ug4
|
This class encapsulates all functions related to error estimation. More...
#include <elem_disc_interface.h>
Public Types | |
typedef TDomain | domain_type |
Domain type. More... | |
typedef TLeaf | leaf_type |
Barton Nackman trick (TODO: needed?) More... | |
Public Member Functions | |
TLeaf & | asLeaf () |
void | check_roid (ReferenceObjectID roid, int discType) |
check, if all inputs have been set More... | |
virtual void | compute_err_est_A_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale) |
virtual compute the error estimator (stiffness part) contribution for one element More... | |
virtual void | compute_err_est_M_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale) |
virtual compute the error estimator (mass part) contribution for one element More... | |
virtual void | compute_err_est_rhs_elem (GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale) |
virtual compute the error estimator (rhs part) contribution for one element More... | |
void | do_compute_err_est_A_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale) |
void | do_compute_err_est_M_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale) |
void | do_compute_err_est_rhs_elem (GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale) |
void | do_fsh_err_est_elem_loop () |
void | do_prep_err_est_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[]) |
void | do_prep_err_est_elem_loop (const ReferenceObjectID roid, const int si) |
virtual SmartPtr< IErrEstData< TDomain > > | err_est_data () |
returns the pointer to the error estimator data object (or NULL) More... | |
bool | err_est_enabled () const |
find out whether or not a posteriori error estimation is to be performed for this disc More... | |
virtual void | fsh_err_est_elem_loop () |
virtual postprocesses the loop over all elements of one type in the computation of the error estimator More... | |
IElemEstimatorFuncs () | |
constructor More... | |
virtual void | prep_err_est_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[]) |
virtual prepares the loop over all elements of one type for the computation of the error estimator More... | |
virtual void | prep_err_est_elem_loop (const ReferenceObjectID roid, const int si) |
virtual prepares the loop over all elements of one type for the computation of the error estimator More... | |
void | set_error_estimator (SmartPtr< IErrEstData< TDomain > > ee) |
sets the pointer to an error estimator data object (or NULL) More... | |
void | set_roid (ReferenceObjectID id, int discType) |
sets the geometric object type More... | |
virtual | ~IElemEstimatorFuncs () |
Virtual destructor. More... | |
Static Public Attributes | |
static const int | dim = TDomain::dim |
World dimension. More... | |
Protected Member Functions | |
void | clear_add_fct () |
sets all assemble functions to NULL (for all ReferenceObjectID's) More... | |
void | clear_add_fct (ReferenceObjectID id) |
sets all assemble functions to NULL for a given ReferenceObjectID More... | |
void | remove_compute_err_est_A_elem (ReferenceObjectID id) |
void | remove_compute_err_est_M_elem (ReferenceObjectID id) |
void | remove_compute_err_est_rhs_elem (ReferenceObjectID id) |
void | remove_fsh_err_est_elem_loop (ReferenceObjectID id) |
void | remove_prep_err_est_elem (ReferenceObjectID id) |
void | remove_prep_err_est_elem_loop (ReferenceObjectID id) |
template<typename TAssFunc > | |
void | set_compute_err_est_A_elem (ReferenceObjectID id, TAssFunc func) |
template<typename TAssFunc > | |
void | set_compute_err_est_M_elem (ReferenceObjectID id, TAssFunc func) |
template<typename TAssFunc > | |
void | set_compute_err_est_rhs_elem (ReferenceObjectID id, TAssFunc func) |
void | set_default_add_fct () |
sets all assemble functions to the corresponding virtual ones More... | |
template<typename TAssFunc > | |
void | set_fsh_err_est_elem_loop (ReferenceObjectID id, TAssFunc func) |
template<typename TAssFunc > | |
void | set_prep_err_est_elem (ReferenceObjectID id, TAssFunc func) |
template<typename TAssFunc > | |
void | set_prep_err_est_elem_loop (ReferenceObjectID id, TAssFunc func) |
Protected Attributes | |
ReferenceObjectID | m_roid |
current Geometric Object More... | |
SmartPtr< IErrEstData< TDomain > > | m_spErrEstData |
error estimation object associated to the element discretization More... | |
Private Types | |
typedef void(T::* | ElemComputeErrEstAFct) (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &) |
typedef void(T::* | ElemComputeErrEstMFct) (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &) |
typedef void(T::* | ElemComputeErrEstRhsFct) (GridObject *elem, const MathVector< dim > vCornerCoords[], const number &) |
typedef void(T::* | FinishErrEstElemLoopFct) () |
typedef void(T::* | PrepareErrEstElemFct) (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[]) |
typedef void(T::* | PrepareErrEstElemLoopFct) (ReferenceObjectID roid, int si) |
typedef IElemEstimatorFuncs< TLeaf, TDomain > | T |
Private Attributes | |
bool | m_bDoErrEst |
flag indicating whether or not a posteriori error estimation is to be performed for this disc More... | |
ElemComputeErrEstAFct | m_vElemComputeErrEstAFct [NUM_REFERENCE_OBJECTS] |
ElemComputeErrEstMFct | m_vElemComputeErrEstMFct [NUM_REFERENCE_OBJECTS] |
ElemComputeErrEstRhsFct | m_vElemComputeErrEstRhsFct [NUM_REFERENCE_OBJECTS] |
FinishErrEstElemLoopFct | m_vFinishErrEstElemLoopFct [NUM_REFERENCE_OBJECTS] |
PrepareErrEstElemFct | m_vPrepareErrEstElemFct [NUM_REFERENCE_OBJECTS] |
PrepareErrEstElemLoopFct | m_vPrepareErrEstElemLoopFct [NUM_REFERENCE_OBJECTS] |
This class encapsulates all functions related to error estimation.
typedef TDomain ug::IElemEstimatorFuncs< TLeaf, TDomain >::domain_type |
Domain type.
|
private |
|
private |
|
private |
|
private |
typedef TLeaf ug::IElemEstimatorFuncs< TLeaf, TDomain >::leaf_type |
Barton Nackman trick (TODO: needed?)
|
private |
|
private |
|
private |
|
inline |
constructor
References ug::IElemEstimatorFuncs< TLeaf, TDomain >::set_default_add_fct().
|
inlinevirtual |
Virtual destructor.
|
inline |
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::check_roid | ( | ReferenceObjectID | roid, |
int | discType | ||
) |
check, if all inputs have been set
|
protected |
sets all assemble functions to NULL (for all ReferenceObjectID's)
|
protected |
sets all assemble functions to NULL for a given ReferenceObjectID
|
virtual |
virtual compute the error estimator (stiffness part) contribution for one element
Reimplemented in ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >, ug::DiracSourceDisc< TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, and ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >.
|
virtual |
virtual compute the error estimator (mass part) contribution for one element
Reimplemented in ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, and ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >.
|
virtual |
virtual compute the error estimator (rhs part) contribution for one element
Reimplemented in ug::NeumannBoundaryFV1< TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, and ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >.
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::do_compute_err_est_A_elem | ( | LocalVector & | u, |
GridObject * | elem, | ||
const MathVector< dim > | vCornerCoords[], | ||
const number & | scale | ||
) |
References ug::LocalVector::access_by_map().
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::do_compute_err_est_M_elem | ( | LocalVector & | u, |
GridObject * | elem, | ||
const MathVector< dim > | vCornerCoords[], | ||
const number & | scale | ||
) |
References ug::LocalVector::access_by_map().
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::do_compute_err_est_rhs_elem | ( | GridObject * | elem, |
const MathVector< dim > | vCornerCoords[], | ||
const number & | scale | ||
) |
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::do_fsh_err_est_elem_loop |
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::do_prep_err_est_elem | ( | LocalVector & | u, |
GridObject * | elem, | ||
const MathVector< dim > | vCornerCoords[] | ||
) |
References ug::LocalVector::access_by_map(), and UG_ASSERT.
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::do_prep_err_est_elem_loop | ( | const ReferenceObjectID | roid, |
const int | si | ||
) |
References UG_ASSERT.
|
inlinevirtual |
returns the pointer to the error estimator data object (or NULL)
References ug::IElemEstimatorFuncs< TLeaf, TDomain >::m_spErrEstData.
|
inline |
find out whether or not a posteriori error estimation is to be performed for this disc
References ug::IElemEstimatorFuncs< TLeaf, TDomain >::m_bDoErrEst.
|
virtual |
virtual postprocesses the loop over all elements of one type in the computation of the error estimator
Reimplemented in ug::NeumannBoundaryFV1< TDomain >, ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >, ug::DiracSourceDisc< TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, and ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >.
|
virtual |
virtual prepares the loop over all elements of one type for the computation of the error estimator
Reimplemented in ug::NeumannBoundaryFV1< TDomain >, ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >, ug::DiracSourceDisc< TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, and ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >.
|
virtual |
virtual prepares the loop over all elements of one type for the computation of the error estimator
Reimplemented in ug::NeumannBoundaryFV1< TDomain >, ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >, ug::DiracSourceDisc< TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, and ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
References func().
|
protected |
References func().
|
protected |
sets all assemble functions to the corresponding virtual ones
References ug::NUM_REFERENCE_OBJECTS.
Referenced by ug::IElemEstimatorFuncs< TLeaf, TDomain >::IElemEstimatorFuncs().
|
inline |
sets the pointer to an error estimator data object (or NULL)
This function sets the pointer to an error estimator data object that should be used for this discretization. Note that the ElemDisc object must use RTTI to try to convert this pointer to the type of the objects accepted by it for this purpose. If the conversion fails than an exception must be thrown since this situation is not allowed.
References ug::IElemEstimatorFuncs< TLeaf, TDomain >::m_bDoErrEst, and ug::IElemEstimatorFuncs< TLeaf, TDomain >::m_spErrEstData.
|
protected |
References func().
|
protected |
References func().
|
protected |
void ug::IElemEstimatorFuncs< TLeaf, TDomain >::set_roid | ( | ReferenceObjectID | id, |
int | discType | ||
) |
sets the geometric object type
This functions set the geometric object type of the object, that is assembled next. The user has to call this function before most of the assembling routines can be called. Keep in mind, that the elements are looped type by type, thus this function has to be called very few times.
References ug::ROID_UNKNOWN, and UG_THROW.
|
static |
World dimension.
|
private |
flag indicating whether or not a posteriori error estimation is to be performed for this disc
Referenced by ug::IElemEstimatorFuncs< TLeaf, TDomain >::err_est_enabled(), and ug::IElemEstimatorFuncs< TLeaf, TDomain >::set_error_estimator().
|
protected |
current Geometric Object
|
protected |
error estimation object associated to the element discretization
Referenced by ug::IElemEstimatorFuncs< TLeaf, TDomain >::err_est_data(), and ug::IElemEstimatorFuncs< TLeaf, TDomain >::set_error_estimator().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |