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

Allow keeping y boundary cells at second divertor #40

Merged
merged 6 commits into from
Aug 7, 2019

Conversation

johnomotani
Copy link
Collaborator

Enables keep_yboundaries option to work in double-null topology.

Should be merged after #39 and #30.

In double-null topology there are y-boundary cells somewhere in the
middle of the grid. This commit adds a check for the value of ny_inner
to find the position of the second divertor, and adds the boundary cells
there if we are keeping y-boundary cells.
@johnomotani johnomotani added the work in progress Not ready to merge label Jul 22, 2019
@pep8speaks
Copy link

pep8speaks commented Jul 22, 2019

Hello @johnomotani! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-08-06 13:09:36 UTC

@codecov-io
Copy link

codecov-io commented Jul 23, 2019

Codecov Report

Merging #40 into master will increase coverage by 2.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
+ Coverage    49.7%   51.85%   +2.14%     
==========================================
  Files           8        8              
  Lines         344      351       +7     
  Branches       63       63              
==========================================
+ Hits          171      182      +11     
+ Misses        155      153       -2     
+ Partials       18       16       -2
Impacted Files Coverage Δ
xbout/load.py 80% <100%> (+4.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9502b3d...94b16e7. Read the comment docs.

Copy link
Collaborator

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Easier to fix than I had imagined.

Only comment I can think of is whether it would be more internally consistent to use the _get_seps() function rather than ds['jxseps1_2'] for example? Possibly not if we haven't yet deciphered those...

@TomNicholas
Copy link
Collaborator

Also might want to merge the guard cells branch into this one

@johnomotani
Copy link
Collaborator Author

Only comment I can think of is whether it would be more internally consistent to use the _get_seps() function rather than ds['jxseps1_2'] for example? Possibly not if we haven't yet deciphered those...

It's a good point. After thinking a bit, it seems sensible to me to keep separate the changes here (which affect pre-processing files before they are loaded) and _get_seps (which calculates indices for slicing up the collected arrays) - even though they do very similar things. What _get_seps ends up doing (in cases with y-boundaries, in some changes that I haven't made a PR for yet) depends on what was done in the pre-processing (i.e. were y-boundary cells kept or not).

@TomNicholas
Copy link
Collaborator

What _get_seps ends up doing (in cases with y-boundaries, in some changes that I haven't made a PR for yet) depends on what was done in the pre-processing (i.e. were y-boundary cells kept or not).

This seems reasonable to me.

I just merged in the final changes to the keep_guard_cells branch (not entirely sure if that was necessary but oh well) - so if someone could give this a final double-check before merging that would be great.

@johnomotani johnomotani removed the work in progress Not ready to merge label Aug 6, 2019
@johnomotani johnomotani requested a review from TomNicholas August 6, 2019 13:11
@TomNicholas TomNicholas merged commit 78a8b9f into master Aug 7, 2019
@johnomotani johnomotani deleted the y-boundaries-second-divertor branch August 10, 2019 18:53
johnomotani pushed a commit that referenced this pull request Dec 11, 2019
Allow keeping y boundary cells at second divertor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants