From 9314389f1565bac0fa545ee502343a1a55ec9b8e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 23 Jul 2015 11:19:47 -0500 Subject: [PATCH] Let second_derivative() return a const reference, rather than a value. This function is used in places where we want to get pointers into an array. Make sure that is possible for both the const and the non-const version of the function. (The latter already did this; the former didn't and that wasn't needed, but I need it for a follow-up patch.) --- include/deal.II/fe/mapping_fe_field.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index 34000afbc7..8324e956f4 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -232,8 +232,8 @@ public: /** * Second derivative of shape function in quadrature point. See above. */ - Tensor<2,dim> second_derivative (const unsigned int qpoint, - const unsigned int shape_nr) const; + const Tensor<2,dim> &second_derivative (const unsigned int qpoint, + const unsigned int shape_nr) const; /** * Second derivative of shape function in quadrature point. See above. @@ -681,7 +681,7 @@ MappingFEField::InternalData::derivative (const unsigned template inline -Tensor<2,dim> +const Tensor<2,dim> & MappingFEField::InternalData::second_derivative (const unsigned int qpoint, const unsigned int shape_nr) const { -- 2.39.5