26 : coarse_cell_id(
numbers::invalid_coarse_cell_id)
27 , n_child_indices(
numbers::invalid_unsigned_int)
34 std::numeric_limits<char>::max());
40 const std::vector<std::uint8_t> &
id)
41 : coarse_cell_id(coarse_cell_id)
42 , n_child_indices(id.size())
51 const unsigned int n_child_indices,
52 const std::uint8_t *
id)
53 : coarse_cell_id(coarse_cell_id)
54 , n_child_indices(n_child_indices)
69 const unsigned int two_bit_mask = (1 << 2) - 1;
70 const unsigned int dim = binary_representation[1] & two_bit_mask;
76 const unsigned int children_per_value =
77 sizeof(binary_type::value_type) * 8 / dim;
78 const unsigned int child_mask = (1 << dim) - 1;
81 unsigned int child_level = 0;
82 unsigned int binary_entry = 2;
85 for (
unsigned int j = 0; j < children_per_value; ++j)
90 (binary_representation[binary_entry] >> (dim * j)) & child_mask;
103 std::istringstream ss(string_representation);
114 binary_representation.fill(0);
124 binary_representation[1] |= dim;
127 const unsigned int children_per_value =
128 sizeof(binary_type::value_type) * 8 / dim;
129 unsigned int child_level = 0;
130 unsigned int binary_entry = 2;
137 for (
unsigned int j = 0; j < children_per_value; ++j)
139 const unsigned int child_index =
143 binary_representation[binary_entry] |= (child_index << (j * dim));
151 return binary_representation;
159 std::ostringstream ss;
166#include "cell_id.inst"
std::array< std::uint8_t, internal::p4est::functions< 2 >::max_level > child_indices
unsigned int n_child_indices
binary_type to_binary() const
std::string to_string() const
types::coarse_cell_id coarse_cell_id
std::array< unsigned int, 4 > binary_type
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()