From 4ebaefd10a72c7c427eda513badddaeec4386879 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 15 Feb 2022 09:38:20 +0100 Subject: [PATCH] add meshing parameter giveuptolopenquads --- libsrc/meshing/meshfunc.cpp | 3 +-- libsrc/meshing/meshtype.hpp | 3 +++ libsrc/meshing/python_mesh.hpp | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/meshfunc.cpp b/libsrc/meshing/meshfunc.cpp index 62a53325..700137e1 100644 --- a/libsrc/meshing/meshfunc.cpp +++ b/libsrc/meshing/meshfunc.cpp @@ -281,8 +281,7 @@ namespace netgen MeshingParameters mpquad = mp; - // mpquad.giveuptol = 15; - mpquad.giveuptol = 200; + mpquad.giveuptol = mp.giveuptolopenquads; mpquad.baseelnp = 4; mpquad.starshapeclass = 1000; mpquad.check_impossible = qstep == 1; // for prisms only (air domain in trafo) diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 1c03401a..f3b83c7c 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -1295,6 +1295,9 @@ namespace netgen int giveuptol2d = 200; /// give up quality class, 3d meshing int giveuptol = 10; + /// give up quality class for closing open quads, > 100 for + /// free pyramids + int giveuptolopenquads = 15; /// maximal outer steps int maxoutersteps = 10; /// class starting star-shape filling diff --git a/libsrc/meshing/python_mesh.hpp b/libsrc/meshing/python_mesh.hpp index 110c26ee..4a5db879 100644 --- a/libsrc/meshing/python_mesh.hpp +++ b/libsrc/meshing/python_mesh.hpp @@ -144,6 +144,8 @@ inline void CreateMPfromKwargs(MeshingParameters& mp, py::kwargs kwargs, bool th mp.giveuptol2d = py::cast(kwargs.attr("pop")("giveuptol2d")); if(kwargs.contains("giveuptol")) mp.giveuptol = py::cast(kwargs.attr("pop")("giveuptol")); + if(kwargs.contains("giveuptolopenquads")) + mp.giveuptolopenquads = py::cast(kwargs.attr("pop")("giveuptolopenquads")); if(kwargs.contains("maxoutersteps")) mp.maxoutersteps = py::cast(kwargs.attr("pop")("maxoutersteps")); if(kwargs.contains("starshapeclass"))