]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make work again.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 2 Jul 2011 22:34:58 +0000 (22:34 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 2 Jul 2011 22:34:58 +0000 (22:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@23914 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/step-14.cc
tests/bits/step-14/cmp/generic

index c80be66217c593c6d18418ebfdfac0d345b241d5..8b7e7937b8a3bd7cde2e9d81d9b7b17583617e6e 100644 (file)
@@ -446,19 +446,19 @@ namespace LaplaceSolver
       = Threads::split_range<active_cell_iterator> (dof_handler.begin_active (),
                                                    dof_handler.end (),
                                                    n_threads);
-
-    Threads::ThreadMutex mutex;
-    Threads::ThreadGroup<> threads;
-    for (unsigned int thread=0; thread<n_threads; ++thread)
-      {
-       threads += Threads::spawn (*this, &Solver<dim>::assemble_matrix)
-                  (linear_system,
-                   thread_ranges[thread].first,
-                   thread_ranges[thread].second,
-                   mutex);
-      }
-    threads.join_all();
-
+    
+    {
+      Threads::ThreadMutex mutex;
+      for (unsigned int thread=0; thread<n_threads; ++thread)
+       {
+         assemble_matrix
+           (linear_system,
+            thread_ranges[thread].first,
+            thread_ranges[thread].second,
+            mutex);
+       }
+    }
+    
     assemble_rhs (linear_system.rhs);
     linear_system.hanging_node_constraints.condense (linear_system.rhs);
 
@@ -468,7 +468,6 @@ namespace LaplaceSolver
                                              *boundary_values,
                                              boundary_value_map);
 
-    threads.join_all ();
     linear_system.hanging_node_constraints.condense (linear_system.matrix);
 
     MatrixTools::apply_boundary_values (boundary_value_map,
@@ -1541,11 +1540,8 @@ namespace LaplaceSolver
   void
   WeightedResidual<dim>::solve_problem ()
   {
-    Threads::ThreadGroup<> threads;
-    threads += Threads::spawn (*this, &WeightedResidual<dim>::solve_primal_problem)();
-    threads.join_all ();
-    threads += Threads::spawn (*this, &WeightedResidual<dim>::solve_dual_problem)();
-    threads.join_all ();
+    solve_primal_problem();
+    solve_dual_problem();
   }
 
 
@@ -1684,16 +1680,14 @@ namespace LaplaceSolver
                             .get_tria().n_active_cells());
 
     const unsigned int n_threads = multithread_info.n_default_threads;
-    Threads::ThreadGroup<> threads;
     for (unsigned int i=0; i<n_threads; ++i)
       {
-       threads += Threads::spawn (*this, &WeightedResidual<dim>::estimate_some)
-                  (primal_solution,
-                   dual_weights,
-                   n_threads, i,
-                   error_indicators,
-                   face_integrals);
-       threads.join_all();
+       estimate_some
+         (primal_solution,
+          dual_weights,
+          n_threads, i,
+          error_indicators,
+          face_integrals);
       }
 
     unsigned int present_cell=0;
index a7e2d6a7cfe7c295bb8975c428007917420b3cfd..c3d0444de83ff28aa617f3a45c471101939f17d7 100644 (file)
@@ -1,8 +1,8 @@
 
 DEAL::Refinement cycle: 0
-DEAL:cg::Starting value 0.306186
+DEAL:cg::Starting value 0.31
 DEAL:cg::Convergence step 8 value 0
-DEAL:cg::Starting value 1.00000
+DEAL:cg::Starting value 1.0
 DEAL:cg::Convergence step 21 value 0
 # This file was generated by the deal.II library.
 
@@ -556,9 +556,9 @@ b 2.6e+02 3.0e+02 m 3.0e+02 3.0e+02 x
 showpage
 DEAL::   Estimated error=0.00070
 DEAL::Refinement cycle: 1
-DEAL:cg::Starting value 0.0975781
+DEAL:cg::Starting value 0.098
 DEAL:cg::Convergence step 10 value 0
-DEAL:cg::Starting value 1.00000
+DEAL:cg::Starting value 1.0
 DEAL:cg::Convergence step 25 value 0
 # This file was generated by the deal.II library.
 
@@ -1073,9 +1073,9 @@ b 2.8e+02 3.0e+02 m 3.0e+02 3.0e+02 x
 showpage
 DEAL::   Estimated error=0.00089
 DEAL::Refinement cycle: 2
-DEAL:cg::Starting value 0.136408
+DEAL:cg::Starting value 0.14
 DEAL:cg::Convergence step 14 value 0
-DEAL:cg::Starting value 1.00000
+DEAL:cg::Starting value 1.0
 DEAL:cg::Convergence step 38 value 0
 # This file was generated by the deal.II library.
 
@@ -2137,9 +2137,9 @@ b 2.7e+02 2.8e+02 m 2.8e+02 2.8e+02 x
 showpage
 DEAL::   Estimated error=0.00045
 DEAL::Refinement cycle: 3
-DEAL:cg::Starting value 0.161862
+DEAL:cg::Starting value 0.16
 DEAL:cg::Convergence step 22 value 0
-DEAL:cg::Starting value 1.00000
+DEAL:cg::Starting value 1.0
 DEAL:cg::Convergence step 62 value 0
 # This file was generated by the deal.II library.
 
@@ -4784,9 +4784,9 @@ b 2.8e+02 2.8e+02 m 2.8e+02 2.8e+02 x
 showpage
 DEAL::   Estimated error=0.00024
 DEAL::Refinement cycle: 4
-DEAL:cg::Starting value 0.180177
+DEAL:cg::Starting value 0.18
 DEAL:cg::Convergence step 33 value 0
-DEAL:cg::Starting value 1.00000
+DEAL:cg::Starting value 1.0
 DEAL:cg::Convergence step 98 value 0
 # This file was generated by the deal.II library.
 
@@ -11518,9 +11518,9 @@ b 2.6e+02 2.7e+02 m 2.7e+02 2.7e+02 x
 showpage
 DEAL::   Estimated error=7.5e-05
 DEAL::Refinement cycle: 5
-DEAL:cg::Starting value 0.147763
+DEAL:cg::Starting value 0.15
 DEAL:cg::Convergence step 48 value 0
-DEAL:cg::Starting value 1.00000
+DEAL:cg::Starting value 1.0
 DEAL:cg::Convergence step 157 value 0
 # This file was generated by the deal.II library.
 

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.