From c5d052040843148d97e586fb4ed9233f838b2e45 Mon Sep 17 00:00:00 2001 From: Martin Falk Date: Wed, 28 Jun 2023 15:51:59 +0200 Subject: [PATCH 1/3] Visual Studio fix Marching Tetrahedra * ULONG_LONG_MAX is not part of the C/C++ standard --- core/base/marchingTetrahedra/MarchingTetrahedra.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/base/marchingTetrahedra/MarchingTetrahedra.h b/core/base/marchingTetrahedra/MarchingTetrahedra.h index 2cc95a2c39..1a8515482c 100644 --- a/core/base/marchingTetrahedra/MarchingTetrahedra.h +++ b/core/base/marchingTetrahedra/MarchingTetrahedra.h @@ -31,6 +31,7 @@ #include #include +#include #include @@ -49,7 +50,7 @@ namespace ttk { constexpr unsigned long long int getHash(const unsigned long long int a, const unsigned long long int b) { return (a * b + (a * a) + (b * b) + (a * a * a) * (b * b * b)) - % ULONG_LONG_MAX; + % ULLONG_MAX; } /** From 611fdca2aa7ee071df43c1b7d2731228ded55e9d Mon Sep 17 00:00:00 2001 From: Martin Falk Date: Wed, 28 Jun 2023 15:52:32 +0200 Subject: [PATCH 2/3] Visual Studio macro nesting fix --- core/vtk/ttkIntegralLines/ttkIntegralLines.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp b/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp index 8f4b0e4907..a876994e50 100644 --- a/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp +++ b/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp @@ -425,14 +425,19 @@ int ttkIntegralLines::RequestData(vtkInformation *ttkNotUsed(request), #endif #endif // make the vtk trajectories +#ifdef TTK_ENABLE_MPI + ttkTemplateMacro( + triangulation->getType(), + (getTrajectories( + domain, static_cast(triangulation->getData()), integralLines, + globalVertexId, globalCellId, output))); +#else ttkTemplateMacro( triangulation->getType(), (getTrajectories( domain, static_cast(triangulation->getData()), integralLines, -#ifdef TTK_ENABLE_MPI - globalVertexId, globalCellId, -#endif output))); +#endif return (int)(status == 0); } From fe9067b3a38788c9da6171aeaf3b17180f87b361 Mon Sep 17 00:00:00 2001 From: Martin Falk Date: Wed, 28 Jun 2023 16:04:30 +0200 Subject: [PATCH 3/3] clang-format --- .../marchingTetrahedra/MarchingTetrahedra.h | 2 +- core/vtk/ttkIntegralLines/ttkIntegralLines.cpp | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/base/marchingTetrahedra/MarchingTetrahedra.h b/core/base/marchingTetrahedra/MarchingTetrahedra.h index 1a8515482c..b8451bd511 100644 --- a/core/base/marchingTetrahedra/MarchingTetrahedra.h +++ b/core/base/marchingTetrahedra/MarchingTetrahedra.h @@ -29,9 +29,9 @@ // base code includes #include +#include #include #include -#include #include diff --git a/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp b/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp index a876994e50..9bc1cbf7c9 100644 --- a/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp +++ b/core/vtk/ttkIntegralLines/ttkIntegralLines.cpp @@ -426,17 +426,15 @@ int ttkIntegralLines::RequestData(vtkInformation *ttkNotUsed(request), #endif // make the vtk trajectories #ifdef TTK_ENABLE_MPI - ttkTemplateMacro( - triangulation->getType(), - (getTrajectories( - domain, static_cast(triangulation->getData()), integralLines, - globalVertexId, globalCellId, output))); + ttkTemplateMacro(triangulation->getType(), + (getTrajectories( + domain, static_cast(triangulation->getData()), + integralLines, globalVertexId, globalCellId, output))); #else - ttkTemplateMacro( - triangulation->getType(), - (getTrajectories( - domain, static_cast(triangulation->getData()), integralLines, - output))); + ttkTemplateMacro(triangulation->getType(), + (getTrajectories( + domain, static_cast(triangulation->getData()), + integralLines, output))); #endif return (int)(status == 0);