Ewoms::LoopSolver< X > Class Template Reference

Preconditioned loop solver. More...

#include <solvers.hh>

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

Public Types

typedef X domain_type
 The domain type of the operator that we do the inverse for. More...
 
typedef X range_type
 The range type of the operator that we do the inverse for. More...
 
typedef X::field_type field_type
 The field type of the operator that we do the inverse for. More...
 
typedef field_type real_type
 

Public Member Functions

template<class L , class P >
 LoopSolver (L &op, P &prec, real_type reduction, int maxit, int verbose)
 Set up Loop solver. More...
 
template<class L , class S , class P >
 LoopSolver (L &op, S &sp, P &prec, real_type reduction, int maxit, int verbose)
 Set up loop solver. More...
 
virtual void apply (X &x, X &b, Dune::InverseOperatorResult &res)
 
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::LoopSolver< X >

Preconditioned loop solver.

Implements a preconditioned loop. Using this class every Preconditioner can be turned into a solver. The solver will apply one preconditioner step in each iteration loop.

Member Typedef Documentation

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

The domain type of the operator that we do the inverse for.

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

The field type of the operator that we do the inverse for.

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

The range type of the operator that we do the inverse for.

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

Constructor & Destructor Documentation

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

Set up Loop solver.

Parameters
opThe operator we solve.
precThe preconditioner to apply in each iteration of the loop. Has to inherit from Preconditioner.
reductionThe relative defect reduction to achieve when applying the operator.
maxitThe maximum number of iteration steps allowed when applying the operator.
verboseThe verbosity level.

Verbose levels are:

  • 0 : print nothing
  • 1 : print initial and final defect and statistics
  • 2 : print line for each iteration

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

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

Set up loop solver.

Parameters
opThe operator we solve.
spThe scalar product to use, e. g. SeqScalarproduct.
precThe preconditioner to apply in each iteration of the loop. Has to inherit from Preconditioner.
reductionThe relative defect reduction to achieve when applying the operator.
maxitThe maximum number of iteration steps allowed when applying the operator.
verboseThe verbosity level.

Verbose levels are:

  • 0 : print nothing
  • 1 : print initial and final defect and statistics
  • 2 : print line for each iteration

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

Member Function Documentation

template<class X >
virtual void Ewoms::LoopSolver< 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: