]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update examples
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 31 Jul 2021 10:46:10 +0000 (12:46 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Wed, 4 Aug 2021 17:15:20 +0000 (19:15 +0200)
examples/step-12/step-12.cc
examples/step-47/step-47.cc
examples/step-74/step-74.cc

index f91e94999ed4c4700cf2b0b90ba76faf5a212028..06d43b86425e759a3120c312a076552cfa300d3a 100644 (file)
@@ -406,7 +406,7 @@ namespace Step12
           for (unsigned int i = 0; i < n_dofs; ++i)
             for (unsigned int j = 0; j < n_dofs; ++j)
               copy_data_face.cell_matrix(i, j) +=
-                fe_iv.jump(i, qpoint) // [\phi_i]
+                fe_iv.jump_in_shape_values(i, qpoint) // [\phi_i]
                 *
                 fe_iv.shape_value((beta_dot_n > 0), j, qpoint) // phi_j^{upwind}
                 * beta_dot_n                                   // (\beta . n)
index 53a03a1feabdac644cd49420385d910cb6e3eb82..c63afdd9b0a5a149bf4696799a160010c04fc50d 100644 (file)
@@ -549,16 +549,19 @@ namespace Step47
           for (unsigned int i = 0; i < n_interface_dofs; ++i)
             {
               const double av_hessian_i_dot_n_dot_n =
-                (fe_interface_values.average_hessian(i, qpoint) * n * n);
+                (fe_interface_values.average_of_shape_hessians(i, qpoint) * n *
+                 n);
               const double jump_grad_i_dot_n =
-                (fe_interface_values.jump_gradient(i, qpoint) * n);
+                (fe_interface_values.jump_in_shape_gradients(i, qpoint) * n);
 
               for (unsigned int j = 0; j < n_interface_dofs; ++j)
                 {
                   const double av_hessian_j_dot_n_dot_n =
-                    (fe_interface_values.average_hessian(j, qpoint) * n * n);
+                    (fe_interface_values.average_of_shape_hessians(j, qpoint) *
+                     n * n);
                   const double jump_grad_j_dot_n =
-                    (fe_interface_values.jump_gradient(j, qpoint) * n);
+                    (fe_interface_values.jump_in_shape_gradients(j, qpoint) *
+                     n);
 
                   copy_data_face.cell_matrix(i, j) +=
                     (-av_hessian_i_dot_n_dot_n       // - {grad^2 v n n }
@@ -641,16 +644,19 @@ namespace Step47
           for (unsigned int i = 0; i < n_dofs; ++i)
             {
               const double av_hessian_i_dot_n_dot_n =
-                (fe_interface_values.average_hessian(i, qpoint) * n * n);
+                (fe_interface_values.average_of_shape_hessians(i, qpoint) * n *
+                 n);
               const double jump_grad_i_dot_n =
-                (fe_interface_values.jump_gradient(i, qpoint) * n);
+                (fe_interface_values.jump_in_shape_gradients(i, qpoint) * n);
 
               for (unsigned int j = 0; j < n_dofs; ++j)
                 {
                   const double av_hessian_j_dot_n_dot_n =
-                    (fe_interface_values.average_hessian(j, qpoint) * n * n);
+                    (fe_interface_values.average_of_shape_hessians(j, qpoint) *
+                     n * n);
                   const double jump_grad_j_dot_n =
-                    (fe_interface_values.jump_gradient(j, qpoint) * n);
+                    (fe_interface_values.jump_in_shape_gradients(j, qpoint) *
+                     n);
 
                   copy_data_face.cell_matrix(i, j) +=
                     (-av_hessian_i_dot_n_dot_n  // - {grad^2 v n n}
index e82c46259601ef4f221458859000bb363fbd3d6b..8a0ee148afabd4cbc9159fe8466cc3f2383aab81 100644 (file)
@@ -509,19 +509,21 @@ namespace Step74
           for (unsigned int i = 0; i < n_dofs_face; ++i)
             for (unsigned int j = 0; j < n_dofs_face; ++j)
               copy_data_face.cell_matrix(i, j) +=
-                (-diffusion_coefficient *              // - nu
-                   fe_iv.jump(i, point) *              // [v_h]
-                   (fe_iv.average_gradient(j, point) * // ({grad u_h} .
-                    normals[point])                    //  n)
-
-                 - diffusion_coefficient *               // - nu
-                     (fe_iv.average_gradient(i, point) * // (grad v_h .
-                      normals[point]) *                  //  n)
-                     fe_iv.jump(j, point)                // [u_h]
-
-                 + diffusion_coefficient * penalty * // + nu sigma
-                     fe_iv.jump(i, point) *          // [v_h]
-                     fe_iv.jump(j, point)            // [u_h]
+                (-diffusion_coefficient *                     // - nu
+                   fe_iv.jump_in_shape_values(i, point) *     // [v_h]
+                   (fe_iv.average_of_shape_gradients(j,       //
+                                                     point) * // ({grad u_h} .
+                    normals[point])                           //  n)
+
+                 -
+                 diffusion_coefficient *                         // - nu
+                   (fe_iv.average_of_shape_gradients(i, point) * // (grad v_h .
+                    normals[point]) *                            //  n)
+                   fe_iv.jump_in_shape_values(j, point)          // [u_h]
+
+                 + diffusion_coefficient * penalty *        // + nu sigma
+                     fe_iv.jump_in_shape_values(i, point) * // [v_h]
+                     fe_iv.jump_in_shape_values(j, point)   // [u_h]
 
                  ) *
                 JxW[point]; // dx

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.