]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a couple more words.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 8 Dec 2013 17:06:04 +0000 (17:06 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 8 Dec 2013 17:06:04 +0000 (17:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@31945 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/doxygen/headers/multithreading.h

index 218b16803c311ff1563e5a0e294ade6e899622f2..7ec8ea3d69e5af55e7a3b772b06c41495dcfe0a4 100644 (file)
  * relatively independent jobs: for example, assembling local
  * contributions to the global linear system on each cell of a mesh;
  * evaluating an error estimator on each cell; or postprocessing on
- * each cell computed data for output fall into this class.
+ * each cell computed data for output fall into this class. These
+ * cases can be treated using a software design pattern we call
+ * "%WorkStream". In the following, we will walk through the rationale
+ * for this pattern and its implementation; more details as well as
+ * examples for the speedup that can be achieved with it are given in
+ * the @ref workstream_paper .
  *
  * Code like this could then be written like this:
  * @code
  *
  * As a final point: What if, for some reason, my assembler and copier
  * function do not match the above signature with three and one argument,
- * respectively? That's not a problem either. The WorkStream class offers two
+ * respectively? That's not a problem either. The WorkStream namespace offers two
  * versions of the WorkStream::run() function: one that takes an object and
  * the addresses of two member functions, and one that simply takes two
  * function objects that can be called with three and one argument,
      // ...is the same as:
      WorkStream::run (dof_handler.begin_active(),
                       dof_handler.end(),
-                      std_cxx1x::bind(&MyClass<dim>::assemble_on_one_cell, *this,
-                                  std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3),
-                      std_cxx1x::bind(&MyClass<dim>::copy_local_to_global, *this, std_cxx1x::_1),
+                      std_cxx1x::bind(&MyClass<dim>::assemble_on_one_cell,
+                                      *this,
+                                      std_cxx1x::_1,
+                                      std_cxx1x::_2,
+                                      std_cxx1x::_3),
+                      std_cxx1x::bind(&MyClass<dim>::copy_local_to_global,
+                                      *this,
+                                      std_cxx1x::_1),
                       per_task_data);
  * @endcode
  * Note how <code>std_cxx1x::bind</code> produces a function object that takes three
      WorkStream::run (dof_handler.begin_active(),
                       dof_handler.end(),
                       std_cxx1x::bind(&MyClass<dim>::assemble_on_one_cell,
-                                  *this,
-                                  current_solution,
-                                  std_cxx1x::_1,
-                                  std_cxx1x::_2,
-                                  std_cxx1x::_3,
-                                  previous_time+time_step),
+                                      *this,
+                                      current_solution,
+                                      std_cxx1x::_1,
+                                      std_cxx1x::_2,
+                                      std_cxx1x::_3,
+                                      previous_time+time_step),
                       std_cxx1x::bind(&MyClass<dim>::copy_local_to_global,
-                                  *this, std_cxx1x::_1),
+                                      *this,
+                                      std_cxx1x::_1),
                       per_task_data);
  * @endcode
  * Here, we bind the object, the linearization point argument, and the
  * current time argument to the function before we hand it off to
  * WorkStream::run(). WorkStream::run() will then simply call the
  * function with the cell and scratch and per task objects which will be filled
- * in at the positions indicated by <code>std_cxx1x::_1, std_cxx1x::_2</code> and <code>std_cxx1x::_3</code>.
+ * in at the positions indicated by <code>std_cxx1x::_1, std_cxx1x::_2</code>
+ * and <code>std_cxx1x::_3</code>.
  *
  * There are refinements to the WorkStream::run function shown above.
  * For example, one may realize that the basic idea above can only scale

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.