From ee4ac09c871b1a2ac539ef917ebf2fb9297242da Mon Sep 17 00:00:00 2001 From: vcloarec Date: Wed, 26 Jun 2024 17:06:11 -0400 Subject: [PATCH] Isolate gmsh --- CMakeLists.txt | 3 ++- Tests/core/reos_mesh_test.cpp | 2 +- src/core/CMakeLists.txt | 8 +++++--- src/core/hydraulicNetwork/reoshydraulicstructure2d.cpp | 2 +- src/core/hydraulicNetwork/reoshydraulicstructure2d.h | 2 +- src/core/mesh/reosmeshgenerator.cpp | 2 +- .../structure2d/reosgmshresolutioncontrollerwidget.h | 4 ++-- src/gui/mesh/reosmeshgeneratorgui.cpp | 2 +- src/gui/reosmainwindow.cpp | 6 +++--- 9 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c571896e1..c016ffae8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ IF(ENABLE_HEC_DSS) ENDIF(MSVC) ENDIF(ENABLE_HEC_DSS) -SET(WITH_HYDRAULIC_MODEL_SUPPORT TRUE CACHE BOOL "Enable TELEMAC Model support") +SET(WITH_HYDRAULIC_MODEL_SUPPORT TRUE CACHE BOOL "Enable Hydraulic Model support") IF(WITH_HYDRAULIC_MODEL_SUPPORT) add_definitions(-DWITH_GMSH) SET(GMSH_INCLUDE_DIR CACHE PATH "Path to the include dir of gmsh") @@ -232,6 +232,7 @@ endif() IF (ENABLE_TESTS) set(COMEPHORE_TESTS_ENABLE FALSE CACHE BOOL "Enable tests for Comephore gridded rainfall, some specific files are necessary.") + set(ERA5_TESTS_ENABLE FALSE CACHE BOOL "Enable tests for ERA5 gridded data, some specific files are necessary.") set(METEOFRANCEAPI_TESTS_ENABLE FALSE CACHE BOOL "Enable tests for Meteo France, a file containing a API key is necessary") set(INTERN_PYTHON_TESTS_ENABLE FALSE CACHE BOOL "Enable tests related calling python from Reos") diff --git a/Tests/core/reos_mesh_test.cpp b/Tests/core/reos_mesh_test.cpp index e01a2dd37..35b68818c 100644 --- a/Tests/core/reos_mesh_test.cpp +++ b/Tests/core/reos_mesh_test.cpp @@ -19,7 +19,7 @@ email : vcloarec at gmail dot com #include "reosmesh.h" #include "reosmeshgenerator.h" #include "reospolylinesstructure.h" -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" #include "reos_testutils.h" #include "reosparameter.h" diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c317942ec..679e99f42 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -107,7 +107,8 @@ SET(REOS_CORE_SOURCES IF(WITH_HYDRAULIC_MODEL_SUPPORT) SET(REOS_CORE_SOURCES - mesh/gmesh/reosgmshgenerator.cpp + ${REOS_CORE_SOURCES} + mesh/gmsh/reosgmshgenerator.cpp ) ENDIF(WITH_HYDRAULIC_MODEL_SUPPORT) @@ -206,7 +207,8 @@ SET(REOS_CORE_HEADERS IF(WITH_HYDRAULIC_MODEL_SUPPORT) SET(REOS_CORE_HEADERS - mesh/gmesh/reosgmshgenerator.h + ${REOS_CORE_HEADERS} + mesh/gmsh/reosgmshgenerator.h ) ENDIF(WITH_HYDRAULIC_MODEL_SUPPORT) @@ -353,7 +355,7 @@ IF(WITH_HYDRAULIC_MODEL_SUPPORT) ${GMSH_INCLUDE_DIR} ) TARGET_INCLUDE_DIRECTORIES( reosCore PUBLIC - ${CMAKE_SOURCE_DIR}/src/core/gmesh + ${CMAKE_SOURCE_DIR}/src/core/gmsh ) ENDIF(WITH_HYDRAULIC_MODEL_SUPPORT) diff --git a/src/core/hydraulicNetwork/reoshydraulicstructure2d.cpp b/src/core/hydraulicNetwork/reoshydraulicstructure2d.cpp index 0e753620a..f42b1a4f6 100644 --- a/src/core/hydraulicNetwork/reoshydraulicstructure2d.cpp +++ b/src/core/hydraulicNetwork/reoshydraulicstructure2d.cpp @@ -17,7 +17,7 @@ #include "reosmeshgenerator.h" #include "reospolygonstructure.h" #ifdef WITH_GMSH -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" #endif //WITH_GMSH #include "reostopographycollection.h" #include "reoshydraulicsimulation.h" diff --git a/src/core/hydraulicNetwork/reoshydraulicstructure2d.h b/src/core/hydraulicNetwork/reoshydraulicstructure2d.h index cc21b8a6f..a2e831e40 100644 --- a/src/core/hydraulicNetwork/reoshydraulicstructure2d.h +++ b/src/core/hydraulicNetwork/reoshydraulicstructure2d.h @@ -22,7 +22,7 @@ #include "reospolylinesstructure.h" #include "reoshydraulicsimulation.h" #ifdef WITH_GMSH -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" #endif //WITH GMSH #include "reosmeshgenerator.h" #include "reosmesh.h" diff --git a/src/core/mesh/reosmeshgenerator.cpp b/src/core/mesh/reosmeshgenerator.cpp index b390e29ba..55ccad576 100644 --- a/src/core/mesh/reosmeshgenerator.cpp +++ b/src/core/mesh/reosmeshgenerator.cpp @@ -24,7 +24,7 @@ #include "reospolylinesstructure.h" #include "reospolygonstructure.h" #ifdef WITH_GMSH -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" #endif //WITH_GMSH ReosMeshGeneratorProcess *ReosMeshGeneratorPoly2Tri::getGenerateMeshProcess( ReosPolylinesStructure *structure, diff --git a/src/gui/hydraulicNetwork/structure2d/reosgmshresolutioncontrollerwidget.h b/src/gui/hydraulicNetwork/structure2d/reosgmshresolutioncontrollerwidget.h index bf23df4a9..e3156b7ca 100644 --- a/src/gui/hydraulicNetwork/structure2d/reosgmshresolutioncontrollerwidget.h +++ b/src/gui/hydraulicNetwork/structure2d/reosgmshresolutioncontrollerwidget.h @@ -18,7 +18,7 @@ #include -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" #include "reosmapitem.h" class ReosMapToolEditPolygonStructure; @@ -40,7 +40,7 @@ class ReosGmshResolutionControllerWidget : public QWidget explicit ReosGmshResolutionControllerWidget( ReosHydraulicStructure2D *structure2D, const ReosGuiContext &guiContext ); ~ReosGmshResolutionControllerWidget(); - void addToolBarActions(const QList &actions ); + void addToolBarActions( const QList &actions ); public slots: void updateParameters(); diff --git a/src/gui/mesh/reosmeshgeneratorgui.cpp b/src/gui/mesh/reosmeshgeneratorgui.cpp index 79a2e7237..04144b053 100644 --- a/src/gui/mesh/reosmeshgeneratorgui.cpp +++ b/src/gui/mesh/reosmeshgeneratorgui.cpp @@ -17,7 +17,7 @@ #include #include -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" ReosFormWidget *ReosFormGmshGeneratorWidgetFactory::createDataWidget( ReosDataObject *dataObject, const ReosGuiContext &context ) { diff --git a/src/gui/reosmainwindow.cpp b/src/gui/reosmainwindow.cpp index 1e590d844..269757c3f 100644 --- a/src/gui/reosmainwindow.cpp +++ b/src/gui/reosmainwindow.cpp @@ -35,7 +35,7 @@ email : vcloarec at gmail dot com #include "reosgisengine.h" #include "reosplotwidget.h" #include "reosstyleregistery.h" -#include "reosgmshgenerator.h" +#include "gmsh/reosgmshgenerator.h" ReosMainWindow::ReosMainWindow( ReosModule *rootModule, QWidget *parent ) @@ -298,12 +298,12 @@ void ReosMainWindow::languageSelection() void ReosMainWindow::newVersionAvailable() { - new ReosVersionMessageBox( this, version(), false ); + new ReosVersionMessageBox( this, version(), false ); } ReosModule *ReosMainWindow::rootModule() const { - return mRootModule; + return mRootModule; } ReosModule *ReosMainWindow::guiRootModule() const