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

#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_tsolver_t
 
typedef Belos::LinearProblem< scalar_t, mv_t, op_tproblem_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 >

Definition at line 35 of file BelosBottomSolver.h.

Member Typedef Documentation

◆ go_t

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

Definition at line 46 of file BelosBottomSolver.h.

◆ lo_t

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

Definition at line 45 of file BelosBottomSolver.h.

◆ matrix_t

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

Definition at line 40 of file BelosBottomSolver.h.

◆ mv_t

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

Definition at line 43 of file BelosBottomSolver.h.

◆ node_t

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

Definition at line 47 of file BelosBottomSolver.h.

◆ op_t

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

Definition at line 44 of file BelosBottomSolver.h.

◆ prec_t

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

Definition at line 52 of file BelosBottomSolver.h.

◆ problem_t

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

Definition at line 50 of file BelosBottomSolver.h.

◆ scalar_t

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

Definition at line 42 of file BelosBottomSolver.h.

◆ solver_t

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

Definition at line 49 of file BelosBottomSolver.h.

◆ vector_t

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

Definition at line 41 of file BelosBottomSolver.h.

Constructor & Destructor Documentation

◆ BelosBottomSolver()

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 27 of file BelosBottomSolver.hpp.

References BelosBottomSolver< Level >::initSolver_m().

Here is the call graph for this function:

Member Function Documentation

◆ getNumIters()

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 100 of file BelosBottomSolver.hpp.

◆ initSolver_m()

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

Create a solver instance

Parameters
solvertypeto create

Definition at line 110 of file BelosBottomSolver.hpp.

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

◆ setOperator()

template<class Level >
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().

Here is the call graph for this function:

◆ solve()

template<class Level >
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(), and gmsg.

Here is the call graph for this function:

Member Data Documentation

◆ A_mp

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

copy of matrix (has to be positive definite)

Definition at line 83 of file BelosBottomSolver.h.

◆ maxiter_m

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

allowed number of steps for iterative solvers

Definition at line 88 of file BelosBottomSolver.h.

◆ params_mp

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

parameter list of solver

Definition at line 80 of file BelosBottomSolver.h.

◆ prec_mp

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

preconditioner

Definition at line 82 of file BelosBottomSolver.h.

◆ problem_mp

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

represents linear problem

Definition at line 79 of file BelosBottomSolver.h.

◆ reltol_m

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

relative tolerance

Definition at line 85 of file BelosBottomSolver.h.

◆ solver_mp

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

solver instance

Definition at line 81 of file BelosBottomSolver.h.


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