ML
Version of the Day
|
ML_Epetra::CrsGraphWrapper: a class to wrap an Epetra_CrsGraph as Epetra_RowMatrix. More...
#include <ml_Epetra_wrap_CrsGraph_as_RowMatrix.H>
Public Member Functions | |
CrsGraphWrapper (const Epetra_CrsGraph &graph, const Epetra_Map &dm, const Epetra_Map &rm, const Epetra_Comm &comm) | |
Constructs a CrsGraphWrapper class. More... | |
virtual | ~CrsGraphWrapper () |
Destructor. | |
int | NumMyRowEntries (int MyRow, int &NumEntries) const |
Returns the number of nonzero entries in MyRow. More... | |
int | MaxNumEntries () const |
Returns the maximum of NumMyRowEntries() over all rows. | |
int | ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const |
Returns a copy of the specified local row in user-provided arrays. More... | |
int | ExtractDiagonalCopy (Epetra_Vector &Diagonal) const |
not implemented, method will throw error and terminate execution. | |
int | Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
not implemented, method will throw error and terminate execution. | |
int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
not implemented, method will throw error and terminate execution. | |
int | InvRowSums (Epetra_Vector &x) const |
not implemented, method will throw error and terminate execution. | |
int | LeftScale (const Epetra_Vector &x) |
not implemented, method will throw error and terminate execution. | |
int | InvColSums (Epetra_Vector &x) const |
not implemented, method will throw error and terminate execution. | |
int | RightScale (const Epetra_Vector &x) |
not implemented, method will throw error and terminate execution. | |
bool | Filled () const |
If FillComplete() has been called, this query returns true, otherwise it returns false. | |
double | NormInf () const |
not implemented, method will throw error and terminate execution. | |
double | NormOne () const |
not implemented, method will throw error and terminate execution. | |
long long | NumGlobalNonzeros () const |
Returns the number of nonzero entries in the global matrix. | |
long long | NumGlobalRows () const |
Returns the number of global matrix rows. | |
long long | NumGlobalCols () const |
Returns the number of global matrix columns. | |
long long | NumGlobalDiagonals () const |
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons. | |
int | NumMyNonzeros () const |
Returns the number of nonzero entries in the calling processor's portion of the matrix. | |
int | NumMyRows () const |
Returns the number of matrix rows owned by the calling processor. | |
int | NumMyCols () const |
Returns the number of matrix columns owned by the calling processor. | |
int | NumMyDiagonals () const |
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons. | |
bool | LowerTriangular () const |
If matrix is lower triangular in local index space, this query returns true, otherwise it returns false. | |
bool | UpperTriangular () const |
If matrix is upper triangular in local index space, this query returns true, otherwise it returns false. | |
const Epetra_Map & | RowMatrixRowMap () const |
Returns the Epetra_Map object associated with the rows of this matrix. | |
const Epetra_Map & | RowMatrixColMap () const |
Returns the Epetra_Map object associated with the columns of this matrix. | |
const Epetra_Import * | RowMatrixImporter () const |
Returns the Epetra_Import object that contains the import operations for distributed operations. | |
const Epetra_BlockMap & | Map () const |
Returns the Epetra_Map object associated with the rows of this matrix, derived from Epetra_Operator. | |
int | SetUseTranspose (bool UseTranspose) |
not implemented, method will always return -1 | |
int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
not implemented, method will throw error and terminate execution. | |
int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
not implemented, method will throw error and terminate execution. | |
const char * | Label () const |
returns the label of this class | |
bool | UseTranspose () const |
returns the usetranspose_ flag | |
bool | HasNormInf () const |
always returns false | |
const Epetra_Comm & | Comm () const |
returns ref to the Epetra_Comm associated with this class | |
const Epetra_Map & | OperatorDomainMap () const |
returns ref to the OperatorDomainMap associated with this class | |
const Epetra_Map & | OperatorRangeMap () const |
returns ref to the OperatorRangeMap associated with this class | |
ML_Epetra::CrsGraphWrapper: a class to wrap an Epetra_CrsGraph as Epetra_RowMatrix.
Wraps a Epetra_CrsGraph as an Epetra_RowMatrix.
Class ML_Epetra::CrsGraphWrapper takes an Epetra_CrsGraph object and wraps it as an Epetra_RowMatrix. It can then be used as input to ML to generate a plain aggegration MG hierarchy. Note that the resulting coarse grid operators are rubbish and need to be replaced before actually applying this hierarchy to something. This class' destructor does not destoy any of the passed objects, so they need to be destoyed separately.
To make use of the full functionality of this class it requires ML to be configured with the following options:
–enable-epetra
|
inline |
Constructs a CrsGraphWrapper class.
Constructs a CrsGraphWrapper class. As this wrapper implements an Epetra_RowMatrix, it can then be used as input to ML to generate a plain aggegration MG hierarchy. Note that the resulting coarse grid operators are rubbish and need to be replaced before actually applying this hierarchy to something.
graph | (In) : ref to Epetra_CrsGraph |
dm | (In) : ref to the DomainMap |
rm | (In) : ref to the RangeMap |
comm | (In) : the Epetra_Comm to be used |
|
inlinevirtual |
Returns a copy of the specified local row in user-provided arrays.
As this class wraps a graph and implements an Epetra_RowMatrix, int-values are taken from the graph and converted to double values.
In | MyRow - Local row to extract. |
In | Length - Length of Values and Indices. |
Out | NumEntries - Number of nonzero entries extracted. |
Out | Values - Extracted values for this row. |
Out | Indices - Extracted global column indices for the corresponding values. |
Implements Epetra_RowMatrix.
References Epetra_CrsGraph::ExtractMyRowCopy().
|
inlinevirtual |
Returns the number of nonzero entries in MyRow.
In | MyRow - Local row. |
Out | NumEntries - Number of nonzero values present. |
Implements Epetra_RowMatrix.
References Epetra_CrsGraph::NumMyIndices().