]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor edits to a bilinear form. 733/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 3 Apr 2015 15:13:50 +0000 (10:13 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 3 Apr 2015 15:13:50 +0000 (10:13 -0500)
The existing code is a bit hard to read because it groups terms in ways that
do not match the way it is shown in the documentation. Change the grouping so
that documentation and code match 1:1.

examples/step-15/step-15.cc

index ba2c2e9b0f3b074566c2fb8679a79a0380153a66..d76f131925ed99ac7f431637449ca64351a4e79e 100644 (file)
@@ -293,17 +293,17 @@ namespace Step15
               {
                 for (unsigned int j=0; j<dofs_per_cell; ++j)
                   {
-                    cell_matrix(i, j) += (fe_values.shape_grad(i, q_point)
-                                          * coeff
-                                          * (fe_values.shape_grad(j, q_point)
-                                             -
-                                             coeff * coeff
+                    cell_matrix(i, j) += ( ((fe_values.shape_grad(i, q_point)
+                                             * coeff
+                                             * fe_values.shape_grad(j, q_point))
+                                            -
+                                            (fe_values.shape_grad(i, q_point)
+                                             * coeff * coeff * coeff
                                              * (fe_values.shape_grad(j, q_point)
                                                 *
                                                 old_solution_gradients[q_point])
-                                             * old_solution_gradients[q_point]
-                                            )
-                                          * fe_values.JxW(q_point));
+                                             * old_solution_gradients[q_point]))
+                                           * fe_values.JxW(q_point));
                   }
 
                 cell_rhs(i) -= (fe_values.shape_grad(i, q_point)

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.