ug4
|
#include <iterator_product.h>
Public Member Functions | |
virtual bool | apply (Y &c, const X &d) |
compute new correction c = B*d | |
virtual bool | apply_update_defect (Y &c, X &d) |
compute new correction c = B*d and update defect d := d - A*c | |
virtual SmartPtr< ILinearIterator< X, Y > > | clone () |
clone | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > J, const Y &u) |
initialize for operator J(u) and linearization point u | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > L) |
initialize for linear operator L | |
LinearIteratorSum () | |
LinearIteratorSum (const std::vector< SmartPtr< ILinearIterator< X, Y > > > &vIterator) | |
virtual const char * | name () const |
returns the name of iterator | |
![]() | |
void | add_iterator (SmartPtr< ILinearIterator< X, Y > > I) |
void | add_iterator (SmartPtr< ILinearIterator< X, Y > > I, size_t nr) |
CombinedLinearIterator () | |
CombinedLinearIterator (const std::vector< SmartPtr< ILinearIterator< X, Y > > > &vIterator) | |
virtual bool | supports_parallel () const |
returns if parallel solving is supported | |
![]() | |
virtual std::string | config_string () const |
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 | |
Protected Types | |
typedef CombinedLinearIterator< X, Y > | base_type |
Protected Attributes | |
SmartPtr< ILinearOperator< Y, X > > | m_spOp |
std::vector< SmartPtr< ILinearIterator< X, Y > > > | m_vIterator |
![]() | |
std::vector< SmartPtr< ILinearIterator< X, Y > > > | m_vIterator |
![]() | |
SmartPtr< IDamping< X, Y > > | m_spDamping |
the scaling | |
Additional Inherited Members | |
![]() | |
typedef Y | codomain_function_type |
Range space. | |
typedef X | domain_function_type |
Domain space. | |
This operator is a sum of ILinearIterator (additive composition).
|
protected |
|
inline |
Referenced by ug::LinearIteratorSum< X, Y >::clone().
|
inline |
|
inlinevirtual |
compute new correction c = B*d
This method applies the iterator operator, i.e. c = B*d. The domain function d remains unchanged. Note, that this method can always be implemented by creating a copy of d and calling apply_update_defect with this copy.
[in] | d | defect |
[out] | c | correction |
Implements ug::CombinedLinearIterator< X, Y >.
References ug::LinearIteratorSum< X, Y >::m_vIterator.
Referenced by ug::LinearIteratorSum< X, Y >::apply_update_defect().
|
inlinevirtual |
compute new correction c = B*d and update defect d := d - A*c
This method applies the inverse operator, i.e. c = B*d. The domain function d is changed in the way, that the defect d := d - A*c is returned in the function. This is always useful, when the iterating 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 := d - A*c.
[in,out] | d | defect |
[out] | u | correction |
Implements ug::CombinedLinearIterator< X, Y >.
References ug::LinearIteratorSum< X, Y >::apply(), and ug::LinearIteratorSum< X, Y >::m_spOp.
|
inlinevirtual |
clone
Implements ug::CombinedLinearIterator< X, Y >.
References ug::LinearIteratorSum< X, Y >::LinearIteratorSum(), and make_sp().
|
inlinevirtual |
initialize for operator J(u) and linearization point u
This method passes the linear operator J(u) that should be used as underlying by this iterator. As second argument the linearization point is passed. This is needed e.g. for the geometric multigrid method.
[in] | J | linearized operator to use as underlying |
[in] | u | linearization point |
Implements ug::CombinedLinearIterator< X, Y >.
References ug::LinearIteratorSum< X, Y >::m_spOp, and ug::LinearIteratorSum< X, Y >::m_vIterator.
|
inlinevirtual |
initialize for linear operator L
This method passes the operator L that used as underlying by this operator. In addition some preparation step can be made.
[in] | L | linear operator to use as underlying |
Implements ug::CombinedLinearIterator< X, Y >.
References ug::LinearIteratorSum< X, Y >::m_spOp, and ug::LinearIteratorSum< X, Y >::m_vIterator.
|
inlinevirtual |
returns the name of iterator
This method returns the name of the iterator operator. This function is typically needed, when the iterator operator is used inside of another operator and some debug output should be printed
Implements ug::CombinedLinearIterator< X, Y >.
|
protected |
|
protected |