throw exception if 2d meshing fails

This commit is contained in:
Joachim Schöberl 2018-12-04 09:49:53 +01:00
parent e4d6ff8302
commit 7b7e7a52b5

View File

@ -601,8 +601,10 @@ namespace netgen
// not complete, use at own risk ...
// meshing.Delaunay(*mesh, domnr, mp);
mp.checkoverlap = 0;
meshing.GenerateMesh (*mesh, mp, h, domnr);
auto res = meshing.GenerateMesh (*mesh, mp, h, domnr);
if (res != 0)
throw NgException("meshing failed");
for (SurfaceElementIndex sei = oldnf; sei < mesh->GetNSE(); sei++)
(*mesh)[sei].SetIndex (domnr);