G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosSolver Class Reference

Detailed Description

Belos solver class.

This class warps the Trilinos Belos package

+ Inheritance diagram for BelosSolver:
+ Collaboration diagram for BelosSolver:

Public Member Functions

 BelosSolver (const SparseMatrix &A, const int solver=BelosSolvers::BiCGStab)
 Constructor (sparse matrix)
 
std::string currentParams () const
 Returns current parameters.
 
Epetra_Operator * getPrecOperator () const
 Returns pointer to preconditioner operator. More...
 
void getSolution (gsVector< real_t > &sol, const int rank=0) const
 Returns solution vector.
 
int numIterations () const
 Returns number of iterations.
 
void set (const std::string &name, const int &value)
 Sets parameters. More...
 
void set (const std::string &name, const bool &value)
 Sets bool paramters.
 
void set (const std::string &name, const double &value)
 Sets double paramters.
 
void set (const std::string &name, const std::string &value)
 Sets string paramters.
 
void setHermitian ()
 Sets Hermitian problem type. More...
 
void setOptions (const gsOptionList &opt)
 Set parameters from option list. More...
 
int setPreconditioner (const std::string &precType, const SparseMatrix &A, const bool &leftprec, const int &OverlapLevel=0)
 OverlapLevel: must be >= 0. If Comm.NumProc() == 1, it is ignored.
 
const Vector & solve (const Vector &b)
 Solves problem for the given a right-hand side vector.
 
std::string status () const
 Returns status and timing of solver. More...
 
std::string timing () const
 Returns timing of the solver.
 
std::string validParams () const
 Returns information about parameters. More...
 
 ~BelosSolver ()
 Destructor.
 

Protected Attributes

int maxIter
 Default maximum number of iterations for all iterative solvers.
 
double tolerance
 Default tolerance for all iterative solvers.
 

Private Member Functions

void solveProblem ()
 Solves problem.
 

Member Function Documentation

Epetra_Operator * getPrecOperator ( ) const

Returns pointer to preconditioner operator.

Returns pointer to internal preconditioner.

void set ( const std::string &  name,
const int &  value 
)
virtual

Sets parameters.

Sets integer paramters.

Implements AbstractSolver.

void setHermitian ( )

Sets Hermitian problem type.

Hermitian problem type used by iterative solver : if matrix is symmetric, specifies it in the linear problem

void setOptions ( const gsOptionList opt)
inherited

Set parameters from option list.

Sets parameters from option list.

std::string status ( ) const
virtual

Returns status and timing of solver.

Returns status of the solver.

Implements AbstractSolver.

std::string validParams ( ) const
virtual

Returns information about parameters.

Returns valid parameters.

Implements AbstractSolver.