OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BelosBottomSolver< Level > Class Template Reference

Interface to Belos solvers of the Trilinos package. More...

#include <BelosBottomSolver.h>

Inheritance diagram for BelosBottomSolver< Level >:
Inheritance graph
[legend]
Collaboration diagram for BelosBottomSolver< Level >:
Collaboration graph
[legend]

Public Types

typedef amr::matrix_t matrix_t
 
typedef amr::vector_t vector_t
 
typedef amr::scalar_t scalar_t
 
typedef amr::multivector_t mv_t
 
typedef amr::operator_t op_t
 
typedef amr::local_ordinal_t lo_t
 
typedef amr::global_ordinal_t go_t
 
typedef amr::node_t node_t
 
typedef Belos::SolverManager
< scalar_t, mv_t, op_t
solver_t
 
typedef Belos::LinearProblem
< scalar_t, mv_t, op_t
problem_t
 
typedef AmrPreconditioner
< matrix_t, Level > 
prec_t
 

Public Member Functions

 BelosBottomSolver (std::string solvertype="Pseudoblock CG", const std::shared_ptr< prec_t > &prec_p=nullptr)
 
void solve (const Teuchos::RCP< mv_t > &x, const Teuchos::RCP< mv_t > &b)
 
void setOperator (const Teuchos::RCP< matrix_t > &A, Level *level_p=nullptr)
 
std::size_t getNumIters ()
 
- Public Member Functions inherited from BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >
 BottomSolver ()
 
virtual ~BottomSolver ()
 
virtual void solve (const Teuchos::RCP< amr::multivector_t > &x, const Teuchos::RCP< amr::multivector_t > &b)=0
 
virtual void setOperator (const Teuchos::RCP< amr::matrix_t > &A, Level *level_p=nullptr)=0
 
bool hasOperator () const
 

Private Member Functions

void initSolver_m (std::string solvertype)
 

Private Attributes

Teuchos::RCP< problem_tproblem_mp
 represents linear problem More...
 
Teuchos::RCP
< Teuchos::ParameterList > 
params_mp
 parameter list of solver More...
 
Teuchos::RCP< solver_tsolver_mp
 solver instance More...
 
std::shared_ptr< prec_tprec_mp
 preconditioner More...
 
Teuchos::RCP< matrix_tA_mp
 copy of matrix (has to be positive definite) More...
 
scalar_t reltol_m
 relative tolerance More...
 
int maxiter_m
 allowed number of steps for iterative solvers More...
 

Additional Inherited Members

- Protected Attributes inherited from BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >
bool isInitialized_m
 

Detailed Description

template<class Level>
class BelosBottomSolver< Level >

Interface to Belos solvers of the Trilinos package.

Definition at line 17 of file BelosBottomSolver.h.

Member Typedef Documentation

template<class Level >
typedef amr::global_ordinal_t BelosBottomSolver< Level >::go_t

Definition at line 28 of file BelosBottomSolver.h.

template<class Level >
typedef amr::local_ordinal_t BelosBottomSolver< Level >::lo_t

Definition at line 27 of file BelosBottomSolver.h.

template<class Level >
typedef amr::matrix_t BelosBottomSolver< Level >::matrix_t

Definition at line 22 of file BelosBottomSolver.h.

template<class Level >
typedef amr::multivector_t BelosBottomSolver< Level >::mv_t

Definition at line 25 of file BelosBottomSolver.h.

template<class Level >
typedef amr::node_t BelosBottomSolver< Level >::node_t

Definition at line 29 of file BelosBottomSolver.h.

template<class Level >
typedef amr::operator_t BelosBottomSolver< Level >::op_t

Definition at line 26 of file BelosBottomSolver.h.

template<class Level >
typedef AmrPreconditioner<matrix_t, Level> BelosBottomSolver< Level >::prec_t

Definition at line 34 of file BelosBottomSolver.h.

template<class Level >
typedef Belos::LinearProblem<scalar_t, mv_t, op_t> BelosBottomSolver< Level >::problem_t

Definition at line 32 of file BelosBottomSolver.h.

template<class Level >
typedef amr::scalar_t BelosBottomSolver< Level >::scalar_t

Definition at line 24 of file BelosBottomSolver.h.

template<class Level >
typedef Belos::SolverManager<scalar_t, mv_t, op_t> BelosBottomSolver< Level >::solver_t

Definition at line 31 of file BelosBottomSolver.h.

template<class Level >
typedef amr::vector_t BelosBottomSolver< Level >::vector_t

Definition at line 23 of file BelosBottomSolver.h.

Constructor & Destructor Documentation

template<class Level >
BelosBottomSolver< Level >::BelosBottomSolver ( std::string  solvertype = "Pseudoblock CG",
const std::shared_ptr< prec_t > &  prec_p = nullptr 
)
Parameters
solvertypeto use
precondpreconditioner of matrix

Definition at line 7 of file BelosBottomSolver.hpp.

References BelosBottomSolver< Level >::initSolver_m().

Here is the call graph for this function:

Member Function Documentation

template<class Level >
std::size_t BelosBottomSolver< Level >::getNumIters ( )
virtual
Returns
the number of required iterations

Implements BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >.

Definition at line 80 of file BelosBottomSolver.hpp.

template<class Level >
void BelosBottomSolver< Level >::initSolver_m ( std::string  solvertype)
private

Create a solver instance

Parameters
solvertypeto create

Definition at line 90 of file BelosBottomSolver.hpp.

Referenced by BelosBottomSolver< Level >::BelosBottomSolver().

template<class Level >
void BelosBottomSolver< Level >::setOperator ( const Teuchos::RCP< matrix_t > &  A,
Level *  level_p = nullptr 
)

Definition at line 51 of file BelosBottomSolver.hpp.

References IpplTimings::getTimer(), IpplTimings::startTimer(), and IpplTimings::stopTimer().

Here is the call graph for this function:

template<class Level >
void BelosBottomSolver< Level >::solve ( const Teuchos::RCP< mv_t > &  x,
const Teuchos::RCP< mv_t > &  b 
)

Definition at line 23 of file BelosBottomSolver.hpp.

References endl().

Here is the call graph for this function:

Member Data Documentation

template<class Level >
Teuchos::RCP<matrix_t> BelosBottomSolver< Level >::A_mp
private

copy of matrix (has to be positive definite)

Definition at line 65 of file BelosBottomSolver.h.

template<class Level >
int BelosBottomSolver< Level >::maxiter_m
private

allowed number of steps for iterative solvers

Definition at line 70 of file BelosBottomSolver.h.

template<class Level >
Teuchos::RCP<Teuchos::ParameterList> BelosBottomSolver< Level >::params_mp
private

parameter list of solver

Definition at line 62 of file BelosBottomSolver.h.

template<class Level >
std::shared_ptr<prec_t> BelosBottomSolver< Level >::prec_mp
private

preconditioner

Definition at line 64 of file BelosBottomSolver.h.

template<class Level >
Teuchos::RCP<problem_t> BelosBottomSolver< Level >::problem_mp
private

represents linear problem

Definition at line 61 of file BelosBottomSolver.h.

template<class Level >
scalar_t BelosBottomSolver< Level >::reltol_m
private

relative tolerance

Definition at line 67 of file BelosBottomSolver.h.

template<class Level >
Teuchos::RCP<solver_t> BelosBottomSolver< Level >::solver_mp
private

solver instance

Definition at line 63 of file BelosBottomSolver.h.


The documentation for this class was generated from the following files: