]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cell_weight: not implemented for partition_zorder 13449/head
authorMarc Fehling <mafehling.git@gmail.com>
Fri, 25 Feb 2022 19:12:12 +0000 (12:12 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Fri, 25 Feb 2022 19:22:27 +0000 (12:22 -0700)
source/grid/grid_tools.cc

index 9cd09727d8d16cee168ca8b868789461a0226806..361721e687a5a69e7ba49f066f6f20e6cf88ed3d 100644 (file)
@@ -4028,6 +4028,7 @@ namespace GridTools
                       "are already partitioned implicitly and can not be "
                       "partitioned again explicitly."));
     Assert(n_partitions > 0, ExcInvalidNumberOfPartitions(n_partitions));
+    Assert(triangulation.signals.cell_weight.empty(), ExcNotImplemented());
 
     // signal that partitioning is going to happen
     triangulation.signals.pre_partition();
@@ -4128,10 +4129,7 @@ namespace GridTools
     unsigned int n_levels = triangulation.n_levels();
     for (int lvl = n_levels - 1; lvl >= 0; --lvl)
       {
-        typename Triangulation<dim, spacedim>::cell_iterator
-          cell = triangulation.begin(lvl),
-          endc = triangulation.end(lvl);
-        for (; cell != endc; ++cell)
+        for (const auto &cell : triangulation.cell_iterators_on_level(lvl))
           {
             if (cell->is_active())
               cell->set_level_subdomain_id(cell->subdomain_id());

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.