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
Make nel_1d mean what it says #287
Conversation
A thousand thumbs up on this, but: shouldn't it be renamed to Edit: My thinking is that instead of actually changing all the grids, that the grids can be left the same. The grid interface actually expects the argument to be |
I still like thinking of the problem size in terms of numbers of elements instead of points. It makes it easier to multiply the mesh resolution. Also makes code like this simpler (from #272): nel_1d_0 = 5
for hn1 in [1, 2, 3, 4]:
- nel_1d = hn1 * (nel_1d_0 - 1) + 1
- h = 1/(nel_1d-1)
+ nel_1d = hn1 * nel_1d_0
+ h = 1/nel_1d If the |
Actually, that's a fair point.
I like that idea! We could (not saying we should) offer |
+1's to everything here (even if it's awkward). I also prefer to think about number of elements, and would love it to have this distinction acknowledged by the interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not a giant fan of that it changes the previous grids, but still prefer it over the previous thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The
n
parameter ingenerate_regular_rect_mesh
is the number of points in 1D, sonel_1d
is currently kind of misnamed. This PR fixes it.