From: Luca Heltai Date: Thu, 9 Jul 2020 11:29:30 +0000 (+0200) Subject: Be explicit about dimension. X-Git-Tag: v9.3.0-rc1~1312^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10672%2Fhead;p=dealii.git Be explicit about dimension. --- diff --git a/include/deal.II/meshworker/mesh_loop.h b/include/deal.II/meshworker/mesh_loop.h index 2c2267de1c..3c9d143a7e 100644 --- a/include/deal.II/meshworker/mesh_loop.h +++ b/include/deal.II/meshworker/mesh_loop.h @@ -317,6 +317,9 @@ namespace MeshWorker // user. copy = sample_copy_data; + // Store the dimension in which we are working for later use + const auto dim = cell->get_triangulation().dimension; + const bool ignore_subdomain = (cell->get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id); @@ -390,10 +393,10 @@ namespace MeshWorker const bool periodic_neighbor = cell->has_periodic_neighbor(face_no); - if ((!periodic_neighbor && - cell->neighbor_is_coarser(face_no)) || - (periodic_neighbor && - cell->periodic_neighbor_is_coarser(face_no))) + if (dim > 1 && ((!periodic_neighbor && + cell->neighbor_is_coarser(face_no)) || + (periodic_neighbor && + cell->periodic_neighbor_is_coarser(face_no)))) { Assert(cell->is_active(), ExcInternalError()); Assert(neighbor->is_active(), ExcInternalError()); @@ -435,8 +438,7 @@ namespace MeshWorker copy); } } - else if (CellIteratorType::AccessorType::dimension == 1 && - cell->level() > neighbor->level()) + else if (dim == 1 && cell->level() > neighbor->level()) { // In one dimension, there is no other check to do const unsigned int neighbor_face_no =