From: Marc Fehling Date: Sun, 4 Aug 2019 14:47:57 +0000 (-0600) Subject: mpi/step-27: Check consistency of AffineConstraints. X-Git-Tag: v9.2.0-rc1~1325^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8452%2Fhead;p=dealii.git mpi/step-27: Check consistency of AffineConstraints. --- diff --git a/tests/mpi/petsc_step-27.cc b/tests/mpi/petsc_step-27.cc index c36531d968..1fba613fcf 100644 --- a/tests/mpi/petsc_step-27.cc +++ b/tests/mpi/petsc_step-27.cc @@ -229,6 +229,19 @@ namespace Step27 0, Functions::ZeroFunction(), 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); diff --git a/tests/mpi/trilinos_step-27.cc b/tests/mpi/trilinos_step-27.cc index cca0b94db8..44d553f904 100644 --- a/tests/mpi/trilinos_step-27.cc +++ b/tests/mpi/trilinos_step-27.cc @@ -229,6 +229,19 @@ namespace Step27 0, Functions::ZeroFunction(), 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);