]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work around a bug in present gcc mainline.
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Jun 2004 18:35:05 +0000 (18:35 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Jun 2004 18:35:05 +0000 (18:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@9375 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_refinement.cc

index ea6c0021f3e57ebd6b0643752cfbc2135b1df078..e3a0b3725280ae2228487424f78b11abd0e42c6b 100644 (file)
@@ -141,11 +141,13 @@ void GridRefinement::refine (Triangulation<dim> &tria,
                                   // smallest value in criteria
                                   // greater 0
   if (new_threshold==0)
-    for (unsigned int index=0; index<n_cells; ++index)
-      if (criteria(index)>0
-         && (criteria(index)<new_threshold
-             || new_threshold==0))
+    {
+      new_threshold = criteria(0);
+      for (unsigned int index=1; index<n_cells; ++index)
+       if (criteria(index)>0
+           && (criteria(index)<new_threshold))
        new_threshold=criteria(index);
+    }
   
   for (unsigned int index=0; index<n_cells; ++cell, ++index)
     if (std::fabs(criteria(index)) >= new_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.