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.
Adds an option
single_region
that can be passed the name of a mesh region to build the grid only for that region. Currently only supports divertor leg regions.Would be nice to extend this to allow doing a whole SOL. PFR, or core region - that would require picking out a subset of the radial blocks, and including more than one 'region'. The option might also need renaming in that case...
Things to be aware of:
y_boundary_guards
, as these cannot be consistently created at/past an X-point. For test cases, it is probably OK to let BOUT++ extrapolate into the boundary cells, so hopefully this is not a big problem. A better solution might be to add some special handling for the X-point end when building asingle_region
grid, but that might well get a bit messy...single_region = "outer_lower_divertor"
. The reason is that the grid spacing settings are normalised to the totalny
on the grid (the idea was to allow consistent grids to be produced when scaling upny
with otherwise the same settings). The grid for a divertor leg has a much smallerny
than the full grid, so either all the spacing parameters need to be increased by a factorny(full grid) / ny(divertor leg grid)
, or it may be more convenient to set theN_norm_prefactor
setting to that factor (which has the same effect).Adding a few comments to the code would be good, e.g. that the
"fake"
value added in a few places here is a hack just to supportsingle_region
.doc/whats-new.md
with a summary of the changes