From cae4dfdf585c7567000bbb2a2d371ee1b9dbf3fb Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 5 Sep 2022 08:06:09 +0200 Subject: [PATCH] FEEvaluation: Create temporary copy of Jacobian matrix in submit_gradient --- include/deal.II/matrix_free/fe_evaluation.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 375b2e67d1..f0cf71390b 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -5647,7 +5647,7 @@ FEEvaluationAccess:: // general/affine cell type else { - const Tensor<2, dim, VectorizedArrayType> &jac = + const Tensor<2, dim, VectorizedArrayType> jac = this->cell_type > internal::MatrixFreeFunctions::affine ? this->jacobian[q_point] : this->jacobian[0]; @@ -6533,7 +6533,7 @@ FEEvaluationAccess:: } else { - const Tensor<2, dim, VectorizedArrayType> &jac = + const Tensor<2, dim, VectorizedArrayType> jac = this->cell_type == internal::MatrixFreeFunctions::general ? this->jacobian[q_point] : this->jacobian[0]; @@ -6609,7 +6609,7 @@ FEEvaluationAccess:: this->cell_type == internal::MatrixFreeFunctions::general ? this->J_value[q_point] : this->J_value[0] * this->quadrature_weights[q_point]; - const Tensor<2, dim, VectorizedArrayType> &jac = + const Tensor<2, dim, VectorizedArrayType> jac = this->cell_type == internal::MatrixFreeFunctions::general ? this->jacobian[q_point] : this->jacobian[0]; @@ -6924,7 +6924,7 @@ FEEvaluationAccess<1, 1, Number, is_face, VectorizedArrayType>::submit_gradient( this->gradients_quad_submitted = true; # endif - const Tensor<2, 1, VectorizedArrayType> &jac = + const Tensor<2, 1, VectorizedArrayType> jac = this->cell_type == internal::MatrixFreeFunctions::general ? this->jacobian[q_point] : this->jacobian[0]; -- 2.39.5