13#ifndef dealii_cell_id_translator_h
14#define dealii_cell_id_translator_h
31template <
int dim,
int spacedim>
66 template <
int spacedim>
80 template <
typename Accessor>
88 template <
typename Accessor>
95 template <
typename Accessor>
154 return n_coarse_cells *
155 (Utilities::pow<types::global_cell_index>(max_children_per_cell,
163 template <
typename Accessor>
167 static_assert(dim == Accessor::dimension &&
168 dim == Accessor::structure_dimension,
169 "The information can only be queried for cells.");
171 return translate_level(cell) + tree_sizes[cell->level()];
177 template <
typename Accessor>
182 static_assert(dim == Accessor::dimension &&
183 dim == Accessor::structure_dimension,
184 "The information can only be queried for cells.");
186 return to_level_cell_index(
193 template <
typename Accessor>
198 static_assert(dim == Accessor::dimension &&
199 dim == Accessor::structure_dimension,
200 "The information can only be queried for cells.");
202 return (translate(cell) - tree_sizes[cell->level()]) *
203 max_children_per_cell +
204 i + tree_sizes[cell->level() + 1];
types::global_cell_index translate_level(const TriaIterator< Accessor > &cell) const
const types::global_cell_index n_global_levels
types::global_cell_index translate(const TriaIterator< Accessor > &cell) const
const unsigned int max_children_per_cell
std::vector< types::global_cell_index > tree_sizes
CellId to_cell_id(const types::global_cell_index id) const
const types::global_cell_index n_coarse_cells
types::global_cell_index size() const
types::global_cell_index to_level_cell_index(const CellId &cell_id) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE