dune-fem 2.8.0
|
linear solver using the CG algorithm More...
#include <dune/fem/solver/cginverseoperator.hh>
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 ![]() | |
void | solve (const OperatorType &op, const PreconditionerType &p, const RangeFunctionType &b, DomainFunctionType &x) const |
solve ![]() | |
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_ |
linear solver using the CG algorithm
Operator | type of the operator to invert |
typedef OperatorType::DomainFieldType Dune::Fem::ConjugateGradientSolver< Operator >::DomainFieldType |
field type of the operator's domain vectors
typedef OperatorType::DomainFunctionType Dune::Fem::ConjugateGradientSolver< Operator >::DomainFunctionType |
type of the operator's domain vectors
typedef Operator Dune::Fem::ConjugateGradientSolver< Operator >::OperatorType |
type of the operators to invert
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
typedef OperatorType::RangeFieldType Dune::Fem::ConjugateGradientSolver< Operator >::RangeFieldType |
field type of the operator's range vectors
typedef OperatorType::RangeFunctionType Dune::Fem::ConjugateGradientSolver< Operator >::RangeFunctionType |
type of the operator's range vectors
typedef Dune::FieldTraits<RangeFieldType>::real_type Dune::Fem::ConjugateGradientSolver< Operator >::RealType |
|
inline |
constructor
[in] | epsilon | tolerance |
[in] | maxIterations | maximum number of CG iterations |
[in] | errorMeasure | use absolute (0) or relative (1) error |
[in] | verbose | verbose output |
|
inline |
|
inline |
constructor
[in] | epsilon | tolerance |
[in] | maxIterations | maximum number of CG iterations |
|
inline |
return average communication time during last solve
|
inline |
number of iterations needed for last solve
|
inline |
|
inline |
solve
[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) |
|
inline |
solve
[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) |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |