LifeV
BelosOperatorAlgebra Class Reference

InvertibleOperator interface to Belos in Trilinos. BelosOperator requires the operator to be solved and the preconditioner in the form of LinearOperator. More...

#include <BelosOperatorAlgebra.hpp>

+ Inheritance diagram for BelosOperatorAlgebra:
+ Collaboration diagram for BelosOperatorAlgebra:

Static Public Member Functions

static solverManagerMap_TypesingletonSolverManagerMap ()
 
static precSideMap_TypesingletonPrecSideMap ()
 

Protected Member Functions

virtual int doApplyInverse (const vector_Type &X, vector_Type &Y) const
 
virtual void doSetOperator ()
 
virtual void doSetPreconditioner ()
 
virtual void doSetParameterList ()
 
void allocateSolver (const SolverManagerType &solverManagerType)
 

Protected Attributes

LinearProblem_ptr M_linProblem
 The linearProblem. More...
 
SolverType_ptr M_solverManager
 The linearSolver. More...
 
Teuchos::RCP< Belos::EpetraPrecOp > M_belosPrec
 Cast to a Belos Preconditioner. More...
 
- Protected Attributes inherited from InvertibleOperator
std::string M_name
 The name of the Operator. More...
 
Teuchos::RCP< Teuchos::ParameterList > M_pList
 The list of Parameter to feed the linear solver. More...
 
Teuchos::RCP< Epetra_OperatorM_prec
 The preconditioner operator (the boost copy makes sure that the preconditioner is still alive; see .cpp file for details) More...
 
std::shared_ptr< Epetra_OperatorM_precBoost
 
Teuchos::RCP< Epetra_OperatorM_oper
 The operator to be solved (the boost copy makes sure that the operator is still alive; see .cpp file for details) More...
 
std::shared_ptr< Epetra_OperatorM_operBoost
 
bool M_useTranspose
 Whenever to use the transpose. More...
 
int M_numIterations
 Number of iterations performed by the solver. More...
 
double M_solutionTime
 Time spent to solve the linear system. More...
 

Static Protected Attributes

static std::unique_ptr< solverManagerMap_TypeS_solverManagerMap
 
static std::unique_ptr< precSideMap_TypeS_precSideMap
 

Public Typedefs and Enumerators

enum  PreconditionerSide { None, Left, Right }
 
enum  SolverManagerType {
  NotAValidSolverManager, BlockCG, PseudoBlockCG, RCG,
  BlockGmres, PseudoBlockGmres, GmresPoly, GCRODR,
  PCPG, Minres, TFQMR
}
 
typedef std::map< std::string, SolverManagerTypesolverManagerMap_Type
 
typedef std::map< std::string, PreconditionerSideprecSideMap_Type
 
typedef Epetra_MultiVector MV
 
typedef Epetra_Operator OP
 
typedef Belos::LinearProblem< double, MV, OPLinearProblem
 
typedef Belos::SolverManager< double, MV, OPSolverType
 
typedef Teuchos::RCP< LinearProblemLinearProblem_ptr
 
typedef Teuchos::RCP< SolverTypeSolverType_ptr
 
 BelosOperatorAlgebra ()
 null constructor and destructor More...
 
 ~BelosOperatorAlgebra ()
 

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
 
- Public Member Functions inherited from InvertibleOperator
 InvertibleOperator ()
 
virtual int SetUseTranspose (bool useTranspose)
 If set true, transpose of this operator will be applied. More...
 
void setOperator (const operatorPtr_Type &_oper)
 
void setPreconditioner (const operatorPtr_Type &_prec)
 
void setParameterList (const Teuchos::ParameterList &_pList)
 
virtual int Apply (const vector_Type &X, vector_Type &Y) const
 Returns the result of a Epetra_Operator applied to a vector_Type X in Y. More...
 
virtual int ApplyInverse (const vector_Type &X, vector_Type &Y) const
 Returns the result of a Epetra_Operator inverse applied to an vector_Type X in Y. More...
 
int NumIter () const
 
double TimeSolver () const
 
double NormInf () const
 Returns the infinity norm of the global matrix. More...
 
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 Epetra_Map object associated with the domain of this operator. More...
 
virtual const map_TypeOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator. 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...
 

Detailed Description

InvertibleOperator interface to Belos in Trilinos. BelosOperator requires the operator to be solved and the preconditioner in the form of LinearOperator.

For a description of the class functionality, please refer to the parent class InvertibleOperator.

Definition at line 40 of file BelosOperatorAlgebra.hpp.

Member Typedef Documentation

◆ solverManagerMap_Type

typedef std::map<std::string, SolverManagerType> solverManagerMap_Type

Definition at line 53 of file BelosOperatorAlgebra.hpp.

◆ precSideMap_Type

typedef std::map<std::string, PreconditionerSide> precSideMap_Type

Definition at line 54 of file BelosOperatorAlgebra.hpp.

◆ MV

Definition at line 55 of file BelosOperatorAlgebra.hpp.

◆ OP

Definition at line 56 of file BelosOperatorAlgebra.hpp.

◆ LinearProblem

typedef Belos::LinearProblem<double,MV,OP> LinearProblem

Definition at line 57 of file BelosOperatorAlgebra.hpp.

◆ SolverType

typedef Belos::SolverManager<double,MV,OP> SolverType

Definition at line 58 of file BelosOperatorAlgebra.hpp.

◆ LinearProblem_ptr

typedef Teuchos::RCP<LinearProblem> LinearProblem_ptr

Definition at line 59 of file BelosOperatorAlgebra.hpp.

◆ SolverType_ptr

typedef Teuchos::RCP<SolverType> SolverType_ptr

Definition at line 60 of file BelosOperatorAlgebra.hpp.

Member Enumeration Documentation

◆ PreconditionerSide

Enumerator
None 
Left 
Right 

Definition at line 47 of file BelosOperatorAlgebra.hpp.

◆ SolverManagerType

Enumerator
NotAValidSolverManager 
BlockCG 
PseudoBlockCG 
RCG 
BlockGmres 
PseudoBlockGmres 
GmresPoly 
GCRODR 
PCPG 
Minres 
TFQMR 

Definition at line 49 of file BelosOperatorAlgebra.hpp.

Constructor & Destructor Documentation

◆ BelosOperatorAlgebra()

null constructor and destructor

Definition at line 29 of file BelosOperatorAlgebra.cpp.

+ Here is the caller graph for this function:

◆ ~BelosOperatorAlgebra()

~BelosOperatorAlgebra ( )
inline

Definition at line 67 of file BelosOperatorAlgebra.hpp.

Member Function Documentation

◆ singletonSolverManagerMap()

BelosOperatorAlgebra::solverManagerMap_Type * singletonSolverManagerMap ( )
static

Definition at line 182 of file BelosOperatorAlgebra.cpp.

◆ singletonPrecSideMap()

BelosOperatorAlgebra::precSideMap_Type * singletonPrecSideMap ( )
static

Definition at line 199 of file BelosOperatorAlgebra.cpp.

◆ doApplyInverse()

int doApplyInverse ( const vector_Type X,
vector_Type Y 
) const
protectedvirtual

Implements InvertibleOperator.

Definition at line 36 of file BelosOperatorAlgebra.cpp.

◆ doSetOperator()

void doSetOperator ( )
protectedvirtual

Implements InvertibleOperator.

Definition at line 67 of file BelosOperatorAlgebra.cpp.

◆ doSetPreconditioner()

void doSetPreconditioner ( )
protectedvirtual

Implements InvertibleOperator.

Definition at line 72 of file BelosOperatorAlgebra.cpp.

◆ doSetParameterList()

void doSetParameterList ( )
protectedvirtual

Implements InvertibleOperator.

Definition at line 97 of file BelosOperatorAlgebra.cpp.

◆ allocateSolver()

void allocateSolver ( const SolverManagerType solverManagerType)
protected

Definition at line 131 of file BelosOperatorAlgebra.cpp.

Field Documentation

◆ M_linProblem

LinearProblem_ptr M_linProblem
protected

The linearProblem.

Definition at line 80 of file BelosOperatorAlgebra.hpp.

◆ M_solverManager

SolverType_ptr M_solverManager
protected

The linearSolver.

Definition at line 82 of file BelosOperatorAlgebra.hpp.

◆ M_belosPrec

Teuchos::RCP<Belos::EpetraPrecOp> M_belosPrec
protected

Cast to a Belos Preconditioner.

Definition at line 84 of file BelosOperatorAlgebra.hpp.

◆ S_solverManagerMap

std::unique_ptr< BelosOperatorAlgebra::solverManagerMap_Type > S_solverManagerMap
staticprotected

Definition at line 85 of file BelosOperatorAlgebra.hpp.

◆ S_precSideMap

std::unique_ptr< BelosOperatorAlgebra::precSideMap_Type > S_precSideMap
staticprotected

Definition at line 86 of file BelosOperatorAlgebra.hpp.


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