]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix '#if DEBUG' statements. 18056/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 29 Jan 2025 17:51:47 +0000 (10:51 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 29 Jan 2025 17:51:47 +0000 (10:51 -0700)
include/deal.II/fe/fe_tools.templates.h
source/grid/tria_description.cc

index b31cbe3020eeb791c244dc138dd5ebd55afb2f7c..19125efa135301a782b19ccdb5d6768774acb777 100644 (file)
@@ -2233,7 +2233,7 @@ namespace FETools
       // Ensure that the element we are looking for isn't in the map
       // yet. This only requires us to read the map, so it can happen
       // in a shared locked state
-#if DEBUG
+#ifdef DEBUG
     {
       std::shared_lock<std::shared_mutex> lock(
         internal::FEToolsAddFENameHelper::fe_name_map_lock);
index 0954b5ea3a5db5c5db12c4e7544aa4cfd43367e2..52770bdccec6bb42d85e326594825b338e619cc7 100644 (file)
@@ -734,6 +734,7 @@ namespace TriangulationDescription
                    "in the given communicator."));
         }
 
+#ifdef DEBUG
       // If we are dealing with a sequential triangulation, then someone
       // will have needed to set the subdomain_ids by hand. Make sure that
       // all ids we see are less than the number of processes we are
@@ -741,7 +742,6 @@ namespace TriangulationDescription
       if (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
             &tria) == nullptr)
         {
-#if DEBUG
           const unsigned int n_mpi_processes =
             dealii::Utilities::MPI::n_mpi_processes(comm);
           for (const auto &cell : tria.active_cell_iterators())
@@ -751,8 +751,8 @@ namespace TriangulationDescription
                               " when splitting the triangulation using an MPI "
                               " communicator with only " +
                               std::to_string(n_mpi_processes) + " processes."));
-#endif
         }
+#endif
 
       // First, figure out for what rank we are supposed to build the
       // TriangulationDescription::Description object

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.