]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix a sneaky bug in MT.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 29 May 2000 15:49:44 +0000 (15:49 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 29 May 2000 15:49:44 +0000 (15:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@2972 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 5908375889eb157f1641bb9423589bef8b06baf2..aef1a228909dd4c3d9da3a070e1d78f08eb99b5b 100644 (file)
@@ -211,9 +211,13 @@ void DataOut<dim>::build_some_patches (Data data)
   DoFHandler<dim>::cell_iterator cell=first_cell();
 
                                   // get first cell in this thread
-  for (unsigned int i=0;i<data.this_thread;++i,++patch,++cell_number,
-                cell=next_cell(cell));
-  
+  for (unsigned int i=0; (i<data.this_thread)&&(cell != dofs->end()); ++i)
+    {
+      ++patch;
+      ++cell_number;
+      cell=next_cell(cell);
+    }
+
                                   // now loop over all cells and
                                   // actually create the patches
   for (;cell != dofs->end();)
@@ -260,9 +264,13 @@ void DataOut<dim>::build_some_patches (Data data)
            };
        };
                                       // next cell (patch) in this thread
-      for (unsigned int i=0;((i<data.n_threads)&&(cell != dofs->end()));
-          ++i,++patch,++cell_number,cell=next_cell(cell));
-      
+      for (unsigned int i=0;
+          (i<data.n_threads)&&(cell != dofs->end()); ++i)
+       {
+         ++patch;
+         ++cell_number;
+         cell=next_cell(cell);
+       }
     };
 }
 

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.