]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move declaration of std::vector out of loop.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 Sep 2013 13:35:17 +0000 (13:35 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 Sep 2013 13:35:17 +0000 (13:35 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31031 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-42/step-42.cc

index 786b83d3cb749acd63f529dadc570fc2566ae68e..4eccba90eb4465cd880034bc330619dc9ac0e116 100644 (file)
@@ -1373,6 +1373,8 @@ namespace Step42
     const unsigned int dofs_per_face = fe.dofs_per_face;
     const unsigned int n_face_q_points = face_quadrature.size();
 
+    std::vector<types::global_dof_index> dof_indices(dofs_per_face);
+
     // pcout<< "dofs_per_face = " << dofs_per_face
     //      << "n_face_q_points = " << n_face_q_points
     //      <<std::endl;
@@ -1385,7 +1387,6 @@ namespace Step42
               && cell->face(face)->boundary_indicator() == 1)
             {
               fe_values_face.reinit(cell, face);
-              std::vector<types::global_dof_index> dof_indices(dofs_per_face);
               cell->face(face)->get_dof_indices(dof_indices);
 
               for (unsigned int q_point = 0; q_point < n_face_q_points;

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.