1#ifndef __bae24f2390174bff85f65c2c2e558a9e
2#define __bae24f2390174bff85f65c2c2e558a9e
4#include <boost/container/vector.hpp>
7#include "mesh_data_set.h"
34 mesh_(std::move(mesh)),
45 template <
class =
typename std::enable_if<
46 std::is_copy_constructible<T>::value>::type>
49 mesh_(std::move(mesh)),
61 LF_ASSERT_MSG(
DefinedOn(e),
"MeshDataSet is not defined on this entity.");
66 LF_ASSERT_MSG(
DefinedOn(e),
"MeshDataSet not defined on this entity.");
75 std::shared_ptr<const Mesh>
mesh_;
77 boost::container::vector<T>
data_;
93 const std::shared_ptr<const lf::mesh::Mesh>& mesh,
base::dim_t codim) {
95 return std::shared_ptr<impl_t>(
new impl_t(mesh, codim));
106template <
class T,
class =
typename std::enable_if<
107 std::is_copy_constructible<T>::value>::type>
109 const std::shared_ptr<const Mesh>& mesh,
base::dim_t codim, T init) {
111 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_
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
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)
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....