28 template<
typename Mesh_>
52 template<
typename Mesh_>
77 struct NumEntitiesWrapper
79 Index num_entities[n_+1];
81 template<
typename Factory_>
82 explicit NumEntitiesWrapper(Factory_& factory)
84 for(
int i(0); i <= n_; ++i)
86 num_entities[i] = factory.get_num_entities(i);
90 template<
typename Factory_>
91 static void apply(Factory_& factory, Index* num_ent)
93 for(
int i(0); i <= n_; ++i)
95 num_ent[i] = factory.get_num_entities(i);
99 template<
typename Factory_, std::
size_t m_>
100 static void apply(Factory_& factory, std::array<Index, m_>& num_ent)
102 static_assert(int(m_) >= n_+1,
"invalid array size");
103 for(
int i(0); i <= n_; ++i)
105 num_ent[std::size_t(i)] = factory.get_num_entities(i);
111 struct NumSlicesWrapper
113 Index num_slices[n_];
115 template<
typename Factory_>
116 explicit NumSlicesWrapper(Factory_& factory)
118 for(
int i(0); i < n_; ++i)
120 num_slices[i] = factory.get_num_slices(i);
124 template<
typename Factory_>
125 static void apply(Factory_& factory, Index* num_slic)
127 for(
int i(0); i < n_; ++i)
129 num_slic[i] = factory.get_num_slices(i);
133 template<
typename Factory_, std::
size_t m_>
134 static void apply(Factory_& factory, std::array<Index, m_>& num_slic)
136 static_assert(int(m_) >= n_,
"invalid array size");
137 for(
int i(0); i < n_; ++i)
139 num_slic[i] = factory.get_num_slices(i);
Mesh Factory class template.
Standard Refinery class template.
StandardRefinery(const MeshType &coarse_mesh)
Constructor.
std::uint64_t Index
Index data type.