diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index c6d40df9..1a6b9e80 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -81,7 +81,7 @@ namespace netgen the face-index of the surface element maps into this table. */ - NgArray facedecoding; + Array facedecoding; /** @@ -712,15 +712,19 @@ 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]; } /// - FaceDescriptor & GetFaceDescriptor (int i) - { return facedecoding.Elem(i); } + FaceDescriptor & GetFaceDescriptor (int i) + { return facedecoding[i-1]; } + // { return facedecoding.Elem(i); } int IdentifyPeriodicBoundaries(const string& s1, const string& s2, diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index f0a761df..84b77622 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -848,6 +848,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) .def("FaceDescriptor", static_cast (&Mesh::GetFaceDescriptor), py::return_value_policy::reference) .def("GetNFaceDescriptors", &Mesh::GetNFD) + + .def("FaceDescriptors", + // static_cast&(Mesh::*)()> (&Mesh::FaceDescriptors), + &Mesh::FaceDescriptors, + py::return_value_policy::reference) + + .def("GetNDomains", &Mesh::GetNDomains) .def("GetVolumeNeighboursOfSurfaceElement", [](Mesh & self, size_t sel)