Add in mesh quality check at the start of MMG5_adptet_delone. #108
Add in mesh quality check at the start of MMG5_adptet_delone. #108iwheel wants to merge 2 commits intoMmgTools:masterfrom
Conversation
…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.
|
Hi @iwheel , Thank your for your feedback and your contribution and sorry for the delay of answer. Thank you by advance, |
|
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. Cheers, |
|
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). 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), |
|
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, |

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!