Loading [MathJax]/extensions/tex2jax.js
ug4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ug::IElemDiscBase< TDomain > Class Template Referenceabstract

base class for all element-wise discretizations More...

#include <elem_disc_interface.h>

+ Inheritance diagram for ug::IElemDiscBase< TDomain >:

Public Types

typedef TDomain domain_type
 Domain type.
 
typedef TDomain::position_type position_type
 Position type.
 

Public Member Functions

SmartPtr< ApproximationSpace< TDomain > > approx_space ()
 returns approximation space
 
ConstSmartPtr< ApproximationSpace< TDomain > > approx_space () const
 returns approximation space
 
void check_setup (bool bNonRegularGrid)
 checks the setup of the elem disc
 
void clear_imports ()
 removes all imports
 
SmartPtr< TDomain > domain ()
 returns the domain
 
ConstSmartPtr< TDomain > domain () const
 returns the domain
 
const FunctionGroupfunction_group () const
 returns the current function group
 
ConstSmartPtr< FunctionPatternfunction_pattern () const
 returns the current function pattern
 
IDataImport< dim > & get_import (size_t i)
 returns an import
 
 IElemDiscBase (const char *functions="", const char *subsets="")
 Constructor.
 
 IElemDiscBase (const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset)
 Constructor.
 
bool is_time_dependent () const
 returns if assembling is time-dependent
 
bool local_time_series_needed ()
 
const LocalVectorTimeSerieslocal_time_solutions () const
 returns the local time solutions
 
const FunctionIndexMappingmap () const
 returns the current function index mapping
 
size_t num_fct () const
 number of functions this discretization handles
 
size_t num_imports () const
 returns number of imports
 
size_t num_subsets () const
 number of subsets this discretization handles
 
virtual void prepare_setting (const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)=0
 requests assembling for trial spaces and grid type
 
void register_import (IDataImport< dim > &Imp)
 registers a data import
 
virtual bool requests_local_time_series ()
 returns if local time series needed by assembling
 
void set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace)
 sets the approximation space
 
void set_functions (const std::string &functions)
 Approximation Space.
 
void set_functions (const std::vector< std::string > &functions)
 sets functions by vector of names
 
void set_stationary ()
 
void set_stationary (bool bStationaryForced=true)
 sets that the assembling is always stationary (even in instationary case)
 
void set_subsets (const std::string &subsets)
 sets subset(s) by name list, divided by ','
 
void set_subsets (const std::vector< std::string > &subsets)
 sets subset(s) by name list, divided by ','
 
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
 
void set_time_independent ()
 sets that the assembling is time independent
 
void set_time_point (const size_t timePoint)
 sets the current time point
 
TDomain::subset_handler_type & subset_handler ()
 returns the subset handler
 
const TDomain::subset_handler_type & subset_handler () const
 returns the subset handler
 
const std::vector< std::string > & symb_fcts () const
 returns the symbolic functions
 
const std::vector< std::string > & symb_subsets () const
 returns the symbolic subsets
 
number time () const
 returns currently set timepoint
 
size_t time_point () const
 returns the currently considered time point of the time-disc scheme
 
virtual int type () const
 returns the type of elem disc
 
virtual bool use_hanging () const
 returns if discretization acts on hanging nodes if present
 
virtual ~IElemDiscBase ()
 Virtual destructor.
 
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.
 

Protected Member Functions

virtual void approximation_space_changed ()
 callback invoked, when approximation space is changed
 
void set_function_pattern (ConstSmartPtr< FunctionPattern > fctPatt)
 sets current function pattern
 
void update_function_index_mapping ()
 updates the function index mapping
 

Protected Attributes

bool m_bStationaryForced
 flag if stationary assembling is to be used even in instationary assembling
 
FunctionGroup m_fctGrp
 current function group
 
FunctionIndexMapping m_fctIndexMap
 current function index mapping
 
LocalVectorTimeSeriesm_pLocalVectorTimeSeries
 list of local vectors for all solutions of the time series
 
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
 Approximation Space.
 
ConstSmartPtr< FunctionPatternm_spFctPattern
 current function pattern
 
size_t m_timePoint
 time point
 
std::vector< std::string > m_vFct
 vector holding name of all symbolic functions
 
std::vector< IDataImport< dim > * > m_vIImport
 data imports
 
std::vector< std::string > m_vSubset
 vector holding name of all symbolic subsets
 
std::vector< numberm_vScaleMass
 
std::vector< numberm_vScaleStiff
 

Detailed Description

template<typename TDomain>
class ug::IElemDiscBase< TDomain >

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.

Member Typedef Documentation

◆ domain_type

template<typename TDomain >
typedef TDomain ug::IElemDiscBase< TDomain >::domain_type

Domain type.

◆ position_type

template<typename TDomain >
typedef TDomain::position_type ug::IElemDiscBase< TDomain >::position_type

Position type.

Constructor & Destructor Documentation

◆ IElemDiscBase() [1/2]

template<typename TDomain >
ug::IElemDiscBase< TDomain >::IElemDiscBase ( const char *  functions = "",
const char *  subsets = "" 
)

◆ IElemDiscBase() [2/2]

template<typename TDomain >
ug::IElemDiscBase< TDomain >::IElemDiscBase ( const std::vector< std::string > &  vFct,
const std::vector< std::string > &  vSubset 
)

◆ ~IElemDiscBase()

template<typename TDomain >
virtual ug::IElemDiscBase< TDomain >::~IElemDiscBase ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ approx_space() [1/2]

template<typename TDomain >
SmartPtr< ApproximationSpace< TDomain > > ug::IElemDiscBase< TDomain >::approx_space ( )
inline

returns approximation space

References ug::IElemDiscBase< TDomain >::m_spApproxSpace.

◆ approx_space() [2/2]

template<typename TDomain >
ConstSmartPtr< ApproximationSpace< TDomain > > ug::IElemDiscBase< TDomain >::approx_space ( ) const
inline

returns approximation space

References ug::IElemDiscBase< TDomain >::m_spApproxSpace.

◆ approximation_space_changed()

template<typename TDomain >
virtual void ug::IElemDiscBase< TDomain >::approximation_space_changed ( )
inlineprotectedvirtual

callback invoked, when approximation space is changed

◆ check_setup()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::check_setup ( bool  bNonRegularGrid)

checks the setup of the elem disc

References ug::SubsetGroup::size(), and UG_LOG.

◆ clear_imports()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::clear_imports ( )
inline

removes all imports

References ug::IElemDiscBase< TDomain >::m_vIImport.

◆ domain() [1/2]

template<typename TDomain >
SmartPtr< TDomain > ug::IElemDiscBase< TDomain >::domain ( )
inline

returns the domain

References ug::IElemDiscBase< TDomain >::m_spApproxSpace.

◆ domain() [2/2]

template<typename TDomain >
ConstSmartPtr< TDomain > ug::IElemDiscBase< TDomain >::domain ( ) const
inline

returns the domain

References ug::IElemDiscBase< TDomain >::m_spApproxSpace.

◆ function_group()

template<typename TDomain >
const FunctionGroup & ug::IElemDiscBase< TDomain >::function_group ( ) const
inline

returns the current function group

References ug::IElemDiscBase< TDomain >::m_fctGrp.

◆ function_pattern()

template<typename TDomain >
ConstSmartPtr< FunctionPattern > ug::IElemDiscBase< TDomain >::function_pattern ( ) const
inline

returns the current function pattern

References ug::IElemDiscBase< TDomain >::m_spFctPattern.

◆ get_import()

template<typename TDomain >
IDataImport< dim > & ug::IElemDiscBase< TDomain >::get_import ( size_t  i)
inline

◆ is_time_dependent()

template<typename TDomain >
bool ug::IElemDiscBase< TDomain >::is_time_dependent ( ) const
inline

◆ local_time_series_needed()

template<typename TDomain >
bool ug::IElemDiscBase< TDomain >::local_time_series_needed ( )
inline

◆ local_time_solutions()

template<typename TDomain >
const LocalVectorTimeSeries * ug::IElemDiscBase< TDomain >::local_time_solutions ( ) const
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.

Returns
vLocalTimeSol vector of local time Solutions

References ug::IElemDiscBase< TDomain >::m_pLocalVectorTimeSeries.

◆ map()

template<typename TDomain >
const FunctionIndexMapping & ug::IElemDiscBase< TDomain >::map ( ) const
inline

returns the current function index mapping

References ug::IElemDiscBase< TDomain >::m_fctIndexMap.

◆ mass_scale() [1/2]

template<typename TDomain >
number ug::IElemDiscBase< TDomain >::mass_scale ( ) const
inline

returns the weight factors of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_timePoint, and ug::IElemDiscBase< TDomain >::m_vScaleMass.

◆ mass_scale() [2/2]

template<typename TDomain >
number ug::IElemDiscBase< TDomain >::mass_scale ( const size_t  timePoint) const
inline

returns the weight factors of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_vScaleMass.

◆ mass_scales()

template<typename TDomain >
const std::vector< number > & ug::IElemDiscBase< TDomain >::mass_scales ( ) const
inline

returns the weight factors of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_vScaleMass.

◆ num_fct()

template<typename TDomain >
size_t ug::IElemDiscBase< TDomain >::num_fct ( ) const
inline

number of functions this discretization handles

References ug::IElemDiscBase< TDomain >::m_vFct.

Referenced by ug::NeumannBoundaryBase< TDomain >::NeumannBoundaryBase().

◆ num_imports()

template<typename TDomain >
size_t ug::IElemDiscBase< TDomain >::num_imports ( ) const
inline

◆ num_subsets()

template<typename TDomain >
size_t ug::IElemDiscBase< TDomain >::num_subsets ( ) const
inline

number of subsets this discretization handles

References ug::IElemDiscBase< TDomain >::m_vSubset.

◆ prepare_setting()

template<typename TDomain >
virtual void ug::IElemDiscBase< TDomain >::prepare_setting ( const std::vector< LFEID > &  vLfeID,
bool  bNonRegularGrid 
)
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.

Parameters
[in]vLfeIDvector of Local Finite Element IDs
[in]bNonRegularGridregular grid type

Implemented in ug::Electromagnetism::NedelecLoopCurrent::AuxLaplaceLocAss, ug::Electromagnetism::NedelecProject::AuxLaplaceLocAss, ug::Electromagnetism::EddyCurrent_E_Nedelec< typename TDomain, typename TAlgebra >, ug::NavierStokes::CompressibleNavierStokesFV1< typename TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE< typename TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFractFV1< typename TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV< typename TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< typename TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionFVCR< typename TDomain >, ug::ConvectionDiffusionPlugin::ConvectionDiffusionStabFE< typename TDomain >, ug::NavierStokes::CRNavierStokesSymBC< typename TDomain >, ug::NavierStokes::NavierStokesFE< typename TDomain >, ug::NavierStokes::NavierStokesFE< TDomain >, ug::NavierStokes::NavierStokesFV< typename TDomain >, ug::NavierStokes::NavierStokesFV1< typename TDomain >, ug::NavierStokes::NavierStokesFV1< TDomain >, ug::NavierStokes::NavierStokesFVCR< typename TDomain >, ug::NavierStokes::NavierStokesFVCR< TDomain >, ug::NavierStokes::NavierStokesNoNormalStressOutflowFV< typename TDomain >, ug::NavierStokes::NavierStokesNoNormalStressOutflowFV1< typename TDomain >, ug::NavierStokes::NavierStokesNoNormalStressOutflowFVCR< typename TDomain >, ug::NavierStokes::NavierStokesSymBCFV1< typename TDomain >, ug::NavierStokes::NavierStokesWSBCFV1< typename TDomain >, ug::SmallStrainMechanics::SmallStrainMechanicsElemDisc< typename TDomain >, ug::SmallStrainMechanics::SmallStrainMechanicsElemDisc< TDomain >, ug::DiracSourceDisc< TDomain >, ug::NeumannBoundaryFE< TDomain >, ug::NeumannBoundaryFV< TDomain >, ug::NeumannBoundaryFV1< TDomain >, and ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >.

◆ register_import()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::register_import ( IDataImport< dim > &  Imp)

registers a data import

◆ requests_local_time_series()

template<typename TDomain >
virtual bool ug::IElemDiscBase< TDomain >::requests_local_time_series ( )
inlinevirtual

◆ set_approximation_space()

template<typename TDomain >
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.

◆ set_function_pattern()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::set_function_pattern ( ConstSmartPtr< FunctionPattern fctPatt)
protected

sets current function pattern

◆ set_functions() [1/2]

template<typename TDomain >
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(), and ug::IElemDiscBase< TDomain >::IElemDiscBase().

◆ set_functions() [2/2]

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::set_functions ( const std::vector< std::string > &  functions)

sets functions by vector of names

◆ set_stationary() [1/2]

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::set_stationary ( )
inline

◆ set_stationary() [2/2]

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::set_stationary ( bool  bStationaryForced = true)
inline

sets that the assembling is always stationary (even in instationary case)

References ug::IElemDiscBase< TDomain >::m_bStationaryForced.

◆ set_subsets() [1/2]

template<typename TDomain >
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(), and ug::IElemDiscBase< TDomain >::IElemDiscBase().

◆ set_subsets() [2/2]

template<typename TDomain >
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.

◆ set_time_dependent()

template<typename TDomain >
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.

Parameters
[in]locTimeSeriesTime series of previous solutions

◆ set_time_independent()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::set_time_independent ( )

sets that the assembling is time independent

◆ set_time_point()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::set_time_point ( const size_t  timePoint)
inline

sets the current time point

References ug::IElemDiscBase< TDomain >::m_timePoint.

◆ stiff_scale() [1/2]

template<typename TDomain >
number ug::IElemDiscBase< TDomain >::stiff_scale ( ) const
inline

returns the weight factors of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_timePoint, and ug::IElemDiscBase< TDomain >::m_vScaleStiff.

◆ stiff_scale() [2/2]

template<typename TDomain >
number ug::IElemDiscBase< TDomain >::stiff_scale ( const size_t  timePoint) const
inline

returns the weight factors of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_vScaleStiff.

◆ stiff_scales()

template<typename TDomain >
const std::vector< number > & ug::IElemDiscBase< TDomain >::stiff_scales ( ) const
inline

returns the weight factors of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_vScaleStiff.

◆ subset_handler() [1/2]

template<typename TDomain >
TDomain::subset_handler_type & ug::IElemDiscBase< TDomain >::subset_handler ( )
inline

returns the subset handler

References ug::IElemDiscBase< TDomain >::m_spApproxSpace, and UG_ASSERT.

◆ subset_handler() [2/2]

template<typename TDomain >
const TDomain::subset_handler_type & ug::IElemDiscBase< TDomain >::subset_handler ( ) const
inline

returns the subset handler

References ug::IElemDiscBase< TDomain >::m_spApproxSpace, and UG_ASSERT.

◆ symb_fcts()

template<typename TDomain >
const std::vector< std::string > & ug::IElemDiscBase< TDomain >::symb_fcts ( ) const
inline

returns the symbolic functions

References ug::IElemDiscBase< TDomain >::m_vFct.

◆ symb_subsets()

template<typename TDomain >
const std::vector< std::string > & ug::IElemDiscBase< TDomain >::symb_subsets ( ) const
inline

returns the symbolic subsets

References ug::IElemDiscBase< TDomain >::m_vSubset.

◆ time()

template<typename TDomain >
number ug::IElemDiscBase< TDomain >::time ( ) const
inline

◆ time_point()

template<typename TDomain >
size_t ug::IElemDiscBase< TDomain >::time_point ( ) const
inline

returns the currently considered time point of the time-disc scheme

References ug::IElemDiscBase< TDomain >::m_timePoint.

◆ type()

template<typename TDomain >
virtual int ug::IElemDiscBase< TDomain >::type ( ) const
inlinevirtual

returns the type of elem disc

Reimplemented in ug::NeumannBoundaryBase< TDomain >.

References ug::EDT_ELEM, and ug::EDT_SIDE.

◆ update_function_index_mapping()

template<typename TDomain >
void ug::IElemDiscBase< TDomain >::update_function_index_mapping ( )
protected

updates the function index mapping

◆ use_hanging()

Member Data Documentation

◆ dim

template<typename TDomain >
const int ug::IElemDiscBase< TDomain >::dim = TDomain::dim
static

World dimension.

◆ m_bStationaryForced

template<typename TDomain >
bool ug::IElemDiscBase< TDomain >::m_bStationaryForced
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().

◆ m_fctGrp

template<typename TDomain >
FunctionGroup ug::IElemDiscBase< TDomain >::m_fctGrp
protected

current function group

Referenced by ug::IElemDiscBase< TDomain >::function_group().

◆ m_fctIndexMap

template<typename TDomain >
FunctionIndexMapping ug::IElemDiscBase< TDomain >::m_fctIndexMap
protected

current function index mapping

Referenced by ug::IElemDiscBase< TDomain >::map().

◆ m_pLocalVectorTimeSeries

template<typename TDomain >
LocalVectorTimeSeries* ug::IElemDiscBase< TDomain >::m_pLocalVectorTimeSeries
protected

◆ m_spApproxSpace

◆ m_spFctPattern

template<typename TDomain >
ConstSmartPtr<FunctionPattern> ug::IElemDiscBase< TDomain >::m_spFctPattern
protected

current function pattern

Referenced by ug::IElemDiscBase< TDomain >::function_pattern().

◆ m_timePoint

◆ m_vFct

template<typename TDomain >
std::vector<std::string> ug::IElemDiscBase< TDomain >::m_vFct
protected

vector holding name of all symbolic functions

Referenced by ug::IElemDiscBase< TDomain >::num_fct(), and ug::IElemDiscBase< TDomain >::symb_fcts().

◆ m_vIImport

template<typename TDomain >
std::vector<IDataImport<dim>*> ug::IElemDiscBase< TDomain >::m_vIImport
protected

◆ m_vScaleMass

template<typename TDomain >
std::vector<number> ug::IElemDiscBase< TDomain >::m_vScaleMass
protected

◆ m_vScaleStiff

template<typename TDomain >
std::vector<number> ug::IElemDiscBase< TDomain >::m_vScaleStiff
protected

◆ m_vSubset

template<typename TDomain >
std::vector<std::string> ug::IElemDiscBase< TDomain >::m_vSubset
protected

vector holding name of all symbolic subsets

Referenced by ug::IElemDiscBase< TDomain >::num_subsets(), and ug::IElemDiscBase< TDomain >::symb_subsets().


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