Skip to content
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

Target/limiter plates are plotted half a grid point off from where they should be #169

Open
johnomotani opened this issue Nov 25, 2020 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@johnomotani
Copy link
Collaborator

At the moment when the targets are plotted, they are drawn along the line of the first/last grid points in the y-direction.

if list(da_region.regions.values())[0].connection_lower_y is None:
# lower target exists
x_target = da_region.coords[x].isel(**{ycoord: y_boundary_guards})
y_target = da_region.coords[y].isel(**{ycoord: y_boundary_guards})
[line] = ax.plot(x_target, y_target, "k-", linewidth=2)
if hatching:
_add_hatching(line, ax)
if list(da_region.regions.values())[0].connection_upper_y is None:
# upper target exists
x_target = da_region.coords[x].isel(**{ycoord: -y_boundary_guards - 1})
y_target = da_region.coords[y].isel(**{ycoord: -y_boundary_guards - 1})
[line] = ax.plot(x_target, y_target, "k-", linewidth=2)
if hatching:
_add_hatching(line, ax, reversed=True)

They should really be half way between the end-most grid point and the first boundary point (to be consistent with BOUT++ boundary conditions definitions). This should be straightforward if we have the y boundary cells, but requires an extrapolation if they are not present.

@johnomotani johnomotani added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant