37 #ifndef _SOLVEROPERATORALGO_HPP_ 38 #define _SOLVEROPERATORALGO_HPP_ 41 #include <lifev/core/operator
/LinearOperator.hpp> 42 #include <lifev/core/util/FactorySingleton.hpp> 43 #include <lifev/core/util/Factory.hpp> 44 #include <lifev/core/array/VectorEpetra.hpp> 46 #include <Teuchos_ParameterList.hpp> 47 #include <Teuchos_RCPDecl.hpp> 48 #include <Epetra_MpiComm.h> 67 SolverOperatorAlgo ( boost::shared_ptr<Epetra_Comm> comm = boost::shared_ptr<Epetra_Comm> (
new Epetra_SerialComm ) );
108 return M_oper->NormInf();
127 return M_name.c_str();
139 return M_oper->HasNormInf();
145 return M_oper->Comm();
151 return M_oper->OperatorDomainMap();
157 return M_oper->OperatorRangeMap();
virtual const map_Type & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
FactorySingleton< Factory< SolverOperatorAlgo, std::string > > SolverOperatorAlgoFactory
Abstract class which defines the interface of a Linear Operator.
virtual int SetUseTranspose(bool useTranspose)
If set true, transpose of this operator will be applied.
virtual void doSetParameterList()=0
int numCumulIterations() const
Returns the cumul of iterations.
operatorPtr_Type M_prec
The preconditioner operator.
void setOperator(operatorPtr_Type _oper)
bool M_printSubiterationCount
Print the number of iteration (used only for preconditioner LinearSolver)
virtual ~SolverOperatorAlgo()
void updateInverseJacobian(const UInt &iQuadPt)
int numIterations() const
Returns the number of iterations.
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. ...
bool M_useTranspose
Whenever to use the transpose.
virtual const char * Label() const
Returns a character string describing the operator.
void setTolerance(const Real &tolerance)
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.
virtual const comm_Type & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
void resetCumulIterations()
int M_numIterations
Number of iterations performed by the solver.
void setUsedForPreconditioning(const bool &enable)
boost::shared_ptr< Epetra_Comm > M_comm
Communicator.
double Real
Generic real data.
Real M_tolerance
Solver tolerance.
virtual const map_Type & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Epetra_MultiVector vector_Type
virtual void doSetOperator()=0
SolverOperatorAlgo(boost::shared_ptr< Epetra_Comm > comm=boost::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD)))
SolverOperatorStatusType isLossOfAccuracyDetected() const
Returns if a loss of precision has been detected.
double NormInf() const
Returns the infinity norm of the global matrix.
virtual void doResetSolver()=0
std::string M_name
The name of the Operator.
virtual void doSetPreconditioner()=0
Teuchos::RCP< Teuchos::ParameterList > M_pList
The list of Parameter to feed the linear solver.
std::shared_ptr< operator_Type > operatorPtr_Type
void setPreconditioner(operatorPtr_Type _prec)
SolverOperatorStatusType hasConverged() const
Returns if the convergence has been achieved.
operatorPtr_Type M_oper
The operator to be solved.
SolverOperatorStatusType M_converged
Status to see if the solver has converged.
void resetStatus()
Reset the status for the state of convergence and loss of accuracy.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
SolverOperatorStatusType M_lossOfAccuracy
Status to see if there is a loss of accuracy.
void setParameters(const Teuchos::ParameterList &_pList)
virtual int doApplyInverse(const vector_Type &X, vector_Type &Y) const =0
int M_numCumulIterations
Number of cumulated iterations performed by the solver.