Advanced Multi-Physics (AMP)
On-Line Documentation
GMRESRSolver.h
Go to the documentation of this file.
1#ifndef included_AMP_GMRESRSolver
2#define included_AMP_GMRESRSolver
3
4#include "AMP/solvers/SolverStrategy.h"
5#include "AMP/solvers/SolverStrategyParameters.h"
6#include "AMP/utils/AMP_MPI.h"
7#include "AMP/utils/Array.h"
8
9#include <string>
10
11namespace AMP::Solver {
12
28template<typename T = double>
30{
31public:
36
47 explicit GMRESRSolver( std::shared_ptr<SolverStrategyParameters> params );
48
54 static std::unique_ptr<SolverStrategy>
55 createSolver( std::shared_ptr<SolverStrategyParameters> params )
56 {
57 return std::make_unique<GMRESRSolver<T>>( params );
58 }
59
63 virtual ~GMRESRSolver() = default;
64
65 std::string type() const override { return "GMRESRSolver"; }
66
74
79 void initialize( std::shared_ptr<const SolverStrategyParameters> params ) override;
80
81protected:
82 void getFromInput( std::shared_ptr<AMP::Database> db );
83
84private:
85 bool d_bRestart = false;
86
89
91
93 std::string d_variant;
94
97 std::vector<AMP::LinearAlgebra::Vector::shared_ptr> d_c;
98
101 std::vector<AMP::LinearAlgebra::Vector::shared_ptr> d_u;
102};
103} // namespace AMP::Solver
104
105#endif
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
GMRESRSolver(std::shared_ptr< SolverStrategyParameters > params)
static std::unique_ptr< SolverStrategy > createSolver(std::shared_ptr< SolverStrategyParameters > params)
std::vector< AMP::LinearAlgebra::Vector::shared_ptr > d_u
void initialize(std::shared_ptr< const SolverStrategyParameters > params) override
void getFromInput(std::shared_ptr< AMP::Database > db)
std::string d_variant
logs number of times the solver is restarted
int d_iMaxKrylovDimension
whether to restart
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr f, AMP::LinearAlgebra::Vector::shared_ptr u) override
std::string type() const override
Return the name of the solver.
std::vector< AMP::LinearAlgebra::Vector::shared_ptr > d_c
virtual ~GMRESRSolver()=default
std::shared_ptr< AMP::Solver::SolverStrategy > shared_ptr



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page