-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fs Grid data interpolation #164
Conversation
Maybe @markusbattarbee @ursg @ykempf can have a look at this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional comments on how output should be handled:
If a point is outside of a non periodic domain: Return None(s). We don't have data there, let's use None.
If a point is outside of a periodic domain: just use modulo. 2D particle pusher particles can travel quite far in the out-of-plane direction so let's retain compatibility with that.
If a point is inside the domain but one of its neighbors cannot be located: indeed keep a is, return a NaN is returned. We don't want to hide errors in finding/interpolating data!
Also, I would recommend returning a numpy array instead of a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last fix for periodicity please! :)
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 :
