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

Fixes and optimization to the evaluation of levelset #146

Merged
merged 40 commits into from
Apr 8, 2021

Conversation

andrea-iob
Copy link
Member

These change fixes the selection of surface segments when multiple segments are at the same distance from a cell and introduce some miscellaneous optimizations to the evaluation of the levelset.

@roccoarpa roccoarpa removed their request for review February 22, 2021 08:42
@andrea-iob andrea-iob force-pushed the levelset.normal.evaluation branch 2 times, most recently from c2500d9 to 951c8c3 Compare February 23, 2021 21:09
Copy link
Member

@edoardolombardi edoardolombardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@andrea-iob
Copy link
Member Author

@marcocisternino @edoardolombardi I've updated sign evaluation, it now uses the pseudo-normal.

@haysam It seems to me that function convertBarycentricToFlagPolygon was giving incorrect results when a point was on an edge, does the fix 54cc90e seems right to you?

The algorithm used to evaluate the pseudo-normal depends on the location of the point within a triangle:

  • if the point coincides with a vertex, the pseudo-normal is evaluated as the unlimited normal of the vertex;
  • if the point lies on an edge, the pseudo-normal is the average of the normals of the two segments sharing the edge;
  • if the point is inside the segment, the pseudo-normal is evaluated as the normal of the segment.

@edoardolombardi edoardolombardi self-requested a review April 7, 2021 13:19
@edoardolombardi
Copy link
Member

👍 New changes passed my tests.

The algorithm used to evaluate the pseudo-normal depends on the location
of the point within a triangle:
 - if the point coincides with a vertex, the pseudo-normal is evaluated
   as the unlimited normal of the vertex;
 - if the point lies on an edge, the pseudo-normal is the average of
   the normals of the two segments sharing the edge;
 - if the point is inside the segment, the pseudo-normal is evaluated as
   the normal of the segment.
@andrea-iob andrea-iob merged commit 9023917 into master Apr 8, 2021
@andrea-iob andrea-iob deleted the levelset.normal.evaluation branch April 8, 2021 09:34
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.

2 participants