]> https://gitweb.dealii.org/ - dealii.git/commitdiff
tests: Fix mpi/periodicity_07 test
authorMatthias Maier <tamiko@43-1.org>
Wed, 23 Jan 2019 00:39:58 +0000 (18:39 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 23 Jan 2019 17:05:29 +0000 (11:05 -0600)
tests/mpi/periodicity_07.cc
tests/mpi/periodicity_07.mpirun=13.output

index dc0bf0a9b4fc675df76fa3916c72b20aa8406246..33586a1cc81793316124f055b1757dff00395551 100644 (file)
@@ -150,15 +150,6 @@ test(const unsigned numRefinementLevels = 2)
   AffineConstraints<double> constraints;
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
-  DoFTools::make_hanging_node_constraints(dofHandler, constraints);
-
-  const bool hanging_consistent =
-    constraints.is_consistent_in_parallel(locally_owned_dofs,
-                                          locally_active_dofs,
-                                          mpi_communicator);
-
-  pcout << "Hanging nodes constraints are consistent in parallel: "
-        << hanging_consistent << std::endl;
 
   std::vector<
     GridTools::PeriodicFacePair<typename DoFHandler<dim>::cell_iterator>>
@@ -172,7 +163,6 @@ test(const unsigned numRefinementLevels = 2)
 
   DoFTools::make_periodicity_constraints<DoFHandler<dim>>(periodicity_vectorDof,
                                                           constraints);
-  constraints.close();
 
   const bool consistent =
     constraints.is_consistent_in_parallel(locally_owned_dofs,
@@ -180,45 +170,20 @@ test(const unsigned numRefinementLevels = 2)
                                           mpi_communicator,
                                           /*verbose*/ true);
 
-  pcout << "Total constraints are consistent in parallel: " << consistent
+  pcout << "Periodicity constraints are consistent in parallel: " << consistent
         << std::endl;
 
-  /* verbose output of is_consistent_in_parallel() gives:
-
-  Proc 10 got line 370 from 11 wrong values!
-  Proc 10 got line 374 from 11 wrong values!
-  Proc 10 got line 378 from 11 wrong values!
-  3 inconsistent lines discovered!
+  DoFTools::make_hanging_node_constraints(dofHandler, constraints);
 
-  */
+  const bool hanging_consistent =
+    constraints.is_consistent_in_parallel(locally_owned_dofs,
+                                          locally_active_dofs,
+                                          mpi_communicator);
 
-  const std::vector<unsigned int> wrong_lines = {{370, 374, 378}};
+  pcout << "Hanging nodes constraints are consistent in parallel: "
+        << hanging_consistent << std::endl;
 
-  for (unsigned int i = 0; i < n_mpi_processes; ++i)
-    {
-      if (this_mpi_process == i)
-        {
-          std::cout << "=== Process " << i << std::endl;
-          // constraints.print(std::cout);
-          // std::cout << "Owned DoFs:" << std::endl;
-          // dofHandler.locally_owned_dofs().print(std::cout);
-          // std::cout << "Ghost DoFs:" << std::endl;
-          // locally_relevant_dofs.print(std::cout);
-
-          for (auto ind : wrong_lines)
-            if (locally_relevant_dofs.is_element(ind) &&
-                constraints.is_constrained(ind))
-              {
-                std::cout << "Constraints for " << ind << " @ "
-                          << supportPoints[ind] << ":" << std::endl;
-                for (auto c : *constraints.get_constraint_entries(ind))
-                  std::cout << "    " << c.first << " @ "
-                            << supportPoints[c.first] << " :  " << c.second
-                            << std::endl;
-              }
-        }
-      MPI_Barrier(mpi_communicator);
-    }
+  constraints.close();
 }
 
 int
index ed2f98d514b42cb0b90a55ca86596d4f2be102f7..79a6c47ece7d203f9f380fc6977d88537fead431 100644 (file)
@@ -1,3 +1,3 @@
 number of elements: 183
+Periodicity constraints are consistent in parallel: 1
 Hanging nodes constraints are consistent in parallel: 1
-Total constraints are consistent in parallel: 1

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.