OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Interface to Belos solvers of the Trilinos package. More...
#include <BelosBottomSolver.h>
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 () |
![]() | |
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_t > | problem_mp |
represents linear problem More... | |
Teuchos::RCP < Teuchos::ParameterList > | params_mp |
parameter list of solver More... | |
Teuchos::RCP< solver_t > | solver_mp |
solver instance More... | |
std::shared_ptr< prec_t > | prec_mp |
preconditioner More... | |
Teuchos::RCP< matrix_t > | A_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 | |
![]() | |
bool | isInitialized_m |
Interface to Belos solvers of the Trilinos package.
Definition at line 17 of file BelosBottomSolver.h.
typedef amr::global_ordinal_t BelosBottomSolver< Level >::go_t |
Definition at line 28 of file BelosBottomSolver.h.
typedef amr::local_ordinal_t BelosBottomSolver< Level >::lo_t |
Definition at line 27 of file BelosBottomSolver.h.
typedef amr::matrix_t BelosBottomSolver< Level >::matrix_t |
Definition at line 22 of file BelosBottomSolver.h.
typedef amr::multivector_t BelosBottomSolver< Level >::mv_t |
Definition at line 25 of file BelosBottomSolver.h.
typedef amr::node_t BelosBottomSolver< Level >::node_t |
Definition at line 29 of file BelosBottomSolver.h.
typedef amr::operator_t BelosBottomSolver< Level >::op_t |
Definition at line 26 of file BelosBottomSolver.h.
typedef AmrPreconditioner<matrix_t, Level> BelosBottomSolver< Level >::prec_t |
Definition at line 34 of file BelosBottomSolver.h.
typedef Belos::LinearProblem<scalar_t, mv_t, op_t> BelosBottomSolver< Level >::problem_t |
Definition at line 32 of file BelosBottomSolver.h.
typedef amr::scalar_t BelosBottomSolver< Level >::scalar_t |
Definition at line 24 of file BelosBottomSolver.h.
typedef Belos::SolverManager<scalar_t, mv_t, op_t> BelosBottomSolver< Level >::solver_t |
Definition at line 31 of file BelosBottomSolver.h.
typedef amr::vector_t BelosBottomSolver< Level >::vector_t |
Definition at line 23 of file BelosBottomSolver.h.
BelosBottomSolver< Level >::BelosBottomSolver | ( | std::string | solvertype = "Pseudoblock CG" , |
const std::shared_ptr< prec_t > & | prec_p = nullptr |
||
) |
solvertype | to use |
precond | preconditioner of matrix |
Definition at line 7 of file BelosBottomSolver.hpp.
References BelosBottomSolver< Level >::initSolver_m().
|
virtual |
Implements BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >.
Definition at line 80 of file BelosBottomSolver.hpp.
|
private |
Create a solver instance
solvertype | to create |
Definition at line 90 of file BelosBottomSolver.hpp.
Referenced by BelosBottomSolver< Level >::BelosBottomSolver().
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().
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().
|
private |
copy of matrix (has to be positive definite)
Definition at line 65 of file BelosBottomSolver.h.
|
private |
allowed number of steps for iterative solvers
Definition at line 70 of file BelosBottomSolver.h.
|
private |
parameter list of solver
Definition at line 62 of file BelosBottomSolver.h.
|
private |
preconditioner
Definition at line 64 of file BelosBottomSolver.h.
|
private |
represents linear problem
Definition at line 61 of file BelosBottomSolver.h.
|
private |
relative tolerance
Definition at line 67 of file BelosBottomSolver.h.
|
private |
solver instance
Definition at line 63 of file BelosBottomSolver.h.