ug4
ug::MultipleErrEstData< TDomain, TErrEstData > Class Template Reference

Error estimator data class for discretizations with more than one unknown. More...

#include <err_est_data.h>

+ Inheritance diagram for ug::MultipleErrEstData< TDomain, TErrEstData >:

Public Member Functions

virtual void add (SmartPtr< TErrEstData > spEed, const char *fct)
 adding error estimator data objects More...
 
virtual void alloc_err_est_data (ConstSmartPtr< SurfaceView > spSV, const GridLevel &gl)
 virtual function to allocate data structures for the error estimator More...
 
TErrEstData * get (size_t uid)
 accessing the underlying error estimator data objects via function id More...
 
virtual number get_elem_error_indicator (GridObject *elem, const MathVector< dim > vCornerCoords[])
 calculate L2 integrals More...
 
 MultipleErrEstData (ConstSmartPtr< ApproximationSpace< TDomain > > approx)
 class constructor More...
 
size_t num () const
 getting the number of underlying error estimator data objects More...
 
virtual void release_err_est_data ()
 virtual function to release data structures for the error estimator More...
 
virtual void summarize_err_est_data (SmartPtr< TDomain > spDomain)
 virtual function called after the computation of the error estimator data in all the elements More...
 
virtual ~MultipleErrEstData ()
 virtual class destructor More...
 
- Public Member Functions inherited from ug::IErrEstData< TDomain >
bool consider_me () const
 virtual function granting get access to the m_consider member More...
 
 IErrEstData ()
 class constructor More...
 
number scaling_factor ()
 get scaling factor More...
 
void set_consider_me (bool b)
 whether or not this instance is to be considered by domainDisc More...
 
void set_scaling_factor (number scale)
 set scaling factor for final error calculation More...
 
virtual ~IErrEstData ()
 virtual class destructor More...
 

Static Public Attributes

static const int dim = TDomain::dim
 world dimension More...
 
- Static Public Attributes inherited from ug::IErrEstData< TDomain >
static const int dim = TDomain::dim
 world dimension More...
 

Protected Attributes

FunctionGroup m_fctGrp
 function group (in order to map fcts to error estimator objects) More...
 
ConstSmartPtr< ApproximationSpace< TDomain > > m_spApprox
 approx space More...
 
std::vector< TErrEstData * > m_vEed
 

Detailed Description

template<typename TDomain, typename TErrEstData>
class ug::MultipleErrEstData< TDomain, TErrEstData >

Error estimator data class for discretizations with more than one unknown.

This class is a kind of wrapper for a bundle of error estimator objects. It can be useful if a discretization depends on more than one unknown and needs to compute error estimators for both of them: One can only pass one error estimator to any ElemDisc, but at the same time it is necessary to calculate the errors for different unknowns separately!

This class will not actually do anything, but pass any request on to the underlying objects. As they most probably figure in some other ElemDisc of their corresponding unknown, the considerMe property is set to false by default.

Make sure that the error estimation routines of any elem disc that is given this MultipleErrEstData object write to the correct sub-objects (i.e. ErrEstData objects)! There has to be some kind of mapping between the unknowns of the elem disc and the order in which the single-function ErrEstData objects are added to this object. This will typically be the exact same order. So try not to add the same object of MultipleErrEstData to elem discs with unknowns defined in a different order!

The template parameter TErrEstData must implement the IErrEstData interface.

Todo:
Maybe find a better way to deal with the orders of ErrEstData objects here and unknowns in the elem discs.
Template Parameters
TDomaindomain type

Constructor & Destructor Documentation

◆ MultipleErrEstData()

template<typename TDomain , typename TErrEstData >
ug::MultipleErrEstData< TDomain, TErrEstData >::MultipleErrEstData ( ConstSmartPtr< ApproximationSpace< TDomain > >  approx)
inline

class constructor

References ug::IErrEstData< TDomain >::set_consider_me().

◆ ~MultipleErrEstData()

template<typename TDomain , typename TErrEstData >
virtual ug::MultipleErrEstData< TDomain, TErrEstData >::~MultipleErrEstData ( )
inlinevirtual

virtual class destructor

Member Function Documentation

◆ add()

template<typename TDomain , typename TErrEstData >
virtual void ug::MultipleErrEstData< TDomain, TErrEstData >::add ( SmartPtr< TErrEstData >  spEed,
const char *  fct 
)
inlinevirtual

◆ alloc_err_est_data()

template<typename TDomain , typename TErrEstData >
void ug::MultipleErrEstData< TDomain, TErrEstData >::alloc_err_est_data ( ConstSmartPtr< SurfaceView spSV,
const GridLevel gl 
)
virtual

virtual function to allocate data structures for the error estimator

Implements ug::IErrEstData< TDomain >.

◆ get()

◆ get_elem_error_indicator()

template<typename TDomain , typename TErrEstData >
number ug::MultipleErrEstData< TDomain, TErrEstData >::get_elem_error_indicator ( GridObject elem,
const MathVector< dim vCornerCoords[] 
)
virtual

calculate L2 integrals

Implements ug::IErrEstData< TDomain >.

◆ num()

template<typename TDomain , typename TErrEstData >
size_t ug::MultipleErrEstData< TDomain, TErrEstData >::num ( ) const
inline

getting the number of underlying error estimator data objects

References ug::MultipleErrEstData< TDomain, TErrEstData >::m_vEed.

Referenced by ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::prep_err_est_elem_loop().

◆ release_err_est_data()

template<typename TDomain , typename TErrEstData >
void ug::MultipleErrEstData< TDomain, TErrEstData >::release_err_est_data
virtual

virtual function to release data structures for the error estimator

Implements ug::IErrEstData< TDomain >.

◆ summarize_err_est_data()

template<typename TDomain , typename TErrEstData >
void ug::MultipleErrEstData< TDomain, TErrEstData >::summarize_err_est_data ( SmartPtr< TDomain >  spDomain)
virtual

virtual function called after the computation of the error estimator data in all the elements

Implements ug::IErrEstData< TDomain >.

Member Data Documentation

◆ dim

template<typename TDomain , typename TErrEstData >
const int ug::MultipleErrEstData< TDomain, TErrEstData >::dim = TDomain::dim
static

world dimension

◆ m_fctGrp

template<typename TDomain , typename TErrEstData >
FunctionGroup ug::MultipleErrEstData< TDomain, TErrEstData >::m_fctGrp
protected

function group (in order to map fcts to error estimator objects)

Referenced by ug::MultipleErrEstData< TDomain, TErrEstData >::add(), and ug::MultipleErrEstData< TDomain, TErrEstData >::get().

◆ m_spApprox

template<typename TDomain , typename TErrEstData >
ConstSmartPtr<ApproximationSpace<TDomain> > ug::MultipleErrEstData< TDomain, TErrEstData >::m_spApprox
protected

◆ m_vEed

template<typename TDomain , typename TErrEstData >
std::vector<TErrEstData*> ug::MultipleErrEstData< TDomain, TErrEstData >::m_vEed
protected

The documentation for this class was generated from the following files: