From: Peter Munch Date: Fri, 19 Jun 2020 10:26:34 +0000 (+0200) Subject: Remove usused internal function convert_cell_id_binary_type_to_level_coarse_cell_id X-Git-Tag: v9.3.0-rc1~1417^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdd40febea1c71b7f2b36e3ab7111e5eb428b9cb;p=dealii.git Remove usused internal function convert_cell_id_binary_type_to_level_coarse_cell_id --- diff --git a/source/grid/tria_description.cc b/source/grid/tria_description.cc index b59c2e0b1f..5634c81767 100644 --- a/source/grid/tria_description.cc +++ b/source/grid/tria_description.cc @@ -90,57 +90,6 @@ namespace TriangulationDescription if (cell->level() != 0) set_user_flag_and_of_its_parents(cell->parent()); } - - - /** - * Convert the binary representation of a CellId to coarse-cell id as - * if the finest level were the coarsest level ("level coarse-grid id"). - */ - template - types::coarse_cell_id - convert_cell_id_binary_type_to_level_coarse_cell_id( - const typename CellId::binary_type &binary_representation) - { - // exploiting the structure of CellId::binary_type - // see also the documentation of CellId - - // actual coarse-grid id - const unsigned int coarse_cell_id = binary_representation[0]; - const unsigned int n_child_indices = binary_representation[1] >> 2; - - const unsigned int children_per_value = - sizeof(CellId::binary_type::value_type) * 8 / dim; - unsigned int child_level = 0; - unsigned int binary_entry = 2; - - // path to the get to the cell - std::vector cell_indices; - while (child_level < n_child_indices) - { - Assert(binary_entry < binary_representation.size(), - ExcInternalError()); - - for (unsigned int j = 0; j < children_per_value; ++j) - { - unsigned int cell_index = - (((binary_representation[binary_entry] >> (j * dim))) & - (GeometryInfo::max_children_per_cell - 1)); - cell_indices.push_back(cell_index); - ++child_level; - if (child_level == n_child_indices) - break; - } - ++binary_entry; - } - - // compute new coarse-grid id: c_{i+1} = c_{i}*2^dim + q; - types::coarse_cell_id level_coarse_cell_id = coarse_cell_id; - for (auto i : cell_indices) - level_coarse_cell_id = - level_coarse_cell_id * GeometryInfo::max_children_per_cell + i; - - return level_coarse_cell_id; - } } // namespace