From e869fc334c4553fc36e39f6a5e72b516807a710b Mon Sep 17 00:00:00 2001 From: Maximilian Bergbauer Date: Fri, 10 Dec 2021 11:08:29 +0100 Subject: [PATCH] Fix hessian tests --- include/deal.II/matrix_free/evaluation_kernels.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index 92001b04db..121f5a83d5 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -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) -- 2.39.5