44 #ifndef IFPACK_OVERLAPPINGROWMATRIX_H 45 #define IFPACK_OVERLAPPINGROWMATRIX_H 47 #include "Ifpack_ConfigDefs.h" 48 #include "Epetra_RowMatrix.h" 49 #include "Epetra_CombineMode.h" 50 #include "Teuchos_RefCountPtr.hpp" 51 #include "Epetra_Import.h" 52 #include "Epetra_Map.h" 53 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 54 #include "Epetra_IntVector.h" 56 # ifdef IFPACK_NODE_AWARE_CODE 57 # include "Epetra_IntVector.h" 62 class Epetra_BlockMap;
63 class Epetra_CrsMatrix;
73 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 75 int OverlapLevel_in,
int subdomainID);
77 # ifdef IFPACK_NODE_AWARE_CODE 79 int OverlapLevel_in,
int myNodeID);
85 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 88 # ifdef IFPACK_NODE_AWARE_CODE 112 return(MaxNumEntries_);
130 virtual int ExtractMyRowCopy(
int MyRow,
int Length,
int & NumEntries,
double *Values,
int * Indices)
const;
131 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 132 virtual int ExtractGlobalRowCopy(
int MyRow,
int Length,
int & NumEntries,
double* Values,
int* Indices)
const;
134 # ifdef IFPACK_NODE_AWARE_CODE 135 virtual int ExtractGlobalRowCopy(
int MyRow,
int Length,
int & NumEntries,
double* Values,
int* Indices)
const;
162 virtual int Multiply(
bool TransA,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
165 virtual int Solve(
bool Upper,
bool Trans,
bool UnitDiagonal,
const Epetra_MultiVector& X,
166 Epetra_MultiVector& Y)
const 171 virtual int Apply(
const Epetra_MultiVector& X,
172 Epetra_MultiVector& Y)
const;
174 virtual int ApplyInverse(
const Epetra_MultiVector& X,
175 Epetra_MultiVector& Y)
const;
229 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 234 return (
int) NumGlobalNonzeros_;
236 throw "Ifpack_OverlappingRowMatrix::NumGlobalNonzeros: Global indices not int";
260 return(NumGlobalNonzeros_);
284 return(NumMyNonzeros_);
302 return(NumMyDiagonals_);
326 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 329 # ifdef IFPACK_NODE_AWARE_CODE 355 UseTranspose_ = UseTranspose_in;
362 return(UseTranspose_);
372 const Epetra_Comm &
Comm()
const 390 const Epetra_BlockMap& Map()
const;
392 const char* Label()
const{
393 return(Label_.c_str());
396 int OverlapLevel()
const 398 return(OverlapLevel_);
401 int ImportMultiVector(
const Epetra_MultiVector& X,
402 Epetra_MultiVector& OvX,
403 Epetra_CombineMode CM = Insert);
405 int ExportMultiVector(
const Epetra_MultiVector& OvX,
406 Epetra_MultiVector& X,
407 Epetra_CombineMode CM = Add);
408 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 409 inline const Epetra_RowMatrix& A()
const 414 inline Epetra_CrsMatrix& B()
const 419 # ifdef IFPACK_NODE_AWARE_CODE 420 inline const Epetra_RowMatrix& A()
const 425 inline Epetra_CrsMatrix& B()
const 433 #ifndef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 434 # ifndef IFPACK_NODE_AWARE_CODE 435 inline const Epetra_RowMatrix& A()
const 440 inline Epetra_RowMatrix& B()
const;
449 long long NumGlobalNonzeros_;
457 Teuchos::RefCountPtr<const Epetra_Map> Map_;
458 #ifdef HAVE_IFPACK_PARALLEL_SUBDOMAIN_SOLVERS 459 const Epetra_Map *colMap_;
461 # ifdef IFPACK_NODE_AWARE_CODE 462 const Epetra_Map *colMap_;
465 Teuchos::RefCountPtr<const Epetra_Import> Importer_;
467 Teuchos::RefCountPtr<const Epetra_RowMatrix> Matrix_;
468 Teuchos::RefCountPtr<Epetra_CrsMatrix> ExtMatrix_;
469 Teuchos::RefCountPtr<Epetra_Map> ExtMap_;
470 Teuchos::RefCountPtr<Epetra_Import> ExtImporter_;
475 template<
typename int_type>
476 void BuildMap(
int OverlapLevel_in);
480 #endif // IFPACK_OVERLAPPINGROWMATRIX_H virtual int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const
Returns the number of nonzero entries in MyRow.
virtual int MaxNumEntries() const
Returns the maximum of NumMyRowEntries() over all rows.
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 long long NumGlobalNonzeros64() const
Returns the number of nonzero entries in the global matrix.
virtual double NormOne() const
Returns the one norm of the global matrix.
virtual int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons...
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
Returns a copy of the main diagonal in a user-provided vector.
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 LeftScale(const Epetra_Vector &x)
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x (NOT IMPLEMENTED). ...
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 bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
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.
virtual int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
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 long long NumGlobalDiagonals64() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons...
Ifpack_OverlappingRowMatrix: matrix with ghost rows, based on Epetra_RowMatrix.
virtual long long NumGlobalRows64() const
Returns the number of global matrix rows.
int SetUseTranspose(bool UseTranspose_in)
Sets use transpose (not implemented).
virtual long long NumGlobalCols64() const
Returns the number of global matrix columns.
virtual bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
virtual int RightScale(const Epetra_Vector &x)
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x (NOT IMPLEMENTED).
virtual bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
virtual const Epetra_Map & RowMatrixRowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
virtual const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with the columns of this matrix.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual int NumGlobalRows() const
Returns the number of global matrix rows.
virtual int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
virtual double NormInf() const
Returns the infinity norm of the global matrix.
int SetOwnership(bool ownership)
Sets ownership.
bool UseTranspose() const
Returns the current UseTranspose setting.
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...
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
virtual int NumGlobalCols() const
Returns the number of global matrix columns.
virtual const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations...