From 290c2a5c5551383ad6db113f3553a706c75d1685 Mon Sep 17 00:00:00 2001 From: kanschat Date: Fri, 10 Sep 2010 16:46:12 +0000 Subject: [PATCH] MeshWorker::loop now parallel git-svn-id: https://svn.dealii.org/trunk@21917 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/numerics/mesh_worker_loop.h | 15 +++++++++------ deal.II/doc/news/changes.h | 5 +++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/deal.II/deal.II/include/numerics/mesh_worker_loop.h b/deal.II/deal.II/include/numerics/mesh_worker_loop.h index 6da80980b9..54484f6bdc 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_loop.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_loop.h @@ -20,6 +20,7 @@ #include #include +#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, _1, _3, _2, -// cell_worker, boundary_worker, face_worker, cells_first, true), -// std_cxx1x::bind(internal::assemble, _1, assembler), -// info, dof_info); - +#ifdef DEAL_II_MESHWORKER_PARALLEL + WorkStream::run(begin, end, + std_cxx1x::bind(cell_action, _1, _3, _2, + cell_worker, boundary_worker, face_worker, cells_first, true), + std_cxx1x::bind(internal::assemble, _1, assembler), + info, dof_info); +#else for (ITERATOR cell = begin; cell != end; ++cell) { cell_action(cell, dof_info, info, cell_worker, boundary_worker, face_worker, cells_first, true); dof_info.assemble(assembler); } +#endif } /** diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index bc6e4340b4..9be996c581 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -252,6 +252,11 @@ through DoFHandler::get_tria() and DoFHandler::get_fe(), respectively.
    +
  1. Improved: MeshWorker::loop() now uses WorkStream for multithreading +
    + (GK 2010/09/10) +

    +
  2. Fixed: The method FEValuesViews::SymmetricTensor< 2, dim, spacedim >::get_function_divergences -- 2.39.5