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

Add in mesh quality check at the start of MMG5_adptet_delone. #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

iwheel
Copy link

@iwheel iwheel commented Oct 6, 2021

This gives a failure return value if mesh quality is null, previously if mesh quality was null a segmentation fault with no return would occur in this routine. I've added this as it causes problems when using mmg api integrated in Elmer FEM. If a segfault occurs it breaks the whole model but if I get a return value I can write an exception. I can provide an example if that would be helpful.

Thanks!

…ves a failure return value if mesh quality is null, previously if mesh quality was null a segmentation fault with no return would occur in this routine.
@CLAassistant
Copy link

CLAassistant commented Oct 6, 2021

CLA assistant check
All committers have signed the CLA.

@Algiane
Copy link
Member

Algiane commented Oct 18, 2021

Hi @iwheel ,

Thank your for your feedback and your contribution and sorry for the delay of answer.
Is it possible to share the mesh and the Mmg parameters for which Mmg creates an element of null quality?
I would prefer to prevent such issue instead of retuning a failure (in particular because if we authorize the creation of the null element, it is very likely that other operators or functions of Mmg will fail (on other test cases or in other modes).

Thank you by advance,
Algiane

@iwheel
Copy link
Author

iwheel commented Oct 18, 2021

Hi @Algiane,

I have attached an example mesh and sol file along with an API example including the input parameters. I've also attached the terminal output I get with and without the extra quality check. Mmg compiled in Release/RelWithDebInfo or an assertion fails earlier in the routine when compiled in Debug.
mmgexample.zip

Cheers,
Iain

@Algiane
Copy link
Member

Algiane commented Oct 28, 2021

Hi and thank you @iwheel,

I just want to let you know that I am working at your bug but it may ask some weeks. I think that it is related to a bug that I am still trying to fix in the thread that you have created on the Mmg forum (https://forum.mmgtools.org/t/memory-fault-using-mmgls/549): Mmg authorizes an edge collapse that should be refused because it merges 2 edges belonging to different surfaces into one edge that connects the surfaces together (see for example the attached picture, the node 121 belongs to both the yellow and red surfaces, if we collapse the node 124 with the node 93 (the cyan one), the edge 124-121 belongs to the red and yellow surfaces which is a corruption of the input geometry).
Capture d’écran 2021-10-01 à 20 40 15

I hope to provide a more satisfactory answer soon.

We will probably release Mmg despite this bug (we are currently in ß and the release is due for the end of the month for a research project), but I will do a minor release when it will be fixed.

Best Regards (and thank you for the "challenging-but-friendly" test cases),
Algiane

@iwheel
Copy link
Author

iwheel commented Nov 3, 2021

Hi @Algiane,

Thanks for the update. Not a problem about not making this release - I can continue to use the extra null element check for the time being.

Best,
iain

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.

None yet

3 participants