25 : coarse_cell_id(
numbers::invalid_coarse_cell_id)
26 , n_child_indices(
numbers::invalid_unsigned_int)
33 std::numeric_limits<char>::max());
39 const std::vector<std::uint8_t> &
id)
40 : coarse_cell_id(coarse_cell_id)
41 , n_child_indices(id.size())
50 const unsigned int n_child_indices,
51 const std::uint8_t *
id)
52 : coarse_cell_id(coarse_cell_id)
53 , n_child_indices(n_child_indices)
68 const unsigned int two_bit_mask = (1 << 2) - 1;
69 const unsigned int dim = binary_representation[1] & two_bit_mask;
75 const unsigned int children_per_value =
76 sizeof(binary_type::value_type) * 8 / dim;
77 const unsigned int child_mask = (1 << dim) - 1;
80 unsigned int child_level = 0;
81 unsigned int binary_entry = 2;
84 for (
unsigned int j = 0; j < children_per_value; ++j)
89 (binary_representation[binary_entry] >> (dim * j)) & child_mask;
102 std::istringstream ss(string_representation);
113 binary_representation.fill(0);
123 binary_representation[1] |= dim;
126 const unsigned int children_per_value =
127 sizeof(binary_type::value_type) * 8 / dim;
128 unsigned int child_level = 0;
129 unsigned int binary_entry = 2;
136 for (
unsigned int j = 0; j < children_per_value; ++j)
138 const unsigned int child_index =
142 binary_representation[binary_entry] |= (child_index << (j * dim));
150 return binary_representation;
158 std::ostringstream ss;
165template <
int dim,
int spacedim>
174#include "cell_id.inst"
std::array< std::uint8_t, internal::p4est::functions< 2 >::max_level > child_indices
Triangulation< dim, spacedim >::cell_iterator to_cell(const Triangulation< dim, spacedim > &tria) const
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
cell_iterator create_cell_iterator(const CellId &cell_id) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
const ::Triangulation< dim, spacedim > & tria