OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#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 () |
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_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 | |
Protected Attributes inherited from BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level > | |
bool | isInitialized_m |
Definition at line 35 of file BelosBottomSolver.h.
typedef amr::global_ordinal_t BelosBottomSolver< Level >::go_t |
Definition at line 46 of file BelosBottomSolver.h.
typedef amr::local_ordinal_t BelosBottomSolver< Level >::lo_t |
Definition at line 45 of file BelosBottomSolver.h.
typedef amr::matrix_t BelosBottomSolver< Level >::matrix_t |
Definition at line 40 of file BelosBottomSolver.h.
typedef amr::multivector_t BelosBottomSolver< Level >::mv_t |
Definition at line 43 of file BelosBottomSolver.h.
typedef amr::node_t BelosBottomSolver< Level >::node_t |
Definition at line 47 of file BelosBottomSolver.h.
typedef amr::operator_t BelosBottomSolver< Level >::op_t |
Definition at line 44 of file BelosBottomSolver.h.
typedef AmrPreconditioner<matrix_t, Level> BelosBottomSolver< Level >::prec_t |
Definition at line 52 of file BelosBottomSolver.h.
typedef Belos::LinearProblem<scalar_t, mv_t, op_t> BelosBottomSolver< Level >::problem_t |
Definition at line 50 of file BelosBottomSolver.h.
typedef amr::scalar_t BelosBottomSolver< Level >::scalar_t |
Definition at line 42 of file BelosBottomSolver.h.
typedef Belos::SolverManager<scalar_t, mv_t, op_t> BelosBottomSolver< Level >::solver_t |
Definition at line 49 of file BelosBottomSolver.h.
typedef amr::vector_t BelosBottomSolver< Level >::vector_t |
Definition at line 41 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 27 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 100 of file BelosBottomSolver.hpp.
|
private |
Create a solver instance
solvertype | to create |
Definition at line 110 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 71 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 | ||
) |
|
private |
copy of matrix (has to be positive definite)
Definition at line 83 of file BelosBottomSolver.h.
|
private |
allowed number of steps for iterative solvers
Definition at line 88 of file BelosBottomSolver.h.
|
private |
parameter list of solver
Definition at line 80 of file BelosBottomSolver.h.
|
private |
preconditioner
Definition at line 82 of file BelosBottomSolver.h.
|
private |
represents linear problem
Definition at line 79 of file BelosBottomSolver.h.
|
private |
relative tolerance
Definition at line 85 of file BelosBottomSolver.h.
|
private |
solver instance
Definition at line 81 of file BelosBottomSolver.h.