From: Sebastian Stark Date: Wed, 15 May 2019 19:18:01 +0000 (+0200) Subject: Fix bug in tutorial step-46 X-Git-Tag: v9.2.0-rc1~797^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d2cdea38a02c04b961b0fe3efaea7f7a02246a4;p=dealii.git Fix bug in tutorial step-46 Fix a bug in step-46, which caused the y-displacements (z in 3d) to be unsymmetric --- diff --git a/doc/news/changes/minor/20190515SebastianStark b/doc/news/changes/minor/20190515SebastianStark new file mode 100644 index 0000000000..71a7dd9e9b --- /dev/null +++ b/doc/news/changes/minor/20190515SebastianStark @@ -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. +
+(Sebastian Stark, 2019/05/15) diff --git a/examples/step-46/step-46.cc b/examples/step-46/step-46.cc index 58e5d0bf92..12fa63c0c4 100644 --- a/examples/step-46/step-46.cc +++ b/examples/step-46/step-46.cc @@ -483,7 +483,7 @@ namespace Step46 common_face_quadrature, update_JxW_values | update_normal_vectors | - update_gradients); + update_gradients | update_values); FEFaceValues 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 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] =