From a8e41734cf84981eb2fbe844c0322a4f7080257f Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Mon, 31 Jul 2023 00:13:56 +0200 Subject: [PATCH] no warnings --- libsrc/core/array.hpp | 2 ++ libsrc/meshing/topology.cpp | 11 +++++++++++ libsrc/meshing/topology.hpp | 4 ++-- libsrc/occ/occ_edge.cpp | 5 +++++ libsrc/occ/occ_edge.hpp | 6 ++++++ libsrc/occ/occ_face.cpp | 5 +++++ libsrc/occ/occ_face.hpp | 5 +++++ libsrc/occ/occ_utils.hpp | 5 +++++ libsrc/occ/occ_vertex.hpp | 5 +++++ libsrc/occ/occmeshsurf.cpp | 5 +++++ libsrc/occ/python_occ_shapes.cpp | 5 +++++ 11 files changed, 56 insertions(+), 2 deletions(-) diff --git a/libsrc/core/array.hpp b/libsrc/core/array.hpp index 170f51b8..33e8549f 100644 --- a/libsrc/core/array.hpp +++ b/libsrc/core/array.hpp @@ -1001,8 +1001,10 @@ namespace ngcore data[i] = a2.data[i]; return *this; } +#ifndef __CUDA_ARCH__ else throw Exception(std::string("cannot copy Array of type ") + typeid(T).name()); +#endif } diff --git a/libsrc/meshing/topology.cpp b/libsrc/meshing/topology.cpp index 9232b835..92df2fd5 100644 --- a/libsrc/meshing/topology.cpp +++ b/libsrc/meshing/topology.cpp @@ -1780,6 +1780,17 @@ namespace netgen eledges[i] = edges.Get(elnr)[i]+1; // eledges[i] = abs (edges.Get(elnr)[i]); } + + void MeshTopology :: GetElementFaces (int elnr, NgArray & elfaces) const + { + int nfa = GetNFaces (mesh->VolumeElement(elnr).GetType()); + elfaces.SetSize (nfa); + + for (auto i : Range(nfa)) + elfaces[i] = faces.Get(elnr)[i]+1; + } + + void MeshTopology :: GetElementFaces (int elnr, NgArray & elfaces, bool withorientation) const { int nfa = GetNFaces (mesh->VolumeElement(elnr).GetType()); diff --git a/libsrc/meshing/topology.hpp b/libsrc/meshing/topology.hpp index c77a49e7..62b28fdf 100644 --- a/libsrc/meshing/topology.hpp +++ b/libsrc/meshing/topology.hpp @@ -105,7 +105,8 @@ public: [[deprecated("use GetEdges (ElementIndex) -> FlatArray")]] void GetElementEdges (int elnr, NgArray & edges) const; [[deprecated("use GetFaces (ElementIndex) -> FlatArray")]] - void GetElementFaces (int elnr, NgArray & faces, bool withorientation = false) const; + void GetElementFaces (int elnr, NgArray & faces) const; + void GetElementFaces (int elnr, NgArray & faces, bool withorientation) const; // definition in meshclass.hpp inline FlatArray GetEdges (ElementIndex elnr) const; @@ -134,7 +135,6 @@ public: // [[deprecated("use GetElementEdge instead")]] int GetSegmentEdgeOrientation (int elnr) const; // old style - DLL_HEADER void GetFaceVertices (int fnr, NgArray & vertices) const; DLL_HEADER void GetFaceVertices (int fnr, int * vertices) const; [[deprecated("use GetEdgeVertices -> tupe(v0,v1) instead")]] diff --git a/libsrc/occ/occ_edge.cpp b/libsrc/occ/occ_edge.cpp index a3a2b06e..0c907d78 100644 --- a/libsrc/occ/occ_edge.cpp +++ b/libsrc/occ/occ_edge.cpp @@ -1,7 +1,12 @@ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include +#pragma clang diagnostic pop + #include "occ_edge.hpp" #include "occgeom.hpp" diff --git a/libsrc/occ/occ_edge.hpp b/libsrc/occ/occ_edge.hpp index 1770e56a..52629f84 100644 --- a/libsrc/occ/occ_edge.hpp +++ b/libsrc/occ/occ_edge.hpp @@ -1,6 +1,10 @@ #ifndef FILE_OCC_EDGE_INCLUDED #define FILE_OCC_EDGE_INCLUDED + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include @@ -8,6 +12,8 @@ #include #include +#pragma clang diagnostic pop + #include "occ_vertex.hpp" #include "meshing.hpp" diff --git a/libsrc/occ/occ_face.cpp b/libsrc/occ/occ_face.cpp index a092a3a0..4ef4437c 100644 --- a/libsrc/occ/occ_face.cpp +++ b/libsrc/occ/occ_face.cpp @@ -1,8 +1,13 @@ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include #include +#pragma clang diagnostic pop + #include "occ_edge.hpp" #include "occ_face.hpp" #include "occgeom.hpp" diff --git a/libsrc/occ/occ_face.hpp b/libsrc/occ/occ_face.hpp index 43e66bb6..7ecefbe4 100644 --- a/libsrc/occ/occ_face.hpp +++ b/libsrc/occ/occ_face.hpp @@ -1,11 +1,16 @@ #ifndef FILE_OCC_FACE_INCLUDED #define FILE_OCC_FACE_INCLUDED +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include #include +#pragma clang diagnostic pop + #include "occ_vertex.hpp" #include "meshing.hpp" diff --git a/libsrc/occ/occ_utils.hpp b/libsrc/occ/occ_utils.hpp index 2f55d405..e3c1c24b 100644 --- a/libsrc/occ/occ_utils.hpp +++ b/libsrc/occ/occ_utils.hpp @@ -3,6 +3,9 @@ #include +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include @@ -14,6 +17,8 @@ #include #include +#pragma clang diagnostic pop + #include "meshing.hpp" #if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 diff --git a/libsrc/occ/occ_vertex.hpp b/libsrc/occ/occ_vertex.hpp index 9ec3a4e7..63d9d181 100644 --- a/libsrc/occ/occ_vertex.hpp +++ b/libsrc/occ/occ_vertex.hpp @@ -1,9 +1,14 @@ #ifndef FILE_OCC_VERTEX_INCLUDED #define FILE_OCC_VERTEX_INCLUDED +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include +#pragma clang diagnostic pop + #include "meshing.hpp" #include "occ_utils.hpp" diff --git a/libsrc/occ/occmeshsurf.cpp b/libsrc/occ/occmeshsurf.cpp index a4eaff83..0e707e94 100644 --- a/libsrc/occ/occmeshsurf.cpp +++ b/libsrc/occ/occmeshsurf.cpp @@ -5,9 +5,14 @@ #include #include "occgeom.hpp" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include +#pragma clang diagnostic pop + #include "occmeshsurf.hpp" namespace netgen diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 45a5098f..d03581e5 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -10,6 +10,9 @@ #include "occgeom.hpp" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include @@ -74,6 +77,8 @@ #include #include +#pragma clang diagnostic pop + using namespace netgen; void ExtractEdgeData( const TopoDS_Edge & edge, int index, std::vector * p, Box<3> & box )