|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
Dune::Fem::ConjugateGradientSolver< Operator > Class Template Reference
linear solver using the CG algorithm More...
#include <dune/fem/solver/cginverseoperator.hh>
Inheritance diagram for Dune::Fem::ConjugateGradientSolver< Operator >:

Public Types | |
| typedef Operator | OperatorType |
| type of the operators to invert | |
| typedef OperatorType::DomainFieldType | DomainFieldType |
| field type of the operator's domain vectors | |
| typedef OperatorType::RangeFieldType | RangeFieldType |
| field type of the operator's range vectors | |
| typedef Dune::FieldTraits< RangeFieldType >::real_type | RealType |
| typedef OperatorType::DomainFunctionType | DomainFunctionType |
| type of the operator's domain vectors | |
| typedef OperatorType::RangeFunctionType | RangeFunctionType |
| type of the operator's range vectors | |
| typedef Fem::Operator< RangeFunctionType, DomainFunctionType > | PreconditionerType |
| type of the preconditioner, maps from the range of the operator (the dual space) in it's domain | |
Public Member Functions | |
| ConjugateGradientSolver (const RealType &epsilon, unsigned int maxIterations, int errorMeasure, bool verbose) | |
| constructor | |
| ConjugateGradientSolver (const RealType &epsilon, unsigned int maxIterations, bool verbose, const ParameterReader ¶meter=Parameter::container()) | |
| ConjugateGradientSolver (RealType epsilon, unsigned int maxIterations, const ParameterReader ¶meter=Parameter::container()) | |
| constructor | |
| void | solve (const OperatorType &op, const RangeFunctionType &b, DomainFunctionType &x) const |
| solve \(op( x ) = b\) | |
| void | solve (const OperatorType &op, const PreconditionerType &p, const RangeFunctionType &b, DomainFunctionType &x) const |
| solve \(op( x ) = b\) | |
| unsigned int | iterations () const |
| number of iterations needed for last solve | |
| void | setMaxIterations (unsigned int maxIterations) |
| double | averageCommTime () const |
| return average communication time during last solve | |
Protected Attributes | |
| const RealType | epsilon_ |
| unsigned int | maxIterations_ |
| int | errorMeasure_ |
| const bool | verbose_ |
| double | averageCommTime_ |
| unsigned int | realCount_ |
Detailed Description
template<class Operator>
class Dune::Fem::ConjugateGradientSolver< Operator >
class Dune::Fem::ConjugateGradientSolver< Operator >
linear solver using the CG algorithm
- Parameters
-
Operator type of the operator to invert
Member Typedef Documentation
◆ DomainFieldType
template<class Operator >
| typedef OperatorType::DomainFieldType Dune::Fem::ConjugateGradientSolver< Operator >::DomainFieldType |
field type of the operator's domain vectors
◆ DomainFunctionType
template<class Operator >
| typedef OperatorType::DomainFunctionType Dune::Fem::ConjugateGradientSolver< Operator >::DomainFunctionType |
type of the operator's domain vectors
◆ OperatorType
template<class Operator >
| typedef Operator Dune::Fem::ConjugateGradientSolver< Operator >::OperatorType |
type of the operators to invert
◆ PreconditionerType
template<class Operator >
| typedef Fem::Operator< RangeFunctionType, DomainFunctionType > Dune::Fem::ConjugateGradientSolver< Operator >::PreconditionerType |
type of the preconditioner, maps from the range of the operator (the dual space) in it's domain
◆ RangeFieldType
template<class Operator >
| typedef OperatorType::RangeFieldType Dune::Fem::ConjugateGradientSolver< Operator >::RangeFieldType |
field type of the operator's range vectors
◆ RangeFunctionType
template<class Operator >
| typedef OperatorType::RangeFunctionType Dune::Fem::ConjugateGradientSolver< Operator >::RangeFunctionType |
type of the operator's range vectors
◆ RealType
template<class Operator >
| typedef Dune::FieldTraits<RangeFieldType>::real_type Dune::Fem::ConjugateGradientSolver< Operator >::RealType |
Constructor & Destructor Documentation
◆ ConjugateGradientSolver() [1/3]
template<class Operator >
|
inline |
constructor
- Parameters
-
[in] epsilon tolerance [in] maxIterations maximum number of CG iterations [in] errorMeasure use absolute (0) or relative (1) error [in] verbose verbose output
◆ ConjugateGradientSolver() [2/3]
template<class Operator >
|
inline |
◆ ConjugateGradientSolver() [3/3]
template<class Operator >
|
inline |
constructor
- Parameters
-
[in] epsilon tolerance [in] maxIterations maximum number of CG iterations
Member Function Documentation
◆ averageCommTime()
template<class Operator >
|
inline |
return average communication time during last solve
◆ iterations()
template<class Operator >
|
inline |
number of iterations needed for last solve
◆ setMaxIterations()
template<class Operator >
|
inline |
◆ solve() [1/2]
template<class Operator >
|
inline |
solve \(op( x ) = b\)
- Note
- The CG algorithm also works for positive semidefinite operators. In this case, \(x \cdot v = b \cdot v\) for all \(v\) in the operator's kernel.
- Parameters
-
[in] op linear operator to invert (must be symmetic and positive definite) [in] p (lef) preconditioning operator [in] b right hand side x solution (must be initialized to a start value)
◆ solve() [2/2]
template<class Operator >
|
inline |
solve \(op( x ) = b\)
- Note
- The CG algorithm also works for positive semidefinite operators. In this case, \(x \cdot v = b \cdot v\) for all \(v\) in the operator's kernel.
- Parameters
-
[in] op linear operator to invert (must be symmetic and positive definite) [in] b right hand side x solution (must be initialized to a start value)
Member Data Documentation
◆ averageCommTime_
template<class Operator >
|
mutableprotected |
◆ epsilon_
template<class Operator >
|
protected |
◆ errorMeasure_
template<class Operator >
|
protected |
◆ maxIterations_
template<class Operator >
|
protected |
◆ realCount_
template<class Operator >
|
mutableprotected |
◆ verbose_
template<class Operator >
|
protected |
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8