From f68312cae9e9853aa8bfaec6b0a4cf275e14d8fd Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 21 Oct 2017 01:38:25 +0200 Subject: [PATCH] Take hp objects by const (reference) access --- .../deal.II/numerics/vector_tools.templates.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index 7db3343eeb..30f5a28d59 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -310,7 +310,7 @@ namespace VectorTools typedef typename VectorType::value_type number; - const hp::FECollection fe(dof_handler.get_fe()); + const hp::FECollection &fe(dof_handler.get_fe_collection()); std::vector dofs_on_cell(fe.max_dofs_per_cell()); @@ -343,7 +343,7 @@ namespace VectorTools support_quadrature.push_back(Quadrature(points)); } - hp::MappingCollection mapping_collection(mapping); + const hp::MappingCollection mapping_collection(mapping); // An FEValues object to evaluate (generalized) support point // locations as well as Jacobians and their inverses. @@ -2496,7 +2496,7 @@ namespace VectorTools // now that we have a q_collection object with all the right quadrature // points, create an hp::FEFaceValues object that we can use to evaluate // the boundary values at - dealii::hp::MappingCollection mapping_collection (mapping); + const dealii::hp::MappingCollection mapping_collection (mapping); dealii::hp::FEFaceValues x_fe_values (mapping_collection, finite_elements, q_collection, @@ -4214,8 +4214,8 @@ namespace VectorTools const unsigned int superdegree = dof_handler.get_fe ().degree; const QGauss reference_face_quadrature (2 * superdegree); const unsigned int dofs_per_face = dof_handler.get_fe ().dofs_per_face; - hp::FECollection fe_collection (dof_handler.get_fe_collection ()); - hp::MappingCollection mapping_collection (mapping); + const hp::FECollection &fe_collection (dof_handler.get_fe_collection ()); + const hp::MappingCollection mapping_collection (mapping); hp::QCollection face_quadrature_collection; for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) @@ -4416,7 +4416,7 @@ namespace VectorTools ConstraintMatrix &constraints, const hp::MappingCollection &mapping_collection) { - hp::FECollection fe_collection (dof_handler.get_fe_collection ()); + const hp::FECollection &fe_collection (dof_handler.get_fe_collection ()); hp::QCollection face_quadrature_collection; for (unsigned int i = 0; i < fe_collection.size (); ++i) @@ -5240,7 +5240,7 @@ namespace VectorTools // Create hp FEcollection, dof_handler can be either hp or standard type. // From here on we can treat it like a hp-namespace object. - const hp::FECollection fe_collection (dof_handler.get_fe_collection ()); + const hp::FECollection &fe_collection (dof_handler.get_fe_collection ()); // Create face quadrature collection hp::QCollection face_quadrature_collection; @@ -5470,7 +5470,7 @@ namespace VectorTools // compute_project_boundary_values_curl_conforming_l2() function // above after recasting the mapping. - hp::MappingCollection mapping_collection (mapping); + const hp::MappingCollection mapping_collection (mapping); internals:: compute_project_boundary_values_curl_conforming_l2(dof_handler, first_vector_component, @@ -5712,7 +5712,7 @@ namespace VectorTools update_quadrature_points | update_values); hp::FECollection fe_collection (fe); - hp::MappingCollection mapping_collection (mapping); + const hp::MappingCollection mapping_collection (mapping); hp::QCollection quadrature_collection; for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) -- 2.39.5