From: Martin Kronbichler Date: Mon, 5 Sep 2022 06:06:09 +0000 (+0200) Subject: FEEvaluation: Create temporary copy of Jacobian matrix in submit_gradient X-Git-Tag: v9.5.0-rc1~991^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14240%2Fhead;p=dealii.git FEEvaluation: Create temporary copy of Jacobian matrix in submit_gradient --- 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];