]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix some kind of serious bug: the variable was not initialized, the
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 23 Oct 2000 09:39:45 +0000 (09:39 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 23 Oct 2000 09:39:45 +0000 (09:39 +0000)
function thus did nothing...

git-svn-id: https://svn.dealii.org/trunk@3456 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_renumbering.cc

index 1c1d2785195fefd02e7806867e38104153541739..a10992d65e2892971d36042d1433a88af357f870 100644 (file)
@@ -726,7 +726,12 @@ template <int dim>
 void
 DoFRenumbering::random (DoFHandler<dim> &dof_handler)
 {
-  vector<unsigned int> new_indices (dof_handler.n_dofs());
+  const unsigned int n_dofs = dof_handler.n_dofs();
+  
+  vector<unsigned int> new_indices (n_dofs);
+  for (unsigned i=0; i<n_dofs; ++i)
+    new_indices[i] = i;
+  
   random_shuffle (new_indices.begin(), new_indices.end());
   dof_handler.renumber_dofs(new_indices);  
 };

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.