]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEEvaluation: Fix submit_gradient in 1D
authorMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 26 Mar 2024 16:39:48 +0000 (17:39 +0100)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Wed, 27 Mar 2024 13:44:37 +0000 (14:44 +0100)
include/deal.II/matrix_free/fe_evaluation.h

index 83d3eb462e8448e695593fb35049456771807b77..857927cd79cdaad663da88eebcff2d8c3313ebdf 100644 (file)
@@ -5149,7 +5149,7 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
   submit_gradient(const Tensor<2, 1, VectorizedArrayType> grad_in,
                   const unsigned int                      q_point)
 {
-  submit_value(grad_in[0], q_point);
+  submit_gradient(grad_in[0], q_point);
 }
 
 
@@ -5434,8 +5434,9 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
   VectorizedArrayType divergence;
   const std::size_t   nqp = this->n_quadrature_points;
 
-  if (this->data->element_type ==
-      internal::MatrixFreeFunctions::ElementType::tensor_raviart_thomas)
+  if (dim > 1 &&
+      this->data->element_type ==
+        internal::MatrixFreeFunctions::ElementType::tensor_raviart_thomas)
     {
       VectorizedArrayType inv_det =
         (!is_face &&

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.