From: David Wells Date: Thu, 9 May 2019 12:51:11 +0000 (-0400) Subject: Add some missing braces to fix step-62. X-Git-Tag: v9.1.0-rc1~105^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ef752d4360f2177a1cfd9f94faa05d69dc17b37;p=dealii.git Add some missing braces to fix step-62. --- 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,