9#include <kernel/geometry/conformal_mesh.hpp>
10#include <kernel/geometry/intern/macro_index_mapping.hpp>
19 template<
typename Shape_>
20 struct RefCellVertexer;
31 template<
typename Shape_,
typename CoordType_ = Real>
33 public Factory< ConformalMesh<Shape_, Shape_::dimension, CoordType_> >
46 static constexpr int shape_dim = ShapeType::dimension;
49 virtual Index get_num_entities(
int dim)
override
51 return Index(Intern::DynamicNumFaces<Shape_>::value(dim));
54 virtual void fill_vertex_set(
VertexSetType& vertex_set)
override
56 Intern::RefCellVertexer<ShapeType>::fill(vertex_set);
61 Intern::MacroIndexWrapper<Shape_>::build(index_set_holder);
69 struct RefCellVertexer< Shape::Simplex<dim_> >
71 template<
typename VertexSet_>
72 static void fill(VertexSet_& vtx)
74 typedef typename VertexSet_::CoordType CoordType;
76 for(
int i(0); i < (dim_+1); ++i)
79 for(
int j(0); j < dim_; ++j)
81 vtx[
Index(i)][j] = CoordType(j+1 == i ? 1 : 0);
88 struct RefCellVertexer< Shape::Hypercube<dim_> >
90 template<
typename VertexSet_>
91 static void fill(VertexSet_& vtx)
93 typedef typename VertexSet_::CoordType CoordType;
95 for(
int i(0); i < (1 << dim_); ++i)
98 for(
int j(0); j < dim_; ++j)
100 vtx[
Index(i)][j] = CoordType((((i >> j) & 1) << 1) - 1);
Mesh Factory class template.
Reference Cell Mesh factory.
MeshType::IndexSetHolderType IndexSetHolderType
index holder type
MeshType::VertexSetType VertexSetType
vertex set type
ConformalMesh< Shape_, Shape_::dimension, CoordType_ > MeshType
mesh type
MeshType::ShapeType ShapeType
shape type
static constexpr int shape_dim
shape dimension
std::uint64_t Index
Index data type.
Fixed-Sized Vertex Set class template.