From: Wolfgang Bangerth Date: Thu, 9 Feb 2023 01:10:01 +0000 (-0700) Subject: Get rid of two lambda functions by combining their action using ReferenceCell. X-Git-Tag: v9.5.0-rc1~412^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b9849b07de325ebe1fbf413eddd571edc6449e4;p=dealii.git Get rid of two lambda functions by combining their action using ReferenceCell. --- 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 =