21 #ifndef BELOS_SOLVER_H
22 #define BELOS_SOLVER_H
26 #include <BelosLinearProblem.hpp>
27 #include <BelosTpetraAdapter.hpp>
28 #include <BelosSolverFactory.hpp>
34 template <
class Level>
36 Teuchos::RCP<amr::multivector_t>,
49 typedef Belos::SolverManager<scalar_t, mv_t, op_t>
solver_t;
50 typedef Belos::LinearProblem<scalar_t, mv_t, op_t>
problem_t;
61 const std::shared_ptr<prec_t>& prec_p =
nullptr);
63 void solve(
const Teuchos::RCP<mv_t>& x,
64 const Teuchos::RCP<mv_t>& b);
67 Level* level_p =
nullptr);
83 Teuchos::RCP<matrix_t>
A_mp;
Tpetra::Operator< scalar_t, local_ordinal_t, global_ordinal_t, node_t > operator_t
KokkosClassic::DefaultNode::DefaultNodeType node_t
Tpetra::Vector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > vector_t
Tpetra::MultiVector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > multivector_t
Tpetra::CrsMatrix< scalar_t, local_ordinal_t, global_ordinal_t, node_t > matrix_t
void initSolver_m(std::string solvertype)
Belos::LinearProblem< scalar_t, mv_t, op_t > problem_t
amr::global_ordinal_t go_t
Teuchos::RCP< Teuchos::ParameterList > params_mp
parameter list of solver
amr::local_ordinal_t lo_t
int maxiter_m
allowed number of steps for iterative solvers
Teuchos::RCP< matrix_t > A_mp
copy of matrix (has to be positive definite)
Teuchos::RCP< solver_t > solver_mp
solver instance
std::shared_ptr< prec_t > prec_mp
preconditioner
void solve(const Teuchos::RCP< mv_t > &x, const Teuchos::RCP< mv_t > &b)
AmrPreconditioner< matrix_t, Level > prec_t
Teuchos::RCP< problem_t > problem_mp
represents linear problem
scalar_t reltol_m
relative tolerance
BelosBottomSolver(std::string solvertype="Pseudoblock CG", const std::shared_ptr< prec_t > &prec_p=nullptr)
void setOperator(const Teuchos::RCP< matrix_t > &A, Level *level_p=nullptr)
Belos::SolverManager< scalar_t, mv_t, op_t > solver_t
std::size_t getNumIters()