From b5571213f410681cd31adcd451d7500084b9044e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Thu, 20 Oct 2016 13:19:24 +0200 Subject: [PATCH] meshing parameters to vol-meshing --- libsrc/meshing/meshtype.hpp | 9 ++------- libsrc/meshing/python_mesh.cpp | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 77a0c1c0..522eb8c8 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -1020,13 +1020,6 @@ namespace netgen class DLL_HEADER MeshingParameters { public: - - - - - - - /** 3d optimization strategy: // m .. move nodes @@ -1131,6 +1124,8 @@ namespace netgen /// MeshingParameters (const MeshingParameters & mp2) = default; MeshingParameters (MeshingParameters && mp2) = default; + MeshingParameters & operator= (const MeshingParameters & mp2) = default; + MeshingParameters & operator= (MeshingParameters && mp2) = default; /// void Print (ostream & ost) const; /// diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 59099743..fc5acc62 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -465,16 +465,24 @@ DLL_HEADER void ExportNetgenMeshing() .def ("SetMaterial", &Mesh::SetMaterial) .def ("GetMaterial", FunctionPointer([](Mesh & self, int domnr) { return string(self.GetMaterial(domnr)); })) - + .def ("GenerateVolumeMesh", FunctionPointer - ([](Mesh & self) + ([](Mesh & self, bp::object pymp) { cout << "generate vol mesh" << endl; + MeshingParameters mp; - mp.optsteps3d = 5; + if (bp::extract(pymp).check()) + mp = bp::extract(pymp)(); + else + { + mp.optsteps3d = 5; + } MeshVolume (mp, self); OptimizeVolume (mp, self); - })) + }), + (bp::arg("self"), bp::arg("mp")=bp::object()) + ) .def ("OptimizeVolumeMesh", FunctionPointer ([](Mesh & self)