]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
small clarification in workstream description in multithreading module
authorallmaras <allmaras@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Oct 2011 23:03:50 +0000 (23:03 +0000)
committerallmaras <allmaras@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Oct 2011 23:03:50 +0000 (23:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@24533 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 11c70f363225a2f3d2c33894aebdb604bf23c65f..194308e9e15e8f2e73927376fcdf9fed9cd89fe1 100644 (file)
                :
                fe_values (fe, quadrature, update_flags)
        {}
+     
+     ScratchData (const ScratchData &scratch)
+               :
+               fe_values (scratch.fe_values.get_fe(), 
+                          scratch.fe_values.get_quadrature(), 
+                          scratch.fe_values.get_update_flags())
+       {}
    }
  * @endcode
  * and then use this FEValues object in the assemble function:
      ...
    }
  * @endcode
+ *   Just as for the <code>PerTaskData</code> structure, we will create a 
+ *   sample <code>ScratchData</code> object and pass it to the work stream
+ *   object, which will replicate it as many times as necessary. For this 
+ *   to work <code>ScratchData</code> structures need to copyable. Since FEValues 
+ *   objects are rather complex and cannot be copied implicitly, we provided 
+ *   our own copy constructor for the <code>ScratchData</code> structure. 
+ * 
  *   The same approach, putting things into the <code>ScratchData</code>
- *   data structure should be used for everything that is expensive to
+ *   data structure, should be used for everything that is expensive to
  *   construct. This holds, in particular, for everything that needs to
  *   allocate memory upon construction; for example, if the values of a
  *   function need to be evaluated at quadrature points, then this is
                   const Quadrature<dim>    &quadrature,
                   const UpdateFlags         update_flags)
                :
-               rhs_values (quadrature.n_quadrature_points),
+               rhs_values (quadrature.size()),
                fe_values (fe, quadrature, update_flags)
        {}
+       
+      ScratchData (const ScratchData &scratch)
+               :
+               rhs_values (scratch.rhs_values),
+               fe_values (scratch.fe_values.get_fe(), 
+                          scratch.fe_values.get_quadrature(), 
+                          scratch.fe_values.get_update_flags())
+       {}
    }
 
    template <int dim>

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.