From 13d962acddafbd2fa2398330f789941795e93955 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 27 Sep 2024 11:48:28 +0200 Subject: [PATCH] Write more debug output meshes on failure --- libsrc/meshing/meshfunc.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/meshfunc.cpp b/libsrc/meshing/meshfunc.cpp index 656f6ed8..db941b53 100644 --- a/libsrc/meshing/meshfunc.cpp +++ b/libsrc/meshing/meshfunc.cpp @@ -359,8 +359,10 @@ namespace netgen if (mesh.HasOpenQuads()) { - if(debugparam.write_mesh_on_error) - md.mesh->Save("open_quads_"+ToString(md.domain)+".vol.gz"); + if(debugparam.write_mesh_on_error) { + md.mesh->Save("open_quads_starting_mesh_"+ToString(md.domain)+".vol.gz"); + GetOpenElements(*md.mesh, md.domain)->Save("open_quads_rest_" + ToString(md.domain)+".vol.gz"); + } PrintSysError ("mesh has still open quads"); throw NgException ("Stop meshing since too many attempts"); // return MESHING3_GIVEUP; @@ -426,7 +428,11 @@ namespace netgen if (cntsteps > mp.maxoutersteps) { if(debugparam.write_mesh_on_error) + { md.mesh->Save("meshing_error_domain_"+ToString(md.domain)+".vol.gz"); + if(mesh.GetNOpenElements()) + GetOpenElements(*md.mesh, md.domain)->Save("meshing_error_rest_" + ToString(md.domain)+".vol.gz"); + } throw NgException ("Stop meshing since too many attempts in domain " + ToString(md.domain)); }