From d52ccb521833aea58711c7dc276ad60cd6638bbe Mon Sep 17 00:00:00 2001 From: "LEGOLAS\\lenz" <lenz@irmb.tu-bs.de> Date: Wed, 4 Dec 2019 17:01:32 +0100 Subject: [PATCH] adds some clarifications in CMake template --- CMakeLists.txt | 29 ++++++++++++++++------------- targets/apps/LBM/TGV_3D/TGV_3D.cpp | 28 ++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa70f6569..53b7eab63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ include(${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/general/FileUtilities.cmake) ### PROJECT SETTINGS ### ############################################################# -project(VirtualFluidsGpuCodes) +project(VirtualFluidsGPU) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -76,13 +76,14 @@ ENDIF(MSVC) ############################################################# ### OPTIONS ### ############################################################# -option(BUILD_SHARED_LIBS "Build shared libraries" ON ) -option(HULC.BUILD_VF_GPU "Build VirtualFluids GPU" ON ) -option(HULC.BUILD_VF_GKS "Build VirtualFluids GKS" OFF ) -option(HULC.BUILD_JSONCPP "Builds json cpp " ON ) -option(HULC.BUILD_NUMERIC_TESTS "Build numeric tests" ON ) +option(BUILD_SHARED_LIBS "Build shared libraries" ON ) +option(VF.BUILD_VF_GPU "Build VirtualFluids GPU" ON ) +option(VF.BUILD_VF_GKS "Build VirtualFluids GKS" OFF) +option(VF.BUILD_VF_TRAFFIC "Build VirtualFluids Traffic" OFF) +option(VF.BUILD_JSONCPP "Builds json cpp " OFF) +option(VF.BUILD_NUMERIC_TESTS "Build numeric tests" OFF) -option(VF_DOUBLE_ACCURACY "Build shared libraries" OFF ) +option(VF.BUILD_DOUBLE_ACCURACY "Use double accuracy" OFF ) ############################################################# @@ -124,7 +125,7 @@ add_subdirectory(targets/libs/GridGenerator) ### Virtual Fluids GPU ### ############################################################# -IF (HULC.BUILD_VF_GPU) +IF (VF.BUILD_VF_GPU) add_subdirectory(targets/libs/VirtualFluids_GPU) #add_subdirectory(targets/apps/LBM/lbmTest) @@ -143,7 +144,7 @@ ENDIF() ### Virtual Fluids GKS ### ############################################################# -IF (HULC.BUILD_VF_GKS) +IF (VF.BUILD_VF_GKS) add_subdirectory(targets/libs/GksMeshAdapter) add_subdirectory(targets/libs/GksVtkAdapter) @@ -192,7 +193,7 @@ ENDIF() ############################################################# ### JSONCPP ### ############################################################# -IF (NOT HULC.BUILD_JSONCPP) +IF (NOT VF.BUILD_JSONCPP) MESSAGE( STATUS "Build Input Project without JsonCpp." ) ELSE() add_subdirectory(3rdParty/jsoncpp) @@ -203,7 +204,7 @@ ENDIF() ### Numeric Tests ### ############################################################# -if(HULC.BUILD_NUMERIC_TESTS) +if(VF.BUILD_NUMERIC_TESTS) add_subdirectory(3rdParty/fftw/fftw-3.3.7) add_subdirectory(3rdParty/googletest) add_subdirectory(targets/tests/NumericalTests) @@ -214,6 +215,8 @@ endif() ### Annas Traffic Sim ### ############################################################# -add_subdirectory(targets/libs/Traffic) +if(VF.BUILD_VF_TRAFFIC) + add_subdirectory(targets/libs/Traffic) -add_subdirectory(targets/apps/LBM/TrafficTest) \ No newline at end of file + add_subdirectory(targets/apps/LBM/TrafficTest) +endif() \ No newline at end of file diff --git a/targets/apps/LBM/TGV_3D/TGV_3D.cpp b/targets/apps/LBM/TGV_3D/TGV_3D.cpp index 6481947a1..5e87c4958 100644 --- a/targets/apps/LBM/TGV_3D/TGV_3D.cpp +++ b/targets/apps/LBM/TGV_3D/TGV_3D.cpp @@ -97,7 +97,7 @@ std::string kernel( "CumulantK17Comp" ); std::string path("F:/Work/Computations/out/TaylorGreen3DNew/"); //LEGOLAS //std::string path("E:/DrivenCavity/results/"); //TESLA03 -std::string simulationName("TaylorGreen3D"); +std::string simulationName("TGV_3D"); ////////////////////////////////////////////////////////////////////////// void multipleLevel(const std::string& configPath) @@ -176,14 +176,30 @@ void multipleLevel(const std::string& configPath) // para->setOutputPrefix(_prefix.str()); // para->setFName(_path.str() + "/" + _prefix.str()); - std::stringstream _path; + ////////////////////////////////////////////////////////////////////////// + + { + std::stringstream _path; - _path << path; - _path << kernel; + _path << path; + _path << kernel; - if( useLimiter ) _path << "_Limiter"; + if (useLimiter) _path << "_Limiter"; - path = _path.str(); + path = _path.str(); + } + + ////////////////////////////////////////////////////////////////////////// + + { + std::stringstream _simulationName; + + _simulationName << simulationName; + _simulationName << "_nx_" << nx; + _simulationName << "_dtPerL_" << dtPerL << "_"; + + simulationName = _simulationName.str(); + } ////////////////////////////////////////////////////////////////////////// -- GitLab