ug4
ug::DataEvaluatorBase< TDomain, TElemDisc > Class Template Reference

helper class to evaluate data evaluation for local contributions during assembling More...

#include <data_evaluator.h>

Public Member Functions

void compute_err_est_A_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const LocalIndices &ind, const number scaleMass=(number) 1.0, const number scaleStiff=(number) 1.0)
 compute contributions of the local error indicators in one element for all IElemDiscs More...
 
void compute_err_est_M_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const LocalIndices &ind, const number scaleMass=(number) 1.0, const number scaleStiff=(number) 1.0)
 compute contributions of the local error indicators in one element for all IElemDiscs More...
 
void compute_err_est_rhs_elem (GridObject *elem, const MathVector< dim > vCornerCoords[], const LocalIndices &ind, const number scaleMass=(number) 1.0, const number scaleStiff=(number) 1.0)
 compute contributions of the local error indicators in one element for all IElemDiscs More...
 
 DataEvaluatorBase (int discPart, const std::vector< TElemDisc * > &vElemDisc, ConstSmartPtr< FunctionPattern > fctPat, const bool bNonRegularGrid, LocalVectorTimeSeries *locTimeSeries=NULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL)
 sets the elem discs to evaluate More...
 
void finish_err_est_elem_loop ()
 finishes the error estimator element loop for all IElemDiscs More...
 
void prepare_err_est_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const LocalIndices &ind, bool bDeriv=false)
 prepares the element for all IElemDiscs More...
 
void prepare_err_est_elem_loop (const ReferenceObjectID id, int si)
 prepares the element loop for all IElemDiscs for the computation of the error estimator More...
 
void set_time_point (const size_t timePoint)
 sets the time point for data evaluation More...
 
bool time_series_needed () const
 returns if local time series is really needed for assembling More...
 
bool use_hanging () const
 returns if one of the element discs needs hanging dofs More...
 

Static Public Attributes

static const int dim = TDomain::dim
 world dimension More...
 

Protected Member Functions

void add_data_to_eval_data (std::vector< SmartPtr< ICplUserData< dim > > > &vEvalData, std::vector< SmartPtr< ICplUserData< dim > > > &vTryingToAdd)
 tries to add the last entry of vTryingToAdd to the eval data More...
 
void clear_extracted_data_and_mappings ()
 clears imports and user data and mappings betweem commonFctGrp and local More...
 
void clear_positions_in_user_data ()
 clears all requested positions in user data More...
 
void extract_imports_and_userdata (int subsetIndex, int discPart)
 extracts imports and userdata from IElemDiscs More...
 

Protected Attributes

bool m_bNeedLocTimeSeries
 flag indicating if any elem disc needs local time series More...
 
bool m_bUseHanging
 flag if hanging nodes are used More...
 
int m_discPart
 disc part needed (MASS and/or STIFF and/or RHS) More...
 
LocalVectorTimeSeriesm_pLocTimeSeries
 local time series (non-const since mapping may change) More...
 
ConstSmartPtr< FunctionPatternm_spFctPattern
 underlying function pattern More...
 
std::vector< TElemDisc * > m_vElemDisc [MAX_PROCESS]
 elem disc data More...
 
std::vector< IDataImport< dim > * > m_vImport [MAX_PROCESS][MAX_PART]
 imports that must be evaluated More...
 
std::vector< SmartPtr< ICplUserData< dim > > > m_vConstData
 
std::vector< SmartPtr< ICplUserData< dim > > > m_vPosData
 
std::vector< SmartPtr< ICplUserData< dim > > > m_vDependentData
 

Detailed Description

template<typename TDomain, typename TElemDisc>
class ug::DataEvaluatorBase< TDomain, TElemDisc >

helper class to evaluate data evaluation for local contributions during assembling

This class is a helper class to facilitate the correct evaluation of data during the assembling process. For a given set of IElemDisc this class prepares the assembling, checks for DataImport/DataExports and schedules the evaluation of the data in the correct order. In addition the coupling contributions due to Import/Exports are computed by this class and can be added to the local jacobian/defect.

Constructor & Destructor Documentation

◆ DataEvaluatorBase()

template<typename TDomain , typename TElemDisc >
ug::DataEvaluatorBase< TDomain, TElemDisc >::DataEvaluatorBase ( int  discPart,
const std::vector< TElemDisc * > &  vElemDisc,
ConstSmartPtr< FunctionPattern fctPat,
const bool  bNonRegularGrid,
LocalVectorTimeSeries locTimeSeries = NULL,
const std::vector< number > *  vScaleMass = NULL,
const std::vector< number > *  vScaleStiff = NULL 
)

Member Function Documentation

◆ add_data_to_eval_data()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::add_data_to_eval_data ( std::vector< SmartPtr< ICplUserData< dim > > > &  vEvalData,
std::vector< SmartPtr< ICplUserData< dim > > > &  vTryingToAdd 
)
protected

tries to add the last entry of vTryingToAdd to the eval data

◆ clear_extracted_data_and_mappings()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::clear_extracted_data_and_mappings
protected

clears imports and user data and mappings betweem commonFctGrp and local

References ug::MASS, ug::MAX_PROCESS, ug::RHS, and ug::STIFF.

◆ clear_positions_in_user_data()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::clear_positions_in_user_data
protected

clears all requested positions in user data

◆ compute_err_est_A_elem()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::compute_err_est_A_elem ( LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
const LocalIndices ind,
const number  scaleMass = (number) 1.0,
const number  scaleStiff = (number) 1.0 
)

compute contributions of the local error indicators in one element for all IElemDiscs

References ug::PT_ALL, ug::STIFF, UG_ASSERT, and UG_CATCH_THROW.

◆ compute_err_est_M_elem()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::compute_err_est_M_elem ( LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
const LocalIndices ind,
const number  scaleMass = (number) 1.0,
const number  scaleStiff = (number) 1.0 
)

compute contributions of the local error indicators in one element for all IElemDiscs

References ug::MASS, ug::PT_ALL, UG_ASSERT, and UG_CATCH_THROW.

◆ compute_err_est_rhs_elem()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::compute_err_est_rhs_elem ( GridObject elem,
const MathVector< dim vCornerCoords[],
const LocalIndices ind,
const number  scaleMass = (number) 1.0,
const number  scaleStiff = (number) 1.0 
)

compute contributions of the local error indicators in one element for all IElemDiscs

References ug::PT_ALL, ug::RHS, UG_ASSERT, and UG_CATCH_THROW.

◆ extract_imports_and_userdata()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::extract_imports_and_userdata ( int  subsetIndex,
int  discPart 
)
protected

◆ finish_err_est_elem_loop()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::finish_err_est_elem_loop

finishes the error estimator element loop for all IElemDiscs

References ug::PT_ALL, and UG_CATCH_THROW.

◆ prepare_err_est_elem()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::prepare_err_est_elem ( LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
const LocalIndices ind,
bool  bDeriv = false 
)

prepares the element for all IElemDiscs

References ug::LocalVector::access_by_map(), compute(), ug::PT_ALL, and UG_CATCH_THROW.

◆ prepare_err_est_elem_loop()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::prepare_err_est_elem_loop ( const ReferenceObjectID  id,
int  si 
)

prepares the element loop for all IElemDiscs for the computation of the error estimator

References compute(), ug::MASS, ug::PT_ALL, ug::RHS, ug::STIFF, and UG_CATCH_THROW.

◆ set_time_point()

template<typename TDomain , typename TElemDisc >
void ug::DataEvaluatorBase< TDomain, TElemDisc >::set_time_point ( const size_t  timePoint)

sets the time point for data evaluation

References ug::PT_ALL.

◆ time_series_needed()

template<typename TDomain , typename TElemDisc >
bool ug::DataEvaluatorBase< TDomain, TElemDisc >::time_series_needed ( ) const
inline

returns if local time series is really needed for assembling

References ug::DataEvaluatorBase< TDomain, TElemDisc >::m_bNeedLocTimeSeries.

◆ use_hanging()

template<typename TDomain , typename TElemDisc >
bool ug::DataEvaluatorBase< TDomain, TElemDisc >::use_hanging ( ) const
inline

returns if one of the element discs needs hanging dofs

References ug::DataEvaluatorBase< TDomain, TElemDisc >::m_bUseHanging.

Member Data Documentation

◆ dim

template<typename TDomain , typename TElemDisc >
const int ug::DataEvaluatorBase< TDomain, TElemDisc >::dim = TDomain::dim
static

world dimension

◆ m_bNeedLocTimeSeries

template<typename TDomain , typename TElemDisc >
bool ug::DataEvaluatorBase< TDomain, TElemDisc >::m_bNeedLocTimeSeries
protected

◆ m_bUseHanging

template<typename TDomain , typename TElemDisc >
bool ug::DataEvaluatorBase< TDomain, TElemDisc >::m_bUseHanging
protected

◆ m_discPart

template<typename TDomain , typename TElemDisc >
int ug::DataEvaluatorBase< TDomain, TElemDisc >::m_discPart
protected

disc part needed (MASS and/or STIFF and/or RHS)

Referenced by ug::DataEvaluatorBase< TDomain, TElemDisc >::DataEvaluatorBase().

◆ m_pLocTimeSeries

template<typename TDomain , typename TElemDisc >
LocalVectorTimeSeries* ug::DataEvaluatorBase< TDomain, TElemDisc >::m_pLocTimeSeries
protected

local time series (non-const since mapping may change)

Referenced by ug::DataEvaluatorBase< TDomain, TElemDisc >::DataEvaluatorBase().

◆ m_spFctPattern

template<typename TDomain , typename TElemDisc >
ConstSmartPtr<FunctionPattern> ug::DataEvaluatorBase< TDomain, TElemDisc >::m_spFctPattern
protected

underlying function pattern

◆ m_vConstData

template<typename TDomain , typename TElemDisc >
std::vector<SmartPtr<ICplUserData<dim> > > ug::DataEvaluatorBase< TDomain, TElemDisc >::m_vConstData
protected

user data that must be evaluated

◆ m_vDependentData

template<typename TDomain , typename TElemDisc >
std::vector<SmartPtr<ICplUserData<dim> > > ug::DataEvaluatorBase< TDomain, TElemDisc >::m_vDependentData
protected

user data that must be evaluated

◆ m_vElemDisc

template<typename TDomain , typename TElemDisc >
std::vector<TElemDisc*> ug::DataEvaluatorBase< TDomain, TElemDisc >::m_vElemDisc[MAX_PROCESS]
protected

◆ m_vImport

template<typename TDomain , typename TElemDisc >
std::vector<IDataImport<dim>*> ug::DataEvaluatorBase< TDomain, TElemDisc >::m_vImport[MAX_PROCESS][MAX_PART]
protected

imports that must be evaluated

◆ m_vPosData

template<typename TDomain , typename TElemDisc >
std::vector<SmartPtr<ICplUserData<dim> > > ug::DataEvaluatorBase< TDomain, TElemDisc >::m_vPosData
protected

user data that must be evaluated


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