zero based access to identification pairs in new interface

This commit is contained in:
Christopher Lackner 2018-06-12 13:37:06 +02:00
parent 7e76805269
commit bafeb53395
3 changed files with 13 additions and 1 deletions

View File

@ -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<int[2]> GetPeriodicVertices(int idnr) const;
// Find element of point, returns local coordinates

View File

@ -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<int[2]> Ngx_Mesh :: GetPeriodicVertices(int idnr) const
{
Array<INDEX_2> apairs;
mesh->GetIdentifications().GetPairs (idnr, apairs);
mesh->GetIdentifications().GetPairs (idnr+1, apairs);
for(auto& ind : apairs)
{
ind.I1()--;

View File

@ -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);
}