39 const std::vector<std::uint8_t> &
id)
40 : coarse_cell_id(coarse_cell_id)
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;
105 binary_representation.fill(0);
115 binary_representation[1] |= dim;
118 const unsigned int children_per_value =
119 sizeof(binary_type::value_type) * 8 / dim;
120 unsigned int child_level = 0;
121 unsigned int binary_entry = 2;
128 for (
unsigned int j = 0; j < children_per_value; ++j)
130 const unsigned int child_index =
134 binary_representation[binary_entry] |= (child_index << (j * dim));
142 return binary_representation;
150 std::ostringstream ss;
157 template <
int dim,
int spacedim>
165 cell = cell->child(static_cast<unsigned int>(
child_indices[i]));
171 #include "cell_id.inst"
virtual unsigned int coarse_cell_id_to_coarse_cell_index(const types::coarse_cell_id coarse_cell_id) const
static const unsigned int invalid_unsigned_int
const types::coarse_cell_id invalid_coarse_cell_id
Triangulation< dim, spacedim >::cell_iterator to_cell(const Triangulation< dim, spacedim > &tria) const
binary_type to_binary() const
std::array< unsigned int, 4 > binary_type
#define Assert(cond, exc)
#define DEAL_II_NAMESPACE_CLOSE
VectorType::value_type * end(VectorType &V)
std::string to_string() const
#define DEAL_II_NAMESPACE_OPEN
VectorType::value_type * begin(VectorType &V)
unsigned int n_child_indices
types::coarse_cell_id coarse_cell_id
global_cell_index coarse_cell_id
void copy(const T *begin, const T *end, U *dest)
T max(const T &t, const MPI_Comm &mpi_communicator)
std::array< std::uint8_t, internal::p4est::functions< 2 >::max_level > child_indices
static ::ExceptionBase & ExcInternalError()