]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix SparsityTools::reorder_hierarchical with 64 bit integers 776/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sat, 11 Apr 2015 20:17:14 +0000 (22:17 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sat, 11 Apr 2015 20:18:07 +0000 (22:18 +0200)
source/lac/sparsity_tools.cc

index 905edda0c50f9ec5eaa985471d122266c0d60263..a9e34327794b7a202807dc3b0860a554861085d1 100644 (file)
@@ -371,12 +371,12 @@ namespace SparsityTools
           // Find cell with the minimal number of neighbors (typically a corner
           // node when based on FEM meshes). If no cell is left, we are done.
           std::pair<types::global_dof_index,types::global_dof_index> min_neighbors
-          (numbers::invalid_unsigned_int, numbers::invalid_unsigned_int);
+          (numbers::invalid_dof_index, numbers::invalid_dof_index);
           for (types::global_dof_index i=0; i<touched_nodes.size(); ++i)
-            if (touched_nodes[i] == numbers::invalid_unsigned_int)
+            if (touched_nodes[i] == numbers::invalid_dof_index)
               if (connectivity.row_length(i) < min_neighbors.second)
                 min_neighbors = std::make_pair(i, connectivity.row_length(i));
-          if (min_neighbors.first == numbers::invalid_unsigned_int)
+          if (min_neighbors.first == numbers::invalid_dof_index)
             break;
 
           current_neighbors.clear();
@@ -385,18 +385,18 @@ namespace SparsityTools
             {
               // Find cell with minimum number of untouched neighbors among the
               // next set of possible neighbors
-              min_neighbors = std::make_pair (numbers::invalid_unsigned_int,
-                                              numbers::invalid_unsigned_int);
+              min_neighbors = std::make_pair (numbers::invalid_dof_index,
+                                              numbers::invalid_dof_index);
               for (std::set<types::global_dof_index>::iterator it=current_neighbors.begin();
                    it != current_neighbors.end(); ++it)
                 {
-                  AssertThrow(touched_nodes[*it] == numbers::invalid_unsigned_int,
+                  AssertThrow(touched_nodes[*it] == numbers::invalid_dof_index,
                               ExcInternalError());
                   types::global_dof_index active_row_length = 0;
                   for (CompressedSimpleSparsityPattern::row_iterator rowit
                        = connectivity.row_begin(*it);
                        rowit != connectivity.row_end(*it); ++rowit)
-                    if (touched_nodes[*rowit] == numbers::invalid_unsigned_int)
+                    if (touched_nodes[*rowit] == numbers::invalid_dof_index)
                       ++active_row_length;
                   if (active_row_length < min_neighbors.second)
                     min_neighbors = std::make_pair(*it, active_row_length);
@@ -412,7 +412,7 @@ namespace SparsityTools
                   for (CompressedSimpleSparsityPattern::row_iterator rowit
                        = connectivity.row_begin(*it);
                        rowit != connectivity.row_end(*it); ++rowit)
-                    if (touched_nodes[*rowit] == numbers::invalid_unsigned_int)
+                    if (touched_nodes[*rowit] == numbers::invalid_dof_index)
                       ++active_row_length;
                   if (active_row_length == best_row_length)
                     if (connectivity.row_length(*it) > min_neighbors.second)
@@ -431,7 +431,7 @@ namespace SparsityTools
                    = connectivity.row_begin(min_neighbors.first);
                    it != connectivity.row_end(min_neighbors.first); ++it)
                 {
-                  if (touched_nodes[*it] == numbers::invalid_unsigned_int)
+                  if (touched_nodes[*it] == numbers::invalid_dof_index)
                     {
                       new_entries.push_back(*it);
                       touched_nodes[*it] = groups.size()-1;
@@ -446,7 +446,7 @@ namespace SparsityTools
                   for (CompressedSimpleSparsityPattern::row_iterator it
                        = connectivity.row_begin(new_entries[i]);
                        it != connectivity.row_end(new_entries[i]); ++it)
-                    if (touched_nodes[*it] == numbers::invalid_unsigned_int)
+                    if (touched_nodes[*it] == numbers::invalid_dof_index)
                       current_neighbors.insert(*it);
                   current_neighbors.erase(new_entries[i]);
                 }

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.