]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Communicate thresholds. 8325/head
authormarcfehling <marc.fehling@gmx.net>
Thu, 4 Jul 2019 13:24:31 +0000 (15:24 +0200)
committermarcfehling <marc.fehling@gmx.net>
Thu, 4 Jul 2019 13:36:09 +0000 (15:36 +0200)
source/hp/refinement.cc

index acb946f2c850fa0fa09deb2f38c285d0393f61f4..82eb819177c040721955d13aa4462919abb1e8f6 100644 (file)
 // ---------------------------------------------------------------------
 
 
+#include <deal.II/base/mpi.h>
+
+#include <deal.II/distributed/tria_base.h>
+
 #include <deal.II/grid/grid_refinement.h>
 
 #include <deal.II/hp/dof_handler.h>
@@ -129,6 +133,24 @@ namespace hp
               }
           }
 
+      if (const parallel::Triangulation<dim, spacedim> *parallel_tria =
+            dynamic_cast<const parallel::Triangulation<dim, spacedim> *>(
+              &dof_handler.get_triangulation()))
+        {
+          max_smoothness_refine =
+            Utilities::MPI::max(max_smoothness_refine,
+                                parallel_tria->get_communicator());
+          min_smoothness_refine =
+            Utilities::MPI::min(min_smoothness_refine,
+                                parallel_tria->get_communicator());
+          max_smoothness_coarsen =
+            Utilities::MPI::max(max_smoothness_coarsen,
+                                parallel_tria->get_communicator());
+          min_smoothness_coarsen =
+            Utilities::MPI::min(min_smoothness_coarsen,
+                                parallel_tria->get_communicator());
+        }
+
       // Absent any better strategies, we will set the threshold by linear
       // interpolation for both classes of cells individually.
       const Number threshold_smoothness_refine =

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.