From 17803d2d4508d56244c9ad129b8b06c824bb8e1a Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Wed, 26 Oct 2022 16:45:15 +0200 Subject: [PATCH] relax deprecated --- libsrc/include/nginterface.h | 4 ++-- libsrc/interface/nginterface.cpp | 24 +++++++++++++++--------- libsrc/meshing/topology.hpp | 8 ++++---- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/libsrc/include/nginterface.h b/libsrc/include/nginterface.h index 93c0fd52..b4459087 100644 --- a/libsrc/include/nginterface.h +++ b/libsrc/include/nginterface.h @@ -222,11 +222,11 @@ extern "C" { [[deprecated("orientation is not supported anymore")]] DLL_HEADER int Ng_GetElement_Edges (int elnr, int * edges, int * orient = 0); - [[deprecated("orientation is not supported anymore")]] + // [[deprecated("orientation is not supported anymore")]] DLL_HEADER int Ng_GetElement_Faces (int elnr, int * faces, int * orient = 0); [[deprecated("orientation is not supported anymore")]] DLL_HEADER int Ng_GetSurfaceElement_Edges (int selnr, int * edges, int * orient = 0); - [[deprecated("orientation is not supported anymore")]] + // [[deprecated("orientation is not supported anymore")]] DLL_HEADER int Ng_GetSurfaceElement_Face (int selnr, int * orient = 0); DLL_HEADER void Ng_GetSurfaceElementNeighbouringDomains(const int selnr, int & in, int & out); diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index d98b797c..4da0eed9 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -1943,8 +1943,9 @@ int Ng_IsRunning() int Ng_GetVertex_Elements( int vnr, int* elems ) { const MeshTopology& topology = mesh->GetTopology(); - ArrayMem indexArray; - topology.GetVertexElements( vnr, indexArray ); + // ArrayMem indexArray; + // topology.GetVertexElements( vnr, indexArray ); + auto indexArray = topology.GetVertexElements( vnr ); for( int i=0; iGetTopology(); - ArrayMem indexArray; - topology.GetVertexSurfaceElements( vnr, indexArray ); + // ArrayMem indexArray; + // topology.GetVertexSurfaceElements( vnr, indexArray ); + auto indexArray = topology.GetVertexSurfaceElements( vnr ); for( int i=0; iGetTopology(); + /* ArrayMem indexArray; topology.GetVertexElements( vnr, indexArray ); - return indexArray.Size(); + */ + return topology.GetVertexElements(vnr).Size(); } ///// Added by Roman Stainko .... @@ -2006,8 +2010,9 @@ int Ng_GetVertex_NSurfaceElements( int vnr ) case 3: { const MeshTopology& topology = mesh->GetTopology(); - ArrayMem indexArray; - topology.GetVertexSurfaceElements( vnr, indexArray ); + // ArrayMem indexArray; + // topology.GetVertexSurfaceElements( vnr, indexArray ); + auto indexArray = topology.GetVertexSurfaceElements( vnr ); return indexArray.Size(); } case 2: @@ -2251,8 +2256,9 @@ int Ng_GetClosureNodes (int nt, int nodenr, int nodeset, int * nodes) if (nodeset & 2) // Edges { int edges[12]; - int ned; - ned = mesh->GetTopology().GetElementEdges (nodenr+1, edges, 0); + // int ned; + // ned = mesh->GetTopology().GetElementEdges (nodenr+1, edges, 0); + int ned = mesh->GetTopology().GetEdges (ElementIndex(nodenr)).Size(); for (int i = 0; i < ned; i++) { nodes[cnt++] = 1; diff --git a/libsrc/meshing/topology.hpp b/libsrc/meshing/topology.hpp index c13a305e..8a2fc9e0 100644 --- a/libsrc/meshing/topology.hpp +++ b/libsrc/meshing/topology.hpp @@ -112,15 +112,15 @@ public: inline FlatArray GetFaces (ElementIndex elnr) const; - [[deprecated("use GetElementEdge instead")]] + // [[deprecated("use GetElementEdge instead")]] void GetElementEdgeOrientations (int elnr, NgArray & eorient) const; - [[deprecated("use GetElementEdge instead")]] + // [[deprecated("use GetElementEdge instead")]] void GetElementFaceOrientations (int elnr, NgArray & forient) const; [[deprecated("use GetEdges (ElementIndex) -> FlatArray")]] int GetElementEdges (int elnr, int * edges, int * orient) const; - [[deprecated("use GetFaces (ElementIndex) -> FlatArray")]] + // [[deprecated("use GetFaces (ElementIndex) -> FlatArray")]] int GetElementFaces (int elnr, int * faces, int * orient) const; [[deprecated("use GetElementEdge instead")]] @@ -152,7 +152,7 @@ public: int GetSurfaceElementFace (int elnr) const; [[deprecated("orientation is outdated")]] void GetSurfaceElementEdgeOrientations (int elnr, NgArray & eorient) const; - [[deprecated("orientation is outdated")]] + // [[deprecated("orientation is outdated")]] int GetSurfaceElementFaceOrientation (int elnr) const; [[deprecated("use GetEdge -> FlatArray instead")]]