]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Give variables and typedefs introduced only a debug mode a smaller scope.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 25 Jan 2013 19:37:21 +0000 (19:37 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 25 Jan 2013 19:37:21 +0000 (19:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@28172 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_tools.cc

index 38b166525c9b60ee4eab65e6043cbd2b55eed592..02e722a86fcfb8088350298d8493803b4e357e8c 100644 (file)
@@ -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<DH::dimension,DH::space_dimension> PTRIA;
-    const PTRIA* ptria_p = dynamic_cast<const PTRIA*> (&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<DH::dimension,DH::space_dimension> PTRIA;
+      const PTRIA* ptria_p = dynamic_cast<const PTRIA*> (&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<DH::dimension,DH::space_dimension> PTRIA;
-    const PTRIA* ptria_p = dynamic_cast<const PTRIA*> (&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<DH::dimension,DH::space_dimension> PTRIA;
+      const PTRIA* ptria_p = dynamic_cast<const PTRIA*> (&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;

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.