]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work-around for a rather uncommon problem. Should not affect everyday use.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 29 Oct 1999 08:50:22 +0000 (08:50 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 29 Oct 1999 08:50:22 +0000 (08:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@1805 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index 640ff904e948ce7c51dd155774b035363c794409..e267510f331bc3dd9e0e1158c896b17242a48704 100644 (file)
@@ -3654,6 +3654,23 @@ Triangulation<dim>::refine_and_coarsen_fixed_fraction (const Vector<number> &cri
                                   // In these case we arbitrarily reduce the
                                   // bottom threshold by one permille below
                                   // the top threshold
+                                  //
+                                  // Finally, in some cases
+                                  // (especially involving symmetric
+                                  // solutions) there are many cells
+                                  // with the same error indicator
+                                  // values. if there are many with
+                                  // indicator equal to the top
+                                  // threshold, no refinement will
+                                  // take place below; to avoid this
+                                  // case, we also lower the top
+                                  // threshold if it equals the
+                                  // largest indicator and the
+                                  // top_fraction!=1
+  if ((top_threshold == *max_element(criteria.begin(), criteria.end())) &&
+      (top_fraction != 1))
+    top_threshold *= 0.999;
+  
   if (bottom_threshold>=top_threshold)
     bottom_threshold = 0.999*top_threshold;
   

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.