1#ifndef INCGbae24f2390174bff85f65c2c2e558a9e
2#define INCGbae24f2390174bff85f65c2c2e558a9e
4#include <boost/container/vector.hpp>
7#include "mesh_data_set.h"
34 mesh_(std::move(mesh)),
46 requires std::copy_constructible<T>
48 mesh_(std::move(mesh)),
60 LF_ASSERT_MSG(
DefinedOn(e),
"MeshDataSet is not defined on this entity.");
65 LF_ASSERT_MSG(
DefinedOn(e),
"MeshDataSet not defined on this entity.");
74 std::shared_ptr<const Mesh>
mesh_;
76 boost::container::vector<T>
data_;
92 const std::shared_ptr<const lf::mesh::Mesh>& mesh,
base::dim_t codim) {
94 return std::shared_ptr<impl_t>(
new impl_t(mesh, codim));
105template <std::copy_constructible T>
107 const std::shared_ptr<const Mesh>& mesh,
base::dim_t codim, T init) {
109 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
Interface that specifies how data is stored with an entity.
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....