From eee158a2530fcd4a1cf3f117fa46440439c71f73 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 5 May 2024 12:02:07 +0200 Subject: [PATCH] Fix FEEvaluation gradient layout in step-76 tutorial program --- examples/step-76/step-76.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/step-76/step-76.cc b/examples/step-76/step-76.cc index 1d9fdb1a99..c872469b27 100644 --- a/examples/step-76/step-76.cc +++ b/examples/step-76/step-76.cc @@ -741,17 +741,19 @@ namespace Euler_DG for (unsigned int c = 0; c < dim + 2; ++c) { if (dim >= 1 && body_force.get() == nullptr) - eval.template gradients<0, false, false>( - gradient_ptr + phi.static_n_q_points * 0, values_ptr); + eval.template gradients<0, false, false, dim>(gradient_ptr, + values_ptr); else if (dim >= 1) - eval.template gradients<0, false, true>( - gradient_ptr + phi.static_n_q_points * 0, values_ptr); + eval.template gradients<0, false, true, dim>(gradient_ptr, + values_ptr); if (dim >= 2) - eval.template gradients<1, false, true>( - gradient_ptr + phi.static_n_q_points * 1, values_ptr); + eval.template gradients<1, false, true, dim>(gradient_ptr + + 1, + values_ptr); if (dim >= 3) - eval.template gradients<2, false, true>( - gradient_ptr + phi.static_n_q_points * 2, values_ptr); + eval.template gradients<2, false, true, dim>(gradient_ptr + + 2, + values_ptr); values_ptr += phi.static_n_q_points; gradient_ptr += phi.static_n_q_points * dim; -- 2.39.5