From feaa33fd90bd0a35bc64b9c33bcb8083ea098c15 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 8 Feb 2025 22:02:00 -0500 Subject: [PATCH] Avoid calling the deprecated versions of project_to_face() etc. --- include/deal.II/fe/fe_tools.templates.h | 5 ++++- include/deal.II/non_matching/mapping_info.h | 8 +++----- .../numerics/vector_tools_boundary.templates.h | 16 ++++++++++++---- source/fe/fe_abf.cc | 7 +++++-- source/fe/fe_bernstein.cc | 8 +++++--- source/fe/fe_p1nc.cc | 3 ++- source/fe/fe_q_base.cc | 8 +++++--- source/fe/fe_raviart_thomas.cc | 7 +++++-- source/fe/fe_raviart_thomas_nodal.cc | 3 ++- source/fe/fe_simplex_p.cc | 11 ++++++----- tests/fe/fe_support_points_common.h | 11 +++++------ 11 files changed, 54 insertions(+), 33 deletions(-) diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index 19125efa13..15431416f3 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1915,7 +1915,10 @@ namespace FETools // hating the anisotropic implementation QGauss q_gauss(degree + 1); const Quadrature q_fine = - QProjector::project_to_face(fe.reference_cell(), q_gauss, face_fine); + QProjector::project_to_face(fe.reference_cell(), + q_gauss, + face_fine, + numbers::default_geometric_orientation); const unsigned int nq = q_fine.size(); FEValues fine(mapping, diff --git a/include/deal.II/non_matching/mapping_info.h b/include/deal.II/non_matching/mapping_info.h index eb33193e2b..946843b920 100644 --- a/include/deal.II/non_matching/mapping_info.h +++ b/include/deal.II/non_matching/mapping_info.h @@ -124,13 +124,11 @@ namespace NonMatching dynamic_cast::InternalData &>( *internal_mapping_data); data.initialize_face(update_flags_mapping, - QProjector::project_to_oriented_face( - ReferenceCells::get_hypercube(), + QProjector::project_to_face( + cell->reference_cell(), quadrature, face_no, - cell->face_orientation(face_no), - cell->face_flip(face_no), - cell->face_rotation(face_no)), + cell->combined_face_orientation(face_no)), quadrature.size()); mapping_q->fill_mapping_data_for_face_quadrature( diff --git a/include/deal.II/numerics/vector_tools_boundary.templates.h b/include/deal.II/numerics/vector_tools_boundary.templates.h index 28df3a5d5d..78cbdcf978 100644 --- a/include/deal.II/numerics/vector_tools_boundary.templates.h +++ b/include/deal.II/numerics/vector_tools_boundary.templates.h @@ -1960,8 +1960,10 @@ namespace VectorTools QProjector::project_to_face( ReferenceCells::get_hypercube(), reference_edge_quadrature, - line), - face)); + line, + numbers::default_geometric_orientation), + face, + numbers::default_geometric_orientation)); } } } @@ -2377,7 +2379,10 @@ namespace VectorTools for (const unsigned int face : GeometryInfo::face_indices()) quadrature_collection.push_back(QProjector::project_to_face( - ReferenceCells::get_hypercube(), face_quadrature, face)); + ReferenceCells::get_hypercube(), + face_quadrature, + face, + numbers::default_geometric_orientation)); hp::FEValues fe_values(mapping_collection, fe_collection, @@ -2538,7 +2543,10 @@ namespace VectorTools for (const unsigned int face : GeometryInfo::face_indices()) quadrature_collection.push_back(QProjector::project_to_face( - ReferenceCells::get_hypercube(), quadrature, face)); + ReferenceCells::get_hypercube(), + quadrature, + face, + numbers::default_geometric_orientation)); } hp::FEFaceValues fe_face_values(mapping_collection, diff --git a/source/fe/fe_abf.cc b/source/fe/fe_abf.cc index f947e12b07..c93890a486 100644 --- a/source/fe/fe_abf.cc +++ b/source/fe/fe_abf.cc @@ -359,8 +359,11 @@ FE_ABF::initialize_restriction() // child cell are evaluated // in the quadrature points // of a full face. - Quadrature q_face = - QProjector::project_to_face(this->reference_cell(), q_base, face); + Quadrature q_face = QProjector::project_to_face( + this->reference_cell(), + q_base, + face, + numbers::default_geometric_orientation); // Store shape values, since the // evaluation suffers if not // ordered by point diff --git a/source/fe/fe_bernstein.cc b/source/fe/fe_bernstein.cc index cfdc65e08f..145ffb5983 100644 --- a/source/fe/fe_bernstein.cc +++ b/source/fe/fe_bernstein.cc @@ -153,9 +153,11 @@ FE_Bernstein::get_subface_interpolation_matrix( // be done for the face orientation flag in 3d. const Quadrature subface_quadrature = subface == numbers::invalid_unsigned_int ? - QProjector::project_to_face(this->reference_cell(), - quad_face_support, - 0) : + QProjector::project_to_face( + this->reference_cell(), + quad_face_support, + 0, + numbers::default_geometric_orientation) : QProjector::project_to_subface(this->reference_cell(), quad_face_support, 0, diff --git a/source/fe/fe_p1nc.cc b/source/fe/fe_p1nc.cc index f849439b9a..212ca1ef4a 100644 --- a/source/fe/fe_p1nc.cc +++ b/source/fe/fe_p1nc.cc @@ -265,7 +265,8 @@ FE_P1NC::fill_fe_face_values( const Quadrature<2> quadrature_on_face = QProjector<2>::project_to_face(this->reference_cell(), quadrature[0], - face_no); + face_no, + numbers::default_geometric_orientation); if (flags & update_values) for (unsigned int i = 0; i < quadrature_on_face.size(); ++i) diff --git a/source/fe/fe_q_base.cc b/source/fe/fe_q_base.cc index def431961b..70cdd53d90 100644 --- a/source/fe/fe_q_base.cc +++ b/source/fe/fe_q_base.cc @@ -667,9 +667,11 @@ FE_Q_Base::get_subface_interpolation_matrix( // be done for the face orientation flag in 3d. const Quadrature subface_quadrature = subface == numbers::invalid_unsigned_int ? - QProjector::project_to_face(this->reference_cell(), - quad_face_support, - 0) : + QProjector::project_to_face( + this->reference_cell(), + quad_face_support, + 0, + numbers::default_geometric_orientation) : QProjector::project_to_subface(this->reference_cell(), quad_face_support, 0, diff --git a/source/fe/fe_raviart_thomas.cc b/source/fe/fe_raviart_thomas.cc index a8ef14b910..ebdec7a3c2 100644 --- a/source/fe/fe_raviart_thomas.cc +++ b/source/fe/fe_raviart_thomas.cc @@ -465,8 +465,11 @@ FE_RaviartThomas::initialize_restriction() // child cell are evaluated // in the quadrature points // of a full face. - const Quadrature q_face = - QProjector::project_to_face(this->reference_cell(), q_base, face); + const Quadrature q_face = QProjector::project_to_face( + this->reference_cell(), + q_base, + face, + numbers::default_geometric_orientation); // Store shape values, since the // evaluation suffers if not // ordered by point diff --git a/source/fe/fe_raviart_thomas_nodal.cc b/source/fe/fe_raviart_thomas_nodal.cc index 92f1c758ef..d2abaf304e 100644 --- a/source/fe/fe_raviart_thomas_nodal.cc +++ b/source/fe/fe_raviart_thomas_nodal.cc @@ -534,7 +534,8 @@ FE_RaviartThomasNodal::get_face_interpolation_matrix( const Quadrature face_projection = QProjector::project_to_face(this->reference_cell(), quad_face_support, - 0); + 0, + numbers::default_geometric_orientation); for (unsigned int i = 0; i < source_fe.n_dofs_per_face(face_no); ++i) { diff --git a/source/fe/fe_simplex_p.cc b/source/fe/fe_simplex_p.cc index 85c16369f7..7035f3a23a 100644 --- a/source/fe/fe_simplex_p.cc +++ b/source/fe/fe_simplex_p.cc @@ -580,11 +580,12 @@ FE_SimplexPoly::get_face_interpolation_matrix( const double eps = 2e-13 * this->degree * (dim - 1); - std::vector> face_quadrature_points(quad_face_support.size()); - QProjector::project_to_face(this->reference_cell(), - quad_face_support, - face_no, - face_quadrature_points); + const std::vector> face_quadrature_points = + QProjector::project_to_face(this->reference_cell(), + quad_face_support, + face_no, + numbers::default_geometric_orientation) + .get_points(); for (unsigned int i = 0; i < source_fe.n_dofs_per_face(face_no); ++i) for (unsigned int j = 0; j < this->n_dofs_per_face(face_no); ++j) diff --git a/tests/fe/fe_support_points_common.h b/tests/fe/fe_support_points_common.h index 11089801b8..9467798bbd 100644 --- a/tests/fe/fe_support_points_common.h +++ b/tests/fe/fe_support_points_common.h @@ -71,12 +71,11 @@ check_support(const FiniteElement &finel, const char *name) for (const unsigned int i : GeometryInfo::face_indices()) { - std::vector> q_points(q.get_points().size()); - QProjector::project_to_face(ReferenceCells::get_hypercube(), - q, - i, - q_points); - Quadrature qp(q_points); + const auto qp = QProjector::project_to_face( + ReferenceCells::get_hypercube(), + q, + i, + numbers::default_geometric_orientation); deallog << name << '<' << dim << '>' << " face " << i << " support points" << std::endl; -- 2.39.5