Advanced Multi-Physics (AMP)
On-Line Documentation
TFQMRSolver.h
Go to the documentation of this file.
1#ifndef included_AMP_TFQMRSolver
2#define included_AMP_TFQMRSolver
3
4#include "AMP/solvers/SolverStrategy.h"
5#include "AMP/utils/AMP_MPI.h"
6
7namespace AMP::Solver {
8
19template<typename T = double>
21{
22public:
26 TFQMRSolver() = default;
27
45 explicit TFQMRSolver( std::shared_ptr<SolverStrategyParameters> params );
46
52 static std::unique_ptr<SolverStrategy>
53 createSolver( std::shared_ptr<SolverStrategyParameters> params )
54 {
55 return std::make_unique<TFQMRSolver<T>>( params );
56 }
57
61 virtual ~TFQMRSolver() = default;
62
63 std::string type() const override { return "TFQMRSolver"; }
64
70 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
71 std::shared_ptr<AMP::LinearAlgebra::Vector> u ) override;
72
77 void initialize( std::shared_ptr<const SolverStrategyParameters> params ) override;
78
83 void registerOperator( std::shared_ptr<AMP::Operator::Operator> op ) override;
84
85protected:
86 void getFromInput( std::shared_ptr<const AMP::Database> db );
87 void allocateScratchVectors( std::shared_ptr<const AMP::LinearAlgebra::Vector> u );
88
89private:
91
93
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;
101
102 std::array<AMP::LinearAlgebra::Vector::shared_ptr, 2> d_u;
103 std::array<AMP::LinearAlgebra::Vector::shared_ptr, 2> d_y;
104};
105} // namespace AMP::Solver
106
107#endif
std::shared_ptr< AMP::Solver::SolverStrategy > shared_ptr
std::shared_ptr< AMP::LinearAlgebra::Vector > d_d
Definition TFQMRSolver.h:99
virtual ~TFQMRSolver()=default
TFQMRSolver(std::shared_ptr< SolverStrategyParameters > params)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_v
std::string d_preconditioner_side
Definition TFQMRSolver.h:92
static std::unique_ptr< SolverStrategy > createSolver(std::shared_ptr< SolverStrategyParameters > params)
Definition TFQMRSolver.h:53
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
Definition TFQMRSolver.h:95
void registerOperator(std::shared_ptr< AMP::Operator::Operator > op) override
void initialize(std::shared_ptr< const SolverStrategyParameters > params) override
std::shared_ptr< AMP::LinearAlgebra::Vector > d_z
Definition TFQMRSolver.h:96
std::string type() const override
Return the name of the solver.
Definition TFQMRSolver.h:63
std::shared_ptr< AMP::LinearAlgebra::Vector > d_delta
Definition TFQMRSolver.h:97
void getFromInput(std::shared_ptr< const AMP::Database > db)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_w
Definition TFQMRSolver.h:98
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< AMP::LinearAlgebra::Vector > u) override



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