This implements a trilinear interpolation routine for FsGrid data and tries to resolve issue #136 .
Boundaries are handled the following way:
If a point is outside of a non periodic domain NaN is returned. My thought proccess here is that maybe we have some SC orbit and that goes out of our domain during some part of it. Then we would not want to discard all the orbit but only part of it. Hence the NaN returned there.
If a point is outside of a periodic domain then the neighbor is only given if the point is one cell away of the periodic dimension. Otherwise a NaN is returned. (here we could fold over the point back into the domain like particles in PIC but not sure what you think)
If a point is inside the domain but one of its neighbors cannot be located then a NaN is returned. Here we could revert to a nearest neighbor approach.
Have tested this with 2D runs, AMR on/off 3D runs, periodic dimensions , scalar and vector variables.
This implements a trilinear interpolation routine for FsGrid data and tries to resolve issue #136 . Boundaries are handled the following way:
Have tested this with 2D runs, AMR on/off 3D runs, periodic dimensions , scalar and vector variables.
Example of interpolation in an AMR test run :