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

Non manifold surface does not lead to an error anymore : warning instead #205

Merged

Conversation

corentin-prigent
Copy link
Contributor

@corentin-prigent corentin-prigent commented Mar 1, 2023

This PR allows to return a mesh if the mesh adaptation stage leads to attach the discretized level-set surface to itself or to the bounding-box in a non-manifold way, i.e. the level-set surface touches itself or the box in one vertex only (2D, surface and 3D meshes) or in one edge only (3D meshes). See attached pictures for an illustration of what is considered as manifold level-set surfaces (top images) and as a non-manifold one (bottom images).

Manifold level-set surfaces :
2d-manifold)

Non-manifold level-set surfaces :
2-non-manifold

As it is not an expected behaviour (if we start the mesh adaptation stage with a manifold level-set surface, we should end with a similar topology), an error message and the MMG5_STRONGFAILURE return value was previoulsy returned without saving the mesh. As the mesh has been entirely remeshed and the generated mesh remains conformal and usable, now, we only raise a warning and the mesh is returned to the user (so the user can decide to use it or not).

Note that we still want to raise an error and to refuse to remesh the mesh if the level-set is non-manifold at the end of the stage of level-set discretization (before mesh adaptation). The reason is that we can consider such kind of configuration as a transitional step between the situation where the level-set is not attached to itself or to the bounding-box and where the situation where it has merged and for structural optimization for example, it is preferable to avoid remeshing during this transition.

@Algiane Algiane added kind: enhancement enhancement to an existing feature part: mesh adaptation mesh adaptation mode specificity part: ls discretization isovalue discretiztion mode specificity and removed part: mesh adaptation mesh adaptation mode specificity labels Mar 2, 2023
@Algiane
Copy link
Member

Algiane commented Mar 2, 2023

Thanks for this PR.

@Algiane Algiane self-assigned this Mar 3, 2023
@Algiane Algiane merged commit bdfec01 into MmgTools:develop Mar 3, 2023
@Algiane
Copy link
Member

Algiane commented Mar 3, 2023

It's all good, thanks!

@corentin-prigent corentin-prigent deleted the feature/warning_check_mani branch March 3, 2023 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement enhancement to an existing feature part: ls discretization isovalue discretiztion mode specificity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants