]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix hessian tests
authorMaximilian Bergbauer <bergbauer@lnm.mw.tum.de>
Fri, 10 Dec 2021 10:08:29 +0000 (11:08 +0100)
committerMartin Kronbichler <martin.kronbichler@it.uu.se>
Sat, 11 Dec 2021 11:13:32 +0000 (12:13 +0100)
include/deal.II/matrix_free/evaluation_kernels.h

index 92001b04db438da77233dbb5f57cc4eaeb136bc3..121f5a83d58f7c7b1c7e87631c768e2fb17ed65d 100644 (file)
@@ -2083,7 +2083,8 @@ namespace internal
       // keep a copy of the original pointer for the case of the Hessians
       Number *values_dofs_ptr = values_dofs;
 
-      if (evaluation_flag == EvaluationFlags::values)
+      if (evaluation_flag & EvaluationFlags::values &&
+          !(evaluation_flag & EvaluationFlags::gradients))
         for (unsigned int c = 0; c < n_components; ++c)
           {
             switch (dim)
@@ -2283,7 +2284,8 @@ namespace internal
       // keep a copy of the original pointer for the case of the Hessians
       Number *values_dofs_ptr = values_dofs;
 
-      if (integration_flag == EvaluationFlags::values)
+      if (integration_flag & EvaluationFlags::values &&
+          !(integration_flag & EvaluationFlags::gradients))
         for (unsigned int c = 0; c < n_components; ++c)
           {
             switch (dim)

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.