From 0df91284bf6957d9b590227a4279e1498370e3b4 Mon Sep 17 00:00:00 2001 From: Bryn Lloyd Date: Fri, 23 May 2025 08:48:47 +0200 Subject: [PATCH] small fixes to build with VS 2022 --- .gitignore | 1 + CMakeLists.txt | 8 ++++---- libsrc/core/bitarray.hpp | 2 +- libsrc/core/utils.cpp | 4 ++-- nglib/mynglib.cpp | 8 ++------ nglib/nglib.cpp | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 6eb7a9e4..c2d9b522 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ __pycache__ *.zip .cache *.patch +.vscode/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c54e30e..5a4ab6de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,12 +25,12 @@ option( USE_GEOM2D "build 2d geometry kernels" ON) option( USE_JPEG "enable snapshots using library libjpeg" OFF ) option( USE_MPEG "enable video recording with FFmpeg, uses libavcodec" OFF ) option( USE_CGNS "enable CGNS file read/write support" OFF ) -option( USE_NUMA "compile with NUMA-aware code") -option( INTEL_MIC "cross compile for intel xeon phi") +option( USE_NUMA "compile with NUMA-aware code" OFF) +option( INTEL_MIC "cross compile for intel xeon phi" OFF) option( INSTALL_PROFILES "install environment variable settings to /etc/profile.d" OFF ) -option( USE_CCACHE "use ccache") +option( USE_CCACHE "use ccache" OFF) option( USE_INTERNAL_TCL "Compile tcl files into the code and don't install them" ON) -option( ENABLE_UNIT_TESTS "Enable Catch unit tests") +option( ENABLE_UNIT_TESTS "Enable Catch unit tests" OFF) option( ENABLE_CPP_CORE_GUIDELINES_CHECK "Enable cpp core guideline checks on ngcore" OFF) option( DEBUG_LOG "Enable more debug output (may increase computation time) - only works with USE_SPDLOG=ON" OFF) option( CHECK_RANGE "Check array range access, automatically enabled if built in debug mode" OFF) diff --git a/libsrc/core/bitarray.hpp b/libsrc/core/bitarray.hpp index caa8345c..73029a9d 100644 --- a/libsrc/core/bitarray.hpp +++ b/libsrc/core/bitarray.hpp @@ -226,7 +226,7 @@ private: bool operator[] (IndexType i) const { return Test(i); } T_Range Range() const { return { IndexBASE(), IndexBASE()+Size() }; } - NGCORE_API TBitArray & Or (const TBitArray & ba2) + inline TBitArray & Or (const TBitArray & ba2) { BitArray::Or(ba2); return *this; diff --git a/libsrc/core/utils.cpp b/libsrc/core/utils.cpp index 8a792ea9..aed4fd4e 100644 --- a/libsrc/core/utils.cpp +++ b/libsrc/core/utils.cpp @@ -52,8 +52,8 @@ namespace ngcore */ std::string CleanupDemangledName( std::string s ) { - for(const auto & [r, sub] : demangle_regexes) - s = std::regex_replace (s,r,sub); + // for(const auto & [r, sub] : demangle_regexes) + // s = std::regex_replace (s,r,sub); #ifdef EMSCRIPTEN // for some reason regex_replace is not working at all std::string temp = s; diff --git a/nglib/mynglib.cpp b/nglib/mynglib.cpp index 1bac1329..9b722378 100644 --- a/nglib/mynglib.cpp +++ b/nglib/mynglib.cpp @@ -17,7 +17,6 @@ #include #include #include -#include <../visualization/soldata.hpp> #ifdef OCCGEOMETRY #include @@ -31,9 +30,7 @@ namespace netgen { shared_ptr & mesh, MeshingParameters & mp); - extern void Optimize2d (Mesh & mesh, - MeshingParameters & mp); - + extern void Optimize2d(Mesh & mesh, MeshingParameters & mp, int faceindex=0); // Global meshing parameters !! //MeshingParameters mparam; } @@ -615,8 +612,7 @@ namespace nglib } - DLL_HEADER Ng_Result Ng_OptimizeMesh_2D (Ng_Mesh *mesh, - Ng_Meshing_Parameters * mp) + DLL_HEADER Ng_Result Ng_OptimizeMesh_2D (Ng_Mesh *mesh, Ng_Meshing_Parameters * mp) { Mesh * m = (Mesh*)mesh; diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp index e5bf7057..3d1e7852 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -25,7 +25,7 @@ namespace netgen { extern void MeshFromSpline2D (SplineGeometry2d & geometry, shared_ptr & mesh, MeshingParameters & mp); - extern void Optimize2d(Mesh & mesh, MeshingParameters & mp); + extern void Optimize2d(Mesh & mesh, MeshingParameters & mp, int faceindex=0); extern MeshingParameters mparam; DLL_HEADER extern STLParameters stlparam; }