30 template <
int spacedim>
34 tria.get_reference_cells().
end(),
36 tria.get_reference_cells().
end())
51 std::uint64_t max_cell_index = 0;
61 max_cell_index <= std::numeric_limits<types::global_cell_index>::max(),
63 "You have exceeded the maximal number of possible indices this function "
64 "can handle. The current setup (n_coarse_cells=" +
66 ", n_global_levels=" + std::to_string(
n_global_levels) +
") requires " +
67 std::to_string(max_cell_index + 1) +
68 " indices but the current deal.II configuration only supports " +
69 std::to_string(std::numeric_limits<types::global_cell_index>::max()) +
70 " indices. You may want to consider to build deal.II with 64bit "
71 "indices (-D DEAL_II_WITH_64BIT_INDICES=\"ON\") to increase the limit "
93 std::uint8_t level = 0;
101 for (std::uint8_t l = 0; l < level; ++l)
107 constexpr unsigned int pyramid_max_children_per_cell =
111 child_indices.push_back(id_temp % pyramid_max_children_per_cell);
112 id_temp /= pyramid_max_children_per_cell;
116 constexpr unsigned int hypercube_max_children_per_cell =
123 child_indices.push_back(id_temp % hypercube_max_children_per_cell);
124 id_temp /= hypercube_max_children_per_cell;
128 std::reverse(child_indices.begin(), child_indices.end());
131 static_cast<unsigned int>(child_indices.size()),
132 child_indices.data());
146 return level_cell_id;
153#include "grid/cell_id_translator.inst"
ArrayView< const std::uint8_t > get_child_indices() const
types::coarse_cell_id get_coarse_cell_id() const
const types::global_cell_index n_global_levels
const unsigned int max_children_per_cell
CellIDTranslator(const Triangulation< dim, spacedim > &tria)
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 to_level_cell_index(const CellId &cell_id) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
constexpr ReferenceCell< 3 > Pyramid
constexpr const ReferenceCell< dim > & get_hypercube()
constexpr T pow(const T base, const int iexp)
constexpr std::uint8_t max_n_levels
global_cell_index coarse_cell_id
unsigned int global_cell_index