]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify logic in RepartitioningPolicyTools::FirstChildPolicy 13479/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 2 Mar 2022 11:32:11 +0000 (12:32 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 2 Mar 2022 11:32:11 +0000 (12:32 +0100)
source/distributed/repartitioning_policy_tools.cc

index e4a7e0c8d46e029b53b7dc3e012cae8e7f06acec..03a5967ec679ea9fb80b407f3d019a4db7518023 100644 (file)
@@ -39,8 +39,7 @@ namespace RepartitioningPolicyTools
     {
       is_fine.add_index(cell_id_translator.translate(cell));
 
-      if (cell->level() > 0 &&
-          (cell->index() % GeometryInfo<dim>::max_children_per_cell) == 0)
+      if (cell->level() > 0 && cell->parent()->child(0) == cell)
         add_indices_recursively_for_first_child_policy(cell->parent(),
                                                        cell_id_translator,
                                                        is_fine);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.