From: Guido Kanschat Date: Thu, 27 Aug 1998 14:22:26 +0000 (+0000) Subject: No more squares X-Git-Tag: v8.0.0~22729 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c49042b0f2e2e310ace707f116e4f7a94fd4493e;p=dealii.git No more squares git-svn-id: https://svn.dealii.org/trunk@525 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 1f35a3111a..c7fc19578f 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -2175,7 +2175,6 @@ Triangulation::refine_and_coarsen_fixed_fraction (const dVector &criteria, // up and compare with // #fraction_of_error*total_error#. dVector tmp(criteria); - transform (tmp.begin(), tmp.end(), tmp.begin(), sqr); const double total_error = tmp.l1_norm(); dVector partial_sums(criteria.size()); @@ -2188,16 +2187,16 @@ Triangulation::refine_and_coarsen_fixed_fraction (const dVector &criteria, p = lower_bound (partial_sums.begin(), partial_sums.end(), top_fraction*total_error); if (p==partial_sums.begin()) - top_threshold = sqrt(*p); + top_threshold = *p; else - top_threshold = sqrt(*p - *(p-1)); + top_threshold = *p - *(p-1); p = upper_bound (partial_sums.begin(), partial_sums.end(), total_error*(1-bottom_fraction)); if (p==partial_sums.end()) bottom_threshold = 0; else - bottom_threshold = sqrt(*p - *(p-1)); + bottom_threshold = *p - *(p-1); // in some rare cases it may happen that // both thresholds are the same (e.g. if