1#ifndef included_AMP_TFQMRSolver
2#define included_AMP_TFQMRSolver
4#include "AMP/solvers/SolverStrategy.h"
5#include "AMP/utils/AMP_MPI.h"
19template<
typename T =
double>
45 explicit TFQMRSolver( std::shared_ptr<SolverStrategyParameters> params );
52 static std::unique_ptr<SolverStrategy>
55 return std::make_unique<TFQMRSolver<T>>( params );
63 std::string
type()
const override {
return "TFQMRSolver"; }
70 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
71 std::shared_ptr<AMP::LinearAlgebra::Vector>
u )
override;
77 void initialize( std::shared_ptr<const SolverStrategyParameters> params )
override;
95 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_r;
96 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_z;
97 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_delta;
98 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_w;
99 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_d;
100 std::shared_ptr<AMP::LinearAlgebra::Vector>
d_v;
102 std::array<AMP::LinearAlgebra::Vector::shared_ptr, 2>
d_u;
103 std::array<AMP::LinearAlgebra::Vector::shared_ptr, 2>
d_y;
std::shared_ptr< AMP::Solver::SolverStrategy > shared_ptr
std::shared_ptr< AMP::LinearAlgebra::Vector > d_d
virtual ~TFQMRSolver()=default
TFQMRSolver(std::shared_ptr< SolverStrategyParameters > params)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_v
std::string d_preconditioner_side
static std::unique_ptr< SolverStrategy > createSolver(std::shared_ptr< SolverStrategyParameters > params)
void allocateScratchVectors(std::shared_ptr< const AMP::LinearAlgebra::Vector > u)
std::array< AMP::LinearAlgebra::Vector::shared_ptr, 2 > d_y
std::array< AMP::LinearAlgebra::Vector::shared_ptr, 2 > d_u
std::shared_ptr< AMP::LinearAlgebra::Vector > d_r
scratch vectors required for TFQMR
void registerOperator(std::shared_ptr< AMP::Operator::Operator > op) override
void initialize(std::shared_ptr< const SolverStrategyParameters > params) override
bool d_bUsesPreconditioner
std::shared_ptr< AMP::LinearAlgebra::Vector > d_z
std::string type() const override
Return the name of the solver.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_delta
void getFromInput(std::shared_ptr< const AMP::Database > db)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_w
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< AMP::LinearAlgebra::Vector > u) override