ug4
|
#include <operator_inverse_iterator.h>
Public Types | |
typedef TAlgebra | algebra_type |
Algebra type. | |
typedef IPreconditioner< TAlgebra > | base_type |
Base type. | |
typedef IPreconditioner< TAlgebra >::matrix_operator_type | matrix_operator_type |
Matrix Operator type. | |
typedef TAlgebra::matrix_type | matrix_type |
Matrix type. | |
typedef TAlgebra::vector_type | vector_type |
Vector type. | |
![]() | |
typedef TAlgebra::vector_type | codomain_function_type |
Range space. | |
typedef TAlgebra::vector_type | domain_function_type |
Domain space. | |
Public Member Functions | |
virtual bool | apply (vector_type &c, const vector_type &d) |
compute new correction c = B*d | |
virtual bool | apply_update_defect (vector_type &c, vector_type &d) |
compute new correction c = B*d and update defect d := d - A*c | |
virtual SmartPtr< ILinearIterator< vector_type, vector_type > > | clone () |
clone | |
virtual bool | init (SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u) |
virtual bool | init (SmartPtr< ILinearOperator< vector_type > > L) |
virtual const char * | name () const |
returns the name of iterator | |
OperatorInverseIterator (SmartPtr< ILinearOperatorInverse< vector_type > > opInv) | |
default constructor | |
virtual bool | supports_parallel () const |
returns if parallel solving is supported | |
~OperatorInverseIterator () | |
![]() | |
virtual std::string | config_string () const |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | damping () |
returns the scaling | |
ILinearIterator () | |
constructor | |
ILinearIterator (const ILinearIterator< TAlgebra::vector_type, TAlgebra::vector_type > &parent) | |
copy constructor | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > J, const TAlgebra::vector_type &u)=0 |
initialize for operator J(u) and linearization point u | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > L)=0 |
initialize for linear operator L | |
void | set_damp (number factor) |
sets the damping to a constant factor | |
void | set_damp (SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > spScaling) |
sets a scaling for the correction | |
virtual | ~ILinearIterator () |
virtual destructor | |
Public Attributes | |
std::string | m_name |
Protected Attributes | |
SmartPtr< ILinearOperatorInverse< vector_type > > | m_opInv |
![]() | |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | m_spDamping |
the scaling | |
a LinearIterator which can uses ILinearOperatorInverse to perform B^{-1} this is for the case that some class needs a preconditioner, but we'd like to use a linear solver example: 4x AMG as preconditioner
typedef TAlgebra ug::OperatorInverseIterator< TAlgebra >::algebra_type |
Algebra type.
typedef IPreconditioner<TAlgebra> ug::OperatorInverseIterator< TAlgebra >::base_type |
Base type.
typedef IPreconditioner<TAlgebra>::matrix_operator_type ug::OperatorInverseIterator< TAlgebra >::matrix_operator_type |
Matrix Operator type.
typedef TAlgebra::matrix_type ug::OperatorInverseIterator< TAlgebra >::matrix_type |
Matrix type.
typedef TAlgebra::vector_type ug::OperatorInverseIterator< TAlgebra >::vector_type |
Vector type.
|
inline |
default constructor
References ug::OperatorInverseIterator< TAlgebra >::m_name, ug::OperatorInverseIterator< TAlgebra >::m_opInv, and ug::ILinearOperatorInverse< X, Y >::name().
|
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::ILinearIterator< TAlgebra::vector_type >.
References ug::ILinearOperatorInverse< X, Y >::apply(), and ug::OperatorInverseIterator< TAlgebra >::m_opInv.
|
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::ILinearIterator< TAlgebra::vector_type >.
References ug::ILinearOperatorInverse< X, Y >::apply_return_defect(), and ug::OperatorInverseIterator< TAlgebra >::m_opInv.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
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::ILinearIterator< TAlgebra::vector_type >.
References ug::OperatorInverseIterator< TAlgebra >::m_name.
Referenced by ug::OperatorInverseIterator< TAlgebra >::init(), and ug::OperatorInverseIterator< TAlgebra >::init().
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::OperatorInverseIterator< TAlgebra >::m_opInv, and ug::ILinearOperatorInverse< X, Y >::supports_parallel().
std::string ug::OperatorInverseIterator< TAlgebra >::m_name |
|
protected |
Referenced by ug::OperatorInverseIterator< TAlgebra >::apply(), ug::OperatorInverseIterator< TAlgebra >::apply_update_defect(), ug::OperatorInverseIterator< TAlgebra >::init(), ug::OperatorInverseIterator< TAlgebra >::init(), ug::OperatorInverseIterator< TAlgebra >::OperatorInverseIterator(), and ug::OperatorInverseIterator< TAlgebra >::supports_parallel().