From: Daniel Arndt Date: Wed, 23 Jan 2019 20:09:19 +0000 (+0100) Subject: Check consistency for all mpi/periodicity tests X-Git-Tag: v9.1.0-rc1~405^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb43bcca9336a2a40f96a3a6d89d1e6a64529853;p=dealii.git Check consistency for all mpi/periodicity tests --- diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc index fc2df4bf55..0767258f2d 100644 --- a/tests/mpi/periodicity_01.cc +++ b/tests/mpi/periodicity_01.cc @@ -167,6 +167,16 @@ namespace Step40 constraints); constraints.close(); + const std::vector &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); diff --git a/tests/mpi/periodicity_02.cc b/tests/mpi/periodicity_02.cc index 312f5a4235..8178ca8bfa 100644 --- a/tests/mpi/periodicity_02.cc +++ b/tests/mpi/periodicity_02.cc @@ -397,6 +397,16 @@ namespace Step22 constraints.close(); + const std::vector &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, diff --git a/tests/mpi/periodicity_03.cc b/tests/mpi/periodicity_03.cc index 7c23d70d34..51da50c1fb 100644 --- a/tests/mpi/periodicity_03.cc +++ b/tests/mpi/periodicity_03.cc @@ -327,6 +327,16 @@ namespace Step22 } constraints.close(); + const std::vector &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, diff --git a/tests/mpi/periodicity_04.cc b/tests/mpi/periodicity_04.cc index ba8c79099a..e1c13a8de4 100644 --- a/tests/mpi/periodicity_04.cc +++ b/tests/mpi/periodicity_04.cc @@ -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 &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> support_points; diff --git a/tests/mpi/periodicity_06.cc b/tests/mpi/periodicity_06.cc index 21d1e136bb..cd86b29669 100644 --- a/tests/mpi/periodicity_06.cc +++ b/tests/mpi/periodicity_06.cc @@ -187,6 +187,16 @@ test(const unsigned numRefinementLevels = 2) constraints); constraints.close(); + const std::vector &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());