|
ug4
|
describes an inverse linear mapping X->X More...
#include <preconditioned_linear_operator_inverse.h>
Inheritance diagram for ug::IPreconditionedLinearOperatorInverse< X >:Public Types | |
| typedef ILinearOperatorInverse< X, X > | base_type |
| Base class. | |
| typedef X | codomain_function_type |
| Range space. | |
| typedef X | domain_function_type |
| Domain space. | |
Public Types inherited from ug::ILinearOperatorInverse< X, Y > | |
| typedef Y | codomain_function_type |
| Range space. | |
| typedef X | domain_function_type |
| Domain space. | |
Public Types inherited from ug::ILinearIterator< X, Y > | |
| typedef Y | codomain_function_type |
| Range space. | |
| typedef X | domain_function_type |
| Domain space. | |
Public Types inherited from ug::VectorDebugWritingObject< X > | |
| typedef X | vector_type |
| type of vector | |
Public Member Functions | |
| virtual bool | apply (X &x, const X &b) |
| virtual std::string | config_string () const |
| returns information about configuration parameters | |
| std::string | config_string_preconditioner_convergence_check () const |
| returns config information of convergence check and preconditioner | |
| virtual bool | init (SmartPtr< ILinearOperator< X, X > > J, const X &u) |
| initializes the solver for an operator | |
| virtual bool | init (SmartPtr< ILinearOperator< X, X > > L) |
| initializes the solver for an operator | |
| IPreconditionedLinearOperatorInverse () | |
| Empty constructor. | |
| IPreconditionedLinearOperatorInverse (SmartPtr< ILinearIterator< X, X > > spPrecond) | |
| constructor setting the preconditioner | |
| IPreconditionedLinearOperatorInverse (SmartPtr< ILinearIterator< X, X > > spPrecond, SmartPtr< IConvergenceCheck< X > > spConvCheck) | |
| constructor setting the preconditioner | |
| void | set_compute_fresh_defect_when_finished (bool bRecompute) |
| for debug: computes norm again after whole calculation of apply | |
| void | set_preconditioner (SmartPtr< ILinearIterator< X, X > > spPrecond) |
| sets the preconditioner | |
| SmartPtr< ILinearIterator< X, X > > | preconditioner () |
| ConstSmartPtr< ILinearIterator< X, X > > | preconditioner () const |
Public Member Functions inherited from ug::ILinearOperatorInverse< X, Y > | |
| virtual bool | apply (Y &u, const X &f)=0 |
| applies inverse operator, i.e. returns u = A^{-1} f | |
| virtual bool | apply_return_defect (Y &u, X &f)=0 |
| applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u | |
| 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. | |
| virtual bool | init (SmartPtr< ILinearOperator< Y, X > > J, const Y &u) |
| initializes for the inverse for a linearized operator at linearization point u | |
| virtual bool | init (SmartPtr< ILinearOperator< Y, X > > L) |
| initializes for the inverse for a linear operator | |
| SmartPtr< ILinearOperator< Y, X > > | linear_operator () |
| returns the current Operator this Inverse Operator is initialized for | |
| virtual const char * | name () const =0 |
| returns the name of the operator inverse | |
| 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 bool | supports_parallel () const =0 |
| returns if parallel solving is supported | |
| virtual | ~ILinearOperatorInverse () |
| virtual destructor | |
Public Member Functions inherited from ug::ILinearIterator< X, Y > | |
| 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 | |
Public Member Functions inherited from ug::VectorDebugWritingObject< X > | |
| virtual void | set_debug (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) |
| set debug writer | |
| SmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () |
| returns the debug writer | |
| ConstSmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () const |
| bool | vector_debug_writer_valid () const |
| returns true if the debug writer is set | |
| VectorDebugWritingObject () | |
| VectorDebugWritingObject (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) | |
| void | write_debug (const vector_type &vec, const char *filename) |
| writing debug output for a vector (if debug writer set) | |
| virtual | ~VectorDebugWritingObject () |
| virtual destructor | |
Protected Attributes | |
| bool | m_bRecompute |
| flag if fresh defect should be computed when finish for debug purpose | |
| SmartPtr< ILinearIterator< X, X > > | m_spPrecond |
| Iterator used in the iterative scheme to compute the correction and update the defect. | |
Protected Attributes inherited from ug::ILinearOperatorInverse< X, Y > | |
| 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. | |
Protected Attributes inherited from ug::ILinearIterator< X, Y > | |
| SmartPtr< IDamping< X, Y > > | m_spDamping |
| the scaling | |
Protected Attributes inherited from ug::VectorDebugWritingObject< X > | |
| SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
| Debug Writer. | |
Additional Inherited Members | |
Protected Member Functions inherited from ug::VectorDebugWritingObject< X > | |
| void | enter_vector_debug_writer_section (const char *secDir) |
| enters a debugging section | |
| void | enter_vector_debug_writer_section (std::string secDir) |
| enters a debugging section | |
| void | leave_vector_debug_writer_section () |
| leaves a debugging section | |
| void | print_debugger_message (const char *msg) |
| prints a debugger message (listing all the sections) | |
| void | print_debugger_message (std::string msg) |
| prints a debugger message (listing all the sections) | |
| virtual void | write_debug (const vector_type &vec, std::string name) |
| writing debug output for a vector (if debug writer set) | |
describes an inverse linear mapping X->X
This a useful derived class from ILinearOperatorInverse, that uses a ILinearIterator in order to precondition the solution process. This is used e.g. in LinearSolver, CG and BiCGStab.
| X | domain and range space |
| typedef ILinearOperatorInverse<X,X> ug::IPreconditionedLinearOperatorInverse< X >::base_type |
Base class.
| typedef X ug::IPreconditionedLinearOperatorInverse< X >::codomain_function_type |
Range space.
| typedef X ug::IPreconditionedLinearOperatorInverse< X >::domain_function_type |
Domain space.
|
inline |
Empty constructor.
|
inline |
constructor setting the preconditioner
|
inline |
constructor setting the preconditioner
|
inlinevirtual |
Reimplemented in ug::AutoLinearSolver< TVector >.
References ug::ILinearOperatorInverse< X, Y >::apply_return_defect(), ug::ILinearOperatorInverse< X, Y >::linear_operator(), ug::IPreconditionedLinearOperatorInverse< X >::m_bRecompute, ug::ILinearOperatorInverse< X, Y >::name(), UG_LOG, and ug::VectorDebugWritingObject< X >::write_debug().
|
inlinevirtual |
returns information about configuration parameters
Reimplemented from ug::ILinearOperatorInverse< X, Y >.
Reimplemented in ug::BiCGStab< TVector >, and ug::GMRES< TVector >.
References ug::IPreconditionedLinearOperatorInverse< X >::config_string_preconditioner_convergence_check(), and ug::ILinearOperatorInverse< X, Y >::name().
|
inline |
returns config information of convergence check and preconditioner
References ug::ConfigShift(), ug::ILinearOperatorInverse< X, Y >::m_spConvCheck, and ug::IPreconditionedLinearOperatorInverse< X >::m_spPrecond.
Referenced by ug::IPreconditionedLinearOperatorInverse< X >::config_string().
|
inlinevirtual |
initializes the solver for an operator
Reimplemented in ug::AutoLinearSolver< TVector >.
References ug::ILinearOperatorInverse< X, X >::init(), LS_PROFILE_BEGIN, LS_PROFILE_END, ug::IPreconditionedLinearOperatorInverse< X >::m_spPrecond, ug::ILinearOperatorInverse< X, Y >::name(), and UG_THROW.
|
inlinevirtual |
initializes the solver for an operator
Reimplemented in ug::AutoLinearSolver< TVector >.
References ug::ILinearOperatorInverse< X, X >::init(), LS_PROFILE_BEGIN, LS_PROFILE_END, ug::IPreconditionedLinearOperatorInverse< X >::m_spPrecond, ug::ILinearOperatorInverse< X, Y >::name(), and UG_THROW.
|
inline |
returns the preconditioner
References ug::IPreconditionedLinearOperatorInverse< X >::m_spPrecond.
|
inline |
returns the preconditioner
References ug::IPreconditionedLinearOperatorInverse< X >::m_spPrecond.
|
inline |
for debug: computes norm again after whole calculation of apply
References ug::IPreconditionedLinearOperatorInverse< X >::m_bRecompute.
|
inline |
sets the preconditioner
References ug::IPreconditionedLinearOperatorInverse< X >::m_spPrecond.
|
protected |
flag if fresh defect should be computed when finish for debug purpose
Referenced by ug::IPreconditionedLinearOperatorInverse< X >::apply(), and ug::IPreconditionedLinearOperatorInverse< X >::set_compute_fresh_defect_when_finished().
|
protected |
Iterator used in the iterative scheme to compute the correction and update the defect.
Referenced by ug::IPreconditionedLinearOperatorInverse< X >::config_string_preconditioner_convergence_check(), ug::IPreconditionedLinearOperatorInverse< X >::init(), ug::IPreconditionedLinearOperatorInverse< X >::init(), ug::IPreconditionedLinearOperatorInverse< X >::preconditioner(), ug::IPreconditionedLinearOperatorInverse< X >::preconditioner(), and ug::IPreconditionedLinearOperatorInverse< X >::set_preconditioner().