IFPACK Development

Ifpack_OverlapSolveObject: Provides Overlapped Forward/back solve services for Ifpack. More...
#include <Ifpack_OverlapSolveObject.h>
Public Member Functions  
Ifpack_OverlapSolveObject (char *Label, const Epetra_Comm &Comm)  
Constructor.  
Ifpack_OverlapSolveObject (const Ifpack_OverlapSolveObject &Source)  
Copy constructor.  
virtual  ~Ifpack_OverlapSolveObject () 
Ifpack_OverlapSolveObject Destructor.  
void  SetOverlapMode (Epetra_CombineMode OverlapMode) 
Generate Ifpack_OverlapGraph object using current settings.  
int  SetLowerOperator (Epetra_CrsMatrix *L, bool UseLTrans) 
Define the operator to be used for the lower triangle.  
int  SetDiagonal (Epetra_Vector *D, bool UseDInv) 
Define the vector to be used for the diagonal.  
int  SetUpperOperator (Epetra_CrsMatrix *U, bool UseUTrans) 
Define the operator to be used for the upper triangle.  
int  Solve (bool Trans, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const 
Returns the result of a Ifpack_CrsIlut forward/back solve on a Epetra_MultiVector X in Y (works for Epetra_Vectors also).  
int  Multiply (bool Trans, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const 
Returns the result of multiplying U, D and L in that order on an Epetra_MultiVector X in Y.  
int  Condest (bool Trans, double &ConditionNumberEstimate) const 
Returns the maximum over all the condition number estimate for each local ILU set of factors.  
Epetra_CombineMode  OverlapMode () const 
Returns the overlap mode used to combine terms that are redundantly computed.  
int  NumGlobalNonzeros () const 
Returns the number of nonzero entries in the global graph.  
int  NumMyNonzeros () const 
Returns the number of nonzero entries in the local graph.  
const Epetra_CrsMatrix &  L () const 
Returns the address of the L factor associated with this factored matrix.  
const Epetra_Vector &  D () const 
Returns the address of the D factor associated with this factored matrix.  
const Epetra_CrsMatrix &  U () const 
Returns the address of the L factor associated with this factored matrix.  
const char *  Label () const 
Returns a character string describing the operator.  
int  SetUseTranspose (bool UseTranspose) 
If set true, transpose of this operator will be applied.  
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.  
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.  
double  NormInf () const 
Returns 0.0 because this class cannot compute Infnorm.  
bool  HasNormInf () const 
Returns false because this class cannot compute an Infnorm.  
bool  UseTranspose () const 
Returns the current UseTranspose setting.  
const Epetra_Map &  OperatorDomainMap () const 
Returns the Epetra_Map object associated with the domain of this operator.  
const Epetra_Map &  OperatorRangeMap () const 
Returns the Epetra_Map object associated with the range of this operator.  
const Epetra_Comm &  Comm () const 
Returns the Epetra_BlockMap object associated with the range of this matrix operator.  
Protected Member Functions  
virtual int  SetupXY (bool Trans, const Epetra_MultiVector &Xin, const Epetra_MultiVector &Yin, Epetra_MultiVector *&Xout, Epetra_MultiVector *&Yout) const =0 
Ifpack_OverlapSolveObject: Provides Overlapped Forward/back solve services for Ifpack.
Definition at line 54 of file Ifpack_OverlapSolveObject.h.
int Ifpack_OverlapSolveObject::Apply  (  const Epetra_MultiVector &  X, 
Epetra_MultiVector &  Y  
)  const [inline, virtual] 
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
Note that this implementation of Apply does NOT perform a forward back solve with the LDU factorization. Instead it applies these operators via multiplication with U, D and L respectively. The ApplyInverse() method performs a solve.
In  X  A Epetra_MultiVector of dimension NumVectors to multiply with matrix. 
Out  Y A Epetra_MultiVector of dimension NumVectors containing result. 
Implements Epetra_Operator.
Definition at line 179 of file Ifpack_OverlapSolveObject.h.
References Multiply(), and UseTranspose().
int Ifpack_OverlapSolveObject::ApplyInverse  (  const Epetra_MultiVector &  X, 
Epetra_MultiVector &  Y  
)  const [inline, virtual] 
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
In this implementation, we use several existing attributes to determine how virtual method ApplyInverse() should call the concrete method Solve(). We pass in the UpperTriangular(), the Epetra_CrsMatrix::UseTranspose(), and NoDiagonal() methods. The most notable warning is that if a matrix has no diagonal values we assume that there is an implicit unit diagonal that should be accounted for when doing a triangular solve.
In  X  A Epetra_MultiVector of dimension NumVectors to solve for. 
Out  Y A Epetra_MultiVector of dimension NumVectors containing result. 
Implements Epetra_Operator.
Definition at line 196 of file Ifpack_OverlapSolveObject.h.
References Solve(), and UseTranspose().
int Ifpack_OverlapSolveObject::Condest  (  bool  Trans, 
double &  ConditionNumberEstimate  
)  const 
Returns the maximum over all the condition number estimate for each local ILU set of factors.
This functions computes a local condition number estimate on each processor and return the maximum over all processor of the estimate.
In  Trans If true, solve transpose problem. 
Out  ConditionNumberEstimate  The maximum across all processors of the infinitynorm estimate of the condition number of the inverse of LDU. 
Definition at line 165 of file Ifpack_OverlapSolveObject.cpp.
References Epetra_CrsMatrix::DomainMap(), Epetra_MultiVector::PutScalar(), Epetra_CrsMatrix::RangeMap(), and Solve().
int Ifpack_OverlapSolveObject::Multiply  (  bool  Trans, 
const Epetra_MultiVector &  X,  
Epetra_MultiVector &  Y  
)  const 
Returns the result of multiplying U, D and L in that order on an Epetra_MultiVector X in Y.
In  Trans If true, multiply by L^T, D and U^T in that order. 
In  X  A Epetra_MultiVector of dimension NumVectors to solve for. 
Out  Y A Epetra_MultiVector of dimension NumVectorscontaining result. 
Definition at line 118 of file Ifpack_OverlapSolveObject.cpp.
References Epetra_DistObject::Export(), Epetra_CrsMatrix::Exporter(), Epetra_CrsMatrix::Multiply(), Epetra_MultiVector::ReciprocalMultiply(), and Epetra_MultiVector::Update().
Referenced by Apply().
Epetra_CombineMode Ifpack_OverlapSolveObject::OverlapMode  (  )  const [inline] 
Returns the overlap mode used to combine terms that are redundantly computed.
Since rows of the graph, and any related matrices are multiply owned, some values in the subdomain solves will be computed on multiple processors. The overlap mode is used to determine how the redundant values that come in from other processors will be handled.
Definition at line 132 of file Ifpack_OverlapSolveObject.h.
Referenced by SetOverlapMode().
int Ifpack_OverlapSolveObject::SetUseTranspose  (  bool  UseTranspose  )  [inline, virtual] 
If set true, transpose of this operator will be applied.
This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of 1.
In  UseTranspose If true, multiply by the transpose of operator, otherwise just use operator. 
Implements Epetra_Operator.
Definition at line 165 of file Ifpack_OverlapSolveObject.h.
References UseTranspose().
int Ifpack_OverlapSolveObject::Solve  (  bool  Trans, 
const Epetra_MultiVector &  X,  
Epetra_MultiVector &  Y  
)  const 
Returns the result of a Ifpack_CrsIlut forward/back solve on a Epetra_MultiVector X in Y (works for Epetra_Vectors also).
In  Trans If true, solve transpose problem. 
In  X  A Epetra_MultiVector of dimension NumVectors to solve for. 
Out  Y A Epetra_MultiVector of dimension NumVectorscontaining result. 
Definition at line 86 of file Ifpack_OverlapSolveObject.cpp.
References Epetra_DistObject::Export(), Epetra_CrsMatrix::Exporter(), Epetra_CrsMatrix::Importer(), Epetra_MultiVector::Multiply(), and Epetra_CrsMatrix::Solve().
Referenced by ApplyInverse(), and Condest().