LifeV
|
Abstract class which defines the interface of an Invertible Linear Operator. More...
#include <SolverOperatorAlgo.hpp>
Public Types | |
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 | |
SolverOperatorAlgo (boost::shared_ptr< Epetra_Comm > comm=boost::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD))) | |
virtual | ~SolverOperatorAlgo () |
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... | |
Protected Member Functions | |
virtual int | doApplyInverse (const vector_Type &X, vector_Type &Y) const =0 |
virtual void | doSetOperator ()=0 |
virtual void | doSetPreconditioner ()=0 |
virtual void | doSetParameterList ()=0 |
virtual void | doResetSolver ()=0 |
Protected Attributes | |
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... | |
boost::shared_ptr< Epetra_Comm > | M_comm |
Communicator. More... | |
Attribute set methods | |
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 () |
Mathematical methods | |
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... | |
Attribute access methods | |
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... | |
Abstract class which defines the interface of an Invertible Linear Operator.
Definition at line 59 of file SolverOperatorAlgo.hpp.
Enumerator | |
---|---|
undefined | |
yes | |
no |
Definition at line 62 of file SolverOperatorAlgo.hpp.
SolverOperatorAlgo | ( | boost::shared_ptr< Epetra_Comm > | comm = boost::shared_ptr<Epetra_Comm> ( new Epetra_MpiComm ( MPI_COMM_WORLD ) ) | ) |
Definition at line 47 of file SolverOperatorAlgo.cpp.
|
virtual |
Definition at line 59 of file SolverOperatorAlgo.cpp.
|
virtual |
If set true, transpose of this operator will be applied.
Implements LinearOperator.
Definition at line 65 of file SolverOperatorAlgo.cpp.
void setOperator | ( | operatorPtr_Type | _oper | ) |
Definition at line 78 of file SolverOperatorAlgo.cpp.
void setPreconditioner | ( | operatorPtr_Type | _prec | ) |
Definition at line 86 of file SolverOperatorAlgo.cpp.
void setParameters | ( | const Teuchos::ParameterList & | _pList | ) |
Definition at line 94 of file SolverOperatorAlgo.cpp.
void setTolerance | ( | const Real & | tolerance | ) |
Definition at line 100 of file SolverOperatorAlgo.cpp.
void setUsedForPreconditioning | ( | const bool & | enable | ) |
Definition at line 105 of file SolverOperatorAlgo.cpp.
|
inline |
Definition at line 87 of file SolverOperatorAlgo.hpp.
void resetSolver | ( | ) |
Definition at line 110 of file SolverOperatorAlgo.cpp.
|
virtual |
Returns the result of a Epetra_Operator applied to a vector_Type X in Y.
Implements LinearOperator.
Definition at line 117 of file SolverOperatorAlgo.cpp.
|
virtual |
Returns the result of a Epetra_Operator inverse applied to an vector_Type X in Y.
Implements LinearOperator.
Definition at line 125 of file SolverOperatorAlgo.cpp.
|
inlinevirtual |
Returns the infinity norm of the global matrix.
Implements LinearOperator.
Definition at line 106 of file SolverOperatorAlgo.hpp.
|
inline |
Reset the status for the state of convergence and loss of accuracy.
Definition at line 112 of file SolverOperatorAlgo.hpp.
|
inlinevirtual |
Returns a character string describing the operator.
Implements LinearOperator.
Definition at line 125 of file SolverOperatorAlgo.hpp.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements LinearOperator.
Definition at line 131 of file SolverOperatorAlgo.hpp.
|
inlinevirtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements LinearOperator.
Definition at line 137 of file SolverOperatorAlgo.hpp.
|
inlinevirtual |
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Implements LinearOperator.
Definition at line 143 of file SolverOperatorAlgo.hpp.
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements LinearOperator.
Definition at line 149 of file SolverOperatorAlgo.hpp.
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements LinearOperator.
Definition at line 155 of file SolverOperatorAlgo.hpp.
|
inline |
Returns if a loss of precision has been detected.
Definition at line 161 of file SolverOperatorAlgo.hpp.
|
inline |
Returns if the convergence has been achieved.
Definition at line 167 of file SolverOperatorAlgo.hpp.
|
inline |
Returns the number of iterations.
Definition at line 176 of file SolverOperatorAlgo.hpp.
|
inline |
Returns the cumul of iterations.
Definition at line 182 of file SolverOperatorAlgo.hpp.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
The name of the Operator.
Definition at line 198 of file SolverOperatorAlgo.hpp.
|
protected |
The list of Parameter to feed the linear solver.
Definition at line 201 of file SolverOperatorAlgo.hpp.
|
protected |
The preconditioner operator.
Definition at line 204 of file SolverOperatorAlgo.hpp.
|
protected |
The operator to be solved.
Definition at line 207 of file SolverOperatorAlgo.hpp.
|
protected |
Whenever to use the transpose.
Definition at line 210 of file SolverOperatorAlgo.hpp.
|
mutableprotected |
Status to see if there is a loss of accuracy.
Definition at line 213 of file SolverOperatorAlgo.hpp.
|
mutableprotected |
Status to see if the solver has converged.
Definition at line 216 of file SolverOperatorAlgo.hpp.
|
mutableprotected |
Number of iterations performed by the solver.
Definition at line 219 of file SolverOperatorAlgo.hpp.
|
mutableprotected |
Number of cumulated iterations performed by the solver.
Definition at line 222 of file SolverOperatorAlgo.hpp.
|
protected |
Solver tolerance.
Definition at line 225 of file SolverOperatorAlgo.hpp.
|
protected |
Print the number of iteration (used only for preconditioner LinearSolver)
Definition at line 228 of file SolverOperatorAlgo.hpp.
|
protected |
Communicator.
Definition at line 231 of file SolverOperatorAlgo.hpp.