]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fixed stopping rule in solve_newton ()
authorfrohne <frohne@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 31 Mar 2013 00:56:52 +0000 (00:56 +0000)
committerfrohne <frohne@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 31 Mar 2013 00:56:52 +0000 (00:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@29120 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-42/step-42.cc

index 37d5905fa75beda47be610936d97f6af5dd56753..d6c50ee10b25086ecc3e50b54e637e6191ce7687 100644 (file)
@@ -1353,16 +1353,15 @@ namespace Step42
               break;
           }
 
-        if (resid<1e-8)
-          break;
-
         resid_old=resid;
 
         resid_vector = system_rhs_newton;
         resid_vector.compress (VectorOperation::insert);
 
-        if (active_set == active_set_old && resid < 1e-10)
-          break;
+        int is_my_set_changed = (active_set == active_set_old)?0:1;
+        int num_changed = Utilities::MPI::sum(is_my_set_changed, MPI_COMM_WORLD);
+        if (num_changed==0 && resid < 1e-8)
+                   break;
         active_set_old = active_set;
       } // End of active-set-loop
 

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.