]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MeshWorker::loop now parallel
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 10 Sep 2010 16:46:12 +0000 (16:46 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 10 Sep 2010 16:46:12 +0000 (16:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@21917 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/mesh_worker_loop.h
deal.II/doc/news/changes.h

index 6da80980b9e7584c1e54f85bc128f9f4583a0a20..54484f6bdc2f4ca4f6665418b3796298e45dd6ab 100644 (file)
@@ -20,6 +20,7 @@
 #include <grid/tria.h>
 #include <numerics/mesh_worker_info.h>
 
+#define DEAL_II_MESHWORKER_PARALLEL 1
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -257,17 +258,19 @@ namespace MeshWorker
       }
     
                                     // Loop over all cells
-//     WorkStream::run(begin, end,
-//                 std_cxx1x::bind(cell_action<INFOBOX, dim, spacedim, ITERATOR>, _1, _3, _2,
-//                                 cell_worker, boundary_worker, face_worker, cells_first, true),
-//                 std_cxx1x::bind(internal::assemble<dim,spacedim,ASSEMBLER>, _1, assembler),
-//                 info, dof_info);
-    
+#ifdef DEAL_II_MESHWORKER_PARALLEL
+    WorkStream::run(begin, end,
+                   std_cxx1x::bind(cell_action<INFOBOX, DOFINFO, dim, spacedim, ITERATOR>, _1, _3, _2,
+                                   cell_worker, boundary_worker, face_worker, cells_first, true),
+                   std_cxx1x::bind(internal::assemble<dim,DOFINFO,ASSEMBLER>, _1, assembler),
+                   info, dof_info);
+#else
     for (ITERATOR cell = begin; cell != end; ++cell)
       {
        cell_action<INFOBOX,DOFINFO,dim,spacedim>(cell, dof_info, info, cell_worker, boundary_worker, face_worker, cells_first, true);
        dof_info.assemble(assembler);
       }
+#endif
   }
 
 /**
index bc6e4340b4ba848b7bcafad018ebf9ba1707664c..9be996c581a855bd2a58ddd6ebac6bb10486cafb 100644 (file)
@@ -252,6 +252,11 @@ through DoFHandler::get_tria() and DoFHandler::get_fe(), respectively.
 
 <ol>
 
+  <li><p>Improved: MeshWorker::loop() now uses WorkStream for multithreading
+  <br>
+  (GK 2010/09/10)
+  </p>
+  
   <li>
   <p>
   Fixed: The method FEValuesViews::SymmetricTensor< 2, dim, spacedim >::get_function_divergences

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.