]> https://gitweb.dealii.org/ - dealii.git/commitdiff
No more squares
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 27 Aug 1998 14:22:26 +0000 (14:22 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 27 Aug 1998 14:22:26 +0000 (14:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@525 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 1f35a3111a5f6224105c709e9d4606482a60aeaa..c7fc19578ff92c19268c32a6b3eb333dc774408a 100644 (file)
@@ -2175,7 +2175,6 @@ Triangulation<dim>::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<dim>::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

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.