From 8756aabd3c52dccafe502c33f9ad4b16c1ec0ddd Mon Sep 17 00:00:00 2001 From: Christoph Wintersteiger Date: Fri, 21 Oct 2016 16:01:46 +0200 Subject: [PATCH] add identification for 1d meshes, used for periodic boundary conditions --- libsrc/meshing/python_mesh.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index fc5acc62..0fae78ee 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -466,6 +466,20 @@ DLL_HEADER void ExportNetgenMeshing() .def ("GetMaterial", FunctionPointer([](Mesh & self, int domnr) { return string(self.GetMaterial(domnr)); })) + .def ("AddPointIdentification", FunctionPointer ([](Mesh & self, bp::object pindex1, bp::object pindex2, int identnr, int type) + { + if(bp::extract(pindex1).check() && bp::extract(pindex2).check()) + { + self.GetIdentifications().Add (bp::extract(pindex1), bp::extract(pindex2), identnr); + self.GetIdentifications().SetType(identnr, Identifications::ID_TYPE(type)); // type = 2 ... periodic + } + }), + bp::default_call_policies(), + (bp::arg("pid1"), + bp::arg("pid2"), + bp::arg("identnr"), + bp::arg("type") + )) .def ("GenerateVolumeMesh", FunctionPointer ([](Mesh & self, bp::object pymp) {