LifeV
|
Class which defines the interface of an Invertible Linear Operator through belos. More...
#include <BelosOperator.hpp>
Protected Types | |
typedef Epetra_MultiVector | MV |
typedef Epetra_Operator | OP |
typedef Belos::LinearProblem< double, MV, OP > | LinearProblem |
typedef Belos::SolverManager< double, MV, OP > | SolverType |
typedef Teuchos::RCP< LinearProblem > | LinearProblem_ptr |
typedef Teuchos::RCP< SolverType > | SolverType_ptr |
Protected Member Functions | |
virtual int | doApplyInverse (const vector_Type &X, vector_Type &Y) const |
virtual void | doSetOperator () |
virtual void | doSetPreconditioner () |
virtual void | doSetParameterList () |
virtual void | doResetSolver () |
void | allocateSolver (const SolverManagerType &solverManagerType) |
Static Protected Member Functions | |
static SolverManagerType | getSolverManagerTypeFromString (const std::string &str) |
static PreconditionerSide | getPreconditionerSideFromString (const std::string &str) |
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 SolverOperator | |
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... | |
operatorPtr_Type | M_prec |
The preconditioner operator. More... | |
operatorPtr_Type | M_oper |
The operator to be solved. More... | |
bool | M_useTranspose |
Whenever to use the transpose. More... | |
SolverOperatorStatusType | M_lossOfAccuracy |
Status to see if there is a loss of accuracy. More... | |
SolverOperatorStatusType | M_converged |
Status to see if the solver has converged. More... | |
int | M_numIterations |
Number of iterations performed by the solver. More... | |
int | M_numCumulIterations |
Number of cumulated iterations performed by the solver. More... | |
Real | M_tolerance |
Solver tolerance. More... | |
bool | M_printSubiterationCount |
Print the number of iteration (used only for preconditioner LinearSolver) More... | |
std::shared_ptr< Epetra_Comm > | M_comm |
Communicator. More... | |
Public Typedefs and Enumerators | |
enum | PreconditionerSide { None, Left, Right } |
enum | SolverManagerType { NotAValidSolverManager, BlockCG, PseudoBlockCG, RCG, BlockGmres, PseudoBlockGmres, GmresPoly, GCRODR, PCPG, TFQMR, MINRES } |
BelosOperator () | |
null constructor and destructor More... | |
~BelosOperator () | |
Additional Inherited Members | |
Public Types inherited from SolverOperator | |
enum | SolverOperatorStatusType { undefined, yes, no } |
Public Types inherited from LinearOperator | |
typedef Epetra_Comm | comm_Type |
typedef std::shared_ptr< comm_Type > | commPtr_Type |
typedef Epetra_Map | map_Type |
typedef std::shared_ptr< map_Type > | mapPtr_Type |
typedef std::shared_ptr< const map_Type > | constMapPtr_Type |
typedef Epetra_Operator | operator_Type |
typedef std::shared_ptr< operator_Type > | operatorPtr_Type |
typedef Epetra_MultiVector | vector_Type |
typedef std::shared_ptr< vector_Type > | vectorPtr_Type |
Public Member Functions inherited from SolverOperator | |
SolverOperator (std::shared_ptr< Epetra_Comm > comm=std::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD))) | |
virtual | ~SolverOperator () |
virtual int | SetUseTranspose (bool useTranspose) |
If set true, transpose of this operator will be applied. More... | |
void | setOperator (operatorPtr_Type _oper) |
void | setPreconditioner (operatorPtr_Type _prec) |
void | setParameters (const Teuchos::ParameterList &_pList) |
void | setTolerance (const Real &tolerance) |
void | setUsedForPreconditioning (const bool &enable) |
void | resetCumulIterations () |
void | resetSolver () |
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... | |
double | NormInf () const |
Returns the infinity norm of the global matrix. More... | |
void | resetStatus () |
Reset the status for the state of convergence and loss of accuracy. 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_Type & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. More... | |
virtual const map_Type & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. More... | |
virtual const map_Type & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. More... | |
SolverOperatorStatusType | isLossOfAccuracyDetected () const |
Returns if a loss of precision has been detected. More... | |
SolverOperatorStatusType | hasConverged () const |
Returns if the convergence has been achieved. More... | |
int | numIterations () const |
Returns the number of iterations. More... | |
int | numCumulIterations () const |
Returns the cumul of iterations. More... | |
Public Member Functions inherited from LinearOperator | |
virtual | ~LinearOperator () |
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... | |
Class which defines the interface of an Invertible Linear Operator through belos.
Definition at line 55 of file BelosOperator.hpp.
|
protected |
Definition at line 79 of file BelosOperator.hpp.
|
protected |
Definition at line 80 of file BelosOperator.hpp.
|
protected |
Definition at line 81 of file BelosOperator.hpp.
|
protected |
Definition at line 82 of file BelosOperator.hpp.
|
protected |
Definition at line 83 of file BelosOperator.hpp.
|
protected |
Definition at line 84 of file BelosOperator.hpp.
enum PreconditionerSide |
Enumerator | |
---|---|
None | |
Left | |
Right |
Definition at line 62 of file BelosOperator.hpp.
enum SolverManagerType |
Enumerator | |
---|---|
NotAValidSolverManager | |
BlockCG | |
PseudoBlockCG | |
RCG | |
BlockGmres | |
PseudoBlockGmres | |
GmresPoly | |
GCRODR | |
PCPG | |
TFQMR | |
MINRES |
Definition at line 64 of file BelosOperator.hpp.
BelosOperator | ( | ) |
null constructor and destructor
Definition at line 57 of file BelosOperator.cpp.
~BelosOperator | ( | ) |
Definition at line 64 of file BelosOperator.cpp.
|
protectedvirtual |
Implements SolverOperator.
Definition at line 71 of file BelosOperator.cpp.
|
protectedvirtual |
Implements SolverOperator.
Definition at line 115 of file BelosOperator.cpp.
|
protectedvirtual |
Implements SolverOperator.
Definition at line 121 of file BelosOperator.cpp.
|
protectedvirtual |
Implements SolverOperator.
Definition at line 131 of file BelosOperator.cpp.
|
protectedvirtual |
Implements SolverOperator.
Definition at line 291 of file BelosOperator.cpp.
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
The linearProblem.
Definition at line 94 of file BelosOperator.hpp.
|
protected |
The linearSolver.
Definition at line 96 of file BelosOperator.hpp.
|
protected |
Cast to a Belos Preconditioner.
Definition at line 98 of file BelosOperator.hpp.