]> https://gitweb.dealii.org/ - dealii.git/commitdiff
always sort copy_indices for multigrid
authorTimo Heister <timo.heister@gmail.com>
Fri, 23 Oct 2015 15:32:26 +0000 (11:32 -0400)
committerTimo Heister <timo.heister@gmail.com>
Fri, 23 Oct 2015 15:32:26 +0000 (11:32 -0400)
source/multigrid/mg_transfer_prebuilt.cc

index 334d50a305e230f2f5e0e7f366ac3460475c3fca..aa5746c183549076e566b29f0e4adfb30ade3e03 100644 (file)
@@ -479,9 +479,8 @@ MGTransferPrebuilt<VECTOR>::fill_and_communicate_copy_indices(
         }
     }
 
-  // If we are in debugging mode, we order the copy indices, so we get
-  // more reliable output for regression texts
-#ifdef DEBUG
+  // Sort the indices. This will produce more reliable debug output for regression texts
+  // and likely won't hurt performance even in release mode.
   std::less<std::pair<types::global_dof_index, types::global_dof_index> > compare;
   for (unsigned int level=0; level<copy_indices.size(); ++level)
     std::sort(copy_indices[level].begin(), copy_indices[level].end(), compare);
@@ -489,7 +488,6 @@ MGTransferPrebuilt<VECTOR>::fill_and_communicate_copy_indices(
     std::sort(copy_indices_level_mine[level].begin(), copy_indices_level_mine[level].end(), compare);
   for (unsigned int level=0; level<copy_indices_global_mine.size(); ++level)
     std::sort(copy_indices_global_mine[level].begin(), copy_indices_global_mine[level].end(), compare);
-#endif
 }
 
 template <class VECTOR>

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.