-
Notifications
You must be signed in to change notification settings - Fork 509
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
added error checking on cylindrical mesh #2977
added error checking on cylindrical mesh #2977
Conversation
Wow this is some nice input checking, I hadn't though of checking the numbers increase. It is certainly an improvement on what we have at the moment. Would the increasing check catch an input like |
@shimwell Thank you for getting back to us! We have committed new changes that account for input checks similar to [1, 2, 4, 3] as well as adding a unit test for this. Does this logic make sense? |
This all looks good to me, there are lots of ways of checking the list is ascending so I guess we want to make sure we have a fast one. Also I think this is useful enough in multiple places that we could consider making a check_ascending function in this file . and making use of it in a few places throughout the code. As a user who makes tons of mistakes I'm always keen to see extra input checking and am in favour of the PR and also like the code and tests you have done. I'm going to defer to @paulromano for the final judgment on this PR to check we have the balance of extra compute with benefit to user correct. |
@hsameer481 what do you think about the code in #2973. The code added to checkvalues.py looks like we can make use of it on your PR. What do you think should we merge in #2973 first, then sync your fork and make use of those functions on this PR |
@shimwell that sounds good to us! Since this is the first time we're doing this, is there a specific process for implementing a new merged PR? |
Yep, once the PR has been merged (not yet)
But we must first wait to see the other PR gets merged |
@shimwell Great! We really appreciate the guidance and will make sure to follow those steps once it's merged! |
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.
I just made some updates on this branch based on the functionality from #2973. Should be good to go now. Thanks!
Co-authored-by: Paul Romano <[email protected]>
Description
Added an error-checking method for cylindrical_mesh inputs with the same maximum and minimum range values. Added a unit test for invalid bounds of r_grid, phi_grid, and z_grid. The creation of error checking was prompted by the need to enforce logical constraints. This ensures that each grid value represents a correctly sized segment.
Fixes #2933
Checklist