From: wolf Date: Fri, 29 Oct 1999 08:50:22 +0000 (+0000) Subject: Work-around for a rather uncommon problem. Should not affect everyday use. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a40754a7d96018635c36d2ad1b34f5eefddb052;p=dealii-svn.git Work-around for a rather uncommon problem. Should not affect everyday use. git-svn-id: https://svn.dealii.org/trunk@1805 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 640ff904e9..e267510f33 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -3654,6 +3654,23 @@ Triangulation::refine_and_coarsen_fixed_fraction (const Vector &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;