]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix FEEvaluation gradient layout in step-76 tutorial program 16966/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Sun, 5 May 2024 10:02:07 +0000 (12:02 +0200)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Sun, 5 May 2024 10:02:07 +0000 (12:02 +0200)
examples/step-76/step-76.cc

index 1d9fdb1a999f9914db9a68b1a263dec4740c436f..c872469b2784d39e7375ee9957e417f07bf96695 100644 (file)
@@ -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;

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.