Skip to content

Fix issue#269: infinite loop during meshing action with face interpolation#230

Open
lelandaisb wants to merge 3 commits intomainfrom
issue#269
Open

Fix issue#269: infinite loop during meshing action with face interpolation#230
lelandaisb wants to merge 3 commits intomainfrom
issue#269

Conversation

@lelandaisb
Copy link
Copy Markdown
Contributor

@lelandaisb lelandaisb commented Apr 1, 2026

Fix infinite loop in CoEdge::detectLoopReference methods when edges use face interpolation discretization.
Bounce around Fa0020: Ar0082 --> [Ar0076, Ar0077] --> Ar0077 --> [Ar0081, Ar0082] --> Ar0082

issue269

@lelandaisb lelandaisb requested a review from nicolaslg April 1, 2026 07:41
@lelandaisb lelandaisb marked this pull request as draft April 1, 2026 07:41
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 51.72414% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.94%. Comparing base (20a9e72) to head (47ed9be).

Files with missing lines Patch % Lines
src/Core/Topo/CoEdge.cpp 51.72% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
+ Coverage   47.73%   47.94%   +0.20%     
==========================================
  Files         462      462              
  Lines       50079    50068      -11     
==========================================
+ Hits        23906    24003      +97     
+ Misses      26173    26065     -108     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lelandaisb lelandaisb marked this pull request as ready for review April 1, 2026 08:26
@lelandaisb lelandaisb changed the title Fix issue#269 Fix issue#269: infinite loop during meshing action with face interpolation Apr 3, 2026
Copy link
Copy Markdown
Collaborator

@nicolaslg nicolaslg left a comment

Choose a reason for hiding this comment

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

Good job for prevented crashes; I have built additional cases of interpolated edges forming loops

EDIT : sorry, I mistook the branches while reviewing the PR. In the following test case a loop is adequately detected during meshing in the main branch but crashes with this branch

# Création d'un bloc unitaire mis dans le groupe aaa
ctx.getTopoManager().newFreeTopoInGroup ("aaa", 3)
# Changement de discrétisation pour les arêtes Ar0006
emp = Mgx3D.EdgeMeshingPropertyInterpolate(10, "Fa0000")
ctx.getTopoManager().setMeshingProperty (emp, ["Ar0006"])
# Changement de discrétisation pour les arêtes Ar0004
emp = Mgx3D.EdgeMeshingPropertyInterpolate(10, "Fa0004")
ctx.getTopoManager().setMeshingProperty (emp, ["Ar0004"])
# Changement de discrétisation pour les arêtes Ar0005
emp = Mgx3D.EdgeMeshingPropertyInterpolate(10, "Fa0001")
ctx.getTopoManager().setMeshingProperty (emp, ["Ar0005"])
# Changement de discrétisation pour les arêtes Ar0007
emp = Mgx3D.EdgeMeshingPropertyInterpolate(10, "Fa0005")
ctx.getTopoManager().setMeshingProperty (emp, ["Ar0007"])

@nicolaslg nicolaslg self-requested a review April 7, 2026 22:15
@nicolaslg nicolaslg marked this pull request as draft April 8, 2026 06:37
@lelandaisb lelandaisb marked this pull request as ready for review April 10, 2026 14:38
@lelandaisb
Copy link
Copy Markdown
Contributor Author

I rewrote the loop detection algorithm for interpolations. I made it consistent for global/local, local/face, and local/list-of-edges.
I created a unit test that includes the test provided above, the test provided in talk-spirit, and the test that reproduces the internal error.
I tested it against the internal tests: no false positives, everything is OK.

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