33#ifndef __H__UG__LIB_ALGEBRA__OPERATOR__LINEAR_OPERATOR__TRANSFORMING_ITER__
34#define __H__UG__LIB_ALGEBRA__OPERATOR__LINEAR_OPERATOR__TRANSFORMING_ITER__
63template<
typename TAlgebra,
typename TDerived>
72 {
return *
static_cast<TDerived*
>(
this);}
88 {
UG_THROW(
"Do you really want to call a copy constructor of this abstract base class?"); }
103 {
return derived().original_operator();}
107 {
return derived().transform_defect(c,d); }
111 {
return derived().apply_transformed(c,d); }
115 {
return derived().untransform_correction(c,d); }
133 if (!
apply(c,d))
return false;
173template <
typename TDomain,
typename TAlgebra>
210 virtual const char*
name()
const {
return "Assembled Transform Smoother";}
271template <
typename TDomain,
typename TAlgebra>
287 m_spAuxSystemAss->assemble_jacobian(*m_spAuxMatrixOperator, u, gridLevel);
290 " Cannot assemble transformed system matrix.");
292 write_debug(*m_spAuxMatrixOperator,
"TrafoSystem");
294 if(!m_spAuxSmoother->init(m_spAuxMatrixOperator, u))
295 UG_THROW(
"AssembledTransformingSmoother: "
296 " Cannot init smoother for transformed system matrix.");
301 m_spRightTrafoAss->assemble_jacobian(*m_spRightTrafoMat, u, gridLevel);
304 " Cannot assemble right-transformation matrix.");
306 write_debug(*m_spRightTrafoMat,
"RightTrafo");
318template <
typename TDomain,
typename TAlgebra>
335 m_spAuxCorrection = c.clone_without_values();
338 if(!m_spAuxSmoother->apply(*m_spAuxCorrection, d))
340 UG_LOG(
"AssembledTransformingSmoother: Smoother applied incorrectly.\n");
347template <
typename TDomain,
typename TAlgebra>
353 if (m_spRightTrafoSmoother.valid())
356 if(!m_spRightTrafoSmoother->apply(*m_spAuxCorrection, d))
358 UG_LOG(
"AssembledTransformingSmoother: Right Trafo smoother failed!\n");
365 m_spRightTrafoMat->apply(c, *m_spAuxCorrection);
370 m_spAuxCorrection =
SPNULL;
376 const number damp = this->damping()->damping();
383template <
typename TDomain,
typename TAlgebra>
390 m_spAuxSystemAss, m_spAuxSmoother,
391 m_spRightTrafoAss, m_spRightTrafoSmoother));
Definition smart_pointer.h:108
Definition debug_writer.h:354
void write_debug(const matrix_type &mat, const char *filename)
write debug output for a matrix (if debug writer set)
Definition debug_writer.h:399
represents numerical solutions on a grid using an algebraic vector
Definition grid_function.h:121
SmartPtr< DoFDistribution > dof_distribution()
Definition grid_function.h:236
Definition grid_level.h:42
Interface providing Jacobian and Defect of a discretization.
Definition assemble_interface.h:110
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
Definition matrix_operator.h:49
@ PST_CONSISTENT
Definition parallel_storage_type.h:68
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition smart_pointer.h:90
#define UG_CATCH_THROW(msg)
Definition error.h:64
#define UG_THROW(msg)
Definition error.h:57
#define UG_LOG(msg)
Definition log.h:367
double number
Definition types.h:124
function ProblemDisc new(problemDesc, dom)