From d66162e5dff3b038b7f086942e082e16a89633b8 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 25 Jan 2013 19:37:21 +0000 Subject: [PATCH] Give variables and typedefs introduced only a debug mode a smaller scope. git-svn-id: https://svn.dealii.org/trunk@28172 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/dofs/dof_tools.cc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/deal.II/source/dofs/dof_tools.cc b/deal.II/source/dofs/dof_tools.cc index 38b166525c..02e722a86f 100644 --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@ -3011,11 +3011,13 @@ namespace DoFTools #if defined(DEBUG) && defined(DEAL_II_USE_P4EST) // Check whether we run on a non parallel mesh or on a // parallel::distributed::Triangulation in serial - typedef parallel::distributed::Triangulation PTRIA; - const PTRIA* ptria_p = dynamic_cast (&dof_handler.get_tria()); - Assert ((ptria_p == 0 || Utilities::MPI::n_mpi_processes(ptria_p->get_communicator()) == 1), - ExcMessage ("This function can not be used with distributed triangulations." - "See the documentation for more information.")); + { + typedef parallel::distributed::Triangulation PTRIA; + const PTRIA* ptria_p = dynamic_cast (&dof_handler.get_tria()); + Assert ((ptria_p == 0 || Utilities::MPI::n_mpi_processes(ptria_p->get_communicator()) == 1), + ExcMessage ("This function can not be used with distributed triangulations." + "See the documentation for more information.")); + } #endif Assert (b_id1 != b_id2, @@ -3103,11 +3105,13 @@ namespace DoFTools #if defined(DEBUG) && defined(DEAL_II_USE_P4EST) // Check whether we run on a non parallel mesh or on a // parallel::distributed::Triangulation in serial - typedef typename parallel::distributed::Triangulation PTRIA; - const PTRIA* ptria_p = dynamic_cast (&dof_handler.get_tria()); - Assert ((ptria_p == 0 || Utilities::MPI::n_mpi_processes(ptria_p->get_communicator()) == 1), - ExcMessage ("This function can not be used with distributed triangulations." - "See the documentation for more information.")); + { + typedef typename parallel::distributed::Triangulation PTRIA; + const PTRIA* ptria_p = dynamic_cast (&dof_handler.get_tria()); + Assert ((ptria_p == 0 || Utilities::MPI::n_mpi_processes(ptria_p->get_communicator()) == 1), + ExcMessage ("This function can not be used with distributed triangulations." + "See the documentation for more information.")); + } #endif typedef typename DH::face_iterator FaceIterator; -- 2.39.5