]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Need to initialize the array with invalid values.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 31 Oct 2008 21:32:11 +0000 (21:32 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 31 Oct 2008 21:32:11 +0000 (21:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@17452 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparsity_tools.cc

index b3308e23b1a525c285d75c86026acb1be5ab425c..ccb4558d487fd80f62bc3bfc8929a1e3d7495d2f 100644 (file)
@@ -132,7 +132,12 @@ namespace SparsityTools
                                     // in the last round. Default to starting
                                     // points
     std::vector<unsigned int> last_round_dofs (starting_indices);
-  
+
+                                    // initialize the new_indices array with
+                                    // invalid values
+    std::fill (new_indices.begin(), new_indices.end(),
+              numbers::invalid_unsigned_int);
+    
                                     // delete disallowed elements
     for (unsigned int i=0; i<last_round_dofs.size(); ++i)
       if ((last_round_dofs[i]==numbers::invalid_unsigned_int) ||

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.