]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix test `mpi/hp_step-4`. 13025/head
authorMarc Fehling <mafehling.git@gmail.com>
Thu, 2 Dec 2021 18:52:09 +0000 (11:52 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Thu, 2 Dec 2021 20:34:00 +0000 (13:34 -0700)
tests/mpi/hp_step-4.cc

index dd5c51cb176d122d4921ee7cf2d8689e901e3889..e06052b03fd9f71de58afbbc3954a82e4bf51718 100644 (file)
@@ -23,6 +23,7 @@
 #include <deal.II/base/conditional_ostream.h>
 #include <deal.II/base/function.h>
 #include <deal.II/base/logstream.h>
+#include <deal.II/base/mpi.h>
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/utilities.h>
 
@@ -199,15 +200,19 @@ namespace Step4
 #ifdef DEBUG
     // We did not think about hp-constraints on ghost cells yet.
     // Thus, we are content with verifying their consistency for now.
+    const std::vector<IndexSet> locally_owned_dofs_per_processor =
+      Utilities::MPI::all_gather(communicator,
+                                 dof_handler.locally_owned_dofs());
+
     IndexSet locally_active_dofs;
     DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
-    AssertThrow(constraints.is_consistent_in_parallel(
-                  dof_handler.locally_owned_dofs_per_processor(),
-                  locally_active_dofs,
-                  communicator,
-                  /*verbose=*/true),
-                ExcMessage(
-                  "AffineConstraints object contains inconsistencies!"));
+
+    AssertThrow(
+      constraints.is_consistent_in_parallel(locally_owned_dofs_per_processor,
+                                            locally_active_dofs,
+                                            communicator,
+                                            /*verbose=*/true),
+      ExcMessage("AffineConstraints object contains inconsistencies!"));
 #endif
 
     constraints.close();

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.