From 5ef752d4360f2177a1cfd9f94faa05d69dc17b37 Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 9 May 2019 08:51:11 -0400 Subject: [PATCH] Add some missing braces to fix step-62. --- examples/step-62/step-62.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/step-62/step-62.cc b/examples/step-62/step-62.cc index 0408ed44ae..624e93943f 100644 --- a/examples/step-62/step-62.cc +++ b/examples/step-62/step-62.cc @@ -954,15 +954,17 @@ namespace step62 // because we have already calculated the stiffness and mass // matrices, only the value of $\omega$ changes. for (unsigned int i = 0; i < dofs_per_cell; ++i) - for (unsigned int j = 0; j < dofs_per_cell; ++j) - { - std::complex matrix_sum = 0; - matrix_sum += -std::pow(omega, 2) * - quadrature_data.mass_coefficient[i][j]; - matrix_sum += quadrature_data.stiffness_coefficient[i][j]; - cell_matrix(i, j) += matrix_sum * quadrature_data.JxW; - } - cell_rhs(i) += quadrature_data.right_hand_side[i]; + { + for (unsigned int j = 0; j < dofs_per_cell; ++j) + { + std::complex matrix_sum = 0; + matrix_sum += -std::pow(omega, 2) * + quadrature_data.mass_coefficient[i][j]; + matrix_sum += quadrature_data.stiffness_coefficient[i][j]; + cell_matrix(i, j) += matrix_sum * quadrature_data.JxW; + } + cell_rhs(i) += quadrature_data.right_hand_side[i]; + } } cell->get_dof_indices(local_dof_indices); constraints.distribute_local_to_global(cell_matrix, -- 2.39.5