mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
Merge branch 'export_parentelements_python' into 'master'
export parentelements to python See merge request ngsolve/netgen!617
This commit is contained in:
commit
6bd09ee05e
@ -998,7 +998,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
{ sizeof(self.Points()[PointIndex::BASE]), sizeof(double) } )
|
||||
);
|
||||
})
|
||||
|
||||
.def_property_readonly("parentelements", [](Mesh & self) {
|
||||
return FlatArray<int>(self.mlparentelement.Size(), &self.mlparentelement[0]);
|
||||
}, py::keep_alive<0,1>())
|
||||
.def_property_readonly("parentsurfaceelements", [](Mesh & self) {
|
||||
return FlatArray<int>(self.mlparentsurfaceelement.Size(),
|
||||
&self.mlparentsurfaceelement[0]);
|
||||
}, py::keep_alive<0,1>())
|
||||
.def("FaceDescriptor", static_cast<FaceDescriptor&(Mesh::*)(int)> (&Mesh::GetFaceDescriptor),
|
||||
py::return_value_policy::reference)
|
||||
.def("GetNFaceDescriptors", &Mesh::GetNFD)
|
||||
|
Loading…
Reference in New Issue
Block a user