From 552d50402e149faecd1b486e20eded9e19cdd989 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 15 Jun 2018 18:55:17 -0500 Subject: [PATCH] step-7: make bilinear forms more readable --- examples/step-7/step-7.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 49202e94a5..d6c30eab7b 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -655,14 +655,16 @@ namespace Step7 // The first thing that has changed is the bilinear form. It // now contains the additional term from the Helmholtz // equation: - cell_matrix(i, j) += ((fe_values.shape_grad(i, q_point) * - fe_values.shape_grad(j, q_point) + - fe_values.shape_value(i, q_point) * - fe_values.shape_value(j, q_point)) * + cell_matrix(i, j) += ((fe_values.shape_grad(i, q_point) * // + fe_values.shape_grad(j, q_point) // + + // + fe_values.shape_value(i, q_point) * // + fe_values.shape_value(j, q_point)) * // fe_values.JxW(q_point)); - cell_rhs(i) += (fe_values.shape_value(i, q_point) * - rhs_values[q_point] * fe_values.JxW(q_point)); + cell_rhs(i) += (fe_values.shape_value(i, q_point) * // + rhs_values[q_point] * // + fe_values.JxW(q_point)); } // Then there is that second term on the right hand side, the contour @@ -707,9 +709,9 @@ namespace Step7 fe_face_values.normal_vector(q_point)); for (unsigned int i = 0; i < dofs_per_cell; ++i) - cell_rhs(i) += - (neumann_value * fe_face_values.shape_value(i, q_point) * - fe_face_values.JxW(q_point)); + cell_rhs(i) += (neumann_value * // + fe_face_values.shape_value(i, q_point) * // + fe_face_values.JxW(q_point)); } } -- 2.39.5