LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
lf::mesh::utils::MeshDataSet< T > Class Template Referenceabstract

Interface that specifies how data is stored with an entity. More...

#include <lf/mesh/utils/mesh_data_set.h>

Inheritance diagram for lf::mesh::utils::MeshDataSet< T >:
lf::mesh::utils::AllCodimMeshDataSet< T > lf::mesh::utils::CodimMeshDataSet< T >

Public Member Functions

virtual const T & operator() (const Entity &e) const =0
 Get the data stored with entity e.
 
virtual bool DefinedOn (const Entity &e) const =0
 Does the dataset store information with this entity?
 
virtual ~MeshDataSet ()=default
 Virtual destructor.
 

Protected Member Functions

 MeshDataSet ()=default
 
 MeshDataSet (const MeshDataSet &)=default
 
 MeshDataSet (MeshDataSet &&) noexcept=default
 
MeshDataSetoperator= (const MeshDataSet &)=default
 
MeshDataSetoperator= (MeshDataSet &&) noexcept=default
 

Detailed Description

template<class T>
class lf::mesh::utils::MeshDataSet< T >

Interface that specifies how data is stored with an entity.

Template Parameters
TThe type of data that is stored with the entity.

A MeshDataSet is a interface that attaches data of type T with entities of a mesh. Typical types of data that could be stored in a MeshDataSet:

  • Flags that mark boundary entities.
  • Material parameters for mesh elements (codim=0)
Attention
A MeshDataSet may store information only with a subset of entities. See DefinedOn() .
Note
By convention, MeshDataSets are always stored in std::shared_ptr's in order to facilitate memory management. Thus most implementations of this interface don't have public constructors but they provide make_xxx functions for this purpose.

Implementations

There are a number of classes that implement the MeshDataSet interface that differ mostly by the subset of entities to which they can attach data:

  • CodimMeshDataSet attaches data to all entities of a given codimension and is undefined on other entities.
  • AllCodimMeshDataSet attaches data to all entities of a mesh (all codimensions)

Definition at line 36 of file mesh_data_set.h.

Constructor & Destructor Documentation

◆ MeshDataSet() [1/3]

◆ MeshDataSet() [2/3]

template<class T>
lf::mesh::utils::MeshDataSet< T >::MeshDataSet ( const MeshDataSet< T > & )
protecteddefault

References MeshDataSet().

◆ MeshDataSet() [3/3]

template<class T>
lf::mesh::utils::MeshDataSet< T >::MeshDataSet ( MeshDataSet< T > && )
protecteddefaultnoexcept

References MeshDataSet().

◆ ~MeshDataSet()

template<class T>
virtual lf::mesh::utils::MeshDataSet< T >::~MeshDataSet ( )
virtualdefault

Virtual destructor.

References MeshDataSet().

Member Function Documentation

◆ DefinedOn()

template<class T>
virtual bool lf::mesh::utils::MeshDataSet< T >::DefinedOn ( const Entity & e) const
nodiscardpure virtual

◆ operator()()

template<class T>
virtual const T & lf::mesh::utils::MeshDataSet< T >::operator() ( const Entity & e) const
nodiscardpure virtual

Get the data stored with entity e.

Parameters
eThe entity whose data should be retrieved.
Returns
The data stored for this entity.
Note
The behavior of this method is undefined if DefinedOn(e) == false!

Implemented in lf::mesh::utils::AllCodimMeshDataSet< T >, lf::mesh::utils::AllCodimMeshDataSet< std::variant< std::monostate, lf::fe::FePoint< SCALAR >, lf::fe::FeHierarchicSegment< SCALAR >, lf::fe::FeHierarchicTria< SCALAR >, lf::fe::FeHierarchicQuad< SCALAR > > >, and lf::mesh::utils::CodimMeshDataSet< T >.

◆ operator=() [1/2]

template<class T>
MeshDataSet & lf::mesh::utils::MeshDataSet< T >::operator= ( const MeshDataSet< T > & )
protecteddefault

References MeshDataSet().

◆ operator=() [2/2]

template<class T>
MeshDataSet & lf::mesh::utils::MeshDataSet< T >::operator= ( MeshDataSet< T > && )
protecteddefaultnoexcept

References MeshDataSet().


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