ml_epetra_utils.h File Reference

Interface to the Trilinos package Anasazi. More...

#include "ml_common.h"
#include "mpi.h"
#include "ml_include.h"
#include <iostream>

Include dependency graph for ml_epetra_utils.h:

This graph shows which files directly or indirectly include this file:

Functions

int Epetra_ML_matvec (ML_Operator *data, int in, double *p, int out, double *ap)
 Matrix-vector function for Epetra matrices.
int Epetra_ML_getrow (ML_Operator *data, int N_requested_rows, int requested_rows[], int allocated_space, int columns[], double values[], int row_lengths[])
 Getrow function for matrix of type Epetra_RowMatrix.
int Epetra_ML_comm_wrapper (double vec[], void *data)
 Update vec's ghost node via communication.
int EpetraMatrix2MLMatrix (ML *ml_handle, int level, Epetra_RowMatrix *Amat)
 Wraps an Epetra_RowMatrix into an ML_Operators.
int Epetra2MLMatrix (Epetra_RowMatrix *A, ML_Operator *Result)
 Wraps an Epetra_RowMatrix into an ML_Operators, for the given level.
Epetra_CrsMatrixEpetra_MatrixMult (Epetra_RowMatrix *B, Epetra_RowMatrix *Bt)
 Multiplies two Epetra_RowMatrix's, returns the results as an Epetra_CrsMatrix.
Epetra_CrsMatrixEpetra_MatrixAdd (Epetra_RowMatrix *B, Epetra_RowMatrix *Bt, double scalar)
 Adds two Epetra_RowMatrix's, returns the result as an Epetra_CrsMatrix.
int ML_Epetra_CRSinsert (ML_Operator *, int, int *, double *, int)
int ML_Operator2EpetraCrsMatrix (ML_Operator *Ke, Epetra_CrsMatrix *&CrsMatrix, int &MaxNumNonzeros, bool CheckNonzeroRow, double &)
 Converts an ML_Operator into an Epetra_CrsMatrix.
int ML_Operator_Destroy_DiscreteLaplacian ()
int ML_Operator_DiscreteLaplacian (ML_Operator *Op, int SymmetricPattern, double *x_coord, double *y_coord, double *z_coord, double theta, ML_Operator **NewOp)


Detailed Description

Interface to the Trilinos package Anasazi.

Date:
Last update to Doxygen: 22-Jul-04

Function Documentation

int Epetra2MLMatrix Epetra_RowMatrix A,
ML_Operator Result
 

Wraps an Epetra_RowMatrix into an ML_Operators, for the given level.

This function creates an ML_Operator that is based on the input Epetra_RowMatrix. This is a "cheap" wrap in the sense that only function and pointers are created. Data is still coded as an Epetra_RowMatrix. The ML_Operator is set in the specified level of the hierarchy.

Note:
ML requires A->RowMatrixRowMap() == A->OperatorRangeMap()

int Epetra_ML_comm_wrapper double  vec[],
void *  data
 

Update vec's ghost node via communication.

Update vec's ghost node via communication. Note: the length of vec is given by N_local + N_ghost where Amat was created via AZ_matrix_create(N_local); and a 'getrow' function was supplied via AZ_set_MATFREE_getrow(Amat,,,,N_ghost,).

Parameters:
vec Vector containing data. On output, ghost values are updated.
data points to user's data containing matrix values. and communication information.

int Epetra_ML_getrow ML_Operator data,
int  N_requested_rows,
int  requested_rows[],
int  allocated_space,
int  columns[],
double  values[],
int  row_lengths[]
 

Getrow function for matrix of type Epetra_RowMatrix.

Supply local matrix (without ghost node columns) for rows given by requested_rows[0 ... N_requested_rows-1]. Return this information in 'row_lengths, columns, values'. If there is not enough space to complete this operation, return 0. Otherwise, return 1.

Parameters:
data (In) Points to user's data containing matrix values.
N_requested_rows (In) Number of rows for which nonzero are to be returned.
requested_rows (In) Requested_rows[0...N_requested_rows-1] give the row indices of the rows for which nonzero values are returned.
row_lengths (Out) Row_lengths[i] is the number of nonzeros in the row 'requested_rows[i]'
columns,values (Out) Columns[k] and values[k] contains the column number and value of a matrix nonzero where all nonzeros for requested_rows[i] appear before requested_rows[i+1]'s nonzeros. NOTE: Arrays are of size 'allocated_space'.
allocated_space (In) Indicates the space available in 'columns' and 'values' for storing nonzeros. If more space is needed, return 0.

int Epetra_ML_matvec ML_Operator data,
int  in,
double *  p,
int  out,
double *  ap
 

Matrix-vector function for Epetra matrices.

This is the ML matrix-vector wrap for Epetra matrices.

int EpetraMatrix2MLMatrix ML ml_handle,
int  level,
Epetra_RowMatrix Amat
 

Wraps an Epetra_RowMatrix into an ML_Operators.

This function creates an ML_Operator that is based on the input Epetra_RowMatrix. This is a "cheap" wrap in the sense that only function and pointers are created. Data is still coded as an Epetra_RowMatrix.

Note:
ML requires A->RowMatrixRowMap() == A->OperatorRangeMap()

int ML_Operator2EpetraCrsMatrix ML_Operator Ke,
Epetra_CrsMatrix *&  CrsMatrix,
int &  MaxNumNonzeros,
bool  CheckNonzeroRow,
double & 
 

Converts an ML_Operator into an Epetra_CrsMatrix.

This function creates a new Epetra_CrsMatrix, and inserts all the nonzero elements of the ML_Operator in it. This is an expensive conversion, in the sense that the Epetra_RowMatrix is a copy of the input ML_Operator.

Note:
This function can be used with rectangular matrices.


Generated on Thu Sep 18 12:42:33 2008 for ML by doxygen 1.3.9.1