KASKADE 7 development version
|
preconditioned conjugate gradient method More...
#include <apcg.hh>
preconditioned conjugate gradient method
This implements a preconditioned IterateType::CG iteration for an operator \( A: X\to X^* \), preconditioned by a preconditioner \( B^{-1}: X^* \to X \). The termination is policy-based.
The implementation follows Deuflhard/Weiser, Section 5.3.3.
X | the type of vectors from the primal space |
Xstar | the type of vectors from the dual space |
Definition at line 280 of file linalg/apcg.hh.
Public Types | |
typedef X | domain_type |
The domain type of the operator to be inverted. More... | |
typedef Xstar | range_type |
The range type of the operator to be inverted. More... | |
typedef X::field_type | field_type |
The field type of the operator to be inverted. More... | |
typedef ScalarTraits< field_type >::Real | Real |
the real field type corresponding to field_type More... | |
Public Member Functions | |
Pcg (SymmetricLinearOperator< X, Xstar > &op_, SymmetricPreconditioner< X, Xstar > &prec_, PCGTerminationCriterion< Real > &terminate_, int verbose_=0) | |
Set up conjugate gradient solver. More... | |
Pcg (Dune::LinearOperator< X, Xstar > &op_, Dune::Preconditioner< X, Xstar > &prec_, DualPairing< X, Xstar > const &dp_, PCGTerminationCriterion< Real > &terminate_, int verbose_=0) | |
Set up conjugate gradient solver. More... | |
virtual void | apply (X &u, Xstar &b, Dune::InverseOperatorResult &res) |
Apply inverse operator by performing a number of IterateType::PCG iterations. More... | |
virtual void | apply (X &x, Xstar &b, double tol, Dune::InverseOperatorResult &res) |
Apply inverse operator with given tolerance. More... | |
virtual Dune::SolverCategory::Category | category () const override |
returns the category of the operator More... | |
typedef X Kaskade::Pcg< X, Xstar >::domain_type |
The domain type of the operator to be inverted.
Definition at line 284 of file linalg/apcg.hh.
typedef X::field_type Kaskade::Pcg< X, Xstar >::field_type |
The field type of the operator to be inverted.
Definition at line 288 of file linalg/apcg.hh.
typedef Xstar Kaskade::Pcg< X, Xstar >::range_type |
The range type of the operator to be inverted.
Definition at line 286 of file linalg/apcg.hh.
typedef ScalarTraits<field_type>::Real Kaskade::Pcg< X, Xstar >::Real |
the real field type corresponding to field_type
Definition at line 293 of file linalg/apcg.hh.
|
inline |
Set up conjugate gradient solver.
op | the operator |
prec | the preconditioner |
terminate | the termination criterion. The object has to exist during the lifetime of the pcg object as it is referenced. |
verbose | controls the verbosity of logging to std::cout. 0 means no output at all (default). Values in 0,1,2 are valid. |
Definition at line 303 of file linalg/apcg.hh.
|
inline |
Set up conjugate gradient solver.
op | the operator |
prec | the preconditioner |
dp | the dual pairing with respect to which the operator is symmetric |
terminate | the termination criterion. The object has to exist during the lifetime of the pcg object as it is referenced. |
verbose | controls the verbosity of logging to std::cout. 0 means no output at all (default). Values in 0,1,2 are valid. |
Definition at line 321 of file linalg/apcg.hh.
|
inlinevirtual |
Apply inverse operator by performing a number of IterateType::PCG iterations.
u | the initial value (starting iterate) |
b | the right hand side (which will not be modified) |
Definition at line 334 of file linalg/apcg.hh.
|
inlinevirtual |
Apply inverse operator with given tolerance.
This method is equivalent to setting first the tolerance in the termination criterion, then calling apply().
Definition at line 481 of file linalg/apcg.hh.
|
inlineoverridevirtual |
returns the category of the operator
From the Dune doxygen documentation it is unclear what this is supposed to mean. We return a dummy here.
Definition at line 493 of file linalg/apcg.hh.