]> https://gitweb.dealii.org/ - dealii.git/commitdiff
mpi/step-27: Check consistency of AffineConstraints. 8452/head
authorMarc Fehling <marc.fehling@gmx.net>
Sun, 4 Aug 2019 14:47:57 +0000 (08:47 -0600)
committerMarc Fehling <marc.fehling@gmx.net>
Sun, 4 Aug 2019 22:06:23 +0000 (16:06 -0600)
tests/mpi/petsc_step-27.cc
tests/mpi/trilinos_step-27.cc

index c36531d9685d936c1f263730892a11a555c07869..1fba613fcf04c2578494207e66126a766b822865 100644 (file)
@@ -229,6 +229,19 @@ namespace Step27
                                              0,
                                              Functions::ZeroFunction<dim>(),
                                              constraints);
+#ifdef DEBUG
+    // We have not dealt with chains of constraints on ghost cells yet.
+    // Thus, we are content with verifying their consistency for now.
+    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,
+                  mpi_communicator,
+                  /*verbose=*/true),
+                ExcMessage(
+                  "AffineConstraints object contains inconsistencies!"));
+#endif
     constraints.close();
 
     DynamicSparsityPattern dsp(locally_relevant_dofs);
index cca0b94db87a62c8c68c858b2334eef4cb4fd8f9..44d553f904825df8204f4a06001b4347ffa8e05d 100644 (file)
@@ -229,6 +229,19 @@ namespace Step27
                                              0,
                                              Functions::ZeroFunction<dim>(),
                                              constraints);
+#ifdef DEBUG
+    // We did not think about hp constraints on ghost cells yet.
+    // Thus, we are content with verifying their consistency for now.
+    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,
+                  mpi_communicator,
+                  /*verbose=*/true),
+                ExcMessage(
+                  "AffineConstraints object contains inconsistencies!"));
+#endif
     constraints.close();
 
     DynamicSparsityPattern dsp(locally_relevant_dofs);

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.