From 30046657017c4d436e2b94cbad47b2d7bec3ad03 Mon Sep 17 00:00:00 2001 From: marcfehling Date: Thu, 4 Jul 2019 15:24:31 +0200 Subject: [PATCH] Communicate thresholds. --- source/hp/refinement.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/hp/refinement.cc b/source/hp/refinement.cc index acb946f2c8..82eb819177 100644 --- a/source/hp/refinement.cc +++ b/source/hp/refinement.cc @@ -14,6 +14,10 @@ // --------------------------------------------------------------------- +#include + +#include + #include #include @@ -129,6 +133,24 @@ namespace hp } } + if (const parallel::Triangulation *parallel_tria = + dynamic_cast *>( + &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 = -- 2.39.5