diff --git a/libsrc/include/nginterface_v2.hpp b/libsrc/include/nginterface_v2.hpp index 16184d45..580a340a 100644 --- a/libsrc/include/nginterface_v2.hpp +++ b/libsrc/include/nginterface_v2.hpp @@ -300,6 +300,8 @@ namespace netgen int GetParentElement (int ei) const; int GetParentSElement (int ei) const; + int GetNIdentifications() const; + int GetIdentificationType(int idnr) const; Ng_Buffer GetPeriodicVertices(int idnr) const; // Find element of point, returns local coordinates diff --git a/libsrc/include/nginterface_v2_impl.hpp b/libsrc/include/nginterface_v2_impl.hpp index 938efbf8..06e7fa22 100644 --- a/libsrc/include/nginterface_v2_impl.hpp +++ b/libsrc/include/nginterface_v2_impl.hpp @@ -300,7 +300,7 @@ template <> NGX_INLINE DLL_HEADER const Ng_Node<2> Ngx_Mesh :: GetNode<2> (int n NGX_INLINE DLL_HEADER Ng_Buffer Ngx_Mesh :: GetPeriodicVertices(int idnr) const { Array apairs; - mesh->GetIdentifications().GetPairs (idnr, apairs); + mesh->GetIdentifications().GetPairs (idnr+1, apairs); for(auto& ind : apairs) { ind.I1()--; diff --git a/libsrc/interface/nginterface_v2.cpp b/libsrc/interface/nginterface_v2.cpp index 1f8ecbbd..1a776acb 100644 --- a/libsrc/interface/nginterface_v2.cpp +++ b/libsrc/interface/nginterface_v2.cpp @@ -720,6 +720,16 @@ namespace netgen return -1; } + int Ngx_Mesh :: GetNIdentifications () const + { + return mesh->GetIdentifications().GetMaxNr(); + } + + int Ngx_Mesh :: GetIdentificationType(int idnr) const + { + return mesh->GetIdentifications().GetType(idnr+1); + } +