relax deprecated

This commit is contained in:
Joachim Schoeberl 2022-10-26 16:45:15 +02:00
parent a183380cc6
commit 17803d2d45
3 changed files with 21 additions and 15 deletions

View File

@ -222,11 +222,11 @@ extern "C" {
[[deprecated("orientation is not supported anymore")]] [[deprecated("orientation is not supported anymore")]]
DLL_HEADER int Ng_GetElement_Edges (int elnr, int * edges, int * orient = 0); 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); DLL_HEADER int Ng_GetElement_Faces (int elnr, int * faces, int * orient = 0);
[[deprecated("orientation is not supported anymore")]] [[deprecated("orientation is not supported anymore")]]
DLL_HEADER int Ng_GetSurfaceElement_Edges (int selnr, int * edges, int * orient = 0); 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 int Ng_GetSurfaceElement_Face (int selnr, int * orient = 0);
DLL_HEADER void Ng_GetSurfaceElementNeighbouringDomains(const int selnr, int & in, int & out); DLL_HEADER void Ng_GetSurfaceElementNeighbouringDomains(const int selnr, int & in, int & out);

View File

@ -1943,8 +1943,9 @@ int Ng_IsRunning()
int Ng_GetVertex_Elements( int vnr, int* elems ) int Ng_GetVertex_Elements( int vnr, int* elems )
{ {
const MeshTopology& topology = mesh->GetTopology(); const MeshTopology& topology = mesh->GetTopology();
ArrayMem<ElementIndex,4> indexArray; // ArrayMem<ElementIndex,4> indexArray;
topology.GetVertexElements( vnr, indexArray ); // topology.GetVertexElements( vnr, indexArray );
auto indexArray = topology.GetVertexElements( vnr );
for( int i=0; i<indexArray.Size(); i++ ) for( int i=0; i<indexArray.Size(); i++ )
elems[i] = indexArray[i]+1; elems[i] = indexArray[i]+1;
@ -1960,8 +1961,9 @@ int Ng_GetVertex_SurfaceElements( int vnr, int* elems )
case 3: case 3:
{ {
const MeshTopology& topology = mesh->GetTopology(); const MeshTopology& topology = mesh->GetTopology();
ArrayMem<SurfaceElementIndex,4> indexArray; // ArrayMem<SurfaceElementIndex,4> indexArray;
topology.GetVertexSurfaceElements( vnr, indexArray ); // topology.GetVertexSurfaceElements( vnr, indexArray );
auto indexArray = topology.GetVertexSurfaceElements( vnr );
for( int i=0; i<indexArray.Size(); i++ ) for( int i=0; i<indexArray.Size(); i++ )
elems[i] = indexArray[i]+1; elems[i] = indexArray[i]+1;
@ -1992,10 +1994,12 @@ int Ng_GetVertex_SurfaceElements( int vnr, int* elems )
int Ng_GetVertex_NElements( int vnr ) int Ng_GetVertex_NElements( int vnr )
{ {
const MeshTopology& topology = mesh->GetTopology(); const MeshTopology& topology = mesh->GetTopology();
/*
ArrayMem<ElementIndex,4> indexArray; ArrayMem<ElementIndex,4> indexArray;
topology.GetVertexElements( vnr, indexArray ); topology.GetVertexElements( vnr, indexArray );
return indexArray.Size(); return indexArray.Size();
*/
return topology.GetVertexElements(vnr).Size();
} }
///// Added by Roman Stainko .... ///// Added by Roman Stainko ....
@ -2006,8 +2010,9 @@ int Ng_GetVertex_NSurfaceElements( int vnr )
case 3: case 3:
{ {
const MeshTopology& topology = mesh->GetTopology(); const MeshTopology& topology = mesh->GetTopology();
ArrayMem<SurfaceElementIndex,4> indexArray; // ArrayMem<SurfaceElementIndex,4> indexArray;
topology.GetVertexSurfaceElements( vnr, indexArray ); // topology.GetVertexSurfaceElements( vnr, indexArray );
auto indexArray = topology.GetVertexSurfaceElements( vnr );
return indexArray.Size(); return indexArray.Size();
} }
case 2: case 2:
@ -2251,8 +2256,9 @@ int Ng_GetClosureNodes (int nt, int nodenr, int nodeset, int * nodes)
if (nodeset & 2) // Edges if (nodeset & 2) // Edges
{ {
int edges[12]; int edges[12];
int ned; // int ned;
ned = mesh->GetTopology().GetElementEdges (nodenr+1, edges, 0); // ned = mesh->GetTopology().GetElementEdges (nodenr+1, edges, 0);
int ned = mesh->GetTopology().GetEdges (ElementIndex(nodenr)).Size();
for (int i = 0; i < ned; i++) for (int i = 0; i < ned; i++)
{ {
nodes[cnt++] = 1; nodes[cnt++] = 1;

View File

@ -112,15 +112,15 @@ public:
inline FlatArray<T_FACE> GetFaces (ElementIndex elnr) const; inline FlatArray<T_FACE> GetFaces (ElementIndex elnr) const;
[[deprecated("use GetElementEdge instead")]] // [[deprecated("use GetElementEdge instead")]]
void GetElementEdgeOrientations (int elnr, NgArray<int> & eorient) const; void GetElementEdgeOrientations (int elnr, NgArray<int> & eorient) const;
[[deprecated("use GetElementEdge instead")]] // [[deprecated("use GetElementEdge instead")]]
void GetElementFaceOrientations (int elnr, NgArray<int> & forient) const; void GetElementFaceOrientations (int elnr, NgArray<int> & forient) const;
[[deprecated("use GetEdges (ElementIndex) -> FlatArray")]] [[deprecated("use GetEdges (ElementIndex) -> FlatArray")]]
int GetElementEdges (int elnr, int * edges, int * orient) const; 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; int GetElementFaces (int elnr, int * faces, int * orient) const;
[[deprecated("use GetElementEdge instead")]] [[deprecated("use GetElementEdge instead")]]
@ -152,7 +152,7 @@ public:
int GetSurfaceElementFace (int elnr) const; int GetSurfaceElementFace (int elnr) const;
[[deprecated("orientation is outdated")]] [[deprecated("orientation is outdated")]]
void GetSurfaceElementEdgeOrientations (int elnr, NgArray<int> & eorient) const; void GetSurfaceElementEdgeOrientations (int elnr, NgArray<int> & eorient) const;
[[deprecated("orientation is outdated")]] // [[deprecated("orientation is outdated")]]
int GetSurfaceElementFaceOrientation (int elnr) const; int GetSurfaceElementFaceOrientation (int elnr) const;
[[deprecated("use GetEdge -> FlatArray instead")]] [[deprecated("use GetEdge -> FlatArray instead")]]