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

Crash in case of partial meshing failure #178

Open
MrSmile opened this issue Mar 18, 2024 · 2 comments
Open

Crash in case of partial meshing failure #178

MrSmile opened this issue Mar 18, 2024 · 2 comments

Comments

@MrSmile
Copy link

MrSmile commented Mar 18, 2024

I'm using generic meshing interface by creating derivative class from netgen::NetgenGeometry. It works reasonable well, but in the case of partial failure in some early stages netgen frequently crashes. I've discovered that it's due to PointIndex::INVALID and if I comment this line there's no crash any more:

--- a/libsrc/meshing/meshfunc.cpp
+++ b/libsrc/meshing/meshfunc.cpp
@@ -438,7 +438,7 @@ namespace netgen
          glob2loc = PointIndex::INVALID;
 
          for (PointIndex pi : mesh.Points().Range())
-           if (domain_bbox.IsIn (mesh[pi]))
+           //if (domain_bbox.IsIn (mesh[pi]))
                glob2loc[pi] = meshing.AddPoint (mesh[pi], pi);
 
          for (auto sel : mesh.OpenElements() )

Is that if really unnecessary or PointIndex::INVALID should be handled gracefully somewhere later?

@ChrLackner
Copy link
Member

I think this is important for efficiancy of parallel volume meshing, can you provide a surface mesh where this leads to problems? (the volume meshing should then be independent of the basegeom anyway).

@MrSmile
Copy link
Author

MrSmile commented Mar 21, 2024

I've saved intermediate results before volume meshing: test.txt
I can reproduce a similar crash (but not exactly the same: number of points at middle stages differ) by trying to do "Generate Mesh" twice in netgen GUI.

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

No branches or pull requests

2 participants