-
Notifications
You must be signed in to change notification settings - Fork 90
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
Include all boundary cells in GlobalNy #1829
Conversation
The `GlobalNx`, `GlobalNy` variables include boundary cells, but previously `GlobalNy` only included boundary cells from one divertor. If a second divertor boundary is present, the guard cells from there should also be included. This change makes `GlobalNy` consistent with `getGlobalYIndex` in the sense that on the last processor `getGlobalYIndex(LocalNy) == GlobalNy` always.
7351f6d
to
e13ce3b
Compare
Allows calculating the number of boundary cells in the global y-grid.
After changing defition of GlobalNy, need to update its uses. Vol_Integral() seems to have been incorrect previously, since it used a number of points including boundary cells to weight the integral.
e13ce3b
to
ca055d0
Compare
Error in conditional meant method returned the wrong result.
The correct value for the total number of y-boundary cells is mesh.numberOfYBoundaries()*2*mesh.ystart As there are two boundaries (upper and lower) containing mesh.ystart cells each for each boundary. Previously the factor of 2 was missed in several places in the recent re-definition of GlobalNy. The use in Vol_Integral was missing a factor of mesh.ystart as well.
The Travis tests are not completing because they time out when |
Not to my knowledge. The same tests work fine on other builds. I'll have a look on my machine now |
Works on my machine too, so must be something about travis. Will investigate further this afternoon |
GlobalNx is used as the default for ixseps1 and ixseps2 so needs to be initialised first, while GlobalNy uses jyseps1_2 and jyseps2_1 so does need to be initialised after the separatrix positions are loaded.
An identical check is already performed above the one removed in this commit.
Please can you add a section at the top of # Change Log
## [v5.0.0-alpha](https://github.com/boutproject/BOUT-dev/tree/next)
[Full Changelog](https://github.com/boutproject/BOUT-dev/compare/v4.3.0...next)
### Breaking changes
- `BoutMesh::GlobalNy` now counts points from all
y-boundaries. Previously it only counted points from one boundary
[\#1829](https://github.com/boutproject/BOUT-dev/pull/1829) |
The
GlobalNx
,GlobalNy
variables include boundary cells, but previouslyGlobalNy
only included boundary cells from one divertor. If a second divertor boundary is present, the guard cells from there should also be included. This change makesGlobalNy
consistent withgetGlobalYIndex
in the sense that on the last processorgetGlobalYIndex(LocalNy) == GlobalNy
always.The lines setting the global grid sizes are moved below those getting the separatrix/X-point locations just so that setting
GlobalNy
can usejyseps2_1
andjyseps1_2
- the other lines are not changed.