33 #ifndef __H__LIB_ALGEBRA__OPERATOR__DAMPING__
34 #define __H__LIB_ALGEBRA__OPERATOR__DAMPING__
58 template <
typename X,
typename Y = X>
99 template <
typename X,
typename Y = X>
122 std::stringstream ss; ss <<
"ConstantDamping(" <<
m_factor <<
")";
return ss.str();
130 template <
typename X,
typename Y = X>
148 if (
kappa<0.3)
return 0.3;
152 }
UG_CATCH_THROW(
"MinimalResiduumDamping: Computing (d,Ac)/(Ac,Ac) failed.")
161 UG_THROW(
"MinimalResiduumDamping: non-constant damping.");
166 return "MinimalResiduumDamping";
171 template <
typename X,
typename Y = X>
185 if (
kappa<0.3)
return 0.3;
197 UG_THROW(
"MinimalEnergyDamping: non-constant damping.");
202 return "MinimalEnergyDamping";
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
ConstSmartPtr< T, FreePolicy > cast_const() const
performs a const cast
Definition: smart_pointer.h:504
constant damping factor
Definition: damping.h:101
virtual number damping() const
returns the constant damping factor
Definition: damping.h:112
virtual number damping(const Y &c, const X &d, ConstSmartPtr< ILinearOperator< Y, X > > spLinOp) const
returns the constant damping factor
Definition: damping.h:106
virtual bool constant_damping() const
returns if damping is constant
Definition: damping.h:118
virtual std::string config_string() const
returns information about configuration parameters
Definition: damping.h:120
number m_factor
constant damping factor
Definition: damping.h:126
ConstantDamping(number factor)
Definition: damping.h:103
virtual ~IDamping()
virtual destructor
Definition: damping.h:86
virtual number damping(const Y &c, const X &d, ConstSmartPtr< ILinearOperator< Y, X > > spLinOp) const =0
returns the damping
virtual bool constant_damping() const =0
returns if the damping is constant
virtual std::string config_string() const =0
returns information about configuration parameters
virtual number damping() const =0
returns the constant damping, throws exception if non-constant damping
describes a linear mapping X->Y
Definition: linear_operator.h:80
damping computed based on the minimal energy
Definition: damping.h:173
virtual number damping() const
returns the constant damping factor
Definition: damping.h:195
virtual std::string config_string() const
returns information about configuration parameters
Definition: damping.h:200
virtual number damping(const Y &c, const X &d, ConstSmartPtr< ILinearOperator< Y, X > > spLinOp) const
returns the damping factor
Definition: damping.h:176
virtual bool constant_damping() const
returns if damping is constant
Definition: damping.h:192
damping computed based on the minimal residuum
Definition: damping.h:132
virtual number damping(const Y &c, const X &d, ConstSmartPtr< ILinearOperator< Y, X > > spLinOp) const
returns the damping factor
Definition: damping.h:135
virtual std::string config_string() const
returns information about configuration parameters
Definition: damping.h:164
virtual bool constant_damping() const
returns if damping is constant
Definition: damping.h:156
virtual number damping() const
returns the constant damping factor
Definition: damping.h:159
#define UG_CATCH_THROW(msg)
Definition: error.h:64
#define UG_THROW(msg)
Definition: error.h:57
double number
Definition: types.h:124
double VecProd(const double &a, const double &b)
returns scal<a, b>
Definition: operations_vec.h:84