Ewoms::GeneralizedPCGSolver< X > Class Template Reference

Generalized preconditioned conjugate gradient solver. More...

#include <solvers.hh>

Inheritance diagram for Ewoms::GeneralizedPCGSolver< X >:
Inheritance graph

Public Types

typedef X domain_type
 The domain type of the operator to be inverted. More...
 
typedef X 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
 

Public Member Functions

template<class L , class P >
 GeneralizedPCGSolver (L &op, P &prec, real_type reduction, int maxit, int verbose, int restart=10)
 Set up nonlinear preconditioned conjugate gradient solver. More...
 
template<class L , class P , class S >
 GeneralizedPCGSolver (L &op, S &sp, P &prec, real_type reduction, int maxit, int verbose, int restart=10)
 Set up nonlinear preconditioned conjugate gradient 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...
 

Detailed Description

template<class X>
class Ewoms::GeneralizedPCGSolver< X >

Generalized preconditioned conjugate gradient solver.

A preconditioned conjugate gradient that allows the preconditioner to change between iterations.

One example for such preconditioner is AMG when used without a direct coarse solver. In this case the number of iterations performed on the coarsest level might change between applications.

In contrast to CGSolver the search directions are stored and the orthogonalization is done explicitly.

Member Typedef Documentation

template<class X >
typedef X Ewoms::GeneralizedPCGSolver< X >::domain_type

The domain type of the operator to be inverted.

template<class X >
typedef X::field_type Ewoms::GeneralizedPCGSolver< X >::field_type

The field type of the operator to be inverted.

template<class X >
typedef X Ewoms::GeneralizedPCGSolver< X >::range_type

The range type of the operator to be inverted.

template<class X >
typedef field_type Ewoms::GeneralizedPCGSolver< X >::real_type

Constructor & Destructor Documentation

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

Set up nonlinear preconditioned conjugate gradient solver.

Parameters
restartWhen to restart the construction of the Krylov search space.

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

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

Set up nonlinear preconditioned conjugate gradient solver.

Parameters
restartWhen to restart the construction of the Krylov search space.

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

Member Function Documentation

template<class X >
virtual void Ewoms::GeneralizedPCGSolver< X >::apply ( X &  x,
X &  b,
Dune::InverseOperatorResult &  res 
)
inlinevirtual
virtual const Ewoms::ConvergenceCriterion<X>& Ewoms::InverseOperator< X, X >::convergenceCriterion ( ) const
inlinevirtualinherited
virtual Ewoms::ConvergenceCriterion<X>& Ewoms::InverseOperator< X, X >::convergenceCriterion ( )
inlinevirtualinherited

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

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

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