1#ifndef INCGbae24f2390174bff85f65c2c2e558a9e
2#define INCGbae24f2390174bff85f65c2c2e558a9e
4#include <boost/container/vector.hpp>
7#include "mesh_data_set.h"
56 requires std::copy_constructible<T>
70 LF_ASSERT_MSG(
DefinedOn(e),
"MeshDataSet is not defined on this entity.");
75 LF_ASSERT_MSG(
DefinedOn(e),
"MeshDataSet not defined on this entity.");
84 std::shared_ptr<const Mesh>
mesh_;
86 boost::container::vector<T>
data_;
102 const std::shared_ptr<const lf::mesh::Mesh>&
mesh,
base::dim_t codim) {
104 return std::shared_ptr<impl_t>(
new impl_t(
mesh, codim));
115template <std::copy_constructible T>
119 return std::shared_ptr<impl_t>(
new impl_t(
mesh, codim, init));
Interface class representing a topological entity in a cellular complex
virtual unsigned Codim() const =0
The codimension of this entity w.r.t. the Mesh.dimMesh() of the owning mesh manager.
lf::base::size_type size_type
A MeshDataSet that attaches data of type T to every entity of a mesh that has a specified codimension...
boost::container::vector< T > data_
bool DefinedOn(const Entity &e) const override
Does the dataset store information with this entity?
std::shared_ptr< const Mesh > mesh_
T & operator()(const Entity &e)
Get a (modifiable) reference to the data stored with entity e.
CodimMeshDataSet(std::shared_ptr< const Mesh > mesh, dim_t codim, T init)
construct and initialize data vector indexed by entities of a particula co-dimension
CodimMeshDataSet(std::shared_ptr< const Mesh > mesh, dim_t codim)
construct data vector indexed by entities of a particular co-dimension
const T & operator()(const Entity &e) const override
Get the data stored with entity e.
Mesh::size_type size_type
unsigned int dim_t
type for dimensions and co-dimensions and numbers derived from them
Contains helper functions and classes that all operate on the interface classes defined in lf::mesh.
std::shared_ptr< CodimMeshDataSet< T > > make_CodimMeshDataSet(const std::shared_ptr< const lf::mesh::Mesh > &mesh, base::dim_t codim)
Create a new CodimMeshDataSet that attaches data of type T with every entity with codimension codim....
Defines a set of interface classes that define a mesh manager and provides mesh-related tools that bu...