]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEEvaluation: Create temporary copy of Jacobian matrix in submit_gradient 14240/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Mon, 5 Sep 2022 06:06:09 +0000 (08:06 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Mon, 5 Sep 2022 06:08:29 +0000 (08:08 +0200)
include/deal.II/matrix_free/fe_evaluation.h

index 375b2e67d144585910c1e2ed0aff3c6d0fbde72f..f0cf71390bbd3e8383825f650f10293c67e2e84e 100644 (file)
@@ -5647,7 +5647,7 @@ FEEvaluationAccess<dim, 1, Number, is_face, VectorizedArrayType>::
   // 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<dim, dim, Number, is_face, VectorizedArrayType>::
         }
       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<dim, dim, Number, is_face, VectorizedArrayType>::
         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];

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.