]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify algorithm.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 21 Apr 2005 21:42:52 +0000 (21:42 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 21 Apr 2005 21:42:52 +0000 (21:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@10559 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/data_out.cc

index b23d3310e5e0655dda0ddbc37a82fed1ff677024..36326979cb3961ecd11b4d03c723c17ec9aae0cb 100644 (file)
@@ -414,9 +414,11 @@ void DataOut<dim>::build_some_patches (Data data)
                                        // have skipped
       const typename DoFHandler<dim>::cell_iterator
         new_cell = next_cell(cell);
-      if (new_cell != this->dofs->end())
-        cell_number += std::distance (cell, new_cell);
-      cell = new_cell;
+      while (cell != new_cell)
+        {
+          ++cell;
+          ++cell_number;
+        }
     }
 
                                   // now loop over all cells and
@@ -571,9 +573,11 @@ void DataOut<dim>::build_some_patches (Data data)
                                            // have skipped
           const typename DoFHandler<dim>::cell_iterator
             new_cell = next_cell(cell);
-          if (new_cell != this->dofs->end())
-            cell_number += std::distance (cell, new_cell);
-          cell = new_cell;
+          while (cell != new_cell)
+            {
+              ++cell;
+              ++cell_number;
+            }
        }
     }
 }

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.