Merged
Conversation
Allows data to be interpolated along the field line before doing the transform to the poloidal plane. Routine assumes input is in field-aligned space. This is the not default for BOUT++ >= v4.
ZedThree
reviewed
May 15, 2018
| try: | ||
| from numpy import linspace, meshgrid, append, newaxis | ||
| except ImportError: | ||
| print("ERROR: NumPy module not available") |
Member
There was a problem hiding this comment.
I'm pretty sure we require numpy for the pylib stuff, so we can just safely import it here. I think we also require scipy as well
ZedThree
reviewed
May 15, 2018
| (1.0 - p[x,y]*p[x,y]) * var3d[x,y,z0[x,y]] + \ | ||
| 0.5*p[x,y]*(p[x,y]+1.0) * var3d[x,y,zp[x,y]] | ||
| #For some reason numpy imposes a limit of 32 entries to choose | ||
| #so if nz>32 we have to use a different approach. This limit may change with numpy version |
Member
There was a problem hiding this comment.
See here for a possible solution: https://stackoverflow.com/a/39169371/2043465
bendudson
approved these changes
May 22, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows data to be interpolated along the field line before doing the
transform to the poloidal plane.
Also fixes for v4 onwards due to change in meaning of
nz(i.e. we no longer have the duplicate point).