sampling of fields at particle locations
This is a "feature request" issue.
Desired functionality:
- user computes arbitrary quantity from field information, at grid points --- result is stored as a generic
field
object. - user would like to sample the values of this field at particle locations, and store the results in a given HDF5 group, in a dataset with a given name.
Desired solution:
A template function that
- takes as parameters:
-
f
, a pointer to afield<rnumber, FFTW, fc>
-
p
, a pointer to anparticles_system<double>
-
gid
, anhid_t
identifying an HDF5 group -
fname
, astd::string
- performs the interpolation
- creates/overwrites the dataset
fname + std::string("/") + std::to_string(p->step_idx)
in the groupgid
- writes the result of the interpolation into the dataset