43 #ifndef IFPACK_LOCALFILTER_H 44 #define IFPACK_LOCALFILTER_H 48 #include "Epetra_MpiComm.h" 50 #include "Epetra_SerialComm.h" 52 #include "Epetra_RowMatrix.h" 53 #include "Teuchos_RefCountPtr.hpp" 56 class Epetra_MultiVector;
59 class Epetra_BlockMap;
150 virtual int ExtractMyRowCopy(
int MyRow,
int Length,
int & NumEntries,
double *Values,
int * Indices)
const;
175 virtual int Multiply(
bool TransA,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const 177 if (TransA ==
true) {
186 virtual int Solve(
bool Upper,
bool Trans,
bool UnitDiagonal,
const Epetra_MultiVector& X,
187 Epetra_MultiVector& Y)
const 192 virtual int Apply(
const Epetra_MultiVector& X,
193 Epetra_MultiVector& Y)
const;
196 Epetra_MultiVector& Y)
const;
250 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 327 return(
Matrix_->LowerTriangular());
333 return(
Matrix_->UpperTriangular());
383 const Epetra_Comm &
Comm()
const 401 const Epetra_BlockMap&
Map()
const;
410 Teuchos::RefCountPtr<const Epetra_RowMatrix>
Matrix_;
415 Teuchos::RefCountPtr<Epetra_SerialComm>
SerialComm_;
418 Teuchos::RefCountPtr<Epetra_Map>
Map_;
virtual bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
int SetUseTranspose(bool UseTranspose_in)
Sets use transpose (not implemented).
Teuchos::RefCountPtr< Epetra_Map > Map_
Map based on SerialComm_, containing the local rows only.
bool UseTranspose_
If true, the tranpose of the local matrix will be used.
char Label_[80]
Label for this object.
virtual int InvColSums(Epetra_Vector &x) const
Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x (NO...
virtual long long NumGlobalRows64() const
Returns the number of global matrix rows.
virtual int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
virtual 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.
Ifpack_LocalFilter(const Teuchos::RefCountPtr< const Epetra_RowMatrix > &Matrix)
Constructor.
const Epetra_BlockMap & Map() const
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
int SetOwnership(bool ownership)
Sets ownership.
virtual bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
Returns a copy of the main diagonal in a user-provided vector.
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual double NormOne() const
Returns the one norm of the global matrix.
virtual int MaxNumEntries() const
Returns the maximum of NumMyRowEntries() over all rows.
virtual int RightScale(const Epetra_Vector &x)
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x (NOT IMPLEMENTED).
virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X a...
virtual int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons...
virtual double NormInf() const
Returns the infinity norm of the global matrix.
virtual int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
Teuchos::RefCountPtr< Epetra_SerialComm > SerialComm_
Communicator containing this process only.
std::vector< int > NumEntries_
NumEntries_[i] contains the nonzero entries in row āiā.
virtual long long NumGlobalNonzeros64() const
Returns the number of nonzero entries in the global matrix.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual const Epetra_Map & RowMatrixRowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
std::vector< int > Indices_
Used in ExtractMyRowCopy, to avoid allocation each time.
Ifpack_LocalFilter a class for light-weight extraction of the submatrix corresponding to local rows a...
virtual int LeftScale(const Epetra_Vector &x)
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x (NOT IMPLEMENTED). ...
int MaxNumEntriesA_
Maximum number of nonzero entries in a row for Matrix_.
const char * Label() const
Teuchos::RefCountPtr< const Epetra_RowMatrix > Matrix_
Pointer to the matrix to be preconditioned.
virtual int NumGlobalRows() const
Returns the number of global matrix rows.
virtual bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
bool UseTranspose() const
Returns the current UseTranspose setting.
int NumRows_
Number of rows in the local matrix.
#define IFPACK_RETURN(ifpack_err)
virtual ~Ifpack_LocalFilter()
Destructor.
int NumNonzeros_
Number of nonzeros in the local matrix.
virtual int InvRowSums(Epetra_Vector &x) const
Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x (NOT I...
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
virtual int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
virtual int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
virtual int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons...
virtual const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with the columns of this matrix.
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const
Returns the number of nonzero entries in MyRow.
#define IFPACK_CHK_ERR(ifpack_err)
Teuchos::RefCountPtr< Epetra_Vector > Diagonal_
virtual long long NumGlobalCols64() const
Returns the number of global matrix columns.
int MaxNumEntries_
Maximum number of nonzero entries in a row for the filtered matrix.
virtual int NumGlobalCols() const
Returns the number of global matrix columns.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual long long NumGlobalDiagonals64() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons...
std::vector< double > Values_
Used in ExtractMyRowCopy, to avoid allocation each time.
virtual const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations...