38 #ifndef _SolverAmesos_H 39 #define _SolverAmesos_H 43 #include <Amesos_BaseSolver.h> 44 #include <Amesos_ConfigDefs.h> 45 #include <Teuchos_ParameterList.hpp> 48 #include <lifev/core/array/VectorEpetra.hpp> 49 #include <lifev/core/array/MatrixEpetra.hpp> 50 #include <lifev/core/util/Displayer.hpp> 146 void setupPreconditioner (
const GetPot& dataFile,
const std::string& section );
156 void showMe ( std::ostream& output = std::cout )
const;
180 void setDataFromGetPot (
const GetPot& dataFile,
const std::string& section );
187 template <
typename ParameterType>
188 void setParameter (
const std::string& name,
const ParameterType value )
190 M_trilinosParameterList.set ( name, value );
206 M_trilinosParameterList = list;
239 return M_trilinosParameterList;
253 void createSolver (
const std::string& solverType );
VectorEpetra - The Epetra Vector format Wrapper.
Amesos_BaseSolver * M_solver
void printStatus()
Display status of the solver.
void importFromHDF5(std::string const &fileName, std::string const &matrixName="matrix")
Read a matrix from a HDF5 (.h5) file.
std::shared_ptr< matrix_type > matrix_ptrtype
MatrixEpetra< Real > matrix_type
~SolverAmesos()
Destructor.
Epetra_LinearProblem M_problem
const Teuchos::ParameterList & parametersList() const
Get the current parameters list.
std::shared_ptr< comm_Type > commPtr_Type
int32_type Int
Generic integer data.
Real trueResidual()
Return the true residual.
void updateInverseJacobian(const UInt &iQuadPt)
Real computeResidual(const vector_type &solution, const vector_type &rhs)
Compute the residual.
void setOperator(const Epetra_Operator &oper)
Method to set a general linear operator (of class derived from Epetra_Operator) defining the linear s...
std::shared_ptr< VectorEpetra > vector_ptrtype
std::shared_ptr< prec_raw_type > prec_type
Int setMatrix(const matrix_type &matrix)
Set matrix from MatrixEpetra.
matrix_type::matrix_ptrtype M_matrix
Int solveSystem(vector_type &rhsFull, vector_type &solution, const matrix_ptrtype &)
Solves the system and returns the number of iterations.
void setReusePreconditioner(const bool &)
Specify if the preconditioner should be reuse or not.
void setTolerance(const Real tolerance)
Set the tolerance of the solver.
SolverAmesos - Class to wrap linear solver.
void showMe(std::ostream &output=std::cout) const
Print informations about the solver.
double Real
Generic real data.
Teuchos::ParameterList M_trilinosParameterList
SolverAmesos(const commPtr_Type &comm)
Default constructor.
Int numIterations()
Return the total number of iterations.
void resetPreconditioner()
Delete the stored preconditioner.
bool isPreconditionerSet() const
Return true if the preconditioner is set.
void setParametersList(const Teuchos::ParameterList &list)
Set the current parameters list.
void setMaxNumIterations(const Int maxIter=-1)
Set the tolerance and the maximum number of iterations.
Displayer - This class is used to display messages in parallel simulations.
void setParameters()
Set the current parameters with the internal parameters list.