From 8b9849b07de325ebe1fbf413eddd571edc6449e4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 8 Feb 2023 18:10:01 -0700 Subject: [PATCH] Get rid of two lambda functions by combining their action using ReferenceCell. --- source/base/qprojector.cc | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/source/base/qprojector.cc b/source/base/qprojector.cc index e7b59b3427..35d43fb58b 100644 --- a/source/base/qprojector.cc +++ b/source/base/qprojector.cc @@ -643,24 +643,6 @@ Quadrature<3> QProjector<3>::project_to_all_faces(const ReferenceCell & reference_cell, const hp::QCollection<2> &quadrature) { - const auto support_points_tri = - [](const std::vector> &face, - const unsigned char orientation) -> std::vector> { - const boost::container::small_vector, 8> temp = - ReferenceCells::Triangle.permute_by_combined_orientation>( - face, orientation); - return std::vector>(temp.begin(), temp.end()); - }; - - const auto support_points_quad = - [](const std::vector> &face, - const unsigned char orientation) -> std::vector> { - const boost::container::small_vector, 8> temp = - ReferenceCells::Quadrilateral.permute_by_combined_orientation>( - face, orientation); - return std::vector>(temp.begin(), temp.end()); - }; - const auto process = [&](const std::vector>> &faces) { // new (projected) quadrature points and weights std::vector> points; @@ -691,10 +673,9 @@ QProjector<3>::project_to_all_faces(const ReferenceCell & reference_cell, { const auto &face = faces[face_no]; - const auto support_points = - n_linear_shape_functions == 3 ? - support_points_tri(face, orientation) : - support_points_quad(face, orientation); + const boost::container::small_vector, 8> support_points = + reference_cell.face_reference_cell(face_no) + .permute_by_combined_orientation>(face, orientation); // the quadrature rule to be projected ... const auto &sub_quadrature_points = -- 2.39.5