]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Patch by Martin Steigemann: Handle the case of zero error indicators better when...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 22 Jan 2014 19:13:57 +0000 (19:13 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 22 Jan 2014 19:13:57 +0000 (19:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@32286 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/distributed/grid_refinement.cc

index 69ee2024b287ee29cf9609b1e6e3cb10f9eb9388..40dee84da40a4c7f53f4fff561ab1a2e8c8ee482 100644 (file)
@@ -84,6 +84,17 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> Improved: In rare cases when the vector of error indicators
+  has entries equal to zero the adjust_interesting_range method
+  produces a negative lower bound. As a result the
+  parallel::distributed::GridRefinement::refine_and_coarsen_fixed_*
+  methods flagged the wrong number of cells for coarsening and refinement.
+  This is now changed by adjusting the lower bound in adjust_interesting_range
+  only, if not equal to zero.
+  <br>
+  (Martin Steigemann, 2014/01/22)
+  </li>
+
   <li> Changed: It was previously possible to set the
   <code>active_fe_index</code> on non-active cells of an hp::DoFHandler.
   However, this was prone to mistakes because it may lead to the assumption
index f7f185ff4e1289f53ce5bf783c16f2e625fdc44b..e4a5e8f41476a01779bdd1a5020592d626496662 100644 (file)
@@ -199,11 +199,16 @@ namespace
     Assert (interesting_range[0] <= interesting_range[1],
             ExcInternalError());
 
+    Assert (interesting_range[0] >= 0,
+            ExcInternalError());
+
+    // adjust the lower bound only
+    // if the end point is not equal
+    // to zero, otherwise it could
+    // happen, that the result
+    // becomes negative
     if (interesting_range[0] > 0)
       interesting_range[0] *= 0.99;
-    else
-      interesting_range[0]
-      -= 0.01 * (interesting_range[1] - interesting_range[0]);
 
     if (interesting_range[1] > 0)
       interesting_range[1] *= 1.01;

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.