]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a problem where we ended up with an invalid cell if there is only
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 23 Sep 2003 16:35:37 +0000 (16:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 23 Sep 2003 16:35:37 +0000 (16:35 +0000)
one cell to work on.

git-svn-id: https://svn.dealii.org/trunk@8007 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/c-4-0.html
deal.II/examples/step-14/step-14.cc

index d00f054da6990a3cdbd70fba65c68381b06e2fad..da1c3a2dcd9551f9d5cef039f37345fff116a25f 100644 (file)
@@ -48,6 +48,13 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>General</h3>
 
 <ol>
+  <li> <p> Fixed: The step-14 program had a bug in the rare case that
+       there are more CPUs in a machine than there are cells. This is
+       now fixed.
+       <br>
+       (WB 2003/09/23)
+       </p>
+
   <li> <p> Fixed: In the step-14 example program, overly conservative
        quadrature formulas were chosen (with 2N+1 quadrature points per space
        dimension, where N is the degree of polynomials). This is unnecessary,
index f587722e4b41aac56040ab2cb3cd17229519b742..2ca8e13af35a972654739f0bab05246ecec3f7fe 100644 (file)
@@ -3137,7 +3137,15 @@ namespace LaplaceSolver
     for (unsigned int t=0;
         (t<this_thread) && (cell!=dual_solver.dof_handler.end());
         ++t, ++cell);
-  
+
+                                    // If there are no cells for this
+                                    // thread (for example if there
+                                    // are a total of less cells than
+                                    // there are threads), then go
+                                    // back right now
+    if (cell == dual_solver.dof_handler.end())
+      return;
+    
                                     // Next loop over all cells. The
                                     // check for loop end is done at
                                     // the end of the loop, along

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.