36 #include <lifev/core/operator
/AztecooOperator.hpp> 48 M_name =
"AztecOOOperator";
60 M_pList->sublist (
"Trilinos: AztecOO List" ).set (
"tol", M_tolerance );
62 M_linSolver->SetParameters ( M_pList->sublist (
"Trilinos: AztecOO List" ) );
63 M_linSolver->SetRHS ( &Xcopy );
64 M_linSolver->SetLHS ( &Y );
66 M_linSolver->SetUserOperator ( M_oper.get() );
68 if ( M_prec.get() != 0 )
70 M_linSolver->SetPrecOperator ( (Epetra_Operator*) M_prec.get() );
73 int maxIter ( M_pList->sublist (
"Trilinos: AztecOO List" ).get<
int> (
"max_iter" ) );
74 double tol ( M_pList->sublist (
"Trilinos: AztecOO List" ).get<
double> (
"tol" ) );
77 int retValue = M_linSolver->Iterate (maxIter, tol);
87 M_numIterations += M_linSolver->NumIters();
88 retValue = M_linSolver->Iterate (maxIter, tol);
92 M_numIterations += M_linSolver->NumIters();
95 Real status[AZ_STATUS_SIZE];
96 M_linSolver->GetAllAztecStatus ( status );
98 if ( status[AZ_why] == AZ_normal )
107 if ( status[AZ_why] == AZ_loss )
134 M_linSolver->SetParameters ( M_pList->sublist (
"Trilinos: AztecOO List" ) );
142 M_linSolver->DestroyPreconditioner();
virtual void doResetSolver()
SolverOperatorStatusType M_lossOfAccuracy
Status to see if there is a loss of accuracy.
SolverOperator(std::shared_ptr< Epetra_Comm > comm=std::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD)))
void updateInverseJacobian(const UInt &iQuadPt)
virtual void doSetParameterList()
SolverOperatorStatusType M_converged
Status to see if the solver has converged.
Abstract class which defines the interface of an Invertible Linear Operator.
virtual void doSetOperator()
virtual void doSetPreconditioner()
Epetra_MultiVector vector_Type
Real M_tolerance
Solver tolerance.
virtual int doApplyInverse(const vector_Type &X, vector_Type &Y) const
SolverType_ptr M_linSolver
int M_numIterations
Number of iterations performed by the solver.