Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag > Class Template Reference

Implements a generic linear solver abstraction. More...

#include <paralleliterativebackend.hh>

Public Member Functions

 ParallelIterativeSolverBackend (const Simulator &simulator)
 
 ~ParallelIterativeSolverBackend ()
 
void setStructureMatrix (const Matrix &M)
 Set the structure of the linear system of equations to be solved. More...
 
bool solve (const Matrix &M, Vector &x, Vector &b)
 Actually solve the linear system of equations. More...
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the linear solver. More...
 

Detailed Description

template<class TypeTag>
class Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >

Implements a generic linear solver abstraction.

This class' intention is to be used in conjunction with the vertex-centered finite volume discretization, so it assumes that the vertices are the only degrees of freedom. It is also capable of parallel executions on arbitrary grids and is generic in the sense that it allows to combine any linear solver implemented by Dune-ISTL with any preconditioner (except the algebraic multigrid preconditioner). To set the linear solver, use

SET_TYPE_PROP(YourTypeTag, LinearSolverWrapper,
Ewoms::Linear::SolverWrapper$SOLVER<TypeTag>);

The possible choices for '$SOLVER' are:

  • Richardson: A fixpoint solver using the Richardson iteration
  • SteepestDescent: The steepest descent solver
  • ConjugatedGradients: A conjugated gradients solver
  • BiCGStab: A stabilized bi-conjugated gradients solver
  • MinRes: A solver based on the minimized residual algorithm
  • RestartedGMRes: A restarted GMRES solver

Chosing the preconditioner works in an analogous way:

SET_TYPE_PROP(YourTypeTag, PreconditionerWrapper,
Ewoms::Linear::PreconditionerWrapper$PRECONDITIONER<TypeTag>);

Where the choices possible for '$PRECONDITIONER' are:

  • Jacobi: A Jacobi preconditioner
  • GaussSeidel: A Gauss-Seidel preconditioner
  • SSOR: A symmetric successive overrelaxation (SSOR) preconditioner
  • SOR: A successive overrelaxation (SOR) preconditioner
  • ILUn: An ILU(n) preconditioner
  • ILU0: An ILU(0) preconditioner. The results of this preconditioner are the same as setting the PreconditionerOrder property to 0 and using the ILU(n) preconditioner. The reason for the existence of ILU0 is that it is computationally cheaper because it does not need to consider things which are only required for higher orders
  • Solver: A BiCGSTAB solver wrapped into the preconditioner interface (may be useful for parallel computations)

Constructor & Destructor Documentation

template<class TypeTag >
Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >::ParallelIterativeSolverBackend ( const Simulator simulator)
inline
template<class TypeTag >
Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >::~ParallelIterativeSolverBackend ( )
inline

Member Function Documentation

template<class TypeTag >
static void Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >::registerParameters ( )
inlinestatic

Register all run-time parameters for the linear solver.

References EWOMS_REGISTER_PARAM.

Referenced by Ewoms::Linear::ParallelAmgBackend< TypeTag >::registerParameters().

template<class TypeTag >
void Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >::setStructureMatrix ( const Matrix &  M)
inline

Set the structure of the linear system of equations to be solved.

This method allocates space an does the necessary communication before actually calling the solve() method. As long as the structure of the linear system does not change, the solve method can be called arbitrarily often.

template<class TypeTag >
bool Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >::solve ( const Matrix &  M,
Vector &  x,
Vector &  b 
)
inline

Actually solve the linear system of equations.

Returns
true if the residual reduction could be achieved, else false.

References EWOMS_GET_PARAM, Ewoms::Simulator< TypeTag >::gridView(), and Ewoms::Simulator< TypeTag >::model().


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