-
Notifications
You must be signed in to change notification settings - Fork 39
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
Mesh check error printout #81
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
==========================================
- Coverage 79.48% 79.24% -0.24%
==========================================
Files 4 4
Lines 424 424
==========================================
- Hits 337 336 -1
- Misses 87 88 +1 ☔ View full report in Codecov by Sentry. |
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.
This needs some minor fixes and formatting with fprettify
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.
From what I can tell, this looks good overall, although I dont have a case to test this. Just a few minor comments.
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.
Sorry for the delay, couple of additional comments. BTW, do you have a mesh that we can add as tests that catch these cases?
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.
Sorry for the delay, couple of additional comments. BTW, do you have a mesh that we can add as tests that catch these cases? Would also be good to add printout to the PR description. Create #92 to track that we should update to mpi_abort
at some point.
I think I could find one that captures one of the errors somewhere in my computer backup but it's ~800k cells, probably too big for the tests. I never had a mesh that would trip all of the errors at once.
Are you saying to add the text that I added for the error printout so it's documented here? |
Wow, if the input meshes are this large, then yes this is way too big. I was hoping for something manageable to improve testing. Right, triggering everything with an actual mesh is probably not realistic, and we probably need to do this in smaller pieces, or manufacture something. Ideally, we should unittests this, although this will take a lot more effort. Given that this is not a runtime critical application, I am approving for now. But if you have other ideas, feel free to create an issue or update this PR.
Yes, I was just thinking of some type of documentation here as to what is expected as I dont have anything to run this with. |
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.
These changes look good and help with more informative error messages, but I do agree there ought to be some sort of small mesh test down the line to trigger these error messages though it is not critical.
Purpose
This changes the logic for error printouts for boundary condition checks and topology errors so all errors present in the mesh will print out.
These checks are:
The previous behavior was to exit when the first issue arose, making it hard to fix multiple errors at once. Now if one or more errors is found the original error message prints out for each and then after everything is checked a general error is printed and pyHyp exits with relevant information, either:
ERROR: pyHyp exited due to one or more issues with mesh boundary conditions. See above error printouts.
orERROR: pyHyp exited due to one or more issues with mesh topology. See above error printouts.
I also changed the printout that shows up at the start of a case. Originally it printed the case name as the name of the input file, but when running pyHyp with patch input there's no input file. I changed this to print the output file when there isn't an input file.
Expected time until merged
None
Type of change
Testing
Run this with a broken mesh to see if all expected errors are printed out
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable