ug4
|
base class for all element-wise discretizations More...
#include <elem_disc_interface.h>
Public Types | |
typedef TDomain | domain_type |
Domain type. More... | |
typedef TDomain::position_type | position_type |
Position type. More... | |
Public Member Functions | |
SmartPtr< ApproximationSpace< TDomain > > | approx_space () |
returns approximation space More... | |
ConstSmartPtr< ApproximationSpace< TDomain > > | approx_space () const |
returns approximation space More... | |
void | check_setup (bool bNonRegularGrid) |
checks the setup of the elem disc More... | |
void | clear_imports () |
removes all imports More... | |
SmartPtr< TDomain > | domain () |
returns the domain More... | |
ConstSmartPtr< TDomain > | domain () const |
returns the domain More... | |
const FunctionGroup & | function_group () const |
returns the current function group More... | |
ConstSmartPtr< FunctionPattern > | function_pattern () const |
returns the current function pattern More... | |
IDataImport< dim > & | get_import (size_t i) |
returns an import More... | |
IElemDiscBase (const char *functions="", const char *subsets="") | |
Constructor. More... | |
IElemDiscBase (const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset) | |
Constructor. More... | |
bool | is_time_dependent () const |
returns if assembling is time-dependent More... | |
bool | local_time_series_needed () |
const LocalVectorTimeSeries * | local_time_solutions () const |
returns the local time solutions More... | |
const FunctionIndexMapping & | map () const |
returns the current function index mapping More... | |
size_t | num_fct () const |
number of functions this discretization handles More... | |
size_t | num_imports () const |
returns number of imports More... | |
size_t | num_subsets () const |
number of subsets this discretization handles More... | |
virtual void | prepare_setting (const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)=0 |
requests assembling for trial spaces and grid type More... | |
void | register_import (IDataImport< dim > &Imp) |
registers a data import More... | |
virtual bool | requests_local_time_series () |
returns if local time series needed by assembling More... | |
void | set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace) |
sets the approximation space More... | |
void | set_functions (const std::string &functions) |
Approximation Space. More... | |
void | set_functions (const std::vector< std::string > &functions) |
sets functions by vector of names More... | |
void | set_stationary () |
void | set_stationary (bool bStationaryForced=true) |
sets that the assembling is always stationary (even in instationary case) More... | |
void | set_subsets (const std::string &subsets) |
sets subset(s) by name list, divided by ',' More... | |
void | set_subsets (const std::vector< std::string > &subsets) |
sets subset(s) by name list, divided by ',' More... | |
void | set_time_dependent (LocalVectorTimeSeries &locTimeSeries, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff) |
sets if assembling should be time-dependent and the local time series More... | |
void | set_time_independent () |
sets that the assembling is time independent More... | |
void | set_time_point (const size_t timePoint) |
sets the current time point More... | |
TDomain::subset_handler_type & | subset_handler () |
returns the subset handler More... | |
const TDomain::subset_handler_type & | subset_handler () const |
returns the subset handler More... | |
const std::vector< std::string > & | symb_fcts () const |
returns the symbolic functions More... | |
const std::vector< std::string > & | symb_subsets () const |
returns the symbolic subsets More... | |
number | time () const |
returns currently set timepoint More... | |
size_t | time_point () const |
returns the currently considered time point of the time-disc scheme More... | |
virtual int | type () const |
returns the type of elem disc More... | |
virtual bool | use_hanging () const |
returns if discretization acts on hanging nodes if present More... | |
virtual | ~IElemDiscBase () |
Virtual destructor. More... | |
const std::vector< number > & | mass_scales () const |
const std::vector< number > & | stiff_scales () const |
number | mass_scale (const size_t timePoint) const |
number | stiff_scale (const size_t timePoint) const |
number | mass_scale () const |
number | stiff_scale () const |
Static Public Attributes | |
static const int | dim = TDomain::dim |
World dimension. More... | |
Protected Member Functions | |
virtual void | approximation_space_changed () |
callback invoked, when approximation space is changed More... | |
void | set_function_pattern (ConstSmartPtr< FunctionPattern > fctPatt) |
sets current function pattern More... | |
void | update_function_index_mapping () |
updates the function index mapping More... | |
Protected Attributes | |
bool | m_bStationaryForced |
flag if stationary assembling is to be used even in instationary assembling More... | |
FunctionGroup | m_fctGrp |
current function group More... | |
FunctionIndexMapping | m_fctIndexMap |
current function index mapping More... | |
LocalVectorTimeSeries * | m_pLocalVectorTimeSeries |
list of local vectors for all solutions of the time series More... | |
SmartPtr< ApproximationSpace< TDomain > > | m_spApproxSpace |
Approximation Space. More... | |
ConstSmartPtr< FunctionPattern > | m_spFctPattern |
current function pattern More... | |
size_t | m_timePoint |
time point More... | |
std::vector< std::string > | m_vFct |
vector holding name of all symbolic functions More... | |
std::vector< IDataImport< dim > * > | m_vIImport |
data imports More... | |
std::vector< std::string > | m_vSubset |
vector holding name of all symbolic subsets More... | |
std::vector< number > | m_vScaleMass |
std::vector< number > | m_vScaleStiff |
base class for all element-wise discretizations
This class is the base class for element-wise discretizations. An implementation of this class must provide local stiffness/mass-matrix contribution of one element to the global jacobian and local contributions of one element to the local defect.
typedef TDomain ug::IElemDiscBase< TDomain >::domain_type |
Domain type.
typedef TDomain::position_type ug::IElemDiscBase< TDomain >::position_type |
Position type.
ug::IElemDiscBase< TDomain >::IElemDiscBase | ( | const char * | functions = "" , |
const char * | subsets = "" |
||
) |
Constructor.
References ug::IElemDiscBase< TDomain >::set_functions(), and ug::IElemDiscBase< TDomain >::set_subsets().
ug::IElemDiscBase< TDomain >::IElemDiscBase | ( | const std::vector< std::string > & | vFct, |
const std::vector< std::string > & | vSubset | ||
) |
Constructor.
References ug::IElemDiscBase< TDomain >::set_functions(), and ug::IElemDiscBase< TDomain >::set_subsets().
|
inlinevirtual |
Virtual destructor.
|
inline |
returns approximation space
References ug::IElemDiscBase< TDomain >::m_spApproxSpace.
|
inline |
returns approximation space
References ug::IElemDiscBase< TDomain >::m_spApproxSpace.
|
inlineprotectedvirtual |
callback invoked, when approximation space is changed
void ug::IElemDiscBase< TDomain >::check_setup | ( | bool | bNonRegularGrid | ) |
checks the setup of the elem disc
References ug::SubsetGroup::size(), and UG_LOG.
|
inline |
removes all imports
References ug::IElemDiscBase< TDomain >::m_vIImport.
|
inline |
returns the domain
References ug::IElemDiscBase< TDomain >::m_spApproxSpace.
|
inline |
returns the domain
References ug::IElemDiscBase< TDomain >::m_spApproxSpace.
|
inline |
returns the current function group
References ug::IElemDiscBase< TDomain >::m_fctGrp.
|
inline |
returns the current function pattern
References ug::IElemDiscBase< TDomain >::m_spFctPattern.
|
inline |
returns an import
References ug::IElemDiscBase< TDomain >::m_vIImport, ug::IElemDiscBase< TDomain >::num_imports(), and UG_ASSERT.
Referenced by ug::DataEvaluator< TDomain >::finish_elem_loop().
|
inline |
returns if assembling is time-dependent
References ug::IElemDiscBase< TDomain >::m_bStationaryForced, and ug::IElemDiscBase< TDomain >::m_pLocalVectorTimeSeries.
Referenced by ug::IElemDiscBase< TDomain >::local_time_series_needed().
|
inline |
|
inline |
returns the local time solutions
This function returns the local time solutions. This a type of vector, that holds the local unknowns for each time point of a time series. Note, that the first sol is always the current (iterated, unknown) time point, while all remaining sols are the already computed time steps used e.g. in a time stepping scheme.
References ug::IElemDiscBase< TDomain >::m_pLocalVectorTimeSeries.
|
inline |
returns the current function index mapping
References ug::IElemDiscBase< TDomain >::m_fctIndexMap.
|
inline |
returns the weight factors of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_timePoint, and ug::IElemDiscBase< TDomain >::m_vScaleMass.
|
inline |
returns the weight factors of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_vScaleMass.
|
inline |
returns the weight factors of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_vScaleMass.
|
inline |
number of functions this discretization handles
References ug::IElemDiscBase< TDomain >::m_vFct.
Referenced by ug::NeumannBoundaryBase< TDomain >::NeumannBoundaryBase().
|
inline |
returns number of imports
References ug::IElemDiscBase< TDomain >::m_vIImport.
Referenced by ug::DataEvaluator< TDomain >::finish_elem_loop(), and ug::IElemDiscBase< TDomain >::get_import().
|
inline |
number of subsets this discretization handles
References ug::IElemDiscBase< TDomain >::m_vSubset.
|
pure virtual |
requests assembling for trial spaces and grid type
This function is called before the assembling starts. The IElemDisc-Implementation is supposed to checks if it can assemble the set of LFEID and the grid type. It may register corresponding assembling functions or perform other initialization. If the ElemDisc does not support the setting it should throw an exception.
[in] | vLfeID | vector of Local Finite Element IDs |
[in] | bNonRegularGrid | regular grid type |
Implemented in ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >, ug::NeumannBoundaryFV1< TDomain >, ug::NeumannBoundaryFV< TDomain >, ug::NeumannBoundaryFE< TDomain >, ug::DiracSourceDisc< TDomain >, ug::NavierStokes::CompressibleNavierStokesFV1< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFractFV1< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFVCR< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >, ug::NavierStokes::CRNavierStokesSymBC< class >, ug::NavierStokes::NavierStokesFE< class >, ug::NavierStokes::NavierStokesFV< class >, ug::NavierStokes::NavierStokesFV1< class >, ug::NavierStokes::NavierStokesFVCR< class >, ug::NavierStokes::NavierStokesNoNormalStressOutflowFV< class >, ug::NavierStokes::NavierStokesNoNormalStressOutflowFV1< class >, ug::NavierStokes::NavierStokesNoNormalStressOutflowFVCR< class >, ug::NavierStokes::NavierStokesSymBCFV1< class >, ug::NavierStokes::NavierStokesWSBCFV1< class >, ug::SmallStrainMechanics::SmallStrainMechanicsElemDisc< class >, ug::Electromagnetism::NedelecLoopCurrent::AuxLaplaceLocAss, ug::Electromagnetism::NedelecProject::AuxLaplaceLocAss, and ug::Electromagnetism::EddyCurrent_E_Nedelec< class, class >.
void ug::IElemDiscBase< TDomain >::register_import | ( | IDataImport< dim > & | Imp | ) |
registers a data import
|
inlinevirtual |
returns if local time series needed by assembling
This callback must be implemented by a derived Elem Disc in order to handle time-dependent data. As return the derived Elem Disc can specify, if it really needs data from previous time steps for the (spatial) disc. The default is false.
Reimplemented in ug::NavierStokes::CompressibleNavierStokesBase< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionBase< class >, ug::NavierStokes::CRNavierStokesSymBC< class >, ug::NavierStokes::IncompressibleNavierStokesBase< class >, ug::NavierStokes::NavierStokesBase< class >, ug::NavierStokes::NavierStokesFV< class >, ug::NavierStokes::NavierStokesNoNormalStressOutflowBase< class >, ug::NavierStokes::NavierStokesSymBCFV1< class >, and ug::NavierStokes::NavierStokesWSBCFV1< class >.
Referenced by ug::IElemDiscBase< TDomain >::local_time_series_needed().
void ug::IElemDiscBase< TDomain >::set_approximation_space | ( | SmartPtr< ApproximationSpace< TDomain > > | approxSpace | ) |
sets the approximation space
Calls protected virtual 'approximation_space_changed', when a new approximation space has been set. Note that 'approximation_space_changed' is only called once if the same approximation space is set multiple times.
|
protected |
sets current function pattern
void ug::IElemDiscBase< TDomain >::set_functions | ( | const std::string & | functions | ) |
Approximation Space.
sets functions by name list, divided by ','
Referenced by ug::IElemDiscBase< TDomain >::IElemDiscBase().
void ug::IElemDiscBase< TDomain >::set_functions | ( | const std::vector< std::string > & | functions | ) |
sets functions by vector of names
|
inline |
References ug::IElemDiscBase< TDomain >::set_stationary().
Referenced by ug::IElemDiscBase< TDomain >::set_stationary().
|
inline |
sets that the assembling is always stationary (even in instationary case)
References ug::IElemDiscBase< TDomain >::m_bStationaryForced.
void ug::IElemDiscBase< TDomain >::set_subsets | ( | const std::string & | subsets | ) |
sets subset(s) by name list, divided by ','
References ug::TokenizeString().
Referenced by ug::IElemDiscBase< TDomain >::IElemDiscBase().
void ug::IElemDiscBase< TDomain >::set_subsets | ( | const std::vector< std::string > & | subsets | ) |
sets subset(s) by name list, divided by ','
References ug::RemoveWhitespaceFromString(), and UG_THROW.
void ug::IElemDiscBase< TDomain >::set_time_dependent | ( | LocalVectorTimeSeries & | locTimeSeries, |
const std::vector< number > & | vScaleMass, | ||
const std::vector< number > & | vScaleStiff | ||
) |
sets if assembling should be time-dependent and the local time series
This function specifies if the assembling is time-dependent. If NULL is passed, the assembling is assumed to be time-independent. If a local time series is passed, this series is used as previous solution.
[in] | locTimeSeries | Time series of previous solutions |
void ug::IElemDiscBase< TDomain >::set_time_independent |
sets that the assembling is time independent
|
inline |
sets the current time point
References ug::IElemDiscBase< TDomain >::m_timePoint.
|
inline |
returns the weight factors of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_timePoint, and ug::IElemDiscBase< TDomain >::m_vScaleStiff.
|
inline |
returns the weight factors of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_vScaleStiff.
|
inline |
returns the weight factors of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_vScaleStiff.
|
inline |
returns the subset handler
References ug::IElemDiscBase< TDomain >::m_spApproxSpace, and UG_ASSERT.
|
inline |
returns the subset handler
References ug::IElemDiscBase< TDomain >::m_spApproxSpace, and UG_ASSERT.
|
inline |
returns the symbolic functions
References ug::IElemDiscBase< TDomain >::m_vFct.
|
inline |
returns the symbolic subsets
References ug::IElemDiscBase< TDomain >::m_vSubset.
|
inline |
returns currently set timepoint
References ug::IElemDiscBase< TDomain >::m_pLocalVectorTimeSeries, ug::IElemDiscBase< TDomain >::m_timePoint, and ug::LocalVectorTimeSeries::time().
|
inline |
returns the currently considered time point of the time-disc scheme
References ug::IElemDiscBase< TDomain >::m_timePoint.
|
inlinevirtual |
returns the type of elem disc
Reimplemented in ug::NeumannBoundaryBase< TDomain >.
References ug::EDT_ELEM, and ug::EDT_SIDE.
|
protected |
updates the function index mapping
|
inlinevirtual |
returns if discretization acts on hanging nodes if present
This function returns if a discretization really needs the hanging nodes in case of non-regular grid. This may not be the case for e.g. finite element assemblings but is needed for finite volumes
Reimplemented in ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >, ug::DiracSourceDisc< TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFractFV1< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFVCR< class >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< class >, and ug::NavierStokes::NavierStokesFVCR< class >.
|
static |
World dimension.
|
protected |
flag if stationary assembling is to be used even in instationary assembling
Referenced by ug::IElemDiscBase< TDomain >::is_time_dependent(), and ug::IElemDiscBase< TDomain >::set_stationary().
|
protected |
current function group
Referenced by ug::IElemDiscBase< TDomain >::function_group().
|
protected |
current function index mapping
Referenced by ug::IElemDiscBase< TDomain >::map().
|
protected |
list of local vectors for all solutions of the time series
Referenced by ug::IElemDiscBase< TDomain >::is_time_dependent(), ug::IElemDiscBase< TDomain >::local_time_solutions(), and ug::IElemDiscBase< TDomain >::time().
|
protected |
Approximation Space.
Referenced by ug::IElemDiscBase< TDomain >::approx_space(), ug::IElemDiscBase< TDomain >::domain(), and ug::IElemDiscBase< TDomain >::subset_handler().
|
protected |
current function pattern
Referenced by ug::IElemDiscBase< TDomain >::function_pattern().
|
protected |
|
protected |
vector holding name of all symbolic functions
Referenced by ug::IElemDiscBase< TDomain >::num_fct(), and ug::IElemDiscBase< TDomain >::symb_fcts().
|
protected |
data imports
Referenced by ug::IElemDiscBase< TDomain >::clear_imports(), ug::IElemDiscBase< TDomain >::get_import(), and ug::IElemDiscBase< TDomain >::num_imports().
|
protected |
weight factors for time dependent assembling
Referenced by ug::IElemDiscBase< TDomain >::mass_scale(), and ug::IElemDiscBase< TDomain >::mass_scales().
|
protected |
weight factors for time dependent assembling
Referenced by ug::IElemDiscBase< TDomain >::stiff_scale(), and ug::IElemDiscBase< TDomain >::stiff_scales().
|
protected |
vector holding name of all symbolic subsets
Referenced by ug::IElemDiscBase< TDomain >::num_subsets(), and ug::IElemDiscBase< TDomain >::symb_subsets().