3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
Dumux::GSCGBackend Class Reference

Sequential GS-preconditioned CG solver. More...

#include <dumux/linear/seqsolverbackend.hh>

Inheritance diagram for Dumux::GSCGBackend:
Inheritance graph

Description

Sequential GS-preconditioned CG solver.

Solver: CG (conjugate gradient) is an iterative method for solving linear systems with a symmetric, positive definite matrix.
See: Helfenstein, R., Koko, J. (2010). "Parallel preconditioned conjugate gradient algorithm on GPU", Journal of Computational and Applied Mathematics, Volume 236, Issue 15, Pages 3584–3590, http://dx.doi.org/10.1016/j.cam.2011.04.025.

Preconditioner: GS Gauss-Seidel method. It can be damped by the relaxation parameter LinearSolver.PreconditionerRelaxation. In each preconditioning step, it is applied as often as given by the parameter LinearSolver.PreconditionerIterations.
See: Golub, G. H., and Van Loan, C. F. (2012). Matrix computations. JHU Press.

Public Types

using Scalar = double

Public Member Functions

template<class Matrix, class Vector>
bool solve (const Matrix &A, Vector &x, const Vector &b)
std::string name () const
 LinearSolver (const std::string &paramGroup="")
 Contruct the solver.
const std::string & paramGroup () const
 the parameter group for getting parameter from the parameter tree
int verbosity () const
 the verbosity level
void setVerbosity (int v)
 set the verbosity level
int maxIter () const
 the maximum number of linear solver iterations
void setMaxIter (int i)
 set the maximum number of linear solver iterations
double residReduction () const
 the linear solver residual reduction
void setResidualReduction (double r)
 set the linear solver residual reduction
double relaxation () const
 the linear solver relaxation factor
void setRelaxation (double r)
 set the linear solver relaxation factor
int precondIter () const
 the number of preconditioner iterations
void setPrecondIter (int i)
 set the number of preconditioner iterations
int precondVerbosity () const
 the preconditioner verbosity
void setPrecondVerbosity (int verbosityLevel)
 set the preconditioner verbosity

Member Typedef Documentation

◆ Scalar

using Dumux::LinearSolver::Scalar = double
inherited

export Scalar type (might be needed to set parameters from output) TODO: Do we need this?

Member Function Documentation

◆ LinearSolver()

Dumux::LinearSolver::LinearSolver ( const std::string & paramGroup = "")
inline

Contruct the solver.

Note
Read parameters from the parameter tree
  • LinearSolver.Verbosity the verbosity level of the linear solver
  • LinearSolver.MaxIterations the maximum iterations of the solver
  • LinearSolver.ResidualReduction the residual reduction threshold, i.e. stopping criterion
  • LinearSolver.Preconditioner.Relaxation precondition relaxation
  • LinearSolver.Preconditioner.Iterations the number of preconditioner iterations
  • LinearSolver.Preconditioner.Verbosity the preconditioner verbosity level

◆ maxIter()

int Dumux::LinearSolver::maxIter ( ) const
inlineinherited

the maximum number of linear solver iterations

◆ name()

std::string Dumux::GSCGBackend::name ( ) const
inline

◆ paramGroup()

const std::string & Dumux::LinearSolver::paramGroup ( ) const
inlineinherited

the parameter group for getting parameter from the parameter tree

◆ precondIter()

int Dumux::LinearSolver::precondIter ( ) const
inlineinherited

the number of preconditioner iterations

◆ precondVerbosity()

int Dumux::LinearSolver::precondVerbosity ( ) const
inlineinherited

the preconditioner verbosity

◆ relaxation()

double Dumux::LinearSolver::relaxation ( ) const
inlineinherited

the linear solver relaxation factor

◆ residReduction()

double Dumux::LinearSolver::residReduction ( ) const
inlineinherited

the linear solver residual reduction

◆ setMaxIter()

void Dumux::LinearSolver::setMaxIter ( int i)
inlineinherited

set the maximum number of linear solver iterations

◆ setPrecondIter()

void Dumux::LinearSolver::setPrecondIter ( int i)
inlineinherited

set the number of preconditioner iterations

◆ setPrecondVerbosity()

void Dumux::LinearSolver::setPrecondVerbosity ( int verbosityLevel)
inlineinherited

set the preconditioner verbosity

◆ setRelaxation()

void Dumux::LinearSolver::setRelaxation ( double r)
inlineinherited

set the linear solver relaxation factor

◆ setResidualReduction()

void Dumux::LinearSolver::setResidualReduction ( double r)
inlineinherited

set the linear solver residual reduction

◆ setVerbosity()

void Dumux::LinearSolver::setVerbosity ( int v)
inlineinherited

set the verbosity level

◆ solve()

template<class Matrix, class Vector>
bool Dumux::GSCGBackend::solve ( const Matrix & A,
Vector & x,
const Vector & b )
inline

◆ verbosity()

int Dumux::LinearSolver::verbosity ( ) const
inlineinherited

the verbosity level


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