49 #ifndef _EPETRAEXT_PETSCAIJMATRIX_H_ 50 #define _EPETRAEXT_PETSCAIJMATRIX_H_ 52 #include "Epetra_Object.h" 53 #include "Epetra_CompObject.h" 54 #include "Epetra_RowMatrix.h" 55 #include "Epetra_Map.h" 57 #include "Epetra_MpiComm.h" 59 #include "Epetra_SerialComm.h" 65 #include "src/mat/impls/aij/mpi/mpiaij.h" 70 class Epetra_MultiVector;
117 int ExtractMyRowCopy(
int MyRow,
int Length,
int & NumEntries,
double *Values,
int * Indices)
const;
143 int Multiply(
bool TransA,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
160 int Solve(
bool Upper,
bool Trans,
bool UnitDiagonal,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
242 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 306 virtual void Print(std::ostream & os)
const;
313 const char *
Label()
const {
return(Epetra_Object::Label());};
337 int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const {
355 Epetra_MultiVector& Y)
const 356 {(void)X; (void)Y;
return(-1);}
386 int GetRow(
int Row)
const;
393 Epetra_MpiComm *
Comm_;
Epetra_SerialComm * Comm_
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y...
int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
Epetra_PETScAIJMatrix(Mat Amat)
Epetra_PETScAIJMatrix constructor.
Mat Amat() const
Returns a pointer to the PETSc matrix used to create this object.
virtual const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
int MaxNumEntries() const
Returns the maximum of NumMyRowEntries() over all rows.
int GetRow(int Row) const
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
long long NumGlobalRows64() const
Returns the number of global matrix rows.
int InvRowSums(Epetra_Vector &x) const
Computes the sum of absolute values of the rows of the Epetra_PETScAIJMatrix, results returned in x...
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries.
int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
Returns a copy of the main diagonal in a user-provided vector.
int RightScale(const Epetra_Vector &x)
Scales the Epetra_PETScAIJMatrix on the right with a Epetra_Vector x.
bool LowerTriangular() const
If matrix is lower triangular, this query returns true, otherwise it returns false.
double NormOne() const
Returns the one norm of the global matrix.
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
virtual ~Epetra_PETScAIJMatrix()
Epetra_PETScAIJMatrix Destructor.
Epetra_MultiVector * ImportVector_
int SetUseTranspose(bool UseTranspose)
If set true, transpose of this operator will be applied.
int LeftScale(const Epetra_Vector &x)
Scales the Epetra_PETScAIJMatrix on the left with a Epetra_Vector x.
Epetra_Import * Importer_
const Epetra_Map & RowMatrixRowMap() const
Returns the Row Map object needed for implementing Epetra_RowMatrix.
double NumGlobalNonzeros_
bool UpperTriangular() const
If matrix is upper triangular, this query returns true, otherwise it returns false.
int InvColSums(Epetra_Vector &x) const
Computes the sum of absolute values of the columns of the Epetra_PETScAIJMatrix, results returned in ...
bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
virtual bool HasNormInf() const
Returns true because this class can compute an Inf-norm.
int NumGlobalCols() const
Returns the number of global matrix columns.
long long NumGlobalDiagonals64() const
Returns the number of global nonzero diagonal entries.
long long NumGlobalCols64() const
Returns the number of global matrix columns.
int NumGlobalRows() const
Returns the number of global matrix rows.
int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_PETScAIJMatrix multiplied by a Epetra_MultiVector X in Y...
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.
int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_PETScAIJMatrix multiplied by a Epetra_MultiVector X in Y...
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
double NormInf() const
Returns the infinity norm of the global matrix.
const Epetra_BlockMap & Map() const
Implement the Epetra_SrcDistObjec::Map() function.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator (same as domain)...
const Epetra_Map & RowMatrixColMap() const
Returns the Column Map object needed for implementing Epetra_RowMatrix.
int NumMyRowEntries(int MyRow, int &NumEntries) const
Return the current number of values stored for the specified local row.
int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries.
Epetra_PETScAIJMatrix: A class for constructing and using real-valued sparse compressed row matrices...
virtual void Print(std::ostream &os) const
Print method.
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
long long NumGlobalNonzeros64() const
Returns the number of nonzero entries in the global matrix.
const char * Label() const
Returns a character string describing the operator.
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.