From: Sean Johnson Date: Tue, 28 Jan 2025 20:48:36 +0000 (-0700) Subject: squashing commits X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61158b558771fc09c11d3d6de6229020c85d4dc2;p=dealii.git squashing commits --- diff --git a/include/deal.II/matrix_free/face_setup_internal.h b/include/deal.II/matrix_free/face_setup_internal.h index 6fe9850926..0f79808ae1 100644 --- a/include/deal.II/matrix_free/face_setup_internal.h +++ b/include/deal.II/matrix_free/face_setup_internal.h @@ -810,8 +810,11 @@ namespace internal { typename dealii::Triangulation::cell_iterator neighbor = dcell->neighbor_or_periodic_neighbor(f); - if (use_active_cells && neighbor->has_children()) + if (use_active_cells && neighbor->has_children() && + dim > 1) { + // dim > 1 because face()->n_children() = 0 when dim + // == 1 for (unsigned int c = 0; c < dcell->face(f)->n_children(); ++c) @@ -879,6 +882,62 @@ namespace internal } } } + else if (dim == 1) + { + // Follow much the same procedure of dim > 1 with + // one large exception: Face is created on first + // visitation as long as neighbor has no children + // face_visited is used as a flag that a face has + // already been created + if (face_visited[dcell->face(f)->index()] == 0 && + !(neighbor->has_children())) + { + std::pair + level_index(neighbor->level(), + neighbor->index()); + if (face_is_owned[dcell->face(f)->index()] == + FaceCategory::locally_active_done_here) + { + Assert(use_active_cells || + dcell->level() == + neighbor->level(), + ExcInternalError()); + ++inner_counter; + inner_faces.push_back(create_face( + f, + dcell, + cell, + neighbor, + map_to_vectorized[level_index], + is_mixed_mesh)); + face_visited[dcell->face(f)->index()] = 1; + } + else if (face_is_owned[dcell->face(f) + ->index()] == + FaceCategory::ghosted) + { + inner_ghost_faces.push_back(create_face( + f, + dcell, + cell, + neighbor, + map_to_vectorized[level_index], + is_mixed_mesh)); + face_visited[dcell->face(f)->index()] = 1; + } + } + if (face_is_owned[dcell->face(f)->index()] == + FaceCategory::multigrid_refinement_edge) + { + refinement_edge_faces.push_back( + create_face(f, + dcell, + cell, + neighbor, + refinement_edge_faces.size(), + is_mixed_mesh)); + } + } else { const types::subdomain_id my_domain = @@ -995,7 +1054,8 @@ namespace internal info.subface_index = cell->periodic_neighbor_of_coarser_periodic_neighbor(face_no) .second; - else + // else if must be dim > 1 because dim == 1 adm creates no subfaces + else if (dim > 1) info.subface_index = cell->neighbor_of_coarser_neighbor(face_no).second; }