|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
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 () |
| 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 |
Protected Attributes | |
| bool | isInitialized_m |
Private Member Functions | |
| void | initSolver_m (std::string solvertype) |
Private Attributes | |
| Teuchos::RCP< problem_t > | problem_mp |
| represents linear problem | |
| Teuchos::RCP< Teuchos::ParameterList > | params_mp |
| parameter list of solver | |
| Teuchos::RCP< solver_t > | solver_mp |
| solver instance | |
| std::shared_ptr< prec_t > | prec_mp |
| preconditioner | |
| Teuchos::RCP< matrix_t > | A_mp |
| copy of matrix (has to be positive definite) | |
| scalar_t | reltol_m |
| relative tolerance | |
| int | maxiter_m |
| allowed number of steps for iterative solvers | |
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 A_mp, BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >::BottomSolver(), initSolver_m(), maxiter_m, prec_mp, problem_mp, and reltol_m.
|
virtual |
Implements BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >.
Definition at line 100 of file BelosBottomSolver.hpp.
References solver_mp.
|
inherited |
Definition at line 59 of file BottomSolver.h.
|
private |
Create a solver instance
| solvertype | to create |
Definition at line 110 of file BelosBottomSolver.hpp.
References maxiter_m, params_mp, reltol_m, and solver_mp.
Referenced by BelosBottomSolver().
| void BelosBottomSolver< Level >::setOperator | ( | const Teuchos::RCP< matrix_t > & | A, |
| Level * | level_p = nullptr ) |
Definition at line 71 of file BelosBottomSolver.hpp.
References A_mp, IpplTimings::getTimer(), BottomSolver< Teuchos::RCP< amr::matrix_t >, Teuchos::RCP< amr::multivector_t >, Level >::isInitialized_m, prec_mp, problem_mp, IpplTimings::startTimer(), and IpplTimings::stopTimer().
|
pure virtualinherited |
Set the system matrix
| A | system matrix |
| void BelosBottomSolver< Level >::solve | ( | const Teuchos::RCP< mv_t > & | x, |
| const Teuchos::RCP< mv_t > & | b ) |
Definition at line 43 of file BelosBottomSolver.hpp.
References endl(), gmsg, problem_mp, and solver_mp.
|
pure virtualinherited |
Solves
\[ Ax = b \]
| x | left-hand side |
| b | right-hand side |
|
private |
copy of matrix (has to be positive definite)
Definition at line 83 of file BelosBottomSolver.h.
Referenced by BelosBottomSolver(), and setOperator().
|
protectedinherited |
Definition at line 63 of file BottomSolver.h.
Referenced by Amesos2BottomSolver< Level >::setOperator(), BelosBottomSolver< Level >::setOperator(), and MueLuBottomSolver< Level >::setOperator().
|
private |
allowed number of steps for iterative solvers
Definition at line 88 of file BelosBottomSolver.h.
Referenced by BelosBottomSolver(), and initSolver_m().
|
private |
parameter list of solver
Definition at line 80 of file BelosBottomSolver.h.
Referenced by initSolver_m().
|
private |
preconditioner
Definition at line 82 of file BelosBottomSolver.h.
Referenced by BelosBottomSolver(), and setOperator().
|
private |
represents linear problem
Definition at line 79 of file BelosBottomSolver.h.
Referenced by BelosBottomSolver(), setOperator(), and solve().
|
private |
relative tolerance
Definition at line 85 of file BelosBottomSolver.h.
Referenced by BelosBottomSolver(), and initSolver_m().
|
private |
solver instance
Definition at line 81 of file BelosBottomSolver.h.
Referenced by getNumIters(), initSolver_m(), and solve().