From 9b927385385e1ba5a6b4feb1f7b467f1a64bcc64 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 12 Apr 2009 04:29:04 +0000 Subject: [PATCH] Move a few variables with no memory allocation into the innermost useful scope. git-svn-id: https://svn.dealii.org/trunk@18593 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-34/step-34.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/deal.II/examples/step-34/step-34.cc b/deal.II/examples/step-34/step-34.cc index 07cc3acc76..9737b95c3a 100644 --- a/deal.II/examples/step-34/step-34.cc +++ b/deal.II/examples/step-34/step-34.cc @@ -599,8 +599,6 @@ void BEMProblem::assemble_system() { // the matrix in the global row i. Vector local_matrix_row_i(fe.dofs_per_cell); - Point R; - // The index i runs on the collocation points, which are the // support of the ith basis function, while j runs on inner // integration. We perform this check here to ensure that we are @@ -654,7 +652,7 @@ void BEMProblem::assemble_system() { // Distance between the external support point // and the quadrature point on the internal // cell. - R = q_points[q] - support_points[i]; + const Point R = q_points[q] - support_points[i]; system_rhs(i) += ( LaplaceKernel::single_layer(R) * normal_wind * @@ -745,7 +743,7 @@ void BEMProblem::assemble_system() { wind.vector_value_list(singular_q_points, singular_cell_wind); for(unsigned int q=0; qsize(); ++q) { - R = singular_q_points[q]- support_points[i]; + const Point R = singular_q_points[q]- support_points[i]; double normal_wind = 0; for(unsigned int d=0; d::compute_exterior_solution() { std::vector normal_wind(n_q_points); std::vector > local_wind(n_q_points, Vector(dim) ); - Point R; - - typename DoFHandler::active_cell_iterator external_cell = external_dh.begin_active(), external_endc = external_dh.end(); @@ -905,7 +900,7 @@ void BEMProblem::compute_exterior_solution() { for(unsigned int q=0; q R = q_points[q] - external_support_points[i]; external_phi(i) += ( ( LaplaceKernel::single_layer(R) * normal_wind[q] + -- 2.39.5