From f0e30a57cad5c752e5099101b465bb4367aa86db Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Tue, 9 Mar 2021 15:34:00 +0100 Subject: [PATCH] Update README and cleanup a few files. --- CMake/cmake_config_files/LISE.config.cmake | 3 - README.md | 8 +- ansible/playbook_cppcheck.yml | 10 - ansible/playbook_gcov.yml | 10 - .../Core/Input/ConfigData/ConfigDataImp.cpp | 106 +----- .../Core/Input/ConfigData/ConfigDataImp.h | 322 +++++++++--------- src/basics/basics/utilities/UbLogger.h | 4 +- src/basics/geometry3d/GbPolygon3D.cpp | 3 + 8 files changed, 182 insertions(+), 284 deletions(-) delete mode 100644 ansible/playbook_cppcheck.yml delete mode 100644 ansible/playbook_gcov.yml diff --git a/CMake/cmake_config_files/LISE.config.cmake b/CMake/cmake_config_files/LISE.config.cmake index 42f10b7dd..705f02c62 100644 --- a/CMake/cmake_config_files/LISE.config.cmake +++ b/CMake/cmake_config_files/LISE.config.cmake @@ -1,6 +1,3 @@ -LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -D__unix__) -LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -D__UNIX__) - ################################################################################# # METIS ################################################################################# diff --git a/README.md b/README.md index 615e4d758..dcd9c19d6 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ VirtualFluids has been used on a variety of platforms: - Cygwin ### Software Requirements - - [CMake](https://cmake.org/) (minimum version 3.13) - - C++ compiler with C++11 support, for example gcc 6.3 or Visual C++ 14.0 + - [CMake](https://cmake.org/) (minimum version 3.15) + - C++ compiler with C++14 support - [Paraview](https://www.paraview.org/) (most recent version) with usage of the GPU: @@ -62,9 +62,7 @@ The doxygen generated documentation can be found [here](https://git.irmb.bau.tu- ## Known Issues -If CMake does not find CUDA_CUT_INCLUDE_DIR use and set the correct CUDA Pathes in gpu.cmake in the base directory in lines 35, 36. - -If you notice any problems on your platform, please report an gitea issue. +If you notice any problems on your platform, please report an issue. ## Authors diff --git a/ansible/playbook_cppcheck.yml b/ansible/playbook_cppcheck.yml deleted file mode 100644 index 942f84245..000000000 --- a/ansible/playbook_cppcheck.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: gitlab_ci_deploy_cppcheck - tasks: - - name: Create remote cppcheck dir - command: mkdir ~/cppcheck - ignore_errors: yes - - - name: Synchronize cppcheck with remote - synchronize: - src: "../html_report" - dest: "~/cppcheck" diff --git a/ansible/playbook_gcov.yml b/ansible/playbook_gcov.yml deleted file mode 100644 index 45e53b9cd..000000000 --- a/ansible/playbook_gcov.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: gitlab_ci_deploy_gcov - tasks: - - name: Create remote gcov dir - command: mkdir ~/gcov - ignore_errors: yes - - - name: Synchronize gcov with remote - synchronize: - src: "../coverage" - dest: "~/gcov" diff --git a/src/basics/Core/Input/ConfigData/ConfigDataImp.cpp b/src/basics/Core/Input/ConfigData/ConfigDataImp.cpp index 7e0e09361..0c53b3282 100644 --- a/src/basics/Core/Input/ConfigData/ConfigDataImp.cpp +++ b/src/basics/Core/Input/ConfigData/ConfigDataImp.cpp @@ -5,86 +5,6 @@ std::shared_ptr<ConfigDataImp> ConfigDataImp::getNewInstance() return std::shared_ptr<ConfigDataImp>(new ConfigDataImp()); } -ConfigDataImp::ConfigDataImp() -{ - this->isViscosity = false; - this->isNumberOfDevices = false; - this->isDevices = false; - this->isOutputPath = false; - this->isPrefix = false; - this->isGridPath = false; - this->isPrintOutputFiles = false; - this->isGeometryValues = false; - this->isCalc2ndOrderMoments = false; - this->isCalc3rdOrderMoments = false; - this->isCalcHighOrderMoments = false; - this->isReadGeo = false; - this->isCalcMedian = false; - this->isCalcDragLift = false; - this->isCalcCp = false; - this->isConcFile = false; - this->isUseMeasurePoints = false; - this->isUseWale = false; - this->isSimulatePorousMedia = false; - this->isD3Qxx = false; - this->isTEnd = false; - this->isTOut = false; - this->isTStartOut = false; - this->isTimeCalcMedStart = false; - this->isTimeCalcMedEnd = false; - this->isPressInID = false; - this->isPressOutID = false; - this->isPressInZ = false; - this->isPressOutZ = false; - this->isDiffOn = false; - this->isDiffMod = false; - this->isDiffusivity = false; - this->isTemperatureInit = false; - this->isTemperatureBC = false; - this->isVelocity = false; - this->isViscosityRatio = false; - this->isVelocityRatio = false; - this->isDensityRatio = false; - this->isPressRatio = false; - this->isRealX = false; - this->isRealY = false; - this->isFactorPressBC = false; - this->isGeometryFileC = false; - this->isGeometryFileM = false; - this->isGeometryFileF = false; - this->isClockCycleForMP = false; - this->isTimestepForMP = false; - this->isForcingX = false; - this->isForcingY = false; - this->isForcingZ = false; - this->isCalcParticles = false; - this->isParticleBasicLevel = false; - this->isParticleInitLevel = false; - this->isNumberOfParticles = false; - this->isNeighborWSB = false; - this->isStartXHotWall = false; - this->isEndXHotWall = false; - this->isPossNeighborFilesX = false; - this->isPossNeighborFilesY = false; - this->isPossNeighborFilesZ = false; - this->isTimeDoCheckPoint = false; - this->isTimeDoRestart = false; - this->isDoCheckPoint = false; - this->isDoRestart = false; - this->isMaxLevel = false; - this->isGridX = false; - this->isGridY = false; - this->isGridZ = false; - this->isDistX = false; - this->isDistY = false; - this->isDistZ = false; - this->isNeedInterface = false; - this->isMainKernel = false; - this->isMultiKernelOn = false; - this->isMultiKernelLevel = false; - this->isMultiKernelName = false; -} - real ConfigDataImp::getViscosity() { return this->viscosity; } uint ConfigDataImp::getNumberOfDevices() { return this->numberOfDevices; } @@ -633,19 +553,19 @@ void ConfigDataImp::setEndXHotWall(real endXHotWall) this->isEndXHotWall = true; } -void ConfigDataImp::setPossNeighborFilesX(std::vector<std::string> possNeighborFilesX) +void ConfigDataImp::setPossNeighborFilesX(const std::vector<std::string> &possNeighborFilesX) { this->possNeighborFilesX = possNeighborFilesX; this->isPossNeighborFilesX = true; } -void ConfigDataImp::setPossNeighborFilesY(std::vector<std::string> possNeighborFilesY) +void ConfigDataImp::setPossNeighborFilesY(const std::vector<std::string> &possNeighborFilesY) { this->possNeighborFilesY = possNeighborFilesY; this->isPossNeighborFilesY = true; } -void ConfigDataImp::setPossNeighborFilesZ(std::vector<std::string> possNeighborFilesZ) +void ConfigDataImp::setPossNeighborFilesZ(const std::vector<std::string> &possNeighborFilesZ) { this->possNeighborFilesZ = possNeighborFilesZ; this->isPossNeighborFilesZ = true; @@ -681,49 +601,49 @@ void ConfigDataImp::setMaxLevel(uint maxLevel) this->isMaxLevel = true; } -void ConfigDataImp::setGridX(std::vector<int> gridX) +void ConfigDataImp::setGridX(const std::vector<int> &gridX) { this->gridX = gridX; this->isGridX = true; } -void ConfigDataImp::setGridY(std::vector<int> gridY) +void ConfigDataImp::setGridY(const std::vector<int> &gridY) { this->gridY = gridY; this->isGridY = true; } -void ConfigDataImp::setGridZ(std::vector<int> gridZ) +void ConfigDataImp::setGridZ(const std::vector<int> &gridZ) { this->gridZ = gridZ; this->isGridZ = true; } -void ConfigDataImp::setDistX(std::vector<int> distX) +void ConfigDataImp::setDistX(const std::vector<int> &distX) { this->distX = distX; this->isDistX = true; } -void ConfigDataImp::setDistY(std::vector<int> distY) +void ConfigDataImp::setDistY(const std::vector<int> &distY) { this->distY = distY; this->isDistY = true; } -void ConfigDataImp::setDistZ(std::vector<int> distZ) +void ConfigDataImp::setDistZ(const std::vector<int> &distZ) { this->distZ = distZ; this->isDistZ = true; } -void ConfigDataImp::setNeedInterface(std::vector<bool> needInterface) +void ConfigDataImp::setNeedInterface(const std::vector<bool> &needInterface) { this->needInterface = needInterface; this->isNeedInterface = true; } -void ConfigDataImp::setMainKernel(std::string mainKernel) +void ConfigDataImp::setMainKernel(const std::string &mainKernel) { this->mainKernel = mainKernel; this->isMainKernel = true; @@ -735,13 +655,13 @@ void ConfigDataImp::setMultiKernelOn(bool multiKernelOn) this->isMultiKernelOn = true; } -void ConfigDataImp::setMultiKernelLevel(std::vector<int> multiKernelLevel) +void ConfigDataImp::setMultiKernelLevel(const std::vector<int> &multiKernelLevel) { this->multiKernelLevel = multiKernelLevel; this->isMultiKernelLevel = true; } -void ConfigDataImp::setMultiKernelName(std::vector<std::string> multiKernelName) +void ConfigDataImp::setMultiKernelName(const std::vector<std::string> &multiKernelName) { this->multiKernelName = multiKernelName; this->isMultiKernelName = true; diff --git a/src/basics/Core/Input/ConfigData/ConfigDataImp.h b/src/basics/Core/Input/ConfigData/ConfigDataImp.h index 34a2a95b9..511ac4be1 100644 --- a/src/basics/Core/Input/ConfigData/ConfigDataImp.h +++ b/src/basics/Core/Input/ConfigData/ConfigDataImp.h @@ -161,9 +161,9 @@ public: void setNumberOfParticles(int numberOfParticles); void setStartXHotWall(real startXHotWall); void setEndXHotWall(real endXHotWall); - void setPossNeighborFilesX(std::vector<std::string> possNeighborFilesX); - void setPossNeighborFilesY(std::vector<std::string> possNeighborFilesY); - void setPossNeighborFilesZ(std::vector<std::string> possNeighborFilesZ); + void setPossNeighborFilesX(const std::vector<std::string> &possNeighborFilesX); + void setPossNeighborFilesY(const std::vector<std::string> &possNeighborFilesY); + void setPossNeighborFilesZ(const std::vector<std::string> &possNeighborFilesZ); // void setPossNeighborFilesX(std::vector<std::string> possNeighborFilesX); // void setPossNeighborFilesY(std::vector<std::string> possNeighborFilesY); // void setPossNeighborFilesZ(std::vector<std::string> possNeighborFilesZ); @@ -172,17 +172,17 @@ public: void setDoCheckPoint(bool doCheckPoint); void setDoRestart(bool doRestart); void setMaxLevel(uint maxLevel); - void setGridX(std::vector<int> gridX); - void setGridY(std::vector<int> gridY); - void setGridZ(std::vector<int> gridZ); - void setDistX(std::vector<int> distX); - void setDistY(std::vector<int> distY); - void setDistZ(std::vector<int> distZ); - void setNeedInterface(std::vector<bool> needInterface); - void setMainKernel(std::string mainKernel); + void setGridX(const std::vector<int> &gridX); + void setGridY(const std::vector<int> &gridY); + void setGridZ(const std::vector<int> &gridZ); + void setDistX(const std::vector<int> &distX); + void setDistY(const std::vector<int> &distY); + void setDistZ(const std::vector<int> &distZ); + void setNeedInterface(const std::vector<bool> &needInterface); + void setMainKernel(const std::string &mainKernel); void setMultiKernelOn(bool multiKernelOn); - void setMultiKernelLevel(std::vector<int> multiKernelLevel); - void setMultiKernelName(std::vector<std::string> multiKernelName); + void setMultiKernelLevel(const std::vector<int> &multiKernelLevel); + void setMultiKernelName(const std::vector<std::string> &multiKernelName); bool isViscosityInConfigFile() override; bool isNumberOfDevicesInConfigFile() override; @@ -270,83 +270,83 @@ public: bool isMultiKernelNameInConfigFile() override; private: - ConfigDataImp(); + ConfigDataImp() = default; - real viscosity; - uint numberOfDevices; + real viscosity { 0. }; + uint numberOfDevices { 0 }; std::vector<uint> devices; std::string outputPath; std::string prefix; std::string gridPath; - bool printOutputFiles; - bool geometryValues; - bool calc2ndOrderMoments; - bool calc3rdOrderMoments; - bool calcHighOrderMoments; - bool readGeo; - bool calcMedian; - bool calcDragLift; - bool calcCp; - bool writeVeloASCIIfiles; - bool calcPlaneConc; - bool concFile; - bool streetVelocityFile; - bool useMeasurePoints; - bool useWale; - bool useInitNeq; - bool simulatePorousMedia; - uint d3Qxx; - uint tEnd; - uint tOut; - uint tStartOut; - uint timeCalcMedStart; - uint timeCalcMedEnd; - uint pressInID; - uint pressOutID; - uint pressInZ; - uint pressOutZ; - bool diffOn; - uint diffMod; - real diffusivity; - real temperatureInit; - real temperatureBC; - // real viscosity; - real velocity; - real viscosityRatio; - real velocityRatio; - real densityRatio; - real pressRatio; - real realX; - real realY; - real factorPressBC; + bool printOutputFiles { false }; + bool geometryValues { false }; + bool calc2ndOrderMoments { false }; + bool calc3rdOrderMoments { false }; + bool calcHighOrderMoments { false }; + bool readGeo { false }; + bool calcMedian { false }; + bool calcDragLift { false }; + bool calcCp { false }; + bool writeVeloASCIIfiles { false }; + bool calcPlaneConc { false }; + bool concFile { false }; + bool streetVelocityFile { false }; + bool useMeasurePoints { false }; + bool useWale { false }; + bool useInitNeq { false }; + bool simulatePorousMedia { false }; + uint d3Qxx { 0 }; + uint tEnd { 0 }; + uint tOut { 0 }; + uint tStartOut { 0 }; + uint timeCalcMedStart { 0 }; + uint timeCalcMedEnd { 0 }; + uint pressInID { 0 }; + uint pressOutID { 0 }; + uint pressInZ { 0 }; + uint pressOutZ { 0 }; + bool diffOn { false }; + uint diffMod { 0 }; + real diffusivity { 0. }; + real temperatureInit { 0. }; + real temperatureBC { 0. }; + // real viscosity { 0 }; + real velocity { 0. }; + real viscosityRatio { 0. }; + real velocityRatio { 0. }; + real densityRatio { 0. }; + real pressRatio { 0. }; + real realX { 0. }; + real realY { 0. }; + real factorPressBC { 0. }; std::string geometryFileC; std::string geometryFileM; std::string geometryFileF; - uint clockCycleForMP; - uint timestepForMP; - real forcingX; - real forcingY; - real forcingZ; - real quadricLimiterP; - real quadricLimiterM; - real quadricLimiterD; - bool calcParticles; - int particleBasicLevel; - int particleInitLevel; - int numberOfParticles; - real startXHotWall; - real endXHotWall; + uint clockCycleForMP { 0 }; + uint timestepForMP { 0 }; + real forcingX { 0. }; + real forcingY { 0. }; + real forcingZ { 0. }; + real quadricLimiterP { 0. }; + real quadricLimiterM { 0. }; + real quadricLimiterD { 0. }; + bool calcParticles { false }; + int particleBasicLevel { 0 }; + int particleInitLevel { 0 }; + int numberOfParticles { 0 }; + real startXHotWall { 0. }; + real endXHotWall { 0. }; std::vector<std::string> possNeighborFilesX; std::vector<std::string> possNeighborFilesY; std::vector<std::string> possNeighborFilesZ; // std::vector<std::string> possNeighborFilesX; // std::vector<std::string> possNeighborFilesY; // std::vector<std::string> possNeighborFilesZ; - int timeDoCheckPoint; - int timeDoRestart; - bool doCheckPoint; - bool doRestart; - int maxLevel; + int timeDoCheckPoint { 0 }; + int timeDoRestart { 0 }; + bool doCheckPoint{ false }; + bool doRestart{ false }; + int maxLevel { 0 }; std::vector<int> gridX; std::vector<int> gridY; std::vector<int> gridZ; @@ -355,93 +355,93 @@ private: std::vector<int> distZ; std::vector<bool> needInterface; std::string mainKernel; - bool multiKernelOn; + bool multiKernelOn{ false }; std::vector<int> multiKernelLevel; std::vector<std::string> multiKernelName; - bool isViscosity; - bool isNumberOfDevices; - bool isDevices; - bool isOutputPath; - bool isPrefix; - bool isGridPath; - bool isPrintOutputFiles; - bool isGeometryValues; - bool isCalc2ndOrderMoments; - bool isCalc3rdOrderMoments; - bool isCalcHighOrderMoments; - bool isReadGeo; - bool isCalcMedian; - bool isCalcDragLift; - bool isCalcCp; - bool isWriteVeloASCII; - bool isCalcPlaneConc; - bool isConcFile; - bool isStreetVelocityFile; - bool isUseMeasurePoints; - bool isUseWale; - bool isUseInitNeq; - bool isSimulatePorousMedia; - bool isD3Qxx; - bool isTEnd; - bool isTOut; - bool isTStartOut; - bool isTimeCalcMedStart; - bool isTimeCalcMedEnd; - bool isPressInID; - bool isPressOutID; - bool isPressInZ; - bool isPressOutZ; - bool isDiffOn; - bool isDiffMod; - bool isDiffusivity; - bool isTemperatureInit; - bool isTemperatureBC; - // bool isViscosity; - bool isVelocity; - bool isViscosityRatio; - bool isVelocityRatio; - bool isDensityRatio; - bool isPressRatio; - bool isRealX; - bool isRealY; - bool isFactorPressBC; - bool isGeometryFileC; - bool isGeometryFileM; - bool isGeometryFileF; - bool isClockCycleForMP; - bool isTimestepForMP; - bool isForcingX; - bool isForcingY; - bool isForcingZ; - bool isQuadricLimiterP; - bool isQuadricLimiterM; - bool isQuadricLimiterD; - bool isCalcParticles; - bool isParticleBasicLevel; - bool isParticleInitLevel; - bool isNumberOfParticles; - bool isNeighborWSB; - bool isStartXHotWall; - bool isEndXHotWall; - bool isPossNeighborFilesX; - bool isPossNeighborFilesY; - bool isPossNeighborFilesZ; - bool isTimeDoCheckPoint; - bool isTimeDoRestart; - bool isDoCheckPoint; - bool isDoRestart; - bool isMaxLevel; - bool isGridX; - bool isGridY; - bool isGridZ; - bool isDistX; - bool isDistY; - bool isDistZ; - bool isNeedInterface; - bool isMainKernel; - bool isMultiKernelOn; - bool isMultiKernelLevel; - bool isMultiKernelName; + bool isViscosity { false }; + bool isNumberOfDevices {false}; + bool isDevices { false }; + bool isOutputPath { false }; + bool isPrefix { false }; + bool isGridPath { false }; + bool isPrintOutputFiles { false }; + bool isGeometryValues { false }; + bool isCalc2ndOrderMoments { false }; + bool isCalc3rdOrderMoments { false }; + bool isCalcHighOrderMoments { false }; + bool isReadGeo { false }; + bool isCalcMedian { false }; + bool isCalcDragLift { false }; + bool isCalcCp { false }; + bool isWriteVeloASCII { false }; + bool isCalcPlaneConc { false }; + bool isConcFile { false }; + bool isStreetVelocityFile { false }; + bool isUseMeasurePoints { false }; + bool isUseWale { false }; + bool isUseInitNeq { false }; + bool isSimulatePorousMedia { false }; + bool isD3Qxx { false }; + bool isTEnd { false }; + bool isTOut { false }; + bool isTStartOut { false }; + bool isTimeCalcMedStart { false }; + bool isTimeCalcMedEnd { false }; + bool isPressInID { false }; + bool isPressOutID { false }; + bool isPressInZ { false }; + bool isPressOutZ { false }; + bool isDiffOn { false }; + bool isDiffMod { false }; + bool isDiffusivity { false }; + bool isTemperatureInit { false }; + bool isTemperatureBC { false }; + // bool isViscosity { false }; + bool isVelocity { false }; + bool isViscosityRatio { false }; + bool isVelocityRatio { false }; + bool isDensityRatio { false }; + bool isPressRatio { false }; + bool isRealX { false }; + bool isRealY { false }; + bool isFactorPressBC { false }; + bool isGeometryFileC { false }; + bool isGeometryFileM { false }; + bool isGeometryFileF { false }; + bool isClockCycleForMP { false }; + bool isTimestepForMP { false }; + bool isForcingX { false }; + bool isForcingY { false }; + bool isForcingZ { false }; + bool isQuadricLimiterP { false }; + bool isQuadricLimiterM { false }; + bool isQuadricLimiterD { false }; + bool isCalcParticles { false }; + bool isParticleBasicLevel { false }; + bool isParticleInitLevel { false }; + bool isNumberOfParticles { false }; + bool isNeighborWSB { false }; + bool isStartXHotWall { false }; + bool isEndXHotWall { false }; + bool isPossNeighborFilesX { false }; + bool isPossNeighborFilesY { false }; + bool isPossNeighborFilesZ { false }; + bool isTimeDoCheckPoint { false }; + bool isTimeDoRestart { false }; + bool isDoCheckPoint { false }; + bool isDoRestart { false }; + bool isMaxLevel { false }; + bool isGridX { false }; + bool isGridY { false }; + bool isGridZ { false }; + bool isDistX { false }; + bool isDistY { false }; + bool isDistZ { false }; + bool isNeedInterface { false }; + bool isMainKernel { false }; + bool isMultiKernelOn { false }; + bool isMultiKernelLevel { false }; + bool isMultiKernelName { false }; }; #endif diff --git a/src/basics/basics/utilities/UbLogger.h b/src/basics/basics/utilities/UbLogger.h index fc2b11871..c0eb6bf24 100644 --- a/src/basics/basics/utilities/UbLogger.h +++ b/src/basics/basics/utilities/UbLogger.h @@ -217,8 +217,8 @@ inline std::string UbLogger<OutputPolicy>::logTimeString() } char result[100] = { 0 }; - static DWORD first = GetTickCount(); - std::sprintf(result, "%s.%03ld", buffer, (long)(GetTickCount() - first) % 1000); + static DWORD first = GetTickCount64(); + std::sprintf(result, "%s.%03ld", buffer, (long)(GetTickCount64() - first) % 1000); return result; } #else diff --git a/src/basics/geometry3d/GbPolygon3D.cpp b/src/basics/geometry3d/GbPolygon3D.cpp index 02138f757..7905576ed 100644 --- a/src/basics/geometry3d/GbPolygon3D.cpp +++ b/src/basics/geometry3d/GbPolygon3D.cpp @@ -46,10 +46,13 @@ void GbPolygon3D::init() { x1s = 0.0; x2s = 0.0; + x3s = 0.0; x1min = 0.0; x1max = 0.0; x2min = 0.0; x2max = 0.0; + x3min = 0.0; + x3max = 0.0; // points = NULL; consistent = false; ps = NULL; -- GitLab