dune-composites (2.5.1)

Dune::Geneo::CGSolverFork< X > Class Template Reference

conjugate gradient method More...

#include <dune/composites/Driver/Solvers/geneo/cg_fork.hh>

Public Types

typedef X domain_type
 The domain type of the operator to be inverted.
 
typedef X range_type
 The range type of the operator to be inverted.
 
typedef X::field_type field_type
 The field type of the operator to be inverted.
 
typedef FieldTraits< field_type >::real_type real_type
 The real type of the field type (is the same if using real numbers, but differs for std::complex)
 

Public Member Functions

template<class L , class P >
 CGSolverFork (L &op, P &prec, real_type reduction, int maxit, int verbose)
 Set up conjugate gradient solver. More...
 
template<class L , class S , class P >
 CGSolverFork (L &op, S &sp, P &prec, real_type reduction, int maxit, int verbose)
 Set up conjugate gradient solver. More...
 
virtual void apply (X &x, X &b, InverseOperatorResult &res)
 Apply inverse operator. More...
 
virtual void apply (X &x, X &b, double reduction, InverseOperatorResult &res)
 Apply inverse operator with given reduction factor. More...
 

Detailed Description

template<class X>
class Dune::Geneo::CGSolverFork< X >

conjugate gradient method

Constructor & Destructor Documentation

◆ CGSolverFork() [1/2]

template<class X >
template<class L , class P >
Dune::Geneo::CGSolverFork< X >::CGSolverFork ( L &  op,
P &  prec,
real_type  reduction,
int  maxit,
int  verbose 
)
inline

Set up conjugate gradient solver.

◆ CGSolverFork() [2/2]

template<class X >
template<class L , class S , class P >
Dune::Geneo::CGSolverFork< X >::CGSolverFork ( L &  op,
S &  sp,
P &  prec,
real_type  reduction,
int  maxit,
int  verbose 
)
inline

Set up conjugate gradient solver.

Member Function Documentation

◆ apply() [1/2]

template<class X >
virtual void Dune::Geneo::CGSolverFork< X >::apply ( X &  x,
X &  b,
double  reduction,
InverseOperatorResult &  res 
)
inlinevirtual

Apply inverse operator with given reduction factor.

Note
Currently, the CGSolver aborts when a NaN or infinite defect is detected. However, -ffinite-math-only (implied by -ffast-math) can inhibit a result from becoming NaN that really should be NaN. E.g. numeric_limits<double>::quiet_NaN()*0.0==0.0 with gcc-5.3 -ffast-math.

◆ apply() [2/2]

template<class X >
virtual void Dune::Geneo::CGSolverFork< X >::apply ( X &  x,
X &  b,
InverseOperatorResult &  res 
)
inlinevirtual

Apply inverse operator.

Note
Currently, the CGSolver aborts when a NaN or infinite defect is detected. However, -ffinite-math-only (implied by -ffast-math) can inhibit a result from becoming NaN that really should be NaN. E.g. numeric_limits<double>::quiet_NaN()*0.0==0.0 with gcc-5.3 -ffast-math.

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Sep 5, 22:35, 2025)