]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Addressed last comments. 9075/head
authorLuca Heltai <luca.heltai@sissa.it>
Sun, 19 Jan 2020 18:20:25 +0000 (19:20 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Sun, 19 Jan 2020 18:21:12 +0000 (19:21 +0100)
include/deal.II/particles/particle_handler.h

index 0137a9147df876fe4783786bdf3431a56b28506d..655566f9acbf12f768b5c3dcce6ccdf534fe9a9f 100644 (file)
@@ -290,6 +290,9 @@ namespace Particles
      * Set the position of the particles by using the values contained in the
      * vector @p input_vector.
      *
+     * @tparam VectorType Any of the parallel distributed vectors supported by
+     * the library.
+     *
      * The vector @p input_vector should have read access to the indices
      * created by extracting the locally relevant ids with
      * locally_relevant_ids(), and taking its tensor
@@ -303,6 +306,10 @@ namespace Particles
      * spacedim consecutive entries starting from
      * `input_vector[id*spacedim]`.
      *
+     * Notice that it is not necessary that the @p input_vector *owns* those
+     * indices, however it has to have read access to them (i.e., it can be a
+     * distributed vector with ghost entries).
+     *
      * If the argument @p displace_particles is set to false, then the new
      * position taken from the values contained in
      * @p input_vector, replacing the previously stored particle position.
@@ -386,11 +393,20 @@ namespace Particles
      * @p output_vector is overwritten by this operation, but you can add to
      * its entries by setting @p add_to_output_vector to `true`.
      *
+     * @tparam VectorType Any of the parallel distributed vectors supported by
+     * the library.
+     *
      * This is the reverse operation of the set_particle_positions() function.
      * The position of the particle with global index `id` is written to
      * spacedim consecutive entries starting from
      * `output_vector[id*spacedim]`.
      *
+     * Notice that, if you use a distributed vector type, it is not necessary
+     * for the @p output_vector to own the entries corresponding to the indices
+     * that will be written. However you should keep in mind that this requires
+     * a global communication to distribute the entries above to their
+     * respective owners.
+     *
      * @param[in, out] output_vector A parallel distributed vector containing
      * the positions of the particles, or updated with the positions of the
      * particles.
@@ -411,7 +427,7 @@ namespace Particles
      * by iterating over all (local) particles, and querying their locations.
      *
      * @param [in,out] positions A vector preallocated at size
-     * (particle_handler.n_locally_owned_articles) and whose points will become
+     * `particle_handler.n_locally_owned_articles` and whose points will become
      * the positions of the locally owned particles
      *
      * @param [in] add_to_output_vector When true, the value of the point of

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.