2#ifndef model_PolyhedralMesh_H_
3#define model_PolyhedralMesh_H_
20 static_assert(dim >= 1);
24 const std::vector<std::vector<size_t>> &simplices,
25 const std::map<
size_t, Eigen::Matrix<double, dim, 1>> &positions);
26 template <
int order>
void validateLevel()
const;
29 void orientMeshFaces();
32 using Vector = Eigen::Matrix<double, dim, 1>;
41 std::apply([
this](
auto &...
factory) { ((
factory.owner =
this), ...); }, factories);
45 PolyhedralMesh(
const std::map<size_t, Vector> &positions,
const std::vector<FaceInput> &faces);
48 return std::get<order>(factories);
50 std::shared_ptr<Polyhedron<dim, dim>>
getRegion(
size_t id)
52 return std::get<dim>(factories).get(
id);
const Polyhedron< dim, dim - 1 > & face(size_t id) const
PolyhedralMesh(const PolyhedralMesh &)=delete
std::shared_ptr< Polyhedron< dim, dim - 1 > > createFace(const Simplex< dim, dim - 1 > *simplex)
PolyhedralMesh & operator=(const PolyhedralMesh &)=delete
const PolyhedronFactory< dim, order > & factory() const
Eigen::Matrix< double, dim, 1 > Vector
const Polyhedron< dim, dim > & region(size_t id) const
std::shared_ptr< Polyhedron< dim, dim > > getRegion(size_t id)
std::tuple< PolyhedronFactory< dim, int(orders)>... > Type