paralleliterativebackend.hh File Reference

Implements a generic linear solver abstraction. More...

#include <ewoms/linear/overlappingbcrsmatrix.hh>
#include <ewoms/linear/overlappingblockvector.hh>
#include <ewoms/linear/overlappingpreconditioner.hh>
#include <ewoms/linear/overlappingscalarproduct.hh>
#include <ewoms/linear/overlappingoperator.hh>
#include <ewoms/linear/solverpreconditioner.hh>
#include <ewoms/common/propertysystem.hh>
#include <ewoms/common/parametersystem.hh>
#include <ewoms/istl/solvers.hh>
#include <dune/grid/io/file/vtk/vtkwriter.hh>
#include <dune/istl/preconditioners.hh>
#include <dune/common/shared_ptr.hh>
#include <dune/common/fvector.hh>
#include <sstream>
#include <iostream>
Include dependency graph for paralleliterativebackend.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >
 Implements a generic linear solver abstraction. More...
 

Namespaces

 Ewoms
 
 Ewoms::Properties
 
 Ewoms::Linear
 

Macros

#define EWOMS_WRAP_ISTL_SOLVER(SOLVER_NAME, ISTL_SOLVER_NAME)
 Macro to create a wrapper around an ISTL solver. More...
 
#define EWOMS_WRAP_ISTL_PRECONDITIONER(PREC_NAME, ISTL_PREC_TYPE)
 
#define EWOMS_WRAP_ISTL_SIMPLE_PRECONDITIONER(PREC_NAME, ISTL_PREC_TYPE)
 

Functions

 Ewoms::Properties::NEW_TYPE_TAG (ParallelIterativeLinearSolver)
 
 Ewoms::Properties::NEW_PROP_TAG (Simulator)
 Manages the simulation time. More...
 
 Ewoms::Properties::NEW_PROP_TAG (Scalar)
 Property to specify the type of scalar values. More...
 
 Ewoms::Properties::NEW_PROP_TAG (JacobianMatrix)
 Type of the global jacobian matrix. More...
 
 Ewoms::Properties::NEW_PROP_TAG (GlobalEqVector)
 Vector containing a quantity of for equation for each DOF of the whole grid. More...
 
 Ewoms::Properties::NEW_PROP_TAG (VertexMapper)
 The mapper to find the global index of a vertex. More...
 
 Ewoms::Properties::NEW_PROP_TAG (GridView)
 The type of the grid view. More...
 
 Ewoms::Properties::NEW_PROP_TAG (BorderListCreator)
 The class which marks the border indices associated with the degrees of freedom on a process boundary. More...
 
 Ewoms::Properties::NEW_PROP_TAG (Overlap)
 
 Ewoms::Properties::NEW_PROP_TAG (OverlappingVector)
 
 Ewoms::Properties::NEW_PROP_TAG (OverlappingMatrix)
 
 Ewoms::Properties::NEW_PROP_TAG (OverlappingScalarProduct)
 
 Ewoms::Properties::NEW_PROP_TAG (OverlappingLinearOperator)
 
 Ewoms::Properties::NEW_PROP_TAG (LinearSolverBackend)
 The type of the linear solver to be used. More...
 
 Ewoms::Properties::NEW_PROP_TAG (LinearSolverWrapper)
 
 Ewoms::Properties::NEW_PROP_TAG (PreconditionerWrapper)
 
 Ewoms::Properties::NEW_PROP_TAG (LinearSolverOverlapSize)
 The size of the algebraic overlap of the linear solver. More...
 
 Ewoms::Properties::NEW_PROP_TAG (LinearSolverTolerance)
 The desired residual reduction of the linear solver. More...
 
 Ewoms::Properties::NEW_PROP_TAG (LinearSolverVerbosity)
 Specifies the verbosity of the linear solver. More...
 
 Ewoms::Properties::NEW_PROP_TAG (LinearSolverMaxIterations)
 Maximum number of iterations eyecuted by the linear solver. More...
 
 Ewoms::Properties::NEW_PROP_TAG (PreconditionerOrder)
 The order of the sequential preconditioner. More...
 
 Ewoms::Properties::NEW_PROP_TAG (PreconditionerRelaxation)
 The relaxation factor of the preconditioner. More...
 
 Ewoms::Properties::NEW_PROP_TAG (GMResRestart)
 number of iterations between solver restarts for the GMRES solver More...
 
 Ewoms::Properties::SET_INT_PROP (ParallelIterativeLinearSolver, LinearSolverVerbosity, 0)
 make the linear solver shut up by default More...
 
 Ewoms::Properties::SET_SCALAR_PROP (ParallelIterativeLinearSolver, PreconditionerRelaxation, 1.0)
 set the preconditioner relaxation parameter to 1.0 by default More...
 
 Ewoms::Properties::SET_INT_PROP (ParallelIterativeLinearSolver, PreconditionerOrder, 0)
 set the preconditioner order to 0 by default More...
 
 Ewoms::Properties::SET_INT_PROP (ParallelIterativeLinearSolver, GMResRestart, 10)
 set the GMRes restart parameter to 10 by default More...
 
 Ewoms::Properties::SET_TYPE_PROP (ParallelIterativeLinearSolver, OverlappingMatrix, Ewoms::Linear::OverlappingBCRSMatrix< typename GET_PROP_TYPE(TypeTag, JacobianMatrix)>)
 
 Ewoms::Properties::SET_TYPE_PROP (ParallelIterativeLinearSolver, Overlap, typename GET_PROP_TYPE(TypeTag, OverlappingMatrix)::Overlap)
 
 Ewoms::Properties::SET_PROP (ParallelIterativeLinearSolver, OverlappingVector)
 
 Ewoms::Properties::SET_PROP (ParallelIterativeLinearSolver, OverlappingScalarProduct)
 
 Ewoms::Properties::SET_PROP (ParallelIterativeLinearSolver, OverlappingLinearOperator)
 
 Ewoms::Properties::SET_TYPE_PROP (ParallelIterativeLinearSolver, LinearSolverBackend, Ewoms::Linear::ParallelIterativeSolverBackend< TypeTag >)
 
 Ewoms::Properties::SET_TYPE_PROP (ParallelIterativeLinearSolver, LinearSolverWrapper, Ewoms::Linear::SolverWrapperBiCGStab< TypeTag >)
 
 Ewoms::Properties::SET_TYPE_PROP (ParallelIterativeLinearSolver, PreconditionerWrapper, Ewoms::Linear::PreconditionerWrapperILU0< TypeTag >)
 
 Ewoms::Properties::SET_SCALAR_PROP (ParallelIterativeLinearSolver, LinearSolverOverlapSize, 2)
 set the default overlap size to 3 More...
 
 Ewoms::Properties::SET_INT_PROP (ParallelIterativeLinearSolver, LinearSolverMaxIterations, 250)
 set the default number of maximum iterations for the linear solver More...
 

Detailed Description

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)

Macro Definition Documentation

#define EWOMS_WRAP_ISTL_PRECONDITIONER (   PREC_NAME,
  ISTL_PREC_TYPE 
)
#define EWOMS_WRAP_ISTL_SIMPLE_PRECONDITIONER (   PREC_NAME,
  ISTL_PREC_TYPE 
)
#define EWOMS_WRAP_ISTL_SOLVER (   SOLVER_NAME,
  ISTL_SOLVER_NAME 
)

Macro to create a wrapper around an ISTL solver.