19 #ifndef GEOSX_LINEARALGEBRA_SOLVERS_GMRESSOLVER_HPP_ 20 #define GEOSX_LINEARALGEBRA_SOLVERS_GMRESSOLVER_HPP_ 22 #include "linearAlgebra/solvers/KrylovSolver.hpp" 36 template<
typename VECTOR >
122 #endif //GEOSX_LINEARALGEBRA_SOLVERS_GMRESSOLVER_HPP_ typename VectorStorageHelper< VECTOR >::type VectorTemp
Alias for vector type that can be used for temporaries.
This class implements Generalized Minimized RESidual method (right-preconditioned) for monolithic and...
bool m_kspaceInitialized
Flag indicating whether kspace vectors have been created.
virtual string methodName() const override final
Get name of the Krylov subspace method.
integer m_logLevel
solver verbosity level
LinearOperator< Vector > const & m_operator
reference to the operator to be solved
LinearOperator< Vector > const & m_precond
reference to the preconditioning operator
void logProgress(localIndex const iter, real64 const rnorm) const
Output iteration progress (called by implementations).
static VectorTemp createTempVector(Vector const &src)
Helper function to create temporary vectors based on a source vector.
typename KrylovSolver< VECTOR >::VectorTemp VectorTemp
Alias for vector type that can be used for temporaries.
double real64
64-bit floating point type.
array1d< real64 > m_residualNorms
Absolute residual norms at each iteration (if available)
typename Base::Vector Vector
Alias for template parameter.
localIndex m_maxRestart
Number of iterations needed to restart GMRES.
real64 m_tolerance
relative residual norm reduction tolerance
std::int32_t integer
Signed integer type.
array1d< VectorTemp > m_kspace
Storage for Krylov subspace vectors.
localIndex m_maxIterations
maximum number of Krylov iterations
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
virtual ~GMRESsolver() override
Virtual destructor.
GMRESsolver(LinearOperator< Vector > const &matrix, LinearOperator< Vector > const &precond, real64 const tolerance, localIndex const maxIterations, integer const verbosity=0, localIndex const maxRestart=100)
Solver object constructor.
void logResult() const
Output convergence result (called by implementations).
VECTOR Vector
Alias for template parameter.
LinearSolverResult m_result
results of a solve
Base class for Krylov solvers.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
virtual void solve(Vector const &b, Vector &x) const override final
Solve preconditioned system.