33 #ifndef __H__UG__LIB_DISC__OPERATOR__LINEAR_OPERATOR__DEBUG_ITERATOR__
34 #define __H__UG__LIB_DISC__OPERATOR__LINEAR_OPERATOR__DEBUG_ITERATOR__
60 template <
typename TAlgebra>
102 newInst->set_damp(this->
damping());
106 newInst->from = this->
from;
107 newInst->to = this->
to;
137 virtual const char*
name()
const
138 {
return "DebugIterator";}
147 J.template cast_dynamic<MatrixOperator<matrix_type, vector_type> >();
152 "not based on matrix. This Preconditioner can only "
153 "handle matrix-based operators.");
164 L.template cast_dynamic<MatrixOperator<matrix_type, vector_type> >();
169 "not based on matrix. This Preconditioner can only "
170 "handle matrix-based operators.");
199 UG_LOG(
"WARNING: cannot find smooth error; no solver supplied!");
205 UG_LOG(
"WARNING: cannot find smooth error; no valid vector !");
216 myError->set_random(
from,
to);
238 return (
m_pprecond->apply_update_defect(c, d));
Definition: smart_pointer.h:108
bool invalid() const
returns true if the pointer is invalid, false if not.
Definition: smart_pointer.h:212
Debugging iterator.
Definition: debug_iterator.h:64
void set_preconditioner(SmartPtr< base_type > pprecond)
specify the real preconditioner (used for iterating)
Definition: debug_iterator.h:120
void set_solver(SmartPtr< solver_type > psolver)
specify the solver that will be used for debugging (optional)
Definition: debug_iterator.h:122
DebugIterator(SmartPtr< base_type > pprecond, SmartPtr< solver_type > psolver)
Definition: debug_iterator.h:90
virtual bool apply(vector_type &c, const vector_type &d)
forwarding call to original preconditioner
Definition: debug_iterator.h:230
virtual bool init(SmartPtr< ILinearOperator< vector_type > > L)
init (expensive)
Definition: debug_iterator.h:160
virtual bool supports_parallel() const
returns if parallel solving is supported
Definition: debug_iterator.h:112
SmartPtr< solver_type > get_solver()
get reference to aux. solver
Definition: debug_iterator.h:133
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_pOperator
Definition: debug_iterator.h:246
TAlgebra algebra_type
Definition: debug_iterator.h:67
virtual const char * name() const
name of preconditioner
Definition: debug_iterator.h:137
TAlgebra::matrix_type matrix_type
Definition: debug_iterator.h:73
double to
Definition: debug_iterator.h:249
IPreconditionedLinearOperatorInverse< vector_type > solver_type
Definition: debug_iterator.h:78
ILinearIterator< typename TAlgebra::vector_type > base_type
Definition: debug_iterator.h:76
virtual bool init(SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u)
init (expensive)
Definition: debug_iterator.h:142
void set_random_bounds(double a, double b)
specify bounds for random initial guess (optional)
Definition: debug_iterator.h:124
void set_solution(SmartPtr< vector_type > sol)
Definition: debug_iterator.h:126
SmartPtr< solver_type > m_solver
Definition: debug_iterator.h:245
VectorDebugWritingObject< typename TAlgebra::vector_type > vdwo_type
Definition: debug_iterator.h:80
bool find_smooth_error()
Determines algebraically smooth error.
Definition: debug_iterator.h:195
double from
Definition: debug_iterator.h:249
virtual SmartPtr< ILinearIterator< vector_type > > clone()
Clone.
Definition: debug_iterator.h:99
DebugIterator()
Constructor.
Definition: debug_iterator.h:84
TAlgebra::vector_type vector_type
Definition: debug_iterator.h:70
virtual bool apply_update_defect(vector_type &c, vector_type &d)
forwarding call to original preconditioner
Definition: debug_iterator.h:236
SmartPtr< base_type > get_preconditioner()
get reference to 'real' preconditioner
Definition: debug_iterator.h:131
SmartPtr< base_type > m_pprecond
Definition: debug_iterator.h:243
SmartPtr< vector_type > m_spSolVector
Definition: debug_iterator.h:247
bool init(SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp)
init (expensive, since it calls
Definition: debug_iterator.h:177
describes a linear iterator
Definition: linear_iterator.h:81
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > damping()
returns the scaling
Definition: linear_iterator.h:173
describes a linear mapping X->Y
Definition: linear_operator.h:80
describes an inverse linear mapping X->X
Definition: preconditioned_linear_operator_inverse.h:63
Definition: matrix_operator.h:49
Definition: debug_writer.h:266
SmartPtr< IVectorDebugWriter< vector_type > > vector_debug_writer()
returns the debug writer
Definition: debug_writer.h:286
void write_debug(const vector_type &vec, const char *filename)
writing debug output for a vector (if debug writer set)
Definition: debug_writer.h:293
#define UG_THROW(msg)
Definition: error.h:57
#define UG_LOG(msg)
Definition: log.h:367