|
group_particles
|
For convenience, the user can just include this single header file. It contains the single routine to be called. More...
Go to the source code of this file.
Functions | |
| template<typename AFields > | |
| void | group_particles (Callback< AFields > &callback) |
| Runs the code. | |
For convenience, the user can just include this single header file. It contains the single routine to be called.
| void group_particles | ( | Callback< AFields > & | callback | ) |
Runs the code.
| AFields | a type constructed from the AllFields template, defines which fields the code should read from the data files. |
| [in,out] | callback | by subclassing from the Callback abstract base class, the user defines which functionality they want the code to fulfill. Furthermore, the passed instance can be used to store data. |
See the documentation of the Callback class for all methods that need to be overriden. Here, we give the order in which the non-const member functions are called (so that the user knows when data that they want to store inside the passed instance will be available).
perform user-defined action on each group:
Will be called consecutively for each group that passes Callback::grp_select.
perform user-defined action on each particle in each group:
Will be called in an undefined order, perhaps in parallel. However, it is guaranteed that no two calls will be simultaneous if they pass the same group. Thus, if the user's Callback::prt_action implementation is local (in the sense that it only acts on data associated with a single group; this will be the case in almost all applications) the user is not required to take any precautations with regard to thread safety.