]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in tutorial step-46
authorSebastian Stark <stark.sebastian@gmx.de>
Wed, 15 May 2019 19:18:01 +0000 (21:18 +0200)
committerSebastian Stark <stark.sebastian@gmx.de>
Wed, 15 May 2019 19:27:30 +0000 (21:27 +0200)
Fix a bug in step-46, which caused the y-displacements (z in 3d) to be unsymmetric

doc/news/changes/minor/20190515SebastianStark [new file with mode: 0644]
examples/step-46/step-46.cc

diff --git a/doc/news/changes/minor/20190515SebastianStark b/doc/news/changes/minor/20190515SebastianStark
new file mode 100644 (file)
index 0000000..71a7dd9
--- /dev/null
@@ -0,0 +1,3 @@
+Fixed: Fix a bug in tutorial step-46, which caused the y-displacement (z-displacement in 3d) to be slightly unsymmetric.
+<br>
+(Sebastian Stark, 2019/05/15)
index 58e5d0bf921f83dc9bcb07ac9601b188a59bb9eb..12fa63c0c44a1182fe699cf4a43b20f44d0f99d3 100644 (file)
@@ -483,7 +483,7 @@ namespace Step46
                                             common_face_quadrature,
                                             update_JxW_values |
                                               update_normal_vectors |
-                                              update_gradients);
+                                              update_gradients | update_values);
     FEFaceValues<dim>    elasticity_fe_face_values(elasticity_fe,
                                                 common_face_quadrature,
                                                 update_values);
@@ -491,7 +491,8 @@ namespace Step46
                                                   common_face_quadrature,
                                                   update_JxW_values |
                                                     update_normal_vectors |
-                                                    update_gradients);
+                                                    update_gradients |
+                                                    update_values);
     FESubfaceValues<dim> elasticity_fe_subface_values(elasticity_fe,
                                                       common_face_quadrature,
                                                       update_values);
@@ -798,8 +799,11 @@ namespace Step46
           stokes_fe_face_values.normal_vector(q);
 
         for (unsigned int k = 0; k < stokes_fe_face_values.dofs_per_cell; ++k)
-          stokes_symgrad_phi_u[k] =
-            stokes_fe_face_values[velocities].symmetric_gradient(k, q);
+          {
+            stokes_symgrad_phi_u[k] =
+              stokes_fe_face_values[velocities].symmetric_gradient(k, q);
+            stokes_phi_p[k] = stokes_fe_face_values[pressure].value(k, q);
+          }
         for (unsigned int k = 0; k < elasticity_fe_face_values.dofs_per_cell;
              ++k)
           elasticity_phi[k] =

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.