ug4
ug::IDamping< X, Y > Class Template Referenceabstract

#include <damping.h>

Public Member Functions

virtual std::string config_string () const =0
 returns information about configuration parameters More...
 
virtual bool constant_damping () const =0
 returns if the damping is constant More...
 
virtual number damping () const =0
 returns the constant damping, throws exception if non-constant damping More...
 
virtual number damping (const Y &c, const X &d, ConstSmartPtr< ILinearOperator< Y, X > > spLinOp) const =0
 returns the damping More...
 
virtual ~IDamping ()
 virtual destructor More...
 

Detailed Description

template<typename X, typename Y = X>
class ug::IDamping< X, Y >

Base class for damping of correction in iterative schemes. An iteration for the solution of a matrix problem \( A*x = b \) is given, for example, by

\[ x = x + c, \]

where \( c = B*d \) is some proposed correction.

The damping class now computes a damping factor \( \kappa \), that is used to damp the correction, i.e.,

\[ x = x + \kappa c. \]

In general, the damping may depend on the correction, the (old) defect and the operator A itself.

Constructor & Destructor Documentation

◆ ~IDamping()

template<typename X , typename Y = X>
virtual ug::IDamping< X, Y >::~IDamping ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ config_string()

template<typename X , typename Y = X>
virtual std::string ug::IDamping< X, Y >::config_string ( ) const
pure virtual

returns information about configuration parameters

this should return necessary information about parameters and possibly calling config_string of subcomponents.

Returns
std::string necessary information about configuration parameters

Implemented in ug::MinimalEnergyDamping< X, Y >, ug::MinimalResiduumDamping< X, Y >, and ug::ConstantDamping< X, Y >.

◆ constant_damping()

template<typename X , typename Y = X>
virtual bool ug::IDamping< X, Y >::constant_damping ( ) const
pure virtual

returns if the damping is constant

returns if the damping is constant, i.e. does not depend on correction, defect and linear operator.

Returns
true if constant damping

Implemented in ug::MinimalEnergyDamping< X, Y >, ug::MinimalResiduumDamping< X, Y >, and ug::ConstantDamping< X, Y >.

◆ damping() [1/2]

template<typename X , typename Y = X>
virtual number ug::IDamping< X, Y >::damping ( ) const
pure virtual

returns the constant damping, throws exception if non-constant damping

Implemented in ug::MinimalEnergyDamping< X, Y >, ug::MinimalResiduumDamping< X, Y >, and ug::ConstantDamping< X, Y >.

◆ damping() [2/2]

template<typename X , typename Y = X>
virtual number ug::IDamping< X, Y >::damping ( const Y &  c,
const X &  d,
ConstSmartPtr< ILinearOperator< Y, X > >  spLinOp 
) const
pure virtual

returns the damping

For a given correction, defect and Operator the damping is returned.

Parameters
cthe correction
dthe defect
spLinOpthe operator
Returns
the damping

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