|
ug4
|
Debugging iterator. More...
#include <debug_iterator.h>
Inheritance diagram for ug::DebugIterator< TAlgebra >:Public Types | |
| typedef TAlgebra | algebra_type |
| typedef ILinearIterator< typename TAlgebra::vector_type > | base_type |
| typedef TAlgebra::matrix_type | matrix_type |
| typedef IPreconditionedLinearOperatorInverse< vector_type > | solver_type |
| typedef TAlgebra::vector_type | vector_type |
Public Types inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
| typedef TAlgebra::vector_type | codomain_function_type |
| Range space. | |
| typedef TAlgebra::vector_type | domain_function_type |
| Domain space. | |
Public Types inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| typedef TAlgebra::vector_type | vector_type |
| type of vector | |
Public Member Functions | |
| virtual SmartPtr< ILinearIterator< vector_type > > | clone () |
| Clone. | |
| DebugIterator () | |
| Constructor. | |
| DebugIterator (SmartPtr< base_type > pprecond, SmartPtr< solver_type > psolver) | |
| void | set_preconditioner (SmartPtr< base_type > pprecond) |
| specify the real preconditioner (used for iterating) | |
| void | set_random_bounds (double a, double b) |
| specify bounds for random initial guess (optional) | |
| void | set_solution (SmartPtr< vector_type > sol) |
| void | set_solver (SmartPtr< solver_type > psolver) |
| specify the solver that will be used for debugging (optional) | |
| virtual bool | supports_parallel () const |
| returns if parallel solving is supported | |
Public Member Functions inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
| 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 Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| 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 Member Functions | |
| virtual bool | apply (vector_type &c, const vector_type &d) |
| forwarding call to original preconditioner | |
| virtual bool | apply_update_defect (vector_type &c, vector_type &d) |
| forwarding call to original preconditioner | |
| bool | find_smooth_error () |
| Determines algebraically smooth error. | |
| SmartPtr< base_type > | get_preconditioner () |
| get reference to 'real' preconditioner | |
| SmartPtr< solver_type > | get_solver () |
| get reference to aux. solver | |
| virtual bool | init (SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u) |
| init (expensive) | |
| virtual bool | init (SmartPtr< ILinearOperator< vector_type > > L) |
| init (expensive) | |
| bool | init (SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp) |
| init (expensive, since it calls | |
| virtual const char * | name () const |
| name of preconditioner | |
Protected Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| 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) | |
Protected Attributes | |
| double | from |
| SmartPtr< MatrixOperator< matrix_type, vector_type > > | m_pOperator |
| SmartPtr< base_type > | m_pprecond |
| SmartPtr< solver_type > | m_solver |
| SmartPtr< vector_type > | m_spSolVector |
| double | to |
Protected Attributes inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
| SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | m_spDamping |
| the scaling | |
Protected Attributes inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
| Debug Writer. | |
Private Types | |
| typedef VectorDebugWritingObject< typename TAlgebra::vector_type > | vdwo_type |
Debugging iterator.
This class implements an iterator that can be used for debugging:
It wraps for an ILinearIterator<typename TAlgebra::vector_type> object, which can be used as usual, i.e., all call are forwarded. Moreover, this class can determine the algebarically smooth error. In order to doso, one must specify a solver. This solver is called once during initialization.
This class is a VectorDebugWritingObject <typename TAlgebra::vector_type>. If a DebugWriter is supplied using use the set_debug routines, the smooth error is written to file.
| typedef TAlgebra ug::DebugIterator< TAlgebra >::algebra_type |
| typedef ILinearIterator<typename TAlgebra::vector_type> ug::DebugIterator< TAlgebra >::base_type |
| typedef TAlgebra::matrix_type ug::DebugIterator< TAlgebra >::matrix_type |
| typedef IPreconditionedLinearOperatorInverse<vector_type> ug::DebugIterator< TAlgebra >::solver_type |
|
private |
| typedef TAlgebra::vector_type ug::DebugIterator< TAlgebra >::vector_type |
|
inline |
Constructor.
References ug::DebugIterator< TAlgebra >::m_pOperator.
|
inline |
|
inlineprotectedvirtual |
forwarding call to original preconditioner
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::DebugIterator< TAlgebra >::m_pprecond.
|
inlineprotectedvirtual |
forwarding call to original preconditioner
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::DebugIterator< TAlgebra >::m_pprecond.
|
inlinevirtual |
Clone.
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::DebugIterator< TAlgebra >::clone(), ug::ILinearIterator< TAlgebra::vector_type >::damping(), ug::DebugIterator< TAlgebra >::from, ug::DebugIterator< TAlgebra >::get_preconditioner(), ug::DebugIterator< TAlgebra >::get_solver(), and ug::DebugIterator< TAlgebra >::to.
Referenced by ug::DebugIterator< TAlgebra >::clone().
|
inlineprotected |
Determines algebraically smooth error.
Solves Ae=0 starting from a random initial guess.
References ug::DebugIterator< TAlgebra >::from, SmartPtr< T, FreePolicy >::invalid(), ug::DebugIterator< TAlgebra >::m_pOperator, ug::DebugIterator< TAlgebra >::m_solver, ug::DebugIterator< TAlgebra >::m_spSolVector, ug::DebugIterator< TAlgebra >::to, UG_LOG, and ug::VectorDebugWritingObject< TAlgebra::vector_type >::write_debug().
Referenced by ug::DebugIterator< TAlgebra >::init().
|
inlineprotected |
get reference to 'real' preconditioner
References ug::DebugIterator< TAlgebra >::m_pprecond.
Referenced by ug::DebugIterator< TAlgebra >::clone().
|
inlineprotected |
get reference to aux. solver
References ug::DebugIterator< TAlgebra >::m_solver.
Referenced by ug::DebugIterator< TAlgebra >::clone().
|
inlineprotectedvirtual |
init (expensive)
References init(), SmartPtr< T, FreePolicy >::invalid(), ug::DebugIterator< TAlgebra >::name(), and UG_THROW.
|
inlineprotectedvirtual |
init (expensive)
References init(), SmartPtr< T, FreePolicy >::invalid(), ug::DebugIterator< TAlgebra >::name(), and UG_THROW.
|
inlineprotected |
init (expensive, since it calls
References ug::DebugIterator< TAlgebra >::find_smooth_error(), ug::MatrixOperator< M, X, Y >::get_matrix(), ug::DebugIterator< TAlgebra >::m_pOperator, and ug::DebugIterator< TAlgebra >::m_pprecond.
|
inlineprotectedvirtual |
name of preconditioner
Implements ug::ILinearIterator< TAlgebra::vector_type >.
Referenced by ug::DebugIterator< TAlgebra >::init(), and ug::DebugIterator< TAlgebra >::init().
|
inline |
specify the real preconditioner (used for iterating)
References ug::DebugIterator< TAlgebra >::m_pprecond.
Referenced by ug::DebugIterator< TAlgebra >::DebugIterator().
|
inline |
specify bounds for random initial guess (optional)
References ug::DebugIterator< TAlgebra >::from, and ug::DebugIterator< TAlgebra >::to.
|
inline |
References ug::DebugIterator< TAlgebra >::m_spSolVector.
|
inline |
specify the solver that will be used for debugging (optional)
References ug::DebugIterator< TAlgebra >::m_solver.
Referenced by ug::DebugIterator< TAlgebra >::DebugIterator().
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::DebugIterator< TAlgebra >::m_pprecond.
|
protected |
|
protected |
|
protected |
Referenced by ug::DebugIterator< TAlgebra >::apply(), ug::DebugIterator< TAlgebra >::apply_update_defect(), ug::DebugIterator< TAlgebra >::get_preconditioner(), ug::DebugIterator< TAlgebra >::init(), ug::DebugIterator< TAlgebra >::set_preconditioner(), and ug::DebugIterator< TAlgebra >::supports_parallel().
|
protected |
|
protected |
|
protected |