From: Wolfgang Bangerth Date: Wed, 29 Jan 2025 17:51:47 +0000 (-0700) Subject: Fix '#if DEBUG' statements. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18056%2Fhead;p=dealii.git Fix '#if DEBUG' statements. --- diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index b31cbe3020..19125efa13 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -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 lock( internal::FEToolsAddFENameHelper::fe_name_map_lock); diff --git a/source/grid/tria_description.cc b/source/grid/tria_description.cc index 0954b5ea3a..52770bdcce 100644 --- a/source/grid/tria_description.cc +++ b/source/grid/tria_description.cc @@ -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 *>( &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