Print unknown topology debug information #32
Merged
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.
Purpose
When pyHyp encounters an unknown topology in the surface mesh, the output is not very helpful. Here is an example:
I think in most cases, an unknown topology is not the intended topology but occurs because of errors in the surface mesh. To make these errors easier to debug, I modified the setup routine to print out the coordinates of the nodes where an unknown topology is encountered as well as the number of edges and faces at that node. This is very similar to how pyHyp prints out the nodes where the normal direction is incorrect. The behavior of the code is unchanged if pyHyp does not encounter an unknown topology.
The output with my changes:
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR
Testing
To replicate the output, unpack and run this case with
python run_pyhyp.py
.Checklist
Put an
x
in the boxes that apply.flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted