From: Wolfgang Bangerth Date: Thu, 7 Jan 2021 16:23:36 +0000 (-0700) Subject: Make one variable 'const'. X-Git-Tag: v9.3.0-rc1~662^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11492%2Fhead;p=dealii.git Make one variable 'const'. --- diff --git a/include/deal.II/fe/fe_point_evaluation.h b/include/deal.II/fe/fe_point_evaluation.h index deced7f9ca..2a637cd27c 100644 --- a/include/deal.II/fe/fe_point_evaluation.h +++ b/include/deal.II/fe/fe_point_evaluation.h @@ -470,7 +470,7 @@ FEPointEvaluation::evaluate( else if (values.size() > 0 || gradients.size() > 0) { // slow path with FEValues - UpdateFlags flags = + const UpdateFlags flags = (values.size() > 0 ? update_values : update_default) | (gradients.size() > 0 ? update_gradients : update_default); FEValues fe_values( @@ -480,6 +480,7 @@ FEPointEvaluation::evaluate( std::vector>(unit_points.begin(), unit_points.end())), flags); fe_values.reinit(cell); + if (values.size() > 0) { AssertDimension(unit_points.size(), values.size()); @@ -503,6 +504,7 @@ FEPointEvaluation::evaluate( fe_values.shape_value_component(i, q, d) * value; } } + if (gradients.size() > 0) { AssertDimension(unit_points.size(), gradients.size());