]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix previous commit 1d327fd1dcd34023a3d5bb2c0ee7524593d44015. 357/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 18 Dec 2014 08:37:02 +0000 (02:37 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 18 Dec 2014 08:37:02 +0000 (02:37 -0600)
Commit 1d327fd1dcd34023a3d5bb2c0ee7524593d44015 moved a function from the .cc
file into the .h file and made it inline. Subtly, it also snuck in a small
change in the code: it changed
  if (!something)
   {
     ...
   }

  if (something)
into
  if (!something)
    {
      ...
    }
  else

The problem is that the first code block in rare circumstances changed the
value of the variable something. It is remarkable that this only triggered
in a single test in the testsuite -- an indication that the testsuite is
after all reasonably good at finding even obscure problems, but also an
indication that the anisotropic refinement stuff is not particularly well
tested.

include/deal.II/grid/tria_objects.h

index 8b377e42b4a332f77c05cd4f041805e627aeb04a..fd2554ed33f3afbadc17d25b074c8dbe66bb7ef7 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2006 - 2013 by the deal.II authors
+// Copyright (C) 2006 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -975,7 +975,8 @@ namespace internal
           else
             next_free_single=pos+1;
         }
-      else
+
+      if (reverse_order_next_free_single)
         {
           // second sweep, use all slots, even
           // in pairs

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.