From: Peter Munch Date: Sat, 7 May 2022 21:35:44 +0000 (+0200) Subject: Rename some face batches X-Git-Tag: v9.4.0-rc1~266^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13691%2Fhead;p=dealii.git Rename some face batches --- diff --git a/include/deal.II/matrix_free/face_setup_internal.h b/include/deal.II/matrix_free/face_setup_internal.h index bdcc6516e6..f271043a43 100644 --- a/include/deal.II/matrix_free/face_setup_internal.h +++ b/include/deal.II/matrix_free/face_setup_internal.h @@ -1191,7 +1191,7 @@ namespace internal std::vector> &faces_out, const std::vector & active_fe_indices) { - FaceToCellTopology macro_face; + FaceToCellTopology face_batch; std::vector> faces_type; unsigned int face_start = face_partition_data[0], @@ -1240,13 +1240,13 @@ namespace internal new_faces(face_comparator); for (const auto &face_type : faces_type) { - macro_face.face_type = faces_in[face_type[0]].face_type; - macro_face.interior_face_no = + face_batch.face_type = faces_in[face_type[0]].face_type; + face_batch.interior_face_no = faces_in[face_type[0]].interior_face_no; - macro_face.exterior_face_no = + face_batch.exterior_face_no = faces_in[face_type[0]].exterior_face_no; - macro_face.subface_index = faces_in[face_type[0]].subface_index; - macro_face.face_orientation = + face_batch.subface_index = faces_in[face_type[0]].subface_index; + face_batch.face_orientation = faces_in[face_type[0]].face_orientation; unsigned int no_faces = face_type.size(); std::vector touched(no_faces, 0); @@ -1276,13 +1276,13 @@ namespace internal vectorization_width + 1); for (unsigned int v = 0; v < vectorization_width; ++v) { - macro_face.cells_interior[v] = + face_batch.cells_interior[v] = faces_in[face_type[f + v]].cells_interior[0]; - macro_face.cells_exterior[v] = + face_batch.cells_exterior[v] = faces_in[face_type[f + v]].cells_exterior[0]; touched[f + v] = 1; } - new_faces.insert(macro_face); + new_faces.insert(face_batch); f += vectorization_width - 1; n_vectorized += vectorization_width; } @@ -1296,14 +1296,14 @@ namespace internal unsigned int v = 0; for (const auto f : untouched) { - macro_face.cells_interior[v] = + face_batch.cells_interior[v] = faces_in[face_type[f]].cells_interior[0]; - macro_face.cells_exterior[v] = + face_batch.cells_exterior[v] = faces_in[face_type[f]].cells_exterior[0]; ++v; if (v == vectorization_width) { - new_faces.insert(macro_face); + new_faces.insert(face_batch); v = 0; } } @@ -1316,12 +1316,12 @@ namespace internal for (; v < vectorization_width; ++v) { // Dummy cell, not used - macro_face.cells_interior[v] = + face_batch.cells_interior[v] = numbers::invalid_unsigned_int; - macro_face.cells_exterior[v] = + face_batch.cells_exterior[v] = numbers::invalid_unsigned_int; } - new_faces.insert(macro_face); + new_faces.insert(face_batch); } else { diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index f977f5d904..12db266c1d 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -1710,7 +1710,7 @@ public: * indicating a boundary face. */ types::boundary_id - get_boundary_id(const unsigned int macro_face) const; + get_boundary_id(const unsigned int face_batch_index) const; /** * Return the boundary ids for the faces within a cell, using the cells' @@ -1898,7 +1898,7 @@ public: * faces. */ std::pair - get_face_category(const unsigned int macro_face) const; + get_face_category(const unsigned int face_batch_index) const; /** * Queries whether or not the indexation has been set. @@ -2388,14 +2388,14 @@ MatrixFree::n_ghost_inner_face_batches() const template inline types::boundary_id MatrixFree::get_boundary_id( - const unsigned int macro_face) const + const unsigned int face_batch_index) const { - Assert(macro_face >= task_info.boundary_partition_data[0] && - macro_face < task_info.boundary_partition_data.back(), - ExcIndexRange(macro_face, + Assert(face_batch_index >= task_info.boundary_partition_data[0] && + face_batch_index < task_info.boundary_partition_data.back(), + ExcIndexRange(face_batch_index, task_info.boundary_partition_data[0], task_info.boundary_partition_data.back())); - return types::boundary_id(face_info.faces[macro_face].exterior_face_no); + return types::boundary_id(face_info.faces[face_batch_index].exterior_face_no); } @@ -2734,10 +2734,10 @@ template inline const internal::MatrixFreeFunctions::FaceToCellTopology< VectorizedArrayType::size()> & MatrixFree::get_face_info( - const unsigned int macro_face) const + const unsigned int face_batch_index) const { - AssertIndexRange(macro_face, face_info.faces.size()); - return face_info.faces[macro_face]; + AssertIndexRange(face_batch_index, face_info.faces.size()); + return face_info.faces[face_batch_index]; } @@ -2798,31 +2798,33 @@ MatrixFree::get_cell_category( template inline std::pair MatrixFree::get_face_category( - const unsigned int macro_face) const + const unsigned int face_batch_index) const { - AssertIndexRange(macro_face, face_info.faces.size()); + AssertIndexRange(face_batch_index, face_info.faces.size()); if (dof_info[0].cell_active_fe_index.empty()) return std::make_pair(0U, 0U); std::pair result; - for (unsigned int v = 0; v < VectorizedArrayType::size() && - face_info.faces[macro_face].cells_interior[v] != - numbers::invalid_unsigned_int; + for (unsigned int v = 0; + v < VectorizedArrayType::size() && + face_info.faces[face_batch_index].cells_interior[v] != + numbers::invalid_unsigned_int; ++v) result.first = std::max( result.first, - dof_info[0] - .cell_active_fe_index[face_info.faces[macro_face].cells_interior[v]]); - if (face_info.faces[macro_face].cells_exterior[0] != + dof_info[0].cell_active_fe_index[face_info.faces[face_batch_index] + .cells_interior[v]]); + if (face_info.faces[face_batch_index].cells_exterior[0] != numbers::invalid_unsigned_int) - for (unsigned int v = 0; v < VectorizedArrayType::size() && - face_info.faces[macro_face].cells_exterior[v] != - numbers::invalid_unsigned_int; + for (unsigned int v = 0; + v < VectorizedArrayType::size() && + face_info.faces[face_batch_index].cells_exterior[v] != + numbers::invalid_unsigned_int; ++v) result.second = std::max( result.first, - dof_info[0] - .cell_active_fe_index[face_info.faces[macro_face].cells_exterior[v]]); + dof_info[0].cell_active_fe_index[face_info.faces[face_batch_index] + .cells_exterior[v]]); else result.second = numbers::invalid_unsigned_int; return result;