FaceDescriptor array to Python

This commit is contained in:
Joachim Schoeberl 2021-09-10 12:42:41 +02:00
parent 94ee2b67ad
commit 781ea7103e
2 changed files with 15 additions and 4 deletions

View File

@ -81,7 +81,7 @@ namespace netgen
the face-index of the surface element maps into
this table.
*/
NgArray<FaceDescriptor> facedecoding;
Array<FaceDescriptor> facedecoding;
/**
@ -712,7 +712,10 @@ namespace netgen
{ return facedecoding.Size(); }
const FaceDescriptor & GetFaceDescriptor (int i) const
{ return facedecoding.Get(i); }
{ return facedecoding[i-1]; }
// { return facedecoding.Get(i); }
auto & FaceDescriptors () const { return facedecoding; }
const EdgeDescriptor & GetEdgeDescriptor (int i) const
{ return edgedecoding[i]; }
@ -720,7 +723,8 @@ namespace netgen
///
FaceDescriptor & GetFaceDescriptor (int i)
{ return facedecoding.Elem(i); }
{ return facedecoding[i-1]; }
// { return facedecoding.Elem(i); }
int IdentifyPeriodicBoundaries(const string& s1,
const string& s2,

View File

@ -848,6 +848,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def("FaceDescriptor", static_cast<FaceDescriptor&(Mesh::*)(int)> (&Mesh::GetFaceDescriptor),
py::return_value_policy::reference)
.def("GetNFaceDescriptors", &Mesh::GetNFD)
.def("FaceDescriptors",
// static_cast<Array<Element>&(Mesh::*)()> (&Mesh::FaceDescriptors),
&Mesh::FaceDescriptors,
py::return_value_policy::reference)
.def("GetNDomains", &Mesh::GetNDomains)
.def("GetVolumeNeighboursOfSurfaceElement", [](Mesh & self, size_t sel)