LifeV
RowMatrixPreconditioner Class Referenceabstract

Abstract class to construct preconditioners from a matrix in Epetra_CsrFormat. More...

#include <RowMatrixPreconditioner.hpp>

+ Inheritance diagram for RowMatrixPreconditioner:
+ Collaboration diagram for RowMatrixPreconditioner:

Public Member Functions

 RowMatrixPreconditioner ()
 Empty constructor. More...
 
virtual ~RowMatrixPreconditioner ()
 Destructor. More...
 
int Compute ()
 Compute the preconditioner. More...
 
- Public Member Functions inherited from LinearOperatorAlgebra
virtual ~LinearOperatorAlgebra ()
 Destructor. More...
 
int apply (const VectorEpetra &X, VectorEpetra &Y) const
 Returns the result of a LinearOperator applied to a VectorEpetra X in Y. More...
 
int applyInverse (const VectorEpetra &X, VectorEpetra &Y)
 Returns the result of a LinearOperator inverse applied to an VectorEpetra X in Y. More...
 

Protected Member Functions

virtual int myCompute ()=0
 Abstract method myCompute implemented by the derived class. More...
 

Protected Attributes

rowMatrixPtr_Type M_rowMatrix
 
operatorPtr_Type M_prec
 
pList_Type M_pList
 
typedef Epetra_CrsMatrix rowMatrix_Type
 
typedef std::shared_ptr< rowMatrix_TyperowMatrixPtr_Type
 
typedef Teuchos::ParameterList pList_Type
 

Attribute set methods

void SetRowMatrix (const rowMatrixPtr_Type &rowMatrix)
 Set the row matrix. More...
 
void SetParameterList (const pList_Type pList)
 Set the list of paramenters. More...
 
virtual int SetUseTranspose (bool UseTranspose)
 Transposition. More...
 

Mathematical functions

virtual int Apply (const vector_Type &X, vector_Type &Y) const
 Returns the result of a raw_operator applied to a raw_vector X in Y. More...
 
virtual int ApplyInverse (const vector_Type &X, vector_Type &Y) const
 Returns the result of a raw_operator inverse applied to an raw_vector X in Y. More...
 
virtual double NormInf () const
 Returns the infinity norm of the global matrix. More...
 

Attribute access functions

virtual const char * Label () const
 Returns a character string describing the operator. More...
 
virtual bool UseTranspose () const
 Returns the current UseTranspose setting. More...
 
virtual bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise. More...
 
virtual const comm_TypeComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator. More...
 
virtual const map_TypeOperatorDomainMap () const
 Returns the raw_map object associated with the domain of this operator. More...
 
virtual const map_TypeOperatorRangeMap () const
 Returns the raw_map object associated with the range of this operator. More...
 

Additional Inherited Members

- Public Types inherited from LinearOperatorAlgebra
typedef Epetra_Comm comm_Type
 
typedef std::shared_ptr< comm_TypecommPtr_Type
 
typedef Epetra_Map map_Type
 
typedef std::shared_ptr< map_TypemapPtr_Type
 
typedef std::shared_ptr< const map_TypeconstMapPtr_Type
 
typedef Epetra_Operator operator_Type
 
typedef std::shared_ptr< operator_TypeoperatorPtr_Type
 
typedef Epetra_MultiVector vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 

Detailed Description

Abstract class to construct preconditioners from a matrix in Epetra_CsrFormat.

This class implementents all public methods of the parent class LinearOperator, and additionally introduce the following public methods"

  • SetRowMatrix to specify the matrix in Epetra_CsrMatrix format
  • SetParameterList to specify the list of parameter to be used in the preconditioner
  • Compute do all the operator to compute the preconditioner. This method assert that the parameter are set correctly and then it calls the protected abstract method myCompute.

Concrete instances of the RowMatrixPreconditioner class should implement the protected method myCompute.

Definition at line 45 of file RowMatrixPreconditioner.hpp.

Member Typedef Documentation

◆ rowMatrix_Type

typedef Epetra_CrsMatrix rowMatrix_Type

Definition at line 51 of file RowMatrixPreconditioner.hpp.

◆ rowMatrixPtr_Type

typedef std::shared_ptr<rowMatrix_Type> rowMatrixPtr_Type

Definition at line 52 of file RowMatrixPreconditioner.hpp.

◆ pList_Type

typedef Teuchos::ParameterList pList_Type

Definition at line 53 of file RowMatrixPreconditioner.hpp.

Constructor & Destructor Documentation

◆ RowMatrixPreconditioner()

Empty constructor.

Definition at line 57 of file RowMatrixPreconditioner.hpp.

+ Here is the caller graph for this function:

◆ ~RowMatrixPreconditioner()

virtual ~RowMatrixPreconditioner ( )
inlinevirtual

Destructor.

Definition at line 61 of file RowMatrixPreconditioner.hpp.

Member Function Documentation

◆ SetRowMatrix()

void SetRowMatrix ( const rowMatrixPtr_Type rowMatrix)
inline

Set the row matrix.

Definition at line 66 of file RowMatrixPreconditioner.hpp.

◆ SetParameterList()

void SetParameterList ( const pList_Type  pList)
inline

Set the list of paramenters.

Definition at line 73 of file RowMatrixPreconditioner.hpp.

◆ SetUseTranspose()

virtual int SetUseTranspose ( bool  UseTranspose)
inlinevirtual

Transposition.

Implements LinearOperatorAlgebra.

Definition at line 79 of file RowMatrixPreconditioner.hpp.

◆ Compute()

int Compute ( )
inline

Compute the preconditioner.

Derived classes should implement the protected method myCompute called by this function.

Returns
: 0 success, negative number error, positive number warning

Definition at line 90 of file RowMatrixPreconditioner.hpp.

◆ Apply()

virtual int Apply ( const vector_Type X,
vector_Type Y 
) const
inlinevirtual

Returns the result of a raw_operator applied to a raw_vector X in Y.

Parameters
InX - A raw_vector of dimension NumVectors to multiply with matrix.
OutY -A raw_vector of dimension NumVectors containing result.
Returns
Integer error code, set to 0 if successful.

Implements LinearOperatorAlgebra.

Definition at line 98 of file RowMatrixPreconditioner.hpp.

◆ ApplyInverse()

virtual int ApplyInverse ( const vector_Type X,
vector_Type Y 
) const
inlinevirtual

Returns the result of a raw_operator inverse applied to an raw_vector X in Y.

Parameters
InX - A raw_vector of dimension NumVectors to solve for.
OutY -A raw_vector of dimension NumVectors containing result.
Returns
Integer error code, set to 0 if successful.
Warning
In order to work with AztecOO, any implementation of this method must support the case where X and Y are the same object.

Implements LinearOperatorAlgebra.

Definition at line 103 of file RowMatrixPreconditioner.hpp.

◆ NormInf()

virtual double NormInf ( ) const
inlinevirtual

Returns the infinity norm of the global matrix.

Implements LinearOperatorAlgebra.

Definition at line 108 of file RowMatrixPreconditioner.hpp.

◆ Label()

virtual const char* Label ( ) const
inlinevirtual

Returns a character string describing the operator.

Implements LinearOperatorAlgebra.

Definition at line 118 of file RowMatrixPreconditioner.hpp.

◆ UseTranspose()

virtual bool UseTranspose ( ) const
inlinevirtual

Returns the current UseTranspose setting.

Implements LinearOperatorAlgebra.

Definition at line 124 of file RowMatrixPreconditioner.hpp.

◆ HasNormInf()

virtual bool HasNormInf ( ) const
inlinevirtual

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements LinearOperatorAlgebra.

Definition at line 130 of file RowMatrixPreconditioner.hpp.

◆ Comm()

virtual const comm_Type& Comm ( ) const
inlinevirtual

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements LinearOperatorAlgebra.

Definition at line 136 of file RowMatrixPreconditioner.hpp.

◆ OperatorDomainMap()

virtual const map_Type& OperatorDomainMap ( ) const
inlinevirtual

Returns the raw_map object associated with the domain of this operator.

Implements LinearOperatorAlgebra.

Definition at line 142 of file RowMatrixPreconditioner.hpp.

◆ OperatorRangeMap()

virtual const map_Type& OperatorRangeMap ( ) const
inlinevirtual

Returns the raw_map object associated with the range of this operator.

Implements LinearOperatorAlgebra.

Definition at line 148 of file RowMatrixPreconditioner.hpp.

◆ myCompute()

virtual int myCompute ( )
protectedpure virtual

Abstract method myCompute implemented by the derived class.

Implemented in TwoLevelPreconditioner, IfpackPreconditioner, and MLPreconditioner.

+ Here is the caller graph for this function:

Field Documentation

◆ M_rowMatrix

rowMatrixPtr_Type M_rowMatrix
protected

Definition at line 158 of file RowMatrixPreconditioner.hpp.

◆ M_prec

operatorPtr_Type M_prec
protected

Definition at line 159 of file RowMatrixPreconditioner.hpp.

◆ M_pList

pList_Type M_pList
protected

Definition at line 160 of file RowMatrixPreconditioner.hpp.


The documentation for this class was generated from the following file: