ug4
ug::GridFunction< TDomain, TAlgebra > Class Template Reference

represents numerical solutions on a grid using an algebraic vector More...

#include <grid_function.h>

+ Inheritance diagram for ug::GridFunction< TDomain, TAlgebra >:

Classes

struct  dim_traits
 
struct  traits
 iterator traits More...
 

Public Types

typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef ApproximationSpace< TDomain > approximation_space_type
 Type of Approximation space. More...
 
typedef dim_traits< dim >::const_iterator const_element_iterator
 
typedef dim_traits< dim-1 >::const_iterator const_side_iterator
 
typedef TDomain domain_type
 Domain. More...
 
typedef dim_traits< dim >::iterator element_iterator
 
typedef dim_traits< dim >::grid_base_object element_type
 
typedef dim_traits< dim-1 >::iterator side_iterator
 
typedef dim_traits< dim-1 >::grid_base_object side_type
 
typedef GridFunction< TDomain, TAlgebra > this_type
 This type. More...
 
typedef algebra_type::vector_type vector_type
 Vector type used to store dof values. More...
 

Public Member Functions

template<typename TElem >
size_t algebra_indices (TElem *elem, std::vector< size_t > &ind, bool bClear=true) const
 get algebra indices on an geometric object in canonical order More...
 
SmartPtr< ApproximationSpace< TDomain > > approx_space ()
 returns approx space More...
 
ConstSmartPtr< ApproximationSpace< TDomain > > approx_space () const
 returns const domain More...
 
void assign (const this_type &v)
 assigns another GridFunction More...
 
void assign (const vector_type &v)
 assigns the values of a vector More...
 
SmartPtr< this_typeclone () const
 clone including values More...
 
virtual void clone_pattern (const this_type &v)
 copies the GridFunction v, except that the values are copied. More...
 
SmartPtr< this_typeclone_without_values () const
 clone excluding values More...
 
template<typename TElem , typename TBaseElem >
void collect_associated (std::vector< TBaseElem * > &vAssElem, TElem *elem, bool clearContainer=true) const
 returns the adjacend elements More...
 
virtual void copy_values (const std::vector< std::pair< size_t, size_t > > &vIndexMap, bool bDisjunct=false)
 copy values More...
 
template<typename TElem >
size_t dof_indices (TElem *elem, size_t fct, std::vector< DoFIndex > &ind, bool bHang=false, bool bClear=true) const
 get multi indices on an finite element in canonical order More...
 
SmartPtr< TDomain > domain ()
 returns domain More...
 
ConstSmartPtr< TDomain > domain () const
 returns const domain More...
 
void enable_redistribution (bool enable)
 enables or disables redistribution for this grid function More...
 
const GridLevelgrid_level () const
 returns the grid level More...
 
 GridFunction (const this_type &v)
 Copy constructor. More...
 
 GridFunction (SmartPtr< ApproximationSpace< TDomain > > spApproxSpace, bool bManage=true)
 Initializing Constructor using surface dof distribution. More...
 
 GridFunction (SmartPtr< ApproximationSpace< TDomain > > spApproxSpace, const GridLevel &gl, bool bManage=true)
 Initializing Constructor using a grid level. More...
 
 GridFunction (SmartPtr< ApproximationSpace< TDomain > > spApproxSpace, int level, bool bManage=true)
 Initializing Constructor using surface dof distribution on a level. More...
 
 GridFunction (SmartPtr< ApproximationSpace< TDomain > > spApproxSpace, SmartPtr< DoFDistribution > spDoFDistr, bool bManage=true)
 Initializing Constructor. More...
 
template<typename TElem >
void indices (TElem *elem, LocalIndices &ind, bool bHang=false) const
 get all indices of the element More...
 
template<typename TElem >
size_t inner_algebra_indices (TElem *elem, std::vector< size_t > &ind, bool bClear=true) const
 get algebra indices on an geometric object in canonical order More...
 
template<typename TElem >
size_t inner_dof_indices (TElem *elem, size_t fct, std::vector< DoFIndex > &ind, bool bClear=true) const
 get multi indices on an geometric object in canonical order More...
 
template<class TGeomObj >
bool is_contained (TGeomObj *obj) const
 returns if the grid object is part of this grid function More...
 
bool managed () const
 return m_bManaged More...
 
size_t num_indices () const
 return the number of indices distributed (proc local) More...
 
size_t num_indices (int si) const
 return the number of indices distributed on subset si (proc local) More...
 
this_typeoperator= (const this_type &v)
 assigns another grid function More...
 
this_typeoperator= (number d)
 assigns constant value
More...
 
virtual void permute_values (const std::vector< size_t > &vIndNew)
 permutes all values More...
 
bool redistribution_enabled () const
 retruns true if the grid-function is redistributed together with the grid in parallel applications More...
 
virtual void resize_values (size_t s, number defaultValue=0.0)
 resize More...
 
void SetConsistentStorageType ()
 
virtual ~GridFunction ()
 Destructor. More...
 
SmartPtr< DoFDistributiondof_distribution ()
 
SmartPtr< DoFDistributiondd ()
 
ConstSmartPtr< DoFDistributiondof_distribution () const
 
ConstSmartPtr< DoFDistributiondd () const
 
template<typename TElem >
traits< TElem >::const_iterator begin () const
 
template<typename TElem >
traits< TElem >::const_iterator begin (SurfaceView::SurfaceConstants validStates) const
 
template<typename TElem >
traits< TElem >::const_iterator end () const
 
template<typename TElem >
traits< TElem >::const_iterator end (SurfaceView::SurfaceConstants validStates) const
 
template<typename TElem >
traits< TElem >::const_iterator begin (int si) const
 
template<typename TElem >
traits< TElem >::const_iterator begin (int si, SurfaceView::SurfaceConstants validStates) const
 
template<typename TElem >
traits< TElem >::const_iterator end (int si) const
 
template<typename TElem >
traits< TElem >::const_iterator end (int si, SurfaceView::SurfaceConstants validStates) const
 
size_t num_dofs () const
 
size_t num_dofs (int fct) const
 
size_t num_dofs (int fct, int si) const
 
- Public Member Functions inherited from ug::IGridFunction
virtual ~IGridFunction ()
 
- Public Member Functions inherited from ug::DoFDistributionInfoProvider
SubsetGroup all_subsets_grp_except_for (const char *names) const
 returns subset group of all the subsets except for (by name) More...
 
int dim (size_t fct) const
 returns the dimension in which solution lives More...
 
int dim_subset (int si) const
 returns dimension of subset More...
 
ConstSmartPtr< DoFDistributionInfodof_distribution_info () const
 returns underlying info More...
 
 DoFDistributionInfoProvider ()
 constructor More...
 
 DoFDistributionInfoProvider (ConstSmartPtr< DoFDistributionInfo > spDDI)
 constructor More...
 
FunctionGroup fct_grp_by_name (const char *names) const
 returns a function group to a string of functions More...
 
size_t fct_id_by_name (const char *name) const
 returns fct id by name More...
 
ConstSmartPtr< FunctionPatternfunction_pattern () const
 returns the function pattern More...
 
bool is_def_everywhere (size_t fct) const
 returns true if the discrete function nr_fct is defined everywhere More...
 
bool is_def_in_subset (size_t fct, int si) const
 returns if a function is defined on a subset More...
 
size_t max_dofs (const GridBaseObjectId gbo) const
 returns the maximum number of dofs on a grid base object type More...
 
size_t max_dofs (const GridBaseObjectId gbo, const int si) const
 returns the maximum number of dofs on a grid base object on a subset More...
 
size_t max_dofs (const int dim) const
 returns the maximum number of dofs on grid objects in a dimension More...
 
size_t max_dofs (const int dim, const int si) const
 returns the maximum number of dofs in a dimension on a subset More...
 
size_t max_dofs (const ReferenceObjectID roid) const
 returns the maximum number of dofs on reference object type More...
 
size_t max_fct_dofs (const size_t fct, const GridBaseObjectId gbo) const
 returns the maximal number of dofs on a base object type for a function component More...
 
size_t max_fct_dofs (const size_t fct, const GridBaseObjectId gbo, const int si) const
 returns the maximum number of dofs on a grid base object on a subset for a function component More...
 
size_t max_fct_dofs (const size_t fct, const int dim, const int si) const
 returns the maximum number of dofs in a dimension on a subset for a function component More...
 
size_t max_fct_dofs (const size_t fct, const ReferenceObjectID roid) const
 returns the number of dofs on a reference object for a function component More...
 
size_t max_fct_dofs (const size_t fct, int dim) const
 returns the maximal number of dofs on a dimension for a function component More...
 
std::string name (size_t fct) const
 returns the name of the discrete function nr_fct More...
 
std::vector< std::string > names () const
 returns the names of the discrete functions More...
 
size_t num_dofs (const ReferenceObjectID roid, const int si) const
 returns the number of dofs on a Reference Object on a subset More...
 
size_t num_fct () const
 number of discrete functions on subset si More...
 
size_t num_fct (int si) const
 number of discrete functions on subset si More...
 
size_t num_fct_dofs (const size_t fct, const ReferenceObjectID roid, const int si) const
 returns the number of dofs on a Reference Object on a subset for a function component More...
 
int num_subsets () const
 returns number of subsets More...
 
size_t offset (const ReferenceObjectID roid, const int si, const size_t fct) const
 returns the offset for reference element, subset and function More...
 
void print_local_dof_statistic () const
 prints statistic on local dof distribution More...
 
void print_local_dof_statistic (int verboseLev) const
 prints informations More...
 
void set_dof_distribution_info (ConstSmartPtr< DoFDistributionInfo > spDDI)
 sets the dd info More...
 
SubsetGroup subset_grp_by_name (const char *names) const
 returns subset group by name More...
 
ConstSmartPtr< ISubsetHandlersubset_handler () const
 returns the subset handler More...
 
int subset_id_by_name (const char *name) const
 returns the subset id More...
 
std::string subset_name (int si) const
 returns subset name More...
 
const LFEIDlocal_finite_element_id (size_t fct) const
 
const LFEIDlfeid (size_t fct) const
 

Static Public Attributes

static const int dim = domain_type::dim
 World Dimension. More...
 

Protected Member Functions

void check_algebra ()
 checks the algebra More...
 
void grid_changed_callback (const GridMessage_Adaption &msg)
 
void grid_distribution_callback (const GridMessage_Distribution &msg)
 called during parallel redistribution More...
 
void init (SmartPtr< ApproximationSpace< TDomain > > spApproxSpace, SmartPtr< DoFDistribution > spDoFDistr, bool bManage)
 inits the grid function More...
 
void register_at_adaption_msg_hub ()
 registers at message hub for grid adaption More...
 
virtual this_typevirtual_clone () const
 virtual clone using covariant return type More...
 
virtual this_typevirtual_clone_without_values () const
 virtual clone using covariant return type excluding values More...
 

Protected Attributes

bool m_bManaged
 boolean for DoF Distribution management of grid function More...
 
bool m_bRedistribute
 specifies whether the gridfunction should be redistributed together with the grid. More...
 
uint m_preDistStorageType
 stores the storage-type from before redistribution More...
 
SmartPtr< AdaptionSurfaceGridFunction< TDomain > > m_spAdaptGridFct
 adaption grid function for temporary storage of values in grid More...
 
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
 Approximation Space. More...
 
SmartPtr< DoFDistributionm_spDD
 DoF Distribution this GridFunction relies on. More...
 
MessageHub::SPCallbackId m_spGridAdaptionCallbackID
 message hub id More...
 
MessageHub::SPCallbackId m_spGridDistributionCallbackID
 
- Protected Attributes inherited from ug::DoFDistributionInfoProvider
ConstSmartPtr< DoFDistributionInfom_spDDI
 Function Pattern. More...
 

Detailed Description

template<typename TDomain, typename TAlgebra>
class ug::GridFunction< TDomain, TAlgebra >

represents numerical solutions on a grid using an algebraic vector

A grid function brings approximation space and algebra together. For a given DoF Distribution (e.g. a level dof distribution or a surface dof distribution) the grid function stores the values of the DoFs in an algebraic vector. In addition access to the grid elements is provided and the mapping between grid elements and DoFs is provided.

Template Parameters
TDomaindomain type
TAlgebraalgebra type

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra ug::GridFunction< TDomain, TAlgebra >::algebra_type

Algebra type.

◆ approximation_space_type

template<typename TDomain , typename TAlgebra >
typedef ApproximationSpace<TDomain> ug::GridFunction< TDomain, TAlgebra >::approximation_space_type

Type of Approximation space.

◆ const_element_iterator

template<typename TDomain , typename TAlgebra >
typedef dim_traits<dim>::const_iterator ug::GridFunction< TDomain, TAlgebra >::const_element_iterator

◆ const_side_iterator

template<typename TDomain , typename TAlgebra >
typedef dim_traits<dim-1>::const_iterator ug::GridFunction< TDomain, TAlgebra >::const_side_iterator

◆ domain_type

template<typename TDomain , typename TAlgebra >
typedef TDomain ug::GridFunction< TDomain, TAlgebra >::domain_type

◆ element_iterator

template<typename TDomain , typename TAlgebra >
typedef dim_traits<dim>::iterator ug::GridFunction< TDomain, TAlgebra >::element_iterator

◆ element_type

template<typename TDomain , typename TAlgebra >
typedef dim_traits<dim>::grid_base_object ug::GridFunction< TDomain, TAlgebra >::element_type

◆ side_iterator

template<typename TDomain , typename TAlgebra >
typedef dim_traits<dim-1>::iterator ug::GridFunction< TDomain, TAlgebra >::side_iterator

◆ side_type

template<typename TDomain , typename TAlgebra >
typedef dim_traits<dim-1>::grid_base_object ug::GridFunction< TDomain, TAlgebra >::side_type

◆ this_type

template<typename TDomain , typename TAlgebra >
typedef GridFunction<TDomain, TAlgebra> ug::GridFunction< TDomain, TAlgebra >::this_type

This type.

◆ vector_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::vector_type ug::GridFunction< TDomain, TAlgebra >::vector_type

Vector type used to store dof values.

Constructor & Destructor Documentation

◆ GridFunction() [1/5]

template<typename TDomain , typename TAlgebra >
ug::GridFunction< TDomain, TAlgebra >::GridFunction ( SmartPtr< ApproximationSpace< TDomain > >  spApproxSpace,
SmartPtr< DoFDistribution spDoFDistr,
bool  bManage = true 
)

Initializing Constructor.

References init().

◆ GridFunction() [2/5]

template<typename TDomain , typename TAlgebra >
ug::GridFunction< TDomain, TAlgebra >::GridFunction ( SmartPtr< ApproximationSpace< TDomain > >  spApproxSpace,
bool  bManage = true 
)

Initializing Constructor using surface dof distribution.

References init(), ug::GridLevel::SURFACE, and ug::GridLevel::TOP.

◆ GridFunction() [3/5]

template<typename TDomain , typename TAlgebra >
ug::GridFunction< TDomain, TAlgebra >::GridFunction ( SmartPtr< ApproximationSpace< TDomain > >  spApproxSpace,
int  level,
bool  bManage = true 
)

Initializing Constructor using surface dof distribution on a level.

References init(), and ug::GridLevel::SURFACE.

◆ GridFunction() [4/5]

template<typename TDomain , typename TAlgebra >
ug::GridFunction< TDomain, TAlgebra >::GridFunction ( SmartPtr< ApproximationSpace< TDomain > >  spApproxSpace,
const GridLevel gl,
bool  bManage = true 
)

Initializing Constructor using a grid level.

References init().

◆ GridFunction() [5/5]

template<typename TDomain , typename TAlgebra >
ug::GridFunction< TDomain, TAlgebra >::GridFunction ( const this_type v)
inline

Copy constructor.

References ug::GridFunction< TDomain, TAlgebra >::assign().

◆ ~GridFunction()

template<typename TDomain , typename TAlgebra >
virtual ug::GridFunction< TDomain, TAlgebra >::~GridFunction ( )
inlinevirtual

Member Function Documentation

◆ algebra_indices()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
size_t ug::GridFunction< TDomain, TAlgebra >::algebra_indices ( TElem *  elem,
std::vector< size_t > &  ind,
bool  bClear = true 
) const
inline

get algebra indices on an geometric object in canonical order

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

Referenced by ug::ElementGaussSeidelStep().

◆ approx_space() [1/2]

◆ approx_space() [2/2]

template<typename TDomain , typename TAlgebra >
ConstSmartPtr<ApproximationSpace<TDomain> > ug::GridFunction< TDomain, TAlgebra >::approx_space ( ) const
inline

◆ assign() [1/2]

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::assign ( const this_type v)

◆ assign() [2/2]

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::assign ( const vector_type v)

assigns the values of a vector

References UG_THROW.

◆ begin() [1/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::begin ( ) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ begin() [2/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::begin ( int  si) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ begin() [3/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::begin ( int  si,
SurfaceView::SurfaceConstants  validStates 
) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ begin() [4/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::begin ( SurfaceView::SurfaceConstants  validStates) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ check_algebra()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::check_algebra
protected

checks the algebra

References UG_THROW, and ug::AlgebraType::VariableBlockSize.

◆ clone()

template<typename TDomain , typename TAlgebra >
SmartPtr<this_type> ug::GridFunction< TDomain, TAlgebra >::clone ( ) const
inline

clone including values

References ug::GridFunction< TDomain, TAlgebra >::virtual_clone().

◆ clone_pattern()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::clone_pattern ( const this_type v)
virtual

◆ clone_without_values()

◆ collect_associated()

template<typename TDomain , typename TAlgebra >
template<typename TElem , typename TBaseElem >
void ug::GridFunction< TDomain, TAlgebra >::collect_associated ( std::vector< TBaseElem * > &  vAssElem,
TElem *  elem,
bool  clearContainer = true 
) const
inline

◆ copy_values()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::copy_values ( const std::vector< std::pair< size_t, size_t > > &  vIndexMap,
bool  bDisjunct = false 
)
virtual

copy values

This method copies values between indices according to the passed mapping. The copy of the values is are performed as:

for all i: newIndex = vIndexMap[i].second oldIndex = vIndexMap[i].first value[newIndex] <- value[oldIndex]

If the copy operation is known to be a disjunct composition (i.e. each index appears only in one operation), this can be specified by a flag. In this case the order in which the copying is performed is arbitrary and this will save a copy operation of the whole vector.

Parameters
[in]vIndexMapvector of index mappings (indexOld, indexNew)
[in]bDisjunctflag, if permutation disjunct
Returns
success flag

Implements ug::IGridFunction.

◆ dd() [1/2]

◆ dd() [2/2]

template<typename TDomain , typename TAlgebra >
ConstSmartPtr<DoFDistribution> ug::GridFunction< TDomain, TAlgebra >::dd ( ) const
inline

returns dof distribution

References ug::GridFunction< TDomain, TAlgebra >::dof_distribution().

◆ dof_distribution() [1/2]

template<typename TDomain , typename TAlgebra >
SmartPtr<DoFDistribution> ug::GridFunction< TDomain, TAlgebra >::dof_distribution ( )
inline

returns dof distribution

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution(), ug::ConstrainedLinearIterator< TDomain, TAlgebra, TLinIt, typename >::apply(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs(), ug::AdaptionSurfaceGridFunction< TDomain >::copy_from_surface(), ug::GridFunction< TDomain, TAlgebra >::dd(), ug::AssembledMultiGridCycle< TDomain, TAlgebra >::init(), ug::AssembledTransformingSmoother< TDomain, TAlgebra >::init(), ug::IObstacleConstraint< TDomain, TAlgebra >::IObstacleConstraint(), ug::MarkForAdaption_AbsoluteGradientIndicator(), ug::MarkForAdaption_AbsoluteGradientJumpIndicator(), ug::MarkForAdaption_GradientIndicator(), ug::MarkForAdaption_GradientJumpIndicator(), ug::MarkForCoarsenening_SurfaceLayer(), ug::ObstacleInNormalDir< TDomain, TAlgebra >::ObstacleInNormalDir(), ug::ConstrainedLinearIterator< TDomain, TAlgebra, TLinIt, typename >::apply_update_defect_impl< S, typename >::operator()(), ug::ActiveSet< TDomain, TAlgebra >::prepare(), ug::Prolongate(), ug::ProlongateElemwise(), ug::ProlongateP1(), ug::Restrict(), ug::RestrictElemwise(), and ug::RestrictP1().

◆ dof_distribution() [2/2]

template<typename TDomain , typename TAlgebra >
ConstSmartPtr<DoFDistribution> ug::GridFunction< TDomain, TAlgebra >::dof_distribution ( ) const
inline

returns dof distribution

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ dof_indices()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
size_t ug::GridFunction< TDomain, TAlgebra >::dof_indices ( TElem *  elem,
size_t  fct,
std::vector< DoFIndex > &  ind,
bool  bHang = false,
bool  bClear = true 
) const
inline

get multi indices on an finite element in canonical order

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

Referenced by ug::ElementGaussSeidelStep().

◆ domain() [1/2]

◆ domain() [2/2]

template<typename TDomain , typename TAlgebra >
ConstSmartPtr<TDomain> ug::GridFunction< TDomain, TAlgebra >::domain ( ) const
inline

◆ enable_redistribution()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::enable_redistribution ( bool  enable)
inline

enables or disables redistribution for this grid function

Note
if redistribution is disabled, values corresponding to elements which were received during redistribution will not be initialized and my be completely random.

References ug::GridFunction< TDomain, TAlgebra >::m_bRedistribute.

◆ end() [1/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::end ( ) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ end() [2/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::end ( int  si) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ end() [3/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::end ( int  si,
SurfaceView::SurfaceConstants  validStates 
) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ end() [4/4]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
traits<TElem>::const_iterator ug::GridFunction< TDomain, TAlgebra >::end ( SurfaceView::SurfaceConstants  validStates) const
inline

iterator for elements where this grid function is defined

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ grid_changed_callback()

◆ grid_distribution_callback()

◆ grid_level()

◆ indices()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::GridFunction< TDomain, TAlgebra >::indices ( TElem *  elem,
LocalIndices ind,
bool  bHang = false 
) const
inline

◆ init()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::init ( SmartPtr< ApproximationSpace< TDomain > >  spApproxSpace,
SmartPtr< DoFDistribution spDoFDistr,
bool  bManage 
)
protected

inits the grid function

References ug::PST_UNDEFINED, SPNULL, and UG_THROW.

◆ inner_algebra_indices()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
size_t ug::GridFunction< TDomain, TAlgebra >::inner_algebra_indices ( TElem *  elem,
std::vector< size_t > &  ind,
bool  bClear = true 
) const
inline

get algebra indices on an geometric object in canonical order

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

Referenced by ug::ProlongateP1(), and ug::RestrictP1().

◆ inner_dof_indices()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
size_t ug::GridFunction< TDomain, TAlgebra >::inner_dof_indices ( TElem *  elem,
size_t  fct,
std::vector< DoFIndex > &  ind,
bool  bClear = true 
) const
inline

◆ is_contained()

template<typename TDomain , typename TAlgebra >
template<class TGeomObj >
bool ug::GridFunction< TDomain, TAlgebra >::is_contained ( TGeomObj *  obj) const
inline

returns if the grid object is part of this grid function

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ managed()

template<typename TDomain , typename TAlgebra >
bool ug::GridFunction< TDomain, TAlgebra >::managed ( ) const
inline

◆ num_dofs() [1/3]

template<typename TDomain , typename TAlgebra >
size_t ug::GridFunction< TDomain, TAlgebra >::num_dofs ( ) const
inline

return the number of dofs distributed (global)

References ug::DoFCount::ALL_FCT, and ug::GridFunction< TDomain, TAlgebra >::num_dofs().

Referenced by ug::GridFunction< TDomain, TAlgebra >::num_dofs().

◆ num_dofs() [2/3]

template<typename TDomain , typename TAlgebra >
size_t ug::GridFunction< TDomain, TAlgebra >::num_dofs ( int  fct) const
inline

return the number of dofs distributed (global)

References ug::DoFCount::ALL_SUBSET, and ug::GridFunction< TDomain, TAlgebra >::num_dofs().

Referenced by ug::GridFunction< TDomain, TAlgebra >::num_dofs().

◆ num_dofs() [3/3]

template<typename TDomain , typename TAlgebra >
size_t ug::GridFunction< TDomain, TAlgebra >::num_dofs ( int  fct,
int  si 
) const

return the number of dofs distributed (global)

References ug::DoFCount::num(), ug::DoFCount::sum_values_over_procs(), ug::DoFCount::UNIQUE_ES, and ug::DoFCount::UNIQUE_SS.

◆ num_indices() [1/2]

template<typename TDomain , typename TAlgebra >
size_t ug::GridFunction< TDomain, TAlgebra >::num_indices ( ) const
inline

◆ num_indices() [2/2]

template<typename TDomain , typename TAlgebra >
size_t ug::GridFunction< TDomain, TAlgebra >::num_indices ( int  si) const
inline

return the number of indices distributed on subset si (proc local)

References ug::GridFunction< TDomain, TAlgebra >::m_spDD.

◆ operator=() [1/2]

template<typename TDomain , typename TAlgebra >
this_type& ug::GridFunction< TDomain, TAlgebra >::operator= ( const this_type v)
inline

assigns another grid function

References ug::GridFunction< TDomain, TAlgebra >::assign().

◆ operator=() [2/2]

template<typename TDomain , typename TAlgebra >
this_type& ug::GridFunction< TDomain, TAlgebra >::operator= ( number  d)
inline

assigns constant value

◆ permute_values()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::permute_values ( const std::vector< size_t > &  vIndNew)
virtual

permutes all values

This method permutes the values according to the passed mapping vector, i.e. it performs a permutation of the whole index set. The vector vIndNew must have the size of the number of indices and for each index it must return the new index, i.e. newIndex = vIndNew[oldIndex].

Parameters
[in]vIndNewmapping for each index
Returns
success flag

Implements ug::IGridFunction.

References UG_THROW.

◆ redistribution_enabled()

template<typename TDomain , typename TAlgebra >
bool ug::GridFunction< TDomain, TAlgebra >::redistribution_enabled ( ) const
inline

retruns true if the grid-function is redistributed together with the grid in parallel applications

Note
if redistribution is disabled, values corresponding to elements which were received during redistribution will not be initialized and my be completely random.

References ug::GridFunction< TDomain, TAlgebra >::m_bRedistribute.

Referenced by ug::GridFunction< TDomain, TAlgebra >::clone_pattern().

◆ register_at_adaption_msg_hub()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::register_at_adaption_msg_hub
protected

registers at message hub for grid adaption

References ug::MessageHub::register_class_callback().

◆ resize_values()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::resize_values ( size_t  s,
number  defaultValue = 0.0 
)
virtual

resize

This method resizes the length of the vector.

Parameters
[in]snew size
[in]defaultValuedefault value for new entries

Implements ug::IGridFunction.

References s.

◆ SetConsistentStorageType()

template<typename TDomain , typename TAlgebra >
void ug::GridFunction< TDomain, TAlgebra >::SetConsistentStorageType ( )
inline

References ug::PST_CONSISTENT.

◆ virtual_clone()

template<typename TDomain , typename TAlgebra >
virtual this_type* ug::GridFunction< TDomain, TAlgebra >::virtual_clone ( ) const
inlineprotectedvirtual

virtual clone using covariant return type

Referenced by ug::GridFunction< TDomain, TAlgebra >::clone().

◆ virtual_clone_without_values()

template<typename TDomain , typename TAlgebra >
GridFunction< TDomain, TAlgebra > * ug::GridFunction< TDomain, TAlgebra >::virtual_clone_without_values
protectedvirtual

virtual clone using covariant return type excluding values

References p.

Referenced by ug::GridFunction< TDomain, TAlgebra >::clone_without_values().

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra >
const int ug::GridFunction< TDomain, TAlgebra >::dim = domain_type::dim
static

World Dimension.

◆ m_bManaged

template<typename TDomain , typename TAlgebra >
bool ug::GridFunction< TDomain, TAlgebra >::m_bManaged
protected

boolean for DoF Distribution management of grid function

Referenced by ug::GridFunction< TDomain, TAlgebra >::clone_pattern(), and ug::GridFunction< TDomain, TAlgebra >::managed().

◆ m_bRedistribute

template<typename TDomain , typename TAlgebra >
bool ug::GridFunction< TDomain, TAlgebra >::m_bRedistribute
protected

specifies whether the gridfunction should be redistributed together with the grid.

enabled by default

Referenced by ug::GridFunction< TDomain, TAlgebra >::enable_redistribution(), and ug::GridFunction< TDomain, TAlgebra >::redistribution_enabled().

◆ m_preDistStorageType

template<typename TDomain , typename TAlgebra >
uint ug::GridFunction< TDomain, TAlgebra >::m_preDistStorageType
protected

stores the storage-type from before redistribution

◆ m_spAdaptGridFct

template<typename TDomain , typename TAlgebra >
SmartPtr<AdaptionSurfaceGridFunction<TDomain> > ug::GridFunction< TDomain, TAlgebra >::m_spAdaptGridFct
protected

adaption grid function for temporary storage of values in grid

◆ m_spApproxSpace

template<typename TDomain , typename TAlgebra >
SmartPtr<ApproximationSpace<TDomain> > ug::GridFunction< TDomain, TAlgebra >::m_spApproxSpace
protected

◆ m_spDD

◆ m_spGridAdaptionCallbackID

template<typename TDomain , typename TAlgebra >
MessageHub::SPCallbackId ug::GridFunction< TDomain, TAlgebra >::m_spGridAdaptionCallbackID
protected

message hub id

◆ m_spGridDistributionCallbackID

template<typename TDomain , typename TAlgebra >
MessageHub::SPCallbackId ug::GridFunction< TDomain, TAlgebra >::m_spGridDistributionCallbackID
protected

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