Skip to content
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

Print unknown topology debug information #32

Merged
merged 1 commit into from
Nov 12, 2020
Merged

Conversation

sseraj
Copy link
Collaborator

@sseraj sseraj commented Nov 2, 2020

Purpose

When pyHyp encounters an unknown topology in the surface mesh, the output is not very helpful. Here is an example:

#--------------------#
 Total Nodes:   37850
 Unique Nodes:  36784
 Total Faces:   36608
#--------------------#
 Normal orientation check ...
 Normals are consistent!
 An unknown topology was encountered. I'm assuming we can't do that.

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:

#--------------------#
 Total Nodes:   37850
 Unique Nodes:  36784
 Total Faces:   36608
#--------------------#
 Normal orientation check ...
 Normals are consistent!
 Determining topology ...
  ERROR: Unknown topology encountered
         Check the following coordinates:
 0.19000136415670291 -0.59227588104293228E-2 0.84846649164257160E-1 (node has 5 edges and 4 faces)
 0.18692284541774140 -0.37827186682046743E-2 0.87009737243640473E-1 (node has 5 edges and 4 faces)

Type of change

What types of change is it?
Select the appropriate type(s) that describe this PR

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

To replicate the output, unpack and run this case with python run_pyhyp.py.

Checklist

Put an x in the boxes that apply.

  • I have run flake8 and black to make sure the code adheres to PEP-8 and is consistently formatted
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@sseraj sseraj requested a review from a team as a code owner November 2, 2020 21:50
@sseraj sseraj merged commit 43e1bc7 into mdolab:master Nov 12, 2020
@sseraj sseraj deleted the topo-debug branch November 12, 2020 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants