Ewoms::RestartedGMResSolver< X, Y, F > Class Template Referenceabstract

implements the Generalized Minimal Residual (GMRes) method More...

#include <solvers.hh>

Inheritance diagram for Ewoms::RestartedGMResSolver< X, Y, F >:
Inheritance graph

Public Types

typedef X domain_type
 The domain type of the operator to be inverted. More...
 
typedef Y range_type
 The range type of the operator to be inverted. More...
 
typedef X::field_type field_type
 The field type of the operator to be inverted. More...
 
typedef field_type real_type
 
typedef F basis_type
 The field type of the basis vectors. More...
 

Public Member Functions

template<class L , class P >
 RestartedGMResSolver (L &op, P &prec, real_type reduction, int restart, int maxit, int verbose)
 Set up solver. More...
 
template<class L , class S , class P >
 RestartedGMResSolver (L &op, S &sp, P &prec, real_type reduction, int restart, int maxit, int verbose)
 Set up solver. More...
 
virtual void apply (X &x, X &b, Dune::InverseOperatorResult &res)
 Apply inverse operator. More...
 
virtual const
Ewoms::ConvergenceCriterion< X > & 
convergenceCriterion () const
 Return the criterion to be used to check for convergence of the linear solver. More...
 
virtual
Ewoms::ConvergenceCriterion< X > & 
convergenceCriterion ()
 Return the criterion to be used to check for convergence of the linear solver. More...
 
virtual void setConvergenceCriterion (std::shared_ptr< Ewoms::ConvergenceCriterion< X > > convCrit)
 Set the criterion to be used to check for convergence of the linear solver. More...
 
virtual void apply (X &x, Y &b, Dune::InverseOperatorResult &res)=0
 Apply inverse operator,. More...
 

Detailed Description

template<class X, class Y = X, class F = Y>
class Ewoms::RestartedGMResSolver< X, Y, F >

implements the Generalized Minimal Residual (GMRes) method

GMRes solves the unsymmetric linear system Ax = b using the Generalized Minimal Residual method as described the SIAM Templates book (http://www.netlib.org/templates/templates.pdf).

Template Parameters
Xtrial vector, vector type of the solution
Ytest vector, vector type of the RHS
Fvector type for orthonormal basis of Krylov space

Member Typedef Documentation

template<class X , class Y = X, class F = Y>
typedef F Ewoms::RestartedGMResSolver< X, Y, F >::basis_type

The field type of the basis vectors.

template<class X , class Y = X, class F = Y>
typedef X Ewoms::RestartedGMResSolver< X, Y, F >::domain_type

The domain type of the operator to be inverted.

template<class X , class Y = X, class F = Y>
typedef X::field_type Ewoms::RestartedGMResSolver< X, Y, F >::field_type

The field type of the operator to be inverted.

template<class X , class Y = X, class F = Y>
typedef Y Ewoms::RestartedGMResSolver< X, Y, F >::range_type

The range type of the operator to be inverted.

template<class X , class Y = X, class F = Y>
typedef field_type Ewoms::RestartedGMResSolver< X, Y, F >::real_type

Constructor & Destructor Documentation

template<class X , class Y = X, class F = Y>
template<class L , class P >
Ewoms::RestartedGMResSolver< X, Y, F >::RestartedGMResSolver ( L &  op,
P &  prec,
real_type  reduction,
int  restart,
int  maxit,
int  verbose 
)
inline

Set up solver.

Parameters
restartnumber of GMRes cycles before restart

References Ewoms::InverseOperator< X, Y >::setConvergenceCriterion().

template<class X , class Y = X, class F = Y>
template<class L , class S , class P >
Ewoms::RestartedGMResSolver< X, Y, F >::RestartedGMResSolver ( L &  op,
S &  sp,
P &  prec,
real_type  reduction,
int  restart,
int  maxit,
int  verbose 
)
inline

Set up solver.

Parameters
restartnumber of GMRes cycles before restart

References Ewoms::InverseOperator< X, Y >::setConvergenceCriterion().

Member Function Documentation

template<class X, class Y>
virtual void Ewoms::InverseOperator< X, Y >::apply ( X &  x,
Y &  b,
Dune::InverseOperatorResult &  res 
)
pure virtualinherited

Apply inverse operator,.

Warning
Note: right hand side b may be overwritten!
Parameters
xThe left hand side to store the result in.
bThe right hand side
resObject to store the statistics about applying the operator.

Implemented in Ewoms::GeneralizedPCGSolver< X >, Ewoms::MINRESSolver< X >, Ewoms::BiCGSTABSolver< X >, Ewoms::CGSolver< X >, Ewoms::GradientSolver< X >, and Ewoms::LoopSolver< X >.

template<class X , class Y = X, class F = Y>
virtual void Ewoms::RestartedGMResSolver< X, Y, F >::apply ( X &  x,
X &  b,
Dune::InverseOperatorResult &  res 
)
inlinevirtual

Apply inverse operator.

References Ewoms::InverseOperator< X, Y >::convergenceCriterion().

template<class X, class Y>
virtual const Ewoms::ConvergenceCriterion<X>& Ewoms::InverseOperator< X, Y >::convergenceCriterion ( ) const
inlinevirtualinherited

Return the criterion to be used to check for convergence of the linear solver.

Referenced by Ewoms::RestartedGMResSolver< X, Y, F >::apply().

template<class X, class Y>
virtual Ewoms::ConvergenceCriterion<X>& Ewoms::InverseOperator< X, Y >::convergenceCriterion ( )
inlinevirtualinherited

Return the criterion to be used to check for convergence of the linear solver.

template<class X, class Y>
virtual void Ewoms::InverseOperator< X, Y >::setConvergenceCriterion ( std::shared_ptr< Ewoms::ConvergenceCriterion< X > >  convCrit)
inlinevirtualinherited

Set the criterion to be used to check for convergence of the linear solver.

Referenced by Ewoms::RestartedGMResSolver< X, Y, F >::RestartedGMResSolver().


The documentation for this class was generated from the following file: