From 9058c2626d02f2d4a4f7087be6f9c98eea082429 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 19 Feb 2021 12:09:59 -0700 Subject: [PATCH] Rename variables. --- .../matrix_free/shape_info.templates.h | 22 +++++++-------- .../mg_transfer_global_coarsening.templates.h | 28 +++++++++---------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/include/deal.II/matrix_free/shape_info.templates.h b/include/deal.II/matrix_free/shape_info.templates.h index 53618be269..4298f7a9ba 100644 --- a/include/deal.II/matrix_free/shape_info.templates.h +++ b/include/deal.II/matrix_free/shape_info.templates.h @@ -315,12 +315,12 @@ namespace internal } { - const auto reference_cell_type = fe.reference_cell(); + const auto reference_cell = fe.reference_cell(); const auto temp = get_face_quadrature_collection(quad, false); const auto &quad_face = temp.second; - if (reference_cell_type != temp.first) + if (reference_cell != temp.first) { // TODO: this might happen if the quadrature rule and the // the FE do not match @@ -344,13 +344,12 @@ namespace internal for (unsigned int face_no = 0; face_no < quad_face.size(); ++face_no) - n_max_vertices = - std::max(n_max_vertices, - reference_cell_type.face_reference_cell(face_no) - .n_vertices()); + n_max_vertices = std::max( + n_max_vertices, + reference_cell.face_reference_cell(face_no).n_vertices()); const auto projected_quad_face = - QProjector::project_to_all_faces(reference_cell_type, + QProjector::project_to_all_faces(reference_cell, quad_face); const unsigned int n_max_face_orientations = @@ -368,9 +367,10 @@ namespace internal for (unsigned int f = 0; f < quad_face.size(); ++f) { const unsigned int n_face_orientations = - dim == 2 ? 2 : - (2 * reference_cell_type.face_reference_cell(f) - .n_vertices()); + dim == 2 ? + 2 : + (2 * + reference_cell.face_reference_cell(f).n_vertices()); const unsigned int n_q_points_face = quad_face[f].size(); @@ -378,7 +378,7 @@ namespace internal { const auto offset = QProjector::DataSetDescriptor::face( - reference_cell_type, + reference_cell, f, (o ^ 1) & 1, // face_orientation (o >> 1) & 1, // face_flip diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index c9ecb5a8fc..034dff589e 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -996,8 +996,7 @@ namespace internal transfer.n_components = fe_fine.n_components(); - const auto reference_cell_type = - dof_handler_fine.get_fe(0).reference_cell(); + const auto reference_cell = dof_handler_fine.get_fe(0).reference_cell(); // create partitioners and vectors for internal purposes { @@ -1097,7 +1096,7 @@ namespace internal const auto cell_local_chilren_indices = - (reference_cell_type == ReferenceCells::get_hypercube()) ? + (reference_cell == ReferenceCells::get_hypercube()) ? get_child_offsets(transfer.schemes[0].dofs_per_cell_coarse, fe_fine.degree + 1, fe_fine.degree) : @@ -1126,7 +1125,7 @@ namespace internal // ---------------------- lexicographic_numbering ---------------------- std::vector lexicographic_numbering; - if (reference_cell_type == ReferenceCells::get_hypercube()) + if (reference_cell == ReferenceCells::get_hypercube()) { const Quadrature<1> dummy_quadrature( std::vector>(1, Point<1>())); @@ -1137,7 +1136,7 @@ namespace internal else { const auto dummy_quadrature = - reference_cell_type.template get_gauss_type_quadrature(1); + reference_cell.template get_gauss_type_quadrature(1); internal::MatrixFreeFunctions::ShapeInfo shape_info; shape_info.reinit(dummy_quadrature, fe_fine, 0); lexicographic_numbering = shape_info.lexicographic_numbering; @@ -1224,7 +1223,7 @@ namespace internal // ------------- prolongation matrix (0) -> identity matrix -------------- { AssertDimension(fe_fine.n_base_elements(), 1); - if (reference_cell_type == ReferenceCells::get_hypercube()) + if (reference_cell == ReferenceCells::get_hypercube()) { const auto fe = create_1D_fe(fe_fine.base_element(0)); @@ -1253,7 +1252,7 @@ namespace internal // ----------------------- prolongation matrix (1) ----------------------- { AssertDimension(fe_fine.n_base_elements(), 1); - if (reference_cell_type == ReferenceCells::get_hypercube()) + if (reference_cell == ReferenceCells::get_hypercube()) { const auto fe = create_1D_fe(fe_fine.base_element(0)); @@ -1536,17 +1535,17 @@ namespace internal transfer.schemes[fe_index_pair.second].dofs_per_cell_coarse * transfer.schemes[fe_index_pair.second].n_coarse_cells); - const auto reference_cell_type = + const auto reference_cell = dof_handler_fine.get_fe(fe_index_pair.first.second) .reference_cell(); - Assert(reference_cell_type == + Assert(reference_cell == dof_handler_coarse.get_fe(fe_index_pair.first.second) .reference_cell(), ExcNotImplemented()); // ------------------- lexicographic_numbering -------------------- - if (reference_cell_type == ReferenceCells::get_hypercube()) + if (reference_cell == ReferenceCells::get_hypercube()) { const Quadrature<1> dummy_quadrature( std::vector>(1, Point<1>())); @@ -1568,8 +1567,7 @@ namespace internal else { const auto dummy_quadrature = - reference_cell_type.template get_gauss_type_quadrature( - 1); + reference_cell.template get_gauss_type_quadrature(1); internal::MatrixFreeFunctions::ShapeInfo shape_info; shape_info.reinit(dummy_quadrature, @@ -1646,16 +1644,16 @@ namespace internal dof_handler_coarse.get_fe(fe_index_pair.first).n_base_elements(), 1); - const auto reference_cell_type = + const auto reference_cell = dof_handler_fine.get_fe(fe_index_pair_.first.second) .reference_cell(); - Assert(reference_cell_type == + Assert(reference_cell == dof_handler_coarse.get_fe(fe_index_pair_.first.second) .reference_cell(), ExcNotImplemented()); - if (reference_cell_type == ReferenceCells::get_hypercube()) + if (reference_cell == ReferenceCells::get_hypercube()) { const auto fe_fine = create_1D_fe( dof_handler_fine.get_fe(fe_index_pair.second).base_element(0)); -- 2.39.5