ug4
|
#include <analyzing_solver.h>
Public Types | |
typedef Y | codomain_function_type |
Range space. | |
typedef X | domain_function_type |
Domain space. | |
typedef M | matrix_type |
Matrix type. | |
![]() | |
typedef Y | codomain_function_type |
Range space. | |
typedef X | domain_function_type |
Domain space. | |
![]() | |
typedef Y | codomain_function_type |
Range space. | |
typedef X | domain_function_type |
Domain space. | |
Public Member Functions | |
AnalyzingSolver (SmartPtr< ILinearOperatorInverse< X, Y > > pLinearOperatorInverse) | |
virtual bool | apply (Y &u, const X &f) |
applies inverse operator, i.e. returns u = A^{-1} f | |
virtual bool | apply_return_defect (Y &u, X &f) |
applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u | |
void | check (const matrix_type &A) |
void | check (SmartPtr< ILinearOperator< Y, X > > A) |
virtual std::string | config_string () const |
returns information about configuration parameters | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > A) |
initializes for the inverse for a linear operator | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > A, const Y &u) |
initializes for the inverse for a linearized operator at linearization point u | |
virtual const char * | name () const |
returns the name of the operator inverse | |
virtual bool | supports_parallel () const |
returns if parallel solving is supported | |
virtual | ~AnalyzingSolver () |
virtual destructor | |
![]() | |
virtual bool | apply_update_defect (Y &u, X &f) |
compute new correction c = B*d and update defect d := d - A*c | |
virtual SmartPtr< ILinearIterator< X, Y > > | clone () |
clone | |
SmartPtr< IConvergenceCheck< X > > | convergence_check () |
returns the convergence check | |
ConstSmartPtr< IConvergenceCheck< X > > | convergence_check () const |
returns the convergence check | |
number | defect () const |
returns the current defect | |
ILinearOperatorInverse () | |
constructor setting convergence check to (100, 1e-12, 1e-12, true) | |
ILinearOperatorInverse (SmartPtr< IConvergenceCheck< X > > spConvCheck) | |
Default constructor. | |
SmartPtr< ILinearOperator< Y, X > > | linear_operator () |
returns the current Operator this Inverse Operator is initialized for | |
number | reduction () const |
returns the current relative reduction | |
void | set_convergence_check (SmartPtr< IConvergenceCheck< X > > spConvCheck) |
set the convergence check | |
virtual int | standard_offset () const |
returns the standard offset for output | |
int | step () const |
returns the current number of steps | |
virtual | ~ILinearOperatorInverse () |
virtual destructor | |
![]() | |
SmartPtr< IDamping< X, Y > > | damping () |
returns the scaling | |
ILinearIterator () | |
constructor | |
ILinearIterator (const ILinearIterator< X, Y > &parent) | |
copy constructor | |
void | set_damp (number factor) |
sets the damping to a constant factor | |
void | set_damp (SmartPtr< IDamping< X, Y > > spScaling) |
sets a scaling for the correction | |
virtual | ~ILinearIterator () |
virtual destructor | |
Private Attributes | |
SmartPtr< ILinearOperatorInverse< X, Y > > | m_pLinearOperatorInverse |
Additional Inherited Members | |
![]() | |
SmartPtr< IConvergenceCheck< X > > | m_spConvCheck |
smart pointer holding the convergence check | |
SmartPtr< ILinearOperator< Y, X > > | m_spLinearOperator |
Operator that is inverted by this Inverse Operator. | |
![]() | |
SmartPtr< IDamping< X, Y > > | m_spDamping |
the scaling | |
typedef Y ug::AnalyzingSolver< M, X, Y >::codomain_function_type |
Range space.
typedef X ug::AnalyzingSolver< M, X, Y >::domain_function_type |
Domain space.
typedef M ug::AnalyzingSolver< M, X, Y >::matrix_type |
Matrix type.
|
inline |
|
inlinevirtual |
virtual destructor
|
inlinevirtual |
applies inverse operator, i.e. returns u = A^{-1} f
This method applies the inverse operator, i.e. u = A^{-1} f. The domain function f remains unchanged. Note, that this method can always be implemented by creating a copy of f and calling apply_return_defect with this copy.
[in] | f | right-hand side |
[out] | u | solution |
Implements ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
inlinevirtual |
applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u
This method applies the inverse operator, i.e. u = A^{-1} f. The domain function f is changed in the way, that the defect d := f - A*u is returned in the function. This is always useful, when the inverting algorithm can (or must) update the defect during computation (this is e.g. the case for the geometric multigrid method). Note, that this method can always be implemented by calling apply and then computing d := f - A*u.
[in,out] | f | right-hand side |
[out] | u | solution |
Implements ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
inline |
References ug::BlockRef(), ug::checksub(), ug::GetCols(), ug::GetRows(), and UG_LOG.
Referenced by ug::AnalyzingSolver< M, X, Y >::check(), ug::AnalyzingSolver< M, X, Y >::init(), and ug::AnalyzingSolver< M, X, Y >::init().
|
inline |
|
inlinevirtual |
returns information about configuration parameters
this should return necessary information about parameters and possibly calling config_string of subcomponents.
Reimplemented from ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
inlinevirtual |
initializes for the inverse for a linear operator
This method passes the operator L that is inverted by this operator. In addition some preparation step can be made.
[in] | L | linear operator to invert |
Reimplemented from ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::check(), and ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
inlinevirtual |
initializes for the inverse for a linearized operator at linearization point u
This method passes the linear operator J(u) that should be inverted by this operator. As second argument the linearization point is passed. This is needed e.g. for the geometric multigrid method, that inverts a linearized operator based on coarser grid operators, that have to be initialized based on the linearization point.
[in] | J | linearized operator to invert |
[in] | u | linearization point |
Reimplemented from ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::check(), and ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
inlinevirtual |
returns the name of the operator inverse
This method returns the name of the inverse operator. This function is typically needed, when the inverse operator is used inside of another and some debug output should be printed
Implements ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearOperatorInverse< X, Y >.
References ug::AnalyzingSolver< M, X, Y >::m_pLinearOperatorInverse.
|
private |
Referenced by ug::AnalyzingSolver< M, X, Y >::AnalyzingSolver(), ug::AnalyzingSolver< M, X, Y >::apply(), ug::AnalyzingSolver< M, X, Y >::apply_return_defect(), ug::AnalyzingSolver< M, X, Y >::config_string(), ug::AnalyzingSolver< M, X, Y >::init(), ug::AnalyzingSolver< M, X, Y >::init(), ug::AnalyzingSolver< M, X, Y >::name(), and ug::AnalyzingSolver< M, X, Y >::supports_parallel().