From c7a71148f44a1d07fbcc852ce7c077c131377fc4 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 22 May 2019 00:25:18 +0200 Subject: [PATCH] export function to get volume elements adjacent to surface element --- libsrc/meshing/python_mesh.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 87c436f7..d2946e04 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -763,6 +763,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) py::return_value_policy::reference) .def("GetNFaceDescriptors", &Mesh::GetNFD) + .def("GetVolumeNeighboursOfSurfaceElement", [](Mesh & self, size_t sel) + { + int elnr1, elnr2; + self.GetTopology().GetSurface2VolumeElement(sel+1, elnr1, elnr2); + return py::make_tuple(elnr1, elnr2); + }, "Returns element nrs of volume element connected to surface element, -1 if no volume element") + .def("GetNCD2Names", &Mesh::GetNCD2Names)