From b037a42941ef284c20f705496c5b8b50587563b4 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 22 Jan 2019 18:39:58 -0600 Subject: [PATCH] tests: Fix mpi/periodicity_07 test --- tests/mpi/periodicity_07.cc | 53 ++++------------------- tests/mpi/periodicity_07.mpirun=13.output | 2 +- 2 files changed, 10 insertions(+), 45 deletions(-) diff --git a/tests/mpi/periodicity_07.cc b/tests/mpi/periodicity_07.cc index dc0bf0a9b4..33586a1cc8 100644 --- a/tests/mpi/periodicity_07.cc +++ b/tests/mpi/periodicity_07.cc @@ -150,15 +150,6 @@ test(const unsigned numRefinementLevels = 2) AffineConstraints 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::cell_iterator>> @@ -172,7 +163,6 @@ test(const unsigned numRefinementLevels = 2) DoFTools::make_periodicity_constraints>(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 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 diff --git a/tests/mpi/periodicity_07.mpirun=13.output b/tests/mpi/periodicity_07.mpirun=13.output index ed2f98d514..79a6c47ece 100644 --- a/tests/mpi/periodicity_07.mpirun=13.output +++ b/tests/mpi/periodicity_07.mpirun=13.output @@ -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 -- 2.39.5