version 3.10-dev
Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes > Class Template Reference

Standard dune-istl iterative linear solvers.

#include <dumux/linear/istlsolvers.hh>

Inheritance diagram for Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >:

Public Member Functions

 IstlIterativeLinearSolver (const ParameterInitializer &params="")
 Constructor for sequential solvers. More...
 
template<class GridView , class DofMapper >
 IstlIterativeLinearSolver (const GridView &gridView, const DofMapper &dofMapper, const ParameterInitializer &params="")
 Constructor for parallel and sequential solvers. More...
 
template<class GridView , class DofMapper >
 IstlIterativeLinearSolver (std::shared_ptr< Comm > communication, std::shared_ptr< ScalarProduct > scalarProduct, const GridView &gridView, const DofMapper &dofMapper, const ParameterInitializer &params="")
 Constructor with custom scalar product and communication. More...
 
IstlSolverResult solve (Matrix &A, XVector &x, BVector &b)
 Solve the linear system Ax = b. More...
 
void setMatrix (std::shared_ptr< Matrix > A)
 Set the matrix A of the linear system Ax = b for reuse. More...
 
void setMatrix (Matrix &A)
 Set the matrix A of the linear system Ax = b for reuse. More...
 
IstlSolverResult solve (XVector &x, BVector &b) const
 Solve the linear system Ax = b where A has been set with setMatrix. More...
 
Scalar norm (const XVector &x) const
 Compute the 2-norm of vector x. More...
 
const std::string & name () const
 The name of the linear solver. More...
 
void setResidualReduction (double residReduction)
 Set the residual reduction tolerance. More...
 
void setMaxIter (std::size_t maxIter)
 Set the maximum number of linear solver iterations. More...
 
void setParams (const ParameterInitializer &params)
 Set the linear solver parameters. More...
 

Constructor & Destructor Documentation

◆ IstlIterativeLinearSolver() [1/3]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::IstlIterativeLinearSolver ( const ParameterInitializer &  params = "")
inline

◆ IstlIterativeLinearSolver() [2/3]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
template<class GridView , class DofMapper >
Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::IstlIterativeLinearSolver ( const GridView &  gridView,
const DofMapper &  dofMapper,
const ParameterInitializer &  params = "" 
)
inline

◆ IstlIterativeLinearSolver() [3/3]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
template<class GridView , class DofMapper >
Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::IstlIterativeLinearSolver ( std::shared_ptr< Comm >  communication,
std::shared_ptr< ScalarProduct >  scalarProduct,
const GridView &  gridView,
const DofMapper &  dofMapper,
const ParameterInitializer &  params = "" 
)
inline

Member Function Documentation

◆ name()

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
const std::string & Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::name ( ) const
inline

◆ norm()

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
Scalar Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::norm ( const XVector &  x) const
inline

◆ setMatrix() [1/2]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
void Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::setMatrix ( Matrix &  A)
inline
Note
The client has to take care of the lifetime management of A

◆ setMatrix() [2/2]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
void Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::setMatrix ( std::shared_ptr< Matrix >  A)
inline

◆ setMaxIter()

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
void Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::setMaxIter ( std::size_t  maxIter)
inline

◆ setParams()

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
void Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::setParams ( const ParameterInitializer &  params)
inline
Parameters
paramsEither a std::string giving a parameter group (parameters are read from input file) or a Dune::ParameterTree
Note
In case of a Dune::ParameterTree, the parameters are passed trait to the linear solver and preconditioner

◆ setResidualReduction()

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
void Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::setResidualReduction ( double  residReduction)
inline

◆ solve() [1/2]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
IstlSolverResult Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::solve ( Matrix &  A,
XVector &  x,
BVector &  b 
)
inline

◆ solve() [2/2]

template<class LinearSolverTraits , class LinearAlgebraTraits , class InverseOperator , class PreconditionerFactory , bool convertMultiTypeLATypes = false>
IstlSolverResult Dumux::Detail::IstlIterativeLinearSolver< LinearSolverTraits, LinearAlgebraTraits, InverseOperator, PreconditionerFactory, convertMultiTypeLATypes >::solve ( XVector &  x,
BVector &  b 
) const
inline

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