]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some missing braces to fix step-62. 8050/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 9 May 2019 12:51:11 +0000 (08:51 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 9 May 2019 12:51:11 +0000 (08:51 -0400)
examples/step-62/step-62.cc

index 0408ed44ae10f57398a4a50e5d07852f64249fc9..624e93943f7c7cb5693c0252fba84bb88ed296fd 100644 (file)
@@ -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<double> 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<double> 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,

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.