9#include <kernel/geometry/factory.hpp> 
   10#include <kernel/geometry/struct_index_set.hpp> 
   11#include <kernel/geometry/intern/structured_vertex_refiner.hpp> 
   31      int num_coords_ = shape_dim_,
 
   32      typename Coord_ = 
Real>
 
   35      static_assert(shape_dim_ > 0, 
"invalid shape dimension");
 
   36      static_assert(num_coords_ >= shape_dim_, 
"invalid number of coordinates");
 
   73        static_assert(cell_dim_ <= 
shape_dim, 
"invalid cell dimension");
 
   74        static_assert(face_dim_ < cell_dim_, 
"invalid face/cell dimension");
 
   75        static_assert(face_dim_ >= 0, 
"invalid face dimension");
 
  105        _vertex_set(Intern::StructNumEntities<shape_dim_, 0>::compute(num_slices)),
 
  108        XASSERT(num_slices != 
nullptr);
 
  129          Intern::StructNumEntities<shape_dim_, 0>::compute(
 
  130            Intern::NumSlicesWrapper<
shape_dim>(factory).num_slices)),
 
  134        Intern::NumSlicesWrapper<shape_dim>::apply(factory, 
_num_slices);
 
  153        for(
int i(0); i < shape_dim_; ++i)
 
  290        return "StructuredMesh<...>";
 
  351      public Factory< StructuredMesh<shape_dim_, num_coords_, Coord_> >
 
  362      static constexpr int shape_dim = ShapeType::dimension;
 
  368      Index _num_slices_coarse[shape_dim];
 
  378        _coarse_mesh(coarse_mesh)
 
  380        for(
int i(0); i < shape_dim; ++i)
 
  409        Intern::StructuredVertexRefiner<ShapeType, VertexSetType>
 
  410          ::refine(vertex_set, _coarse_mesh.
get_vertex_set(), _num_slices_coarse);
 
#define XASSERT(expr)
Assertion macro definition.
virtual Index get_num_slices(int dir)=0
Returns the number of slices.
MeshType::VertexSetType VertexSetType
vertex set type
virtual void fill_vertex_set(VertexSetType &vertex_set)=0
Fills the vertex set.
StructuredMesh< shape_dim_, num_coords_, Coord_ > MeshType
mesh type
virtual ~Factory()
virtual destructor
Mesh Factory class template.
StructuredMesh< shape_dim_, num_coords_, Coord_ > MeshType
mesh type
MeshType::ShapeType ShapeType
shape type
virtual void fill_vertex_set(VertexSetType &vertex_set) override
Fills the vertex set.
StandardRefinery(const MeshType &coarse_mesh)
Constructor.
MeshType::VertexSetType VertexSetType
vertex set type
virtual Index get_num_slices(int dir) override
Returns the number of slices.
const MeshType & _coarse_mesh
coarse mesh reference
Standard Refinery class template.
Structured Index-Set class template.
Structured mesh class template.
Index get_num_slices(int dir) const
Returns the number of slices.
const Index * get_num_slices() const
Returns the num_slices array.
Shape::Hypercube< shape_dim_ > ShapeType
Shape type.
StructuredMesh(Factory< StructuredMesh > &factory)
Factory constructor.
Index get_num_entities(int dim) const
Returns the number of entities.
static constexpr int world_dim
world dimension
StructuredMesh(const StructuredMesh &other)
Copy Constructor.
VertexSetType _vertex_set
the vertex set of the mesh.
VertexSetType & get_vertex_set()
Returns a reference to the vertex set of the mesh.
Index _num_entities[shape_dim+1]
number of entities for each dimension
std::size_t bytes() const
Index get_num_elements() const
Returns the number of elements.
static String name()
Returns the name of the class.
Coord_ CoordType
Coordinate type.
Index _num_slices[shape_dim]
number of slices for each direction
static constexpr bool is_structured
the mesh is structured
IndexSetHolderType _index_set_holder
index set holder
StructIndexSetHolder< shape_dim_ > IndexSetHolderType
index set holder type
static constexpr int shape_dim
shape dimension
VertexSet< num_coords_, Coord_ > VertexSetType
vertex set type
StructuredMesh(const Index num_slices[])
Constructor.
Index get_num_vertices() const
Returns the number of vertices.
virtual ~StructuredMesh()
virtual destructor
const VertexSetType & get_vertex_set() const
Returns a reference to the vertex set of the mesh.
const StructIndexSet< shape_dim_, cell_dim_, face_dim_ > & get_index_set() const
Returns a reference to an index set.
String class implementation.
@ other
generic/other permutation strategy
double Real
Real data type.
std::uint64_t Index
Index data type.
Index set type class template.
StructIndexSet< shape_dim_, cell_dim_, face_dim_ > Type
index set type
Fixed-Sized Vertex Set class template.
std::size_t bytes() const
Hypercube shape tag struct template.