]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check consistency for all mpi/periodicity tests
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 23 Jan 2019 20:09:19 +0000 (21:09 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 23 Jan 2019 20:14:22 +0000 (21:14 +0100)
tests/mpi/periodicity_01.cc
tests/mpi/periodicity_02.cc
tests/mpi/periodicity_03.cc
tests/mpi/periodicity_04.cc
tests/mpi/periodicity_06.cc

index fc2df4bf55badbfaebaccff585884917b82ef846..0767258f2d70a7f5860abaf3e004b19686de9875 100644 (file)
@@ -167,6 +167,16 @@ namespace Step40
                                              constraints);
     constraints.close();
 
+    const std::vector<IndexSet> &locally_owned_dofs =
+      dof_handler.locally_owned_dofs_per_processor();
+    IndexSet locally_active_dofs;
+    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
+                                                      locally_active_dofs,
+                                                      mpi_communicator,
+                                                      /*verbose*/ true),
+                ExcInternalError());
+
     DynamicSparsityPattern csp(dof_handler.n_dofs(),
                                dof_handler.n_dofs(),
                                locally_relevant_dofs);
index 312f5a4235aef603e3574cba4009f013a98dc3bc..8178ca8bfa1f8728fcdcc00872a7c16d8eec7a37 100644 (file)
@@ -397,6 +397,16 @@ namespace Step22
 
     constraints.close();
 
+    const std::vector<IndexSet> &locally_owned_dofs =
+      dof_handler.locally_owned_dofs_per_processor();
+    IndexSet locally_active_dofs;
+    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
+                                                      locally_active_dofs,
+                                                      mpi_communicator,
+                                                      /*verbose*/ true),
+                ExcInternalError());
+
     {
       TrilinosWrappers::BlockSparsityPattern bsp(owned_partitioning,
                                                  owned_partitioning,
index 7c23d70d34dd296982ebb09e1e36d06e2880ede1..51da50c1fb7b094e8105bdb18b9f6299fa0e51a5 100644 (file)
@@ -327,6 +327,16 @@ namespace Step22
     }
     constraints.close();
 
+    const std::vector<IndexSet> &locally_owned_dofs =
+      dof_handler.locally_owned_dofs_per_processor();
+    IndexSet locally_active_dofs;
+    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
+                                                      locally_active_dofs,
+                                                      mpi_communicator,
+                                                      /*verbose*/ true),
+                ExcInternalError());
+
     {
       TrilinosWrappers::BlockSparsityPattern bsp(owned_partitioning,
                                                  owned_partitioning,
index ba8c79099a029c947892a32b9b4c8d4565280d71..e1c13a8de4e2cfea78a36b7de97ce0513350996b 100644 (file)
@@ -205,6 +205,16 @@ check(const unsigned int orientation, bool reverse)
   unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
   constraints.print(deallog.get_file_stream());
 
+  const std::vector<IndexSet> &locally_owned_dofs_vector =
+    dof_handler.locally_owned_dofs_per_processor();
+  IndexSet locally_active_dofs;
+  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs_vector,
+                                                    locally_active_dofs,
+                                                    MPI_COMM_WORLD,
+                                                    /*verbose*/ true),
+              ExcInternalError());
+
   unsigned int n_local_constraints = 0;
 
   std::map<types::global_dof_index, Point<dim>> support_points;
index 21d1e136bb57f8e736953edff664aa306d3948f9..cd86b29669995498e5b3b510e92c24fc6b558ec4 100644 (file)
@@ -187,6 +187,16 @@ test(const unsigned numRefinementLevels = 2)
                                                           constraints);
   constraints.close();
 
+  const std::vector<IndexSet> &locally_owned_dofs =
+    dof_handler.locally_owned_dofs_per_processor();
+  IndexSet locally_active_dofs;
+  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
+                                                    locally_active_dofs,
+                                                    mpi_communicator,
+                                                    /*verbose*/ true),
+              ExcInternalError());
+
   deallog << "=== Process " << this_mpi_process << std::endl
           << "Constraints:" << std::endl;
   constraints.print(deallog.get_file_stream());

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.