|
template<VisitorEnum Type, typename TFunctor > |
void | iterate (Storage &storage, TFunctor &&functor) |
| Iterate over given type of quantities and executes functor for each. More...
|
|
template<VisitorEnum Type, typename TFunctor > |
void | iterate (const Storage &storage, TFunctor &&functor) |
|
template<typename TFunctor > |
void | iterateWithPositions (Storage &storage, TFunctor &&functor) |
| Iterate over all quantities and execute a functor, passing quantity buffers together with particle positions as arguments. More...
|
|
template<VisitorEnum Type, typename TFunctor > |
void | iteratePair (Storage &storage1, Storage &storage2, TFunctor &&functor) |
| Iterate over given type of quantities in two storage views and executes functor for each pair. More...
|
|
template<VisitorEnum Type, typename TFunctor > |
void | iteratePair (const Storage &storage1, const Storage &storage2, TFunctor &&functor) |
|
Functions for iterating over individual quantities in Storage.
- Author
- Pavel Sevecek
- Date
- 2016-2021
Definition in file Iterate.h.
template<VisitorEnum Type, typename TFunctor >
void iterate |
( |
Storage & |
storage, |
|
|
TFunctor && |
functor |
|
) |
| |
Iterate over given type of quantities and executes functor for each.
The functor is used for scalars, vectors and tensors, so it must be a generic lambda or a class with overloaded operator() for each value type.
- Template Parameters
-
Type | Subset of visited quantities, also defines parameters of the functor, see VisitorEnum. |
- Parameters
-
storage | Storage containing visited quantities |
functor | Functor executed for every quantity or buffer matching the specified criterion |
Definition at line 266 of file Iterate.h.
template<typename TFunctor >
void iterateWithPositions |
( |
Storage & |
storage, |
|
|
TFunctor && |
functor |
|
) |
| |
Iterate over all quantities and execute a functor, passing quantity buffers together with particle positions as arguments.
Storage must already contain positions, checked by assert.
Definition at line 306 of file Iterate.h.