]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Run the computation of projections from children in parallel. 6023/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 10 Mar 2018 05:47:10 +0000 (22:47 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 10 Mar 2018 05:47:10 +0000 (22:47 -0700)
include/deal.II/fe/fe_tools.templates.h

index a931c07b46378089a3001de53e7087bd3af7e315..cb433bea45aa5193bc01bed0e6c80bce0e0a907d 100644 (file)
@@ -2254,13 +2254,14 @@ namespace FETools
 
 
     // finally loop over all possible refinement cases
+    Threads::TaskGroup<> tasks;
     unsigned int ref_case = (isotropic_only)
                             ? RefinementCase<dim>::isotropic_refinement
                             : RefinementCase<dim>::cut_x;
     for (; ref_case <= RefinementCase<dim>::isotropic_refinement; ++ref_case)
-      {
-        compute_one_case (ref_case, mass, matrices[ref_case-1]);
-      }
+      tasks += Threads::new_task ([ &,ref_case]() { compute_one_case(ref_case, mass, matrices[ref_case-1]); });
+
+    tasks.join_all();
   }
 
 

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.