diff --git a/Python/actuator_line/actuator_line.py b/Python/actuator_line/actuator_line.py index e28947cc49025b2793ddf0608280816d30e60a1b..d0589f402456e8ffe8320ce7f780738aef22fbe4 100644 --- a/Python/actuator_line/actuator_line.py +++ b/Python/actuator_line/actuator_line.py @@ -46,10 +46,7 @@ output_path.mkdir(exist_ok=True) #%% logger.Logger.initialize_logger() -basics.logger.Logger.add_stdout() -basics.logger.Logger.set_debug_level(basics.logger.Level.INFO_LOW) -basics.logger.Logger.time_stamp(basics.logger.TimeStamp.ENABLE) -basics.logger.Logger.enable_printed_rank_numbers(True) + #%% grid_factory = gpu.grid_generator.GridFactory.make() grid_builder = gpu.grid_generator.MultipleGridBuilder.make_shared(grid_factory) diff --git a/Python/boundary_layer/boundary_layer.py b/Python/boundary_layer/boundary_layer.py index 38c1b2256277d69fb45697a7a2c3658a2a735b85..25b3cd895f8a3a80f9fd6438e00d3e924fc13779 100644 --- a/Python/boundary_layer/boundary_layer.py +++ b/Python/boundary_layer/boundary_layer.py @@ -46,10 +46,7 @@ output_path.mkdir(exist_ok=True) #%% logger.Logger.initialize_logger() -basics.logger.Logger.add_stdout() -basics.logger.Logger.set_debug_level(basics.logger.Level.INFO_LOW) -basics.logger.Logger.time_stamp(basics.logger.TimeStamp.ENABLE) -basics.logger.Logger.enable_printed_rank_numbers(True) + #%% grid_factory = gpu.grid_generator.GridFactory.make() grid_builder = gpu.grid_generator.MultipleGridBuilder.make_shared(grid_factory) diff --git a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp index f6b152890771379675c8147d613554d8776441fd..94755358f680503e19e0e204946ae51016d39802 100644 --- a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp +++ b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp @@ -42,12 +42,12 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "PointerDefinitions.h" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" + -#include "Core/VectorTypes.h" #include <basics/config/ConfigurationFile.h> @@ -107,12 +107,6 @@ std::string simulationName("ActuatorLine"); void multipleLevel(const std::string& configPath) { - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); auto gridFactory = GridFactory::make(); diff --git a/apps/gpu/LBM/Basel/main.cpp b/apps/gpu/LBM/Basel/main.cpp index c541d010e11d2fd8ba817b91fdcdab833a046066..4999d3418b269ae4340ca550a5f2c50fc6e45231 100644 --- a/apps/gpu/LBM/Basel/main.cpp +++ b/apps/gpu/LBM/Basel/main.cpp @@ -14,9 +14,9 @@ #define _USE_MATH_DEFINES #include <math.h> -#include "Core/Input/Input.h" -#include "Core/StringUtilities/StringUtil.h" -#include "Core/Input/ConfigFileReader/ConfigFileReader.h" +#include "Input/Input.h" +#include "StringUtilities/StringUtil.h" +#include "Input/ConfigFileReader/ConfigFileReader.h" #include "VirtualFluids_GPU/LBM/Simulation.h" #include "VirtualFluids_GPU/Communication/Communicator.h" @@ -60,17 +60,6 @@ void multipleLevel(const std::string& configPath) { - //std::ofstream logFile( "F:/Work/Computations/gridGenerator/grid/gridGeneratorLog.txt" ); - //std::ofstream logFile("F:/Basel2019/log/gridGeneratorLog.txt"); - //logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - - //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); - auto gridFactory = GridFactory::make(); gridFactory->setGridStrategy(Device::CPU); //gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::RAYCASTING); @@ -229,7 +218,6 @@ int main(int argc, char* argv[]) } catch (const std::exception& e) { - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) @@ -249,22 +237,17 @@ int main(int argc, char* argv[]) } catch (const std::exception& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::bad_alloc e) { - - *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/LBM/BaselMultiGPU/main.cpp b/apps/gpu/LBM/BaselMultiGPU/main.cpp index a18b663ea707672dca6c411da443bc5ef847ff2b..bfd64d42b428907e08c3a3b7fdb99319e0f05382 100644 --- a/apps/gpu/LBM/BaselMultiGPU/main.cpp +++ b/apps/gpu/LBM/BaselMultiGPU/main.cpp @@ -14,9 +14,9 @@ #define _USE_MATH_DEFINES #include <math.h> -#include "Core/Input/Input.h" -#include "Core/StringUtilities/StringUtil.h" -#include "Core/Input/ConfigFileReader/ConfigFileReader.h" +#include "Input/Input.h" +#include "StringUtilities/StringUtil.h" +#include "Input/ConfigFileReader/ConfigFileReader.h" #include "VirtualFluids_GPU/LBM/Simulation.h" #include "VirtualFluids_GPU/Communication/Communicator.h" @@ -57,14 +57,6 @@ void multipleLevel(const std::string& configPath) { - //std::ofstream logFile( "F:/Work/Computations/gridGenerator/grid/gridGeneratorLog.txt" ); - //std::ofstream logFile( "grid/gridGeneratorLog.txt" ); - //logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); @@ -95,8 +87,6 @@ void multipleLevel(const std::string& configPath) logFile2.open(gridpath + std::to_string(generatePart) + "/gridGeneratorLog.txt");//Phoenix //logFile2.open(std::string("M:/Basel2019/grids4/") + std::to_string(generatePart) + "/gridGeneratorLog.txt");//Baumbart - logging::Logger::addStream(&logFile2); - bool useGridGenerator = false; if(useGridGenerator){ @@ -249,7 +239,6 @@ int main( int argc, char* argv[]) } catch (const std::exception& e) { - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) @@ -268,22 +257,17 @@ int main( int argc, char* argv[]) } catch (const std::exception& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::bad_alloc e) { - - *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/LBM/BaselNU/main.cpp b/apps/gpu/LBM/BaselNU/main.cpp index 69013d15722e5d1b261efbb48631478bea3266c8..9600785063018ce140606ef66b1ea466dc4bdb40 100644 --- a/apps/gpu/LBM/BaselNU/main.cpp +++ b/apps/gpu/LBM/BaselNU/main.cpp @@ -14,9 +14,9 @@ #define _USE_MATH_DEFINES #include <math.h> -#include "Core/Input/Input.h" -#include "Core/StringUtilities/StringUtil.h" -#include "Core/Input/ConfigFileReader/ConfigFileReader.h" +#include "Input/Input.h" +#include "StringUtilities/StringUtil.h" +#include "Input/ConfigFileReader/ConfigFileReader.h" #include "VirtualFluids_GPU/LBM/Simulation.h" #include "VirtualFluids_GPU/Communication/Communicator.h" @@ -57,16 +57,6 @@ void multipleLevel(const std::string& configPath) { - std::ofstream logFile("F:/Basel2019NU/grid/gridGeneratorLog.txt"); - logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - - //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); - auto gridFactory = GridFactory::make(); gridFactory->setGridStrategy(Device::CPU); //gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::RAYCASTING); @@ -222,7 +212,6 @@ int main(int argc, char* argv[]) } catch (const std::exception& e) { - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) @@ -242,22 +231,17 @@ int main(int argc, char* argv[]) } catch (const std::exception& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::bad_alloc e) { - - *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp b/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp index dacb4e2f82a002c67b81d44dd6da84e07ccacd0b..298c5d9c344a1873a2612a518f72f33f7d6b6f64 100644 --- a/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp +++ b/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp @@ -43,12 +43,10 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "PointerDefinitions.h" -#include "Core/StringUtilities/StringUtil.h" - -#include "Core/VectorTypes.h" +#include "StringUtilities/StringUtil.h" #include <basics/config/ConfigurationFile.h> #include "basics/constants/NumericConstants.h" @@ -105,12 +103,6 @@ using namespace vf::basics::constant; void multipleLevel(const std::string& configPath) { - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - auto gridFactory = GridFactory::make(); auto gridBuilder = MultipleGridBuilder::makeShared(gridFactory); diff --git a/apps/gpu/LBM/ChannelFlow/ChannelFlow.cpp b/apps/gpu/LBM/ChannelFlow/ChannelFlow.cpp index 80e1040525ad65ea6ac4a17f356ccc9bf1e07e9f..f553c255b882596ea4614e8e2fa33403e3d9a0f8 100644 --- a/apps/gpu/LBM/ChannelFlow/ChannelFlow.cpp +++ b/apps/gpu/LBM/ChannelFlow/ChannelFlow.cpp @@ -45,12 +45,11 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" -#include "Core/Logger/Logger.h" -#include "Core/VectorTypes.h" +#include "DataTypes.h" + #include "PointerDefinitions.h" #include "config/ConfigurationFile.h" -#include "logger/Logger.h" +#include <logger/Logger.h> ////////////////////////////////////////////////////////////////////////// @@ -109,14 +108,6 @@ int main(int argc, char *argv[]) // setup logger ////////////////////////////////////////////////////////////////////////// - std::ofstream logFile("output/log_process" + std::to_string(vf::gpu::Communicator::getInstance().getPID()) + - ".txt"); - logging::Logger::addStream(&logFile); - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::logging::Logger::changeLogPath("output/vflog_process" + std::to_string(vf::gpu::Communicator::getInstance().getPID()) + ".txt"); vf::logging::Logger::initializeLogger(); diff --git a/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp b/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp index ae0e359914989b88e51b088d7c88167ea77f36d8..a802de12c032766f9bf14d2a43b4d16078e230f6 100644 --- a/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp +++ b/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp @@ -41,9 +41,7 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" -#include "Core/Logger/Logger.h" -#include "Core/VectorTypes.h" +#include "DataTypes.h" #include "PointerDefinitions.h" #include <logger/Logger.h> @@ -91,15 +89,6 @@ int main() const uint timeStepOut = 1000; const uint timeStepEnd = 10000; - ////////////////////////////////////////////////////////////////////////// - // setup logger - ////////////////////////////////////////////////////////////////////////// - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - ////////////////////////////////////////////////////////////////////////// // setup gridGenerator ////////////////////////////////////////////////////////////////////////// diff --git a/apps/gpu/LBM/DrivenCavityMultiGPU/DrivenCavityMultiGPU.cpp b/apps/gpu/LBM/DrivenCavityMultiGPU/DrivenCavityMultiGPU.cpp index 7cf64f029873cb4f5a14c95b840ddbe73e76c2ce..4883cbcaae1bf6556d07f94ea87e7201aaad9feb 100755 --- a/apps/gpu/LBM/DrivenCavityMultiGPU/DrivenCavityMultiGPU.cpp +++ b/apps/gpu/LBM/DrivenCavityMultiGPU/DrivenCavityMultiGPU.cpp @@ -12,14 +12,12 @@ ////////////////////////////////////////////////////////////////////////// -#include "basics/Core/DataTypes.h" -#include "basics/Core/VectorTypes.h" +#include "basics/DataTypes.h" #include "basics/PointerDefinitions.h" -#include "basics/Core/Logger/Logger.h" -#include "basics/Core/StringUtilities/StringUtil.h" +#include "basics/StringUtilities/StringUtil.h" #include "basics/config/ConfigurationFile.h" -#include "logger/Logger.h" +#include <logger/Logger.h> ////////////////////////////////////////////////////////////////////////// @@ -64,11 +62,6 @@ void multipleLevel(std::filesystem::path& configPath) { - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); auto gridFactory = GridFactory::make(); diff --git a/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp b/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp index c72de49997439e3b8273757266bb15fc7c2acb08..dfa1256c80e6aeb0e209638ba0c7425ff437e2d5 100644 --- a/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp +++ b/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp @@ -41,9 +41,9 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" -#include "Core/Logger/Logger.h" -#include "Core/VectorTypes.h" +#include "DataTypes.h" +#include <logger/Logger.h> + #include "PointerDefinitions.h" #include <logger/Logger.h> @@ -91,15 +91,6 @@ int main() const uint timeStepOut = 1000; const uint timeStepEnd = 10000; - ////////////////////////////////////////////////////////////////////////// - // setup logger - ////////////////////////////////////////////////////////////////////////// - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - ////////////////////////////////////////////////////////////////////////// // setup gridGenerator ////////////////////////////////////////////////////////////////////////// diff --git a/apps/gpu/LBM/MusselOyster/MusselOyster.cpp b/apps/gpu/LBM/MusselOyster/MusselOyster.cpp index 40ecc2ef1869b3dd04e1b113cb326147877ccc96..48fa21471bbc5f4a6592dba6d4b874bc9ff5fac7 100644 --- a/apps/gpu/LBM/MusselOyster/MusselOyster.cpp +++ b/apps/gpu/LBM/MusselOyster/MusselOyster.cpp @@ -13,14 +13,12 @@ ////////////////////////////////////////////////////////////////////////// -#include "basics/Core/DataTypes.h" -#include "basics/Core/VectorTypes.h" +#include "basics/DataTypes.h" #include "basics/PointerDefinitions.h" -#include "basics/Core/Logger/Logger.h" -#include "basics/Core/StringUtilities/StringUtil.h" +#include "basics/StringUtilities/StringUtil.h" #include "basics/config/ConfigurationFile.h" -#include "logger/Logger.h" +#include <logger/Logger.h> ////////////////////////////////////////////////////////////////////////// @@ -88,11 +86,6 @@ const std::string simulationName("MusselOyster"); void multipleLevel(std::filesystem::path &configPath) { - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator &communicator = vf::gpu::Communicator::getInstance(); auto gridFactory = GridFactory::make(); diff --git a/apps/gpu/LBM/SphereGPU/Sphere.cpp b/apps/gpu/LBM/SphereGPU/Sphere.cpp index 29cf169d424d56f9a42967a4d299c20cc1dbd97c..f8010be8dc2eb52072b69d12b50161e019bd2e0a 100644 --- a/apps/gpu/LBM/SphereGPU/Sphere.cpp +++ b/apps/gpu/LBM/SphereGPU/Sphere.cpp @@ -42,12 +42,10 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" -#include "Core/Logger/Logger.h" -#include "Core/VectorTypes.h" +#include "DataTypes.h" +#include <logger/Logger.h> #include "PointerDefinitions.h" #include "config/ConfigurationFile.h" -#include "logger/Logger.h" ////////////////////////////////////////////////////////////////////////// @@ -94,15 +92,6 @@ int main(int argc, char *argv[]) const uint timeStepOut = 1000; const uint timeStepEnd = 10000; - ////////////////////////////////////////////////////////////////////////// - // setup logger - ////////////////////////////////////////////////////////////////////////// - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - ////////////////////////////////////////////////////////////////////////// // setup simulation parameters (with or without config file) ////////////////////////////////////////////////////////////////////////// diff --git a/apps/gpu/LBM/SphereScaling/SphereScaling.cpp b/apps/gpu/LBM/SphereScaling/SphereScaling.cpp index 8994453e5b0bf6fc38b7f1f293e582fe07ee3168..d67ea9175b2637b3fef6414fda91f44acd7ac8ea 100755 --- a/apps/gpu/LBM/SphereScaling/SphereScaling.cpp +++ b/apps/gpu/LBM/SphereScaling/SphereScaling.cpp @@ -13,14 +13,12 @@ ////////////////////////////////////////////////////////////////////////// -#include "basics/Core/DataTypes.h" -#include "basics/Core/VectorTypes.h" +#include "basics/DataTypes.h" #include "basics/PointerDefinitions.h" -#include "basics/Core/Logger/Logger.h" -#include "basics/Core/StringUtilities/StringUtil.h" +#include "basics/StringUtilities/StringUtil.h" #include "basics/config/ConfigurationFile.h" -#include "logger/Logger.h" +#include <logger/Logger.h> ////////////////////////////////////////////////////////////////////////// @@ -67,11 +65,6 @@ void multipleLevel(std::filesystem::path& configPath) { - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); auto gridFactory = GridFactory::make(); diff --git a/apps/gpu/LBM/TGV_3D/TGV_3D.cpp b/apps/gpu/LBM/TGV_3D/TGV_3D.cpp index f7964f38272b23fa460eaac1ad6c5c5e743e0573..050efc6d0f0f2b80ca2da2df26cdb71b1e52f3ad 100644 --- a/apps/gpu/LBM/TGV_3D/TGV_3D.cpp +++ b/apps/gpu/LBM/TGV_3D/TGV_3D.cpp @@ -45,9 +45,9 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" -#include "Core/Logger/Logger.h" -#include "Core/VectorTypes.h" +#include "DataTypes.h" +#include <logger/Logger.h> + #include "PointerDefinitions.h" ////////////////////////////////////////////////////////////////////////// @@ -77,7 +77,6 @@ #include "VirtualFluids_GPU/Output/FileWriter.h" #include "VirtualFluids_GPU/Parameter/Parameter.h" -#include <logger/Logger.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -133,15 +132,6 @@ std::string simulationName("TGV_3D"); void multipleLevel(const std::string& configPath) { - //std::ofstream logFile( "F:/Work/Computations/gridGenerator/grid/gridGeneratorLog.txt" ); - //std::ofstream logFile( "grid/gridGeneratorLog.txt" ); - //logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); @@ -170,9 +160,8 @@ void multipleLevel(const std::string& configPath) const real viscosity = nx / ( 2.0 * PI ) * velocity / Re; - *logging::out << logging::Logger::INFO_HIGH << "velocity = " << velocity << " s\n"; - - *logging::out << logging::Logger::INFO_HIGH << "viscosity = " << viscosity << "\n"; + VF_LOG_INFO("velocity = {}", velocity); + VF_LOG_INFO("viscosity = {}", viscosity); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -342,22 +331,17 @@ int main( int argc, char* argv[]) } catch (const std::bad_alloc& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::exception& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } //std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/LBM/TGV_3D_GridRef/TGV_3D_GridRef.cpp b/apps/gpu/LBM/TGV_3D_GridRef/TGV_3D_GridRef.cpp index c8d8f166d51a7a601ddb6e7c8f68fcd2385abc50..0f945e32d9fbcb2e18d4888a4fa0a2c6e03c21b4 100644 --- a/apps/gpu/LBM/TGV_3D_GridRef/TGV_3D_GridRef.cpp +++ b/apps/gpu/LBM/TGV_3D_GridRef/TGV_3D_GridRef.cpp @@ -45,9 +45,9 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" -#include "Core/Logger/Logger.h" -#include "Core/VectorTypes.h" +#include "DataTypes.h" +#include <logger/Logger.h> + #include "PointerDefinitions.h" ////////////////////////////////////////////////////////////////////////// @@ -78,8 +78,6 @@ #include "VirtualFluids_GPU/Output/FileWriter.h" #include "VirtualFluids_GPU/Parameter/Parameter.h" -#include <logger/Logger.h> - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -133,11 +131,6 @@ std::string simulationName("TGV_3D_Gridref_noSqPress"); void multipleLevel(const std::string& configPath) { - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); auto gridFactory = GridFactory::make(); @@ -352,22 +345,17 @@ int main( int argc, char* argv[]) } catch (const std::bad_alloc& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << "Bad alloc: " << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::exception& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } //std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/LBM/TGV_3D_MultiGPU/TGV_3D_MultiGPU.cpp b/apps/gpu/LBM/TGV_3D_MultiGPU/TGV_3D_MultiGPU.cpp index c36fc0cb30b2767aa52e3870d1293f6a459ee63a..0c7b9b9606201b32a8376ea637858eb14ec817bb 100644 --- a/apps/gpu/LBM/TGV_3D_MultiGPU/TGV_3D_MultiGPU.cpp +++ b/apps/gpu/LBM/TGV_3D_MultiGPU/TGV_3D_MultiGPU.cpp @@ -50,7 +50,7 @@ //#include "metis.h" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "basics/config/ConfigurationFile.h" #include "VirtualFluids_GPU/LBM/Simulation.h" @@ -156,17 +156,6 @@ void multipleLevel(const std::string& configPath) rankY = ( mpirank % ( sideLengthX * sideLengthY ) ) / sideLengthX; rankZ = mpirank / ( sideLengthY * sideLengthX ); - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - logging::Logger::addStream(&std::cout); - - std::ofstream logFile( path + simulationName + "_rank_" + std::to_string(mpirank) + ".log" ); - logging::Logger::addStream(&logFile); - - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); diff --git a/apps/gpu/LBM/WTG_RUB/WTG_RUB.cpp b/apps/gpu/LBM/WTG_RUB/WTG_RUB.cpp index 25baf638d0e17e57f79a86cbbc64bf8829e21613..d925eef7e7f452e19b63284f9ad3a6af25740e79 100644 --- a/apps/gpu/LBM/WTG_RUB/WTG_RUB.cpp +++ b/apps/gpu/LBM/WTG_RUB/WTG_RUB.cpp @@ -45,10 +45,10 @@ ////////////////////////////////////////////////////////////////////////// -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "PointerDefinitions.h" -#include "Core/VectorTypes.h" -#include "Core/Logger/Logger.h" + +#include <logger/Logger.h> ////////////////////////////////////////////////////////////////////////// @@ -77,7 +77,6 @@ #include "VirtualFluids_GPU/GPU/CudaMemoryManager.h" #include "VirtualFluids_GPU/Factories/BoundaryConditionFactory.h" -#include <logger/Logger.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -130,11 +129,6 @@ std::string chooseVariation(); void multipleLevel(const std::string& configPath) { - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - vf::gpu::Communicator& communicator = vf::gpu::Communicator::getInstance(); auto gridFactory = GridFactory::make(); @@ -233,8 +227,8 @@ void multipleLevel(const std::string& configPath) //const real vx = velocityLB / (real)sqrt(2.0); // LB units //const real vy = velocityLB / (real)sqrt(2.0); // LB units - *logging::out << logging::Logger::INFO_HIGH << "velocity [dx/dt] = " << velocityLB << " \n"; - *logging::out << logging::Logger::INFO_HIGH << "viscosity [dx^2/dt] = " << viscosityLB << "\n"; + VF_LOG_INFO("velocityLB [dx/dt] = " << velocityLB); + VF_LOG_INFO("viscosityLB [dx^2/dt] = " << viscosityLB); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp b/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp index 4552d49970f46c1c5a13f8575d9d0fed644aa259..93ff9de0f0a156d9d9aec0ec1b6615ae728e7811 100644 --- a/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp +++ b/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp @@ -14,7 +14,7 @@ #define _USE_MATH_DEFINES #include <math.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "basics/config/ConfigurationFile.h" #include "VirtualFluids_GPU/LBM/Simulation.h" @@ -58,17 +58,6 @@ void multipleLevel(const std::string& configPath) { - std::ofstream logFile( "F:/Work/Computations/out/Sphere/gridGeneratorLog.txt" ); - //std::ofstream logFile( "grid/gridGeneratorLog.txt" ); - logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - - //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); - auto gridFactory = GridFactory::make(); //gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::RAYCASTING); gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::POINT_IN_OBJECT); @@ -672,7 +661,6 @@ void multipleLevel(const std::string& configPath) logFile2.open( "F:/Work/Computations/gridGenerator/grid/1/gridGeneratorLog.txt" ); //logFile2.open( "grid/1/gridGeneratorLog.txt" ); - logging::Logger::addStream(&logFile2); auto triangularMesh = std::make_shared<TriangularMesh>("F:/Work/Computations/gridGenerator/stl/Sphere/SphereNotOptimal.stl"); //auto triangularMesh = std::make_shared<TriangularMesh>("stl/ShpereNotOptimal.lnx.stl"); @@ -820,18 +808,17 @@ int main( int argc, char* argv[]) } catch (const std::bad_alloc& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; + std::cout << "Bad alloc: " << e.what() << std::flush; } catch (const std::exception& e) { - - *logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n"; + std::cout << e.what() << std::flush; } catch (...) { - *logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n"; + std::cout << "unknown exeption" << std::endl; } + } MPI_Finalize(); diff --git a/apps/gpu/LBM/lbmTest/main.cpp b/apps/gpu/LBM/lbmTest/main.cpp index 01b1543b18b4342ae1b0a379576477e8c49834b3..abe8e7488a55c773896ef6cb362db2bb8247fa4e 100644 --- a/apps/gpu/LBM/lbmTest/main.cpp +++ b/apps/gpu/LBM/lbmTest/main.cpp @@ -16,8 +16,8 @@ #include "metis.h" -#include "Core/Input/Input.h" -#include "Core/StringUtilities/StringUtil.h" +#include "Input/Input.h" +#include "StringUtilities/StringUtil.h" #include "VirtualFluids_GPU/LBM/Simulation.h" #include "VirtualFluids_GPU/Communication/Communicator.h" @@ -262,17 +262,6 @@ void setParameters(std::shared_ptr<Parameter> para, std::unique_ptr<input::Input void multipleLevel(const std::string& configPath) { - //std::ofstream logFile( "F:/Work/Computations/gridGenerator/grid/gridGeneratorLog.txt" ); - std::ofstream logFile( "grid/gridGeneratorLog.txt" ); - logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - - //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); - auto gridFactory = GridFactory::make(); gridFactory->setGridStrategy(Device::CPU); //gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::RAYCASTING); @@ -632,8 +621,6 @@ void multipleLevel(const std::string& configPath) logFile2.open( "F:/Work/Computations/gridGenerator/grid/1/gridGeneratorLog.txt" ); //logFile2.open( "grid/1/gridGeneratorLog.txt" ); - logging::Logger::addStream(&logFile2); - real dx = 1.0 / 40.0; real vx = 0.05; @@ -774,7 +761,6 @@ int main( int argc, char* argv[]) } catch (const std::exception& e) { - *logging::out << logging::Logger::ERROR << e.what() << "\n"; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) @@ -791,22 +777,17 @@ int main( int argc, char* argv[]) } catch (const std::exception& e) { - - *logging::out << logging::Logger::ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::bad_alloc e) { - - *logging::out << logging::Logger::ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/LBM/metisTest/main.cpp b/apps/gpu/LBM/metisTest/main.cpp index 7c94a6781177e1d6ca247d5fc2ae1690ac583e00..b9879c16c32afd0ec27c5841a0b2dad7e4191055 100644 --- a/apps/gpu/LBM/metisTest/main.cpp +++ b/apps/gpu/LBM/metisTest/main.cpp @@ -15,8 +15,8 @@ #include "metis.h" -#include "Core/Input/Input.h" -#include "Core/StringUtilities/StringUtil.h" +#include "Input/Input.h" +#include "StringUtilities/StringUtil.h" #include "VirtualFluids_GPU/LBM/Simulation.h" #include "VirtualFluids_GPU/Communication/Communicator.h" @@ -262,17 +262,6 @@ void setParameters(std::shared_ptr<Parameter> para, std::unique_ptr<input::Input void multipleLevel(const std::string& configPath) { - //std::ofstream logFile( "F:/Work/Computations/gridGenerator/grid/gridGeneratorLog.txt" ); - std::ofstream logFile( "grid/gridGeneratorLog.txt" ); - logging::Logger::addStream(&logFile); - - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); - - //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); - auto gridFactory = GridFactory::make(); gridFactory->setGridStrategy(Device::CPU); //gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::RAYCASTING); @@ -783,7 +772,6 @@ int main( int argc, char* argv[]) } catch (const std::exception& e) { - *logging::out << logging::Logger::ERROR << e.what() << "\n"; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) @@ -799,22 +787,17 @@ int main( int argc, char* argv[]) } catch (const std::exception& e) { - - *logging::out << logging::Logger::ERROR << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (const std::bad_alloc e) { - - *logging::out << logging::Logger::ERROR << "Bad Alloc:" << e.what() << "\n"; - //std::cout << e.what() << std::flush; + std::cout << e.what() << std::flush; //MPI_Abort(MPI_COMM_WORLD, -1); } catch (...) { - *logging::out << logging::Logger::ERROR << "Unknown exception!\n"; - //std::cout << "unknown exeption" << std::endl; + std::cout << "unknown exeption" << std::endl; } std::cout << "\nConfiguration file must be set!: lbmgm <config file>" << std::endl << std::flush; diff --git a/apps/gpu/tests/NumericalTestPostProcessing/Utilities/LogFileReader/LogFileReader.cpp b/apps/gpu/tests/NumericalTestPostProcessing/Utilities/LogFileReader/LogFileReader.cpp index 5a469b44ab21c9a0fc3850baf9f1a82c1f3a0314..580aab90988215ef010de23b47946158e69fb88e 100644 --- a/apps/gpu/tests/NumericalTestPostProcessing/Utilities/LogFileReader/LogFileReader.cpp +++ b/apps/gpu/tests/NumericalTestPostProcessing/Utilities/LogFileReader/LogFileReader.cpp @@ -12,7 +12,7 @@ #include "Utilities/LogFileData/LogFileDataImp.h" #include <basics/config/ConfigurationFile.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "Utilities/AlmostEquals.h" diff --git a/apps/gpu/tests/NumericalTestPostProcessing/Utilities/PostProcessingConfigFileReader/PostProcessingConfigFileReaderImp.cpp b/apps/gpu/tests/NumericalTestPostProcessing/Utilities/PostProcessingConfigFileReader/PostProcessingConfigFileReaderImp.cpp index 7bff82d2118e449ea19a1cfd56ff261b730ff0d4..6c52eeb93f3e556ebfad4e993eb56c63c95b56fd 100644 --- a/apps/gpu/tests/NumericalTestPostProcessing/Utilities/PostProcessingConfigFileReader/PostProcessingConfigFileReaderImp.cpp +++ b/apps/gpu/tests/NumericalTestPostProcessing/Utilities/PostProcessingConfigFileReader/PostProcessingConfigFileReaderImp.cpp @@ -1,7 +1,7 @@ #include "PostProcessingConfigFileReaderImp.h" #include <basics/config/ConfigurationFile.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "Utilities/PostProcessingConfigData/PostProcessingConfigDataImp.h" diff --git a/apps/gpu/tests/NumericalTests/Utilities/ConfigFileReaderNT/ConfigFileReaderNT.cpp b/apps/gpu/tests/NumericalTests/Utilities/ConfigFileReaderNT/ConfigFileReaderNT.cpp index 5507c32f64eea8bb6c5e5e3c835aa5ae223b33cd..0d0dc94a911acb7c3f3f995922e5ce34ddffa303 100644 --- a/apps/gpu/tests/NumericalTests/Utilities/ConfigFileReaderNT/ConfigFileReaderNT.cpp +++ b/apps/gpu/tests/NumericalTests/Utilities/ConfigFileReaderNT/ConfigFileReaderNT.cpp @@ -1,7 +1,7 @@ #include "ConfigFileReaderNT.h" #include <basics/config/ConfigurationFile.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include <memory> #include <fstream> diff --git a/apps/gpu/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp b/apps/gpu/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp index b9b4dd3a8d13ddcce87c555312c0d0a422de5a05..126ff07a31c4f434cc82b4bb8b7e1d944b22cae1 100644 --- a/apps/gpu/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp +++ b/apps/gpu/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp @@ -5,7 +5,7 @@ #include <sstream> #include <stdio.h> -#include <Core/StringUtilities/StringUtil.h> +#include <StringUtilities/StringUtil.h> #include "Parameter/Parameter.h" diff --git a/pythonbindings/pyfluids-stubs/bindings/basics/logger.pyi b/pythonbindings/pyfluids-stubs/bindings/basics/logger.pyi deleted file mode 100644 index 43938ff7646efd3c596ae29971cce39fed865fa6..0000000000000000000000000000000000000000 --- a/pythonbindings/pyfluids-stubs/bindings/basics/logger.pyi +++ /dev/null @@ -1,83 +0,0 @@ -r""" -======================================================================================= - ____ ____ __ ______ __________ __ __ __ __ - \ \ | | | | | _ \ |___ ___| | | | | / \ | | - \ \ | | | | | |_) | | | | | | | / \ | | - \ \ | | | | | _ / | | | | | | / /\ \ | | - \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ - \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| - \ \ | | ________________________________________________________________ - \ \ | | | ______________________________________________________________| - \ \| | | | __ __ __ __ ______ _______ - \ | | |_____ | | | | | | | | | _ \ / _____) - \ | | _____| | | | | | | | | | | \ \ \_______ - \ | | | | |_____ | \_/ | | | | |_/ / _____ | - \ _____| |__| |________| \_______/ |__| |______/ (_______/ - - This file is part of VirtualFluids. VirtualFluids is free software: you can - redistribute it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, either version 3 of - the License, or (at your option) any later version. - - VirtualFluids is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. - -! \file logger.pyi -! \ingroup basics -! \author Henry Korb -======================================================================================= -""" -from typing import Any, ClassVar - -log: None - -class Level: - __members__: ClassVar[dict] = ... # read-only - INFO_HIGH: ClassVar[Level] = ... - INFO_INTERMEDIATE: ClassVar[Level] = ... - INFO_LOW: ClassVar[Level] = ... - LOGGER_ERROR: ClassVar[Level] = ... - WARNING: ClassVar[Level] = ... - __entries: ClassVar[dict] = ... - def __init__(self, arg0: int) -> None: ... - def __eq__(self, arg0: object) -> bool: ... - def __getstate__(self) -> int: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, arg0: object) -> bool: ... - def __setstate__(self, arg0: int) -> None: ... - @property - def name(self) -> str: ... - -class Logger: - def __init__(self, *args, **kwargs) -> None: ... - @staticmethod - def add_stdout() -> None: ... - @staticmethod - def enable_printed_rank_numbers(print: bool) -> None: ... - @staticmethod - def set_debug_level(level: int) -> None: ... - @staticmethod - def time_stamp(time_stemp: TimeStamp) -> None: ... - -class TimeStamp: - __members__: ClassVar[dict] = ... # read-only - DISABLE: ClassVar[TimeStamp] = ... - ENABLE: ClassVar[TimeStamp] = ... - __entries: ClassVar[dict] = ... - def __init__(self, arg0: int) -> None: ... - def __eq__(self, arg0: object) -> bool: ... - def __getstate__(self) -> int: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, arg0: object) -> bool: ... - def __setstate__(self, arg0: int) -> None: ... - @property - def name(self) -> str: ... diff --git a/pythonbindings/src/VirtualFluids.cpp b/pythonbindings/src/VirtualFluids.cpp index 20e5012e0af325440e502c704d6f372100306ab1..91682b79e8125a7513565b28e2e22e74e0b2dac1 100644 --- a/pythonbindings/src/VirtualFluids.cpp +++ b/pythonbindings/src/VirtualFluids.cpp @@ -49,7 +49,8 @@ namespace py_bindings PYBIND11_MODULE(bindings, m) { - py::add_ostream_redirect(m, "ostream_redirect"); + // because we do not use the old logger (src/basics/logger) anymore and cout is not passed anymore to the old logger, we probably do not need this anymore + // pybind11::add_ostream_redirect(m, "ostream_redirect"); basics::makeModule(m); lbm::makeModule(m); logging::makeModule(m); @@ -60,4 +61,4 @@ namespace py_bindings cpu::makeModule(m); #endif } -} \ No newline at end of file +} diff --git a/pythonbindings/src/basics/basics.cpp b/pythonbindings/src/basics/basics.cpp index daba29cdc53e193b4698d9fbbd45763c763c42fc..0b294b7a8de2f4f396dac418b0544b5f99ecec3d 100644 --- a/pythonbindings/src/basics/basics.cpp +++ b/pythonbindings/src/basics/basics.cpp @@ -31,7 +31,6 @@ //! \author Henry Korb //======================================================================================= #include <pybind11/pybind11.h> -#include "submodules/logger.cpp" #include "submodules/configuration_file.cpp" namespace basics @@ -42,9 +41,8 @@ namespace basics { py::module basicsModule = parentModule.def_submodule("basics"); - logger::makeModule(basicsModule); configuration::makeModule(basicsModule); - + return basicsModule; } } \ No newline at end of file diff --git a/pythonbindings/src/basics/submodules/logger.cpp b/pythonbindings/src/basics/submodules/logger.cpp deleted file mode 100644 index fa7e00e4dca06581b7a14d2bcf2628ed6af60001..0000000000000000000000000000000000000000 --- a/pythonbindings/src/basics/submodules/logger.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file logger.cpp -//! \ingroup submodules -//! \author Henry Korb -//======================================================================================= -#include <pybind11/pybind11.h> -#include <pybind11/iostream.h> -#include <basics/Core/Logger/Logger.h> -#include <basics/Core/Logger/implementations/LoggerImp.h> - -namespace logger -{ - namespace py = pybind11; - - py::module makeModule(py::module_ &parentModule) - { - py::module loggerModule = parentModule.def_submodule("logger"); - - py::class_<logging::Logger>(loggerModule, "Logger") - .def_static("add_stdout", [](){ - logging::Logger::addStream(&std::cout); - }) - .def_static("set_debug_level", &logging::Logger::setDebugLevel) - .def_static("time_stamp", &logging::Logger::timeStamp, py::arg("time_stamp")) - .def_static("enable_printed_rank_numbers", &logging::Logger::enablePrintedRankNumbers, py::arg("print")); - - loggerModule.attr("log") = logging::out; - py::enum_<logging::Logger::Level>(loggerModule, "Level") - .value("INFO_LOW", logging::Logger::Level::INFO_LOW) - .value("INFO_INTERMEDIATE", logging::Logger::Level::INFO_INTERMEDIATE) - .value("INFO_HIGH", logging::Logger::Level::INFO_HIGH) - .value("WARNING", logging::Logger::Level::WARNING) - .value("LOGGER_ERROR", logging::Logger::Level::LOGGER_ERROR); - - py::enum_<logging::Logger::TimeStamp>(loggerModule, "TimeStamp") - .value("ENABLE", logging::Logger::TimeStamp::ENABLE) - .value("DISABLE", logging::Logger::TimeStamp::DISABLE); - - return loggerModule; - } -} \ No newline at end of file diff --git a/src/basics/CMakeLists.txt b/src/basics/CMakeLists.txt index 14e1760fe3cb6f9b1e122f4adc5adbfb3e30b5c7..7e4cccf26f0c54a47d720f8d33fad435800838b7 100644 --- a/src/basics/CMakeLists.txt +++ b/src/basics/CMakeLists.txt @@ -1,19 +1,18 @@ -include(Core/buildInfo.cmake) +include(buildInfo.cmake) vf_add_library(PUBLIC_LINK logger MPI::MPI_CXX EXCLUDE buildInfo.in.cpp) vf_get_library_name (library_name) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Core) target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/geometry3d) target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/geometry3d/KdTree) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/container) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/memory) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/objects) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/parallel) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/transmitter) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/utilities) -target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/writer) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/container) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/memory) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/objects) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/parallel) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/transmitter) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utilities) +target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/writer) diff --git a/src/basics/Core/ArrayTypes.h b/src/basics/Core/ArrayTypes.h deleted file mode 100644 index f899c92a7be4f29065b55b13fb1a1181da0eaf7e..0000000000000000000000000000000000000000 --- a/src/basics/Core/ArrayTypes.h +++ /dev/null @@ -1,94 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file ArrayTypes.h -//! \ingroup Core -//! \author Konstantin Kutscher, Soeren Textor, Sebastian Geller -//======================================================================================= -#ifndef ARRAYTYPES_H -#define ARRAYTYPES_H - -#include <array> - -#include "DataTypes.h" - -typedef std::array<uint, 2> uint_2; -typedef std::array<uint, 3> uint_3; -typedef std::array<uint, 4> uint_4; -typedef std::array<uint, 5> uint_5; -typedef std::array<uint, 6> uint_6; -typedef std::array<uint, 7> uint_7; -typedef std::array<uint, 8> uint_8; -typedef std::array<uint, 9> uint_9; -typedef std::array<uint, 10> uint_10; -typedef std::array<uint, 11> uint_11; -typedef std::array<uint, 12> uint_12; -typedef std::array<uint, 13> uint_13; -typedef std::array<uint, 14> uint_14; -typedef std::array<uint, 15> uint_15; -typedef std::array<uint, 16> uint_16; -typedef std::array<uint, 17> uint_17; -typedef std::array<uint, 18> uint_18; -typedef std::array<uint, 19> uint_19; -typedef std::array<uint, 20> uint_20; -typedef std::array<uint, 21> uint_21; -typedef std::array<uint, 22> uint_22; -typedef std::array<uint, 23> uint_23; -typedef std::array<uint, 24> uint_24; -typedef std::array<uint, 25> uint_25; -typedef std::array<uint, 26> uint_26; -typedef std::array<uint, 27> uint_27; - -typedef std::array<bool, 2> bool_2; -typedef std::array<bool, 3> bool_3; -typedef std::array<bool, 4> bool_4; -typedef std::array<bool, 5> bool_5; -typedef std::array<bool, 6> bool_6; -typedef std::array<bool, 7> bool_7; -typedef std::array<bool, 8> bool_8; -typedef std::array<bool, 9> bool_9; -typedef std::array<bool, 10> bool_10; -typedef std::array<bool, 11> bool_11; -typedef std::array<bool, 12> bool_12; -typedef std::array<bool, 13> bool_13; -typedef std::array<bool, 14> bool_14; -typedef std::array<bool, 15> bool_15; -typedef std::array<bool, 16> bool_16; -typedef std::array<bool, 17> bool_17; -typedef std::array<bool, 18> bool_18; -typedef std::array<bool, 19> bool_19; -typedef std::array<bool, 20> bool_20; -typedef std::array<bool, 21> bool_21; -typedef std::array<bool, 22> bool_22; -typedef std::array<bool, 23> bool_23; -typedef std::array<bool, 24> bool_24; -typedef std::array<bool, 25> bool_25; -typedef std::array<bool, 26> bool_26; -typedef std::array<bool, 27> bool_27; - -#endif diff --git a/src/basics/Core/Logger/Logger.cpp b/src/basics/Core/Logger/Logger.cpp deleted file mode 100644 index 1a27ef6f2a33bf46b9f488a4cf8d17705c2a64e6..0000000000000000000000000000000000000000 --- a/src/basics/Core/Logger/Logger.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file Logger.cpp -//! \ingroup Logger -//! \author Stephan Lenz -//======================================================================================= -#include "Logger.h" -#include <iostream> -#include <memory> - -#include "implementations/LoggerImp.h" - -namespace logging -{ - -std::shared_ptr<Logger> out = nullptr; - -logging::Logger::Level logging::Logger::globalLogLevel = logging::Logger::INFO_LOW; -logging::Logger::Level logging::Logger::localLogLevel = logging::Logger::INFO_LOW; -bool logging::Logger::printRankNumber = false; -bool logging::Logger::timeStampEnabled = false; - -logging::Logger::Logger(std::ostream *stream) { streams.push_back(stream); } - -logging::Logger::~Logger() = default; - -void Logger::addStreamToList(std::ostream *stream) { streams.push_back(stream); } - -void Logger::resetStreamList() { streams.clear(); } - -//-----------static methods----------------// -void logging::Logger::resetStreams() -{ - if (!out) - out = std::make_shared<LoggerImp>(&std::cout); - - out->resetStreamList(); -} - -void logging::Logger::setStream(std::ostream *stream) { out = std::make_shared<LoggerImp>(stream); } - -void logging::Logger::addStream(std::ostream *stream) -{ - if (!out) - out = std::make_shared<LoggerImp>(stream); - else - out->addStreamToList(stream); -} - -void logging::Logger::timeStamp(TimeStamp timeStamp) -{ - switch (timeStamp) { - case ENABLE: - timeStampEnabled = true; - break; - case DISABLE: - timeStampEnabled = false; - break; - } -} - -void logging::Logger::setDebugLevel(const Level &level) { globalLogLevel = level; } - -void logging::Logger::enablePrintedRankNumbers(bool print) { printRankNumber = print; } - -} // namespace logging diff --git a/src/basics/Core/Logger/Logger.h b/src/basics/Core/Logger/Logger.h deleted file mode 100644 index 53cb974b8e409a8ba6eb555abac41ca99eb2bbcf..0000000000000000000000000000000000000000 --- a/src/basics/Core/Logger/Logger.h +++ /dev/null @@ -1,88 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file Logger.h -//! \ingroup Logger -//! \author Stephan Lenz -//======================================================================================= -#ifndef Logger_H -#define Logger_H - -#include "basics_export.h" - -#include <memory> -#include <ostream> -#include <string> -#include <vector> - -namespace logging -{ -class BASICS_EXPORT Logger -{ -protected: - Logger(std::ostream *stream); - -public: - virtual ~Logger(); - - enum Level { INFO_LOW = 3, INFO_INTERMEDIATE = 2, INFO_HIGH = 1, WARNING = 0, LOGGER_ERROR = -1 }; - - enum TimeStamp { ENABLE, DISABLE }; - - static void setStream(std::ostream *stream); - static void addStream(std::ostream *stream); - static void resetStreams(); - - static void timeStamp(TimeStamp timeStamp); - - static void setDebugLevel(const Level &level = Level::LOGGER_ERROR); - static void enablePrintedRankNumbers(bool printRankNumbers); - - virtual Logger &operator<<(const Level &level) = 0; - virtual Logger &operator<<(const std::string &log) = 0; - virtual Logger &operator<<(const int &log) = 0; - virtual Logger &operator<<(const unsigned int &log) = 0; - virtual Logger &operator<<(const unsigned long &log) = 0; - virtual Logger &operator<<(const float &log) = 0; - virtual Logger &operator<<(const double &log) = 0; - -protected: - void addStreamToList(std::ostream *stream); - void resetStreamList(); - - std::vector<std::ostream *> streams; - - static Level globalLogLevel; - static Level localLogLevel; - static bool printRankNumber; - static bool timeStampEnabled; -}; -extern BASICS_EXPORT std::shared_ptr<Logger> out; -} // namespace logging - -#endif diff --git a/src/basics/Core/Logger/implementations/LoggerImp.cpp b/src/basics/Core/Logger/implementations/LoggerImp.cpp deleted file mode 100644 index 086c0e3aa5153f017905cd8476248ea7a7434335..0000000000000000000000000000000000000000 --- a/src/basics/Core/Logger/implementations/LoggerImp.cpp +++ /dev/null @@ -1,126 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file LoggerImp.cpp -//! \ingroup Logger -//! \author Stephan Lenz -//======================================================================================= -#include "LoggerImp.h" - -#include <chrono> -#include <iomanip> -#include <iostream> -#include <mpi.h> -#include <sstream> - -logging::LoggerImp::LoggerImp(std::ostream *stream) : logging::Logger(stream) -{ - levelString[Level::WARNING] = "[WARNING] "; - levelString[Level::LOGGER_ERROR] = "[ERROR] "; - levelString[Level::INFO_LOW] = "[INFO_LOW] "; - levelString[Level::INFO_INTERMEDIATE] = "[INFO_INTERMEDIATE]"; - levelString[Level::INFO_HIGH] = "[INFO_HIGH] "; -} - -logging::LoggerImp::~LoggerImp() = default; - -logging::Logger &logging::LoggerImp::operator<<(const Level &level) -{ - localLogLevel = level; - return *this; -} - -logging::Logger &logging::LoggerImp::operator<<(const std::string &message) { return this->log(message); } - -logging::Logger &logging::LoggerImp::operator<<(const int &message) { return this->log(std::to_string(message)); } - -logging::Logger &logging::LoggerImp::operator<<(const unsigned int &message) -{ - return this->log(std::to_string(message)); -} - -logging::Logger &logging::LoggerImp::operator<<(const unsigned long &message) -{ - return this->log(std::to_string(message)); -} - -logging::Logger &logging::LoggerImp::operator<<(const float &message) { return this->log(std::to_string(message)); } - -logging::Logger &logging::LoggerImp::operator<<(const double &message) { return this->log(std::to_string(message)); } - -logging::Logger &logging::LoggerImp::log(const std::string &message) -{ - if (shouldBeLogged()) { - std::string modifiedMessage = message; - addDebugInformation(modifiedMessage); - for (auto stream : streams) - *stream << modifiedMessage << std::flush; - } - std::size_t found = message.find(std::string("\n")); - if (found != std::string::npos) - newLoggingLine = true; - else - newLoggingLine = false; - - return *this; -} - -bool logging::LoggerImp::shouldBeLogged() { return localLogLevel <= globalLogLevel; } - -void logging::LoggerImp::addDebugInformation(std::string &message) -{ - if (newLoggingLine) { - std::stringstream os; - os << levelString[localLogLevel] << getTimeStamp() << " " << message; - message = os.str(); - } -} - -std::string logging::LoggerImp::getTimeStamp() -{ - if (!timeStampEnabled) - return ""; - - const auto now = std::chrono::system_clock::now(); - time_t tt = std::chrono::system_clock::to_time_t(now); - // const tm utc_tm = *gmtime(&tt); - const tm local_tm = *localtime(&tt); - - std::stringstream os; - os << " [" << std::setw(2) << std::setfill('0') << local_tm.tm_hour << ":"; - os << std::setw(2) << std::setfill('0') << local_tm.tm_min << ":"; - os << std::setw(2) << std::setfill('0') << local_tm.tm_sec << "]"; - return os.str(); -} - -std::string logging::LoggerImp::getRankString() -{ - int rank; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - return printRankNumber ? "[" + std::to_string(rank) + "] " : ""; -} diff --git a/src/basics/Core/Logger/implementations/LoggerImp.h b/src/basics/Core/Logger/implementations/LoggerImp.h deleted file mode 100644 index 070b06a23ee59a1d387f09fc86960dd3083c4e61..0000000000000000000000000000000000000000 --- a/src/basics/Core/Logger/implementations/LoggerImp.h +++ /dev/null @@ -1,75 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file LoggerImp.h -//! \ingroup Logger -//! \author Stephan Lenz -//======================================================================================= -#ifndef LoggerImp_H -#define LoggerImp_H - -#include "basics_export.h" - -#include <string> - -#include "../Logger.h" -#include <map> - -namespace logging -{ - -class BASICS_EXPORT LoggerImp : public Logger -{ -public: - LoggerImp(std::ostream *stream); - ~LoggerImp() override; - - Logger &operator<<(const Level &level) override; - Logger &operator<<(const std::string &message) override; - Logger &operator<<(const int &message) override; - Logger &operator<<(const unsigned int &message) override; - Logger &operator<<(const unsigned long &log) override; - Logger &operator<<(const float &message) override; - Logger &operator<<(const double &message) override; - -private: - std::string getRankString(); - static bool shouldBeLogged(); - - static std::string getTimeStamp(); - void addDebugInformation(std::string &message); - logging::Logger &log(const std::string &message); - -private: - std::map<Logger::Level, std::string> levelString; - bool newLoggingLine = true; -}; - -} // namespace logging - -#endif diff --git a/src/basics/Core/Logger/implementations/LoggerTest.cpp b/src/basics/Core/Logger/implementations/LoggerTest.cpp deleted file mode 100644 index 2c4e4e6819a19497c3061caddbfa4c2a54953054..0000000000000000000000000000000000000000 --- a/src/basics/Core/Logger/implementations/LoggerTest.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "gmock/gmock.h" -#include <fstream> -#include <memory> - -#include "../Logger.h" - -TEST(DISABLED_LoggerTest, logStringWithoutSettingLevels_WillPutTheLogMesssageIntoTheStream) -{ - std::ostringstream stream; - logging::Logger::setStream(&stream); - - *logging::out << logging::Logger::INFO_LOW << "Hello World\n"; - - EXPECT_THAT(stream.str(), "[LOW] Hello World\n"); -} - -TEST(DISABLED_LoggerTest, logStringWithHighDebugLevel_logOnlyHighLevelMessages) -{ - std::ostringstream stream; - logging::Logger::setStream(&stream); - - logging::Logger::setDebugLevel(logging::Logger::INFO_HIGH); - *logging::out << logging::Logger::INFO_LOW << "Low Debug Message\n" - << logging::Logger::INFO_HIGH << "HIGH Debug Message\n"; - - EXPECT_THAT(stream.str(), "[HIGH] HIGH Debug Message\n"); -} - -TEST(DISABLED_LoggerTest, addTwoStreams_shouldWriteToBoth) -{ - logging::Logger::resetStreams(); - - std::ostringstream stream1, stream2; - logging::out->addStream(&stream1); - logging::out->addStream(&stream2); - logging::Logger::setDebugLevel(logging::Logger::INFO_LOW); - - *logging::out << logging::Logger::INFO_LOW << "Hello World\n"; - - EXPECT_THAT(stream1.str(), "[LOW] Hello World\n"); - EXPECT_THAT(stream2.str(), "[LOW] Hello World\n"); -} - -TEST(DISABLED_LoggerTest, splittetOutputShouldHaveDebugInformationOnce) -{ - std::ostringstream stream; - logging::Logger::setStream(&stream); - - *logging::out << logging::Logger::INFO_LOW << "Hello" - << " World\n"; - - EXPECT_THAT(stream.str(), "[LOW] Hello World\n"); -} - -TEST(DISABLED_LoggerTest, enableTimeStampInOutput) -{ - std::ostringstream stream; - logging::Logger::setStream(&stream); - logging::Logger::timeStamp(logging::Logger::TimeStamp::ENABLE); - - *logging::out << logging::Logger::INFO_LOW << "Hello" - << " World\n"; - - EXPECT_THAT(stream.str(), testing::StrNe("[LOW] Hello World\n")); -} diff --git a/src/basics/Core/NonCreatable.h b/src/basics/Core/NonCreatable.h deleted file mode 100644 index c581a19ec92b666f45109f1e3c66b9e57fb54614..0000000000000000000000000000000000000000 --- a/src/basics/Core/NonCreatable.h +++ /dev/null @@ -1,44 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file NonCreatable.h -//! \ingroup Core -//! \author Soeren Peters -//======================================================================================= -#ifndef NON_CREATABLE_H -#define NON_CREATABLE_H - -class NonCreatable -{ -private: - NonCreatable() = delete; - NonCreatable(const NonCreatable &) = delete; - NonCreatable &operator=(const NonCreatable &) = delete; -}; - -#endif diff --git a/src/basics/Core/RealConstants.h b/src/basics/Core/RealConstants.h deleted file mode 100644 index 5cb42584e29d0e0a1a9cf1b40f50736dd13169f0..0000000000000000000000000000000000000000 --- a/src/basics/Core/RealConstants.h +++ /dev/null @@ -1,255 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file RealConstants.h -//! \ingroup Core -//! \author Martin Schoenherr -//======================================================================================= -//#ifndef REAL_CONSTANT_H -//#define REAL_CONSTANT_H -// -//#ifdef VF_DOUBLE_ACCURACY -//#define c1o2 0.5 -//#define c3o2 1.5 -//#define c1o3 0.333333333333333 -//#define c2o3 0.666666666666667 -//#define c1o4 0.25 -//#define c3o4 0.75 -//#define c1o6 0.166666666666667 -//#define c1o7 0.142857142857143 -//#define c1o8 0.125 -//#define c1o9 0.111111111111111 -//#define c2o9 0.222222222222222 -//#define c4o9 0.444444444444444 -//#define c1o10 0.1 -//#define c1o12 0.083333333333333 -//#define c1o16 0.0625 -//#define c3o16 0.1875 -//#define c9o16 0.5625 -//#define c1o18 0.055555555555556 -//#define c1o20 0.05 -//#define c19o20 0.95 -//#define c21o20 1.05 -//#define c1o24 0.041666666666667 -//#define c1o27 0.037037037037037 -//#define c3o32 0.09375 -//#define c4o32 0.125 -//#define c1o36 0.027777777777778 -//#define c1o48 0.020833333333333 -//#define c1o64 0.015625 -//#define c3o64 0.046875 -//#define c9o64 0.140625 -//#define c27o64 0.421875 -//#define c1o66 0.015151515151515 -//#define c1o72 0.013888888888889 -//#define c1o264 0.003787878787879 -//#define c8o27 0.296296296296296 -//#define c2o27 0.074074074074074 -//#define c1o54 0.018518518518519 -//#define c1o100 0.01 -//#define c99o100 0.99 -//#define c1o126 0.007936507936508 -//#define c1o216 0.004629629629630 -//#define c5o4 1.25 -//#define c9o4 2.25 -//#define c5o2 2.5 -//#define c9o2 4.5 -// -//#define c0o1 0. -//#define c1o1 1. -//#define c2o1 2. -//#define c3o1 3. -//#define c4o1 4. -//#define c5o1 5. -//#define c6o1 6. -//#define c7o1 7. -//#define c8o1 8. -//#define c9o1 9. -//#define c10o1 10. -//#define c11o1 11. -//#define c12o1 12. -//#define c13o1 13. -//#define c14o1 14. -//#define c15o1 15. -//#define c16o1 16. -//#define c17o1 17. -//#define c18o1 18. -//#define c21o1 21. -//#define c24o1 24. -//#define c25o1 25. -//#define c26o1 26. -//#define c27o1 27. -//#define c28o1 28. -//#define c29o1 29. -//#define c30o1 30. -//#define c32o1 32. -//#define c33o1 33. -//#define c34o1 34. -//#define c36o1 36. -//#define c40o1 40. -//#define c42o1 42. -//#define c46o1 46. -//#define c48o1 48. -//#define c50o1 50. -//#define c52o1 52. -//#define c54o1 54. -//#define c56o1 56. -//#define c64o1 64. -//#define c66o1 66. -//#define c68o1 68. -//#define c69o1 69. -//#define c72o1 72. -//#define c84o1 84. -//#define c88o1 88. -//#define c96o1 96. -//#define c100o1 100.0 -//#define c130o1 130.0 -//#define c152o1 152.0 -//#define c166o1 166.0 -//#define c195o1 195.0 -//#define c216o1 216.0 -//#define c264o1 264.0 -//#define c290o1 290.0 -//#define c367o1 367.0 -// -//#define Op0000002 0.0000002 -//#define c10eM30 1e-30 -//#define c10eM10 1e-10 -//#define smallSingle 0.0000000002 -// -//#else -//#define c1o2 0.5f -//#define c3o2 1.5f -//#define c1o3 (1.0f / 3.0f) -//#define c2o3 (2.0f / 3.0f) -//#define c1o4 0.25f -//#define c3o4 0.75f -//#define c1o6 (1.0f / 6.0f) -//#define c1o7 (1.0f / 7.0f) -//#define c1o8 0.125f -//#define c1o9 (1.0f / 9.0f) -//#define c2o9 (2.0f / 9.0f) -//#define c4o9 (4.0f / 9.0f) -//#define c1o10 0.1f -//#define c1o12 (1.0f / 12.0f) -//#define c1o16 0.0625f -//#define c3o16 0.1875f -//#define c9o16 0.5625f -//#define c1o18 (1.0f / 18.0f) -//#define c1o20 0.05f -//#define c19o20 0.95f -//#define c21o20 1.05f -//#define c1o24 (1.0f / 24.0f) -//#define c1o27 (1.0f / 27.0f) -//#define c3o32 0.09375f -//#define c4o32 0.125f -//#define c1o36 (1.0f / 36.0f) -//#define c1o48 (1.0f / 48.0f) -//#define c1o64 0.015625f -//#define c3o64 0.046875f -//#define c9o64 0.140625f -//#define c27o64 0.421875f -//#define c1o66 (1.0f / 66.0f) -//#define c1o72 (1.0f / 72.0f) -//#define c1o264 (1.0f / 264.0f) -//#define c8o27 (8.0f / 27.0f) -//#define c2o27 (2.0f / 27.0f) -//#define c1o54 (1.0f / 54.0f) -//#define c1o100 0.01f -//#define c99o100 0.99f -//#define c1o126 (1.0f / 126.0f) -//#define c1o216 (1.0f / 216.0f) -//#define c5o4 1.25f -//#define c9o4 2.25f -//#define c5o2 2.5f -//#define c9o2 4.5f -// -//#define c0o1 0.f -//#define c1o1 1.f -//#define c2o1 2.f -//#define c3o1 3.f -//#define c4o1 4.f -//#define c5o1 5.f -//#define c6o1 6.f -//#define c7o1 7.f -//#define c8o1 8.f -//#define c9o1 9.f -//#define c10o1 10.f -//#define c11o1 11.f -//#define c12o1 12.f -//#define c13o1 13.f -//#define c14o1 14.f -//#define c15o1 15.f -//#define c16o1 16.f -//#define c17o1 17.f -//#define c18o1 18.f -//#define c21o1 21.f -//#define c24o1 24.f -//#define c25o1 25.f -//#define c26o1 26.f -//#define c27o1 27.f -//#define c28o1 28.f -//#define c29o1 29.f -//#define c30o1 30.f -//#define c32o1 32.f -//#define c33o1 33.f -//#define c34o1 34.f -//#define c36o1 36.f -//#define c40o1 40.f -//#define c42o1 42.f -//#define c46o1 46.f -//#define c48o1 48.f -//#define c50o1 50.f -//#define c52o1 52.f -//#define c54o1 54.f -//#define c56o1 56.f -//#define c64o1 64.f -//#define c66o1 66.f -//#define c68o1 68.f -//#define c69o1 69.f -//#define c72o1 72.f -//#define c84o1 84.f -//#define c88o1 88.f -//#define c96o1 96.f -//#define c100o1 100.0f -//#define c130o1 130.0f -//#define c152o1 152.0f -//#define c166o1 166.0f -//#define c195o1 195.0f -//#define c216o1 216.0f -//#define c264o1 264.0f -//#define c290o1 290.0f -//#define c367o1 367.0f -// -//#define Op0000002 0.0000002f -//#define c10eM30 1e-30 -//#define c10eM10 1e-10 -//#define smallSingle 0.0000000002f -//#endif -// -//#endif \ No newline at end of file diff --git a/src/basics/Core/VectorTypes.cpp b/src/basics/Core/VectorTypes.cpp deleted file mode 100644 index ecc986be836cb3c85d760f4db408707bfb1180b4..0000000000000000000000000000000000000000 --- a/src/basics/Core/VectorTypes.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file VectorTypes.cpp -//! \ingroup Core -//! \author Soeren Peters -//======================================================================================= -#include "VectorTypes.h" - -// Vec3 Vec3::operator+( Vec3& left, Vec3& right ){ -Vec3 Vec3::operator+(Vec3 &right) { return { this->x + right.x, this->y + right.y, this->z + right.z }; } - -Vec3 Vec3::operator-(Vec3 &right) { return { this->x - right.x, this->y - right.y, this->z - right.z }; } - -Vec3 operator*(real scalar, Vec3 &vec) { return { scalar * vec.x, scalar * vec.y, scalar * vec.z }; } diff --git a/src/basics/Core/VectorTypes.h b/src/basics/Core/VectorTypes.h deleted file mode 100644 index 2ca45b359397c712b8b8695b9a99b4c5f8c324d1..0000000000000000000000000000000000000000 --- a/src/basics/Core/VectorTypes.h +++ /dev/null @@ -1,70 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file VectorTypes.h -//! \ingroup Core -//! \author Soeren Peters -//======================================================================================= -#ifndef VECTORTYPES_H -#define VECTORTYPES_H - -#ifdef __CUDACC__ -#include <cuda_runtime.h> -#else -#ifndef __host__ -#define __host__ -#endif -#ifndef __device__ -#define __device__ -#endif -#endif - -#include <cmath> - -#include "basics_export.h" - -#include "DataTypes.h" -#include "RealConstants.h" - -struct BASICS_EXPORT Vec3 { - real x{ 0. }, y{ 0. }, z{ 0. }; - - __host__ __device__ Vec3(real x, real y, real z) : x(x), y(y), z(z) {} - Vec3() = default; - - __host__ __device__ real length() { return std::sqrt(x * x + y * y + z * z); } - - Vec3 operator+(Vec3 &right); - Vec3 operator-(Vec3 &right); -}; - -// BASICS_EXPORT Vec3 operator+( Vec3& left, Vec3& right ); -// BASICS_EXPORT Vec3 operator-( Vec3& left, Vec3& right ); -BASICS_EXPORT Vec3 operator*(real scalar, Vec3 &vec); - -#endif diff --git a/src/basics/Core/DataTypes.h b/src/basics/DataTypes.h similarity index 100% rename from src/basics/Core/DataTypes.h rename to src/basics/DataTypes.h diff --git a/src/basics/Singelton.h b/src/basics/Singelton.h deleted file mode 100644 index f0979b5dd3d89e26ebbe4b4e82d2336e1f59a07e..0000000000000000000000000000000000000000 --- a/src/basics/Singelton.h +++ /dev/null @@ -1,58 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \author Soeren Peters -//======================================================================================= - -#ifndef BASICS_SINGELTON_H -#define BASICS_SINGELTON_H - -namespace vf::basics -{ - -template<typename T> -class Singleton -{ -public: - Singleton(const Singleton&) = delete; - Singleton & operator=(const Singleton& rhs) = delete; - -protected: - Singleton() = default; - -public: - static std::shared_ptr<Singleton> getInstance() - { - static std::shared_ptr<Singleton> s{new T}; - return s; - } -}; - -} - -#endif \ No newline at end of file diff --git a/src/basics/Core/StringUtilities/StringUtil.cpp b/src/basics/StringUtilities/StringUtil.cpp similarity index 100% rename from src/basics/Core/StringUtilities/StringUtil.cpp rename to src/basics/StringUtilities/StringUtil.cpp diff --git a/src/basics/Core/StringUtilities/StringUtil.h b/src/basics/StringUtilities/StringUtil.h similarity index 100% rename from src/basics/Core/StringUtilities/StringUtil.h rename to src/basics/StringUtilities/StringUtil.h diff --git a/src/basics/Core/StringUtilities/StringUtilTest.cpp b/src/basics/StringUtilities/StringUtilTest.cpp similarity index 100% rename from src/basics/Core/StringUtilities/StringUtilTest.cpp rename to src/basics/StringUtilities/StringUtilTest.cpp diff --git a/src/basics/Core/Timer/Timer.cpp b/src/basics/Timer/Timer.cpp similarity index 100% rename from src/basics/Core/Timer/Timer.cpp rename to src/basics/Timer/Timer.cpp diff --git a/src/basics/Core/Timer/Timer.h b/src/basics/Timer/Timer.h similarity index 100% rename from src/basics/Core/Timer/Timer.h rename to src/basics/Timer/Timer.h diff --git a/src/basics/Core/Timer/TimerImp.cpp b/src/basics/Timer/TimerImp.cpp similarity index 100% rename from src/basics/Core/Timer/TimerImp.cpp rename to src/basics/Timer/TimerImp.cpp diff --git a/src/basics/Core/Timer/TimerImp.h b/src/basics/Timer/TimerImp.h similarity index 100% rename from src/basics/Core/Timer/TimerImp.h rename to src/basics/Timer/TimerImp.h diff --git a/src/basics/Core/buildInfo.cmake b/src/basics/buildInfo.cmake similarity index 100% rename from src/basics/Core/buildInfo.cmake rename to src/basics/buildInfo.cmake diff --git a/src/basics/Core/buildInfo.h b/src/basics/buildInfo.h similarity index 100% rename from src/basics/Core/buildInfo.h rename to src/basics/buildInfo.h diff --git a/src/basics/Core/buildInfo.in.cpp b/src/basics/buildInfo.in.cpp similarity index 100% rename from src/basics/Core/buildInfo.in.cpp rename to src/basics/buildInfo.in.cpp diff --git a/src/basics/config/ConfigurationFile.cpp b/src/basics/config/ConfigurationFile.cpp index 026d13e15486c46a7056e061ea075a03c9c06f9f..6e6ba21c0cec5de886b6ad125a662adacb9f1654 100644 --- a/src/basics/config/ConfigurationFile.cpp +++ b/src/basics/config/ConfigurationFile.cpp @@ -9,7 +9,7 @@ #include <iostream> #include <stdlib.h> -#include <basics/basics/utilities/UbException.h> +#include <basics/utilities/UbException.h> namespace vf::basics diff --git a/src/basics/config/ConfigurationFile.h b/src/basics/config/ConfigurationFile.h index 4a53f7add85b9c6461fda0bab20fa6656eebc5d3..3bf9e807280132afa81fa0473781896e87fbfd66 100644 --- a/src/basics/config/ConfigurationFile.h +++ b/src/basics/config/ConfigurationFile.h @@ -9,7 +9,7 @@ #include <iostream> #include <stdlib.h> -#include <basics/basics/utilities/UbException.h> +#include <basics/utilities/UbException.h> //! \brief Simple configuration file //! \details The Configuration class presented here can read and keep values of any configuration file written in a format like this: diff --git a/src/basics/basics/container/CbArray2D.h b/src/basics/container/CbArray2D.h similarity index 100% rename from src/basics/basics/container/CbArray2D.h rename to src/basics/container/CbArray2D.h diff --git a/src/basics/basics/container/CbArray3D.h b/src/basics/container/CbArray3D.h similarity index 100% rename from src/basics/basics/container/CbArray3D.h rename to src/basics/container/CbArray3D.h diff --git a/src/basics/basics/container/CbArray4D.h b/src/basics/container/CbArray4D.h similarity index 100% rename from src/basics/basics/container/CbArray4D.h rename to src/basics/container/CbArray4D.h diff --git a/src/basics/basics/container/CbVector.h b/src/basics/container/CbVector.h similarity index 100% rename from src/basics/basics/container/CbVector.h rename to src/basics/container/CbVector.h diff --git a/src/basics/basics/container/CbVectorPool.h b/src/basics/container/CbVectorPool.h similarity index 100% rename from src/basics/basics/container/CbVectorPool.h rename to src/basics/container/CbVectorPool.h diff --git a/src/basics/basics/memory/MbSmartPtr.h b/src/basics/memory/MbSmartPtr.h similarity index 100% rename from src/basics/basics/memory/MbSmartPtr.h rename to src/basics/memory/MbSmartPtr.h diff --git a/src/basics/basics/memory/MbSmartPtrBase.cpp b/src/basics/memory/MbSmartPtrBase.cpp similarity index 100% rename from src/basics/basics/memory/MbSmartPtrBase.cpp rename to src/basics/memory/MbSmartPtrBase.cpp diff --git a/src/basics/basics/memory/MbSmartPtrBase.h b/src/basics/memory/MbSmartPtrBase.h similarity index 100% rename from src/basics/basics/memory/MbSmartPtrBase.h rename to src/basics/memory/MbSmartPtrBase.h diff --git a/src/basics/basics/objects/ObObject.h b/src/basics/objects/ObObject.h similarity index 100% rename from src/basics/basics/objects/ObObject.h rename to src/basics/objects/ObObject.h diff --git a/src/basics/basics/parallel/PbMpi.h b/src/basics/parallel/PbMpi.h similarity index 100% rename from src/basics/basics/parallel/PbMpi.h rename to src/basics/parallel/PbMpi.h diff --git a/src/basics/basics/transmitter/TbTransmitter.h b/src/basics/transmitter/TbTransmitter.h similarity index 100% rename from src/basics/basics/transmitter/TbTransmitter.h rename to src/basics/transmitter/TbTransmitter.h diff --git a/src/basics/basics/transmitter/TbTransmitterLocal.h b/src/basics/transmitter/TbTransmitterLocal.h similarity index 100% rename from src/basics/basics/transmitter/TbTransmitterLocal.h rename to src/basics/transmitter/TbTransmitterLocal.h diff --git a/src/basics/basics/transmitter/TbTransmitterMpiPool.h b/src/basics/transmitter/TbTransmitterMpiPool.h similarity index 100% rename from src/basics/basics/transmitter/TbTransmitterMpiPool.h rename to src/basics/transmitter/TbTransmitterMpiPool.h diff --git a/src/basics/basics/utilities/UbComparators.h b/src/basics/utilities/UbComparators.h similarity index 100% rename from src/basics/basics/utilities/UbComparators.h rename to src/basics/utilities/UbComparators.h diff --git a/src/basics/basics/utilities/UbEqual.h b/src/basics/utilities/UbEqual.h similarity index 100% rename from src/basics/basics/utilities/UbEqual.h rename to src/basics/utilities/UbEqual.h diff --git a/src/basics/basics/utilities/UbException.h b/src/basics/utilities/UbException.h similarity index 100% rename from src/basics/basics/utilities/UbException.h rename to src/basics/utilities/UbException.h diff --git a/src/basics/basics/utilities/UbFileInput.h b/src/basics/utilities/UbFileInput.h similarity index 100% rename from src/basics/basics/utilities/UbFileInput.h rename to src/basics/utilities/UbFileInput.h diff --git a/src/basics/basics/utilities/UbFileInputASCII.cpp b/src/basics/utilities/UbFileInputASCII.cpp similarity index 100% rename from src/basics/basics/utilities/UbFileInputASCII.cpp rename to src/basics/utilities/UbFileInputASCII.cpp diff --git a/src/basics/basics/utilities/UbFileInputASCII.h b/src/basics/utilities/UbFileInputASCII.h similarity index 100% rename from src/basics/basics/utilities/UbFileInputASCII.h rename to src/basics/utilities/UbFileInputASCII.h diff --git a/src/basics/basics/utilities/UbFileInputASCIITest.cfg b/src/basics/utilities/UbFileInputASCIITest.cfg similarity index 100% rename from src/basics/basics/utilities/UbFileInputASCIITest.cfg rename to src/basics/utilities/UbFileInputASCIITest.cfg diff --git a/src/basics/basics/utilities/UbFileInputASCIITest.cpp b/src/basics/utilities/UbFileInputASCIITest.cpp similarity index 100% rename from src/basics/basics/utilities/UbFileInputASCIITest.cpp rename to src/basics/utilities/UbFileInputASCIITest.cpp diff --git a/src/basics/basics/utilities/UbFileInputBinary.cpp b/src/basics/utilities/UbFileInputBinary.cpp similarity index 100% rename from src/basics/basics/utilities/UbFileInputBinary.cpp rename to src/basics/utilities/UbFileInputBinary.cpp diff --git a/src/basics/basics/utilities/UbFileInputBinary.h b/src/basics/utilities/UbFileInputBinary.h similarity index 100% rename from src/basics/basics/utilities/UbFileInputBinary.h rename to src/basics/utilities/UbFileInputBinary.h diff --git a/src/basics/basics/utilities/UbFileOutput.h b/src/basics/utilities/UbFileOutput.h similarity index 100% rename from src/basics/basics/utilities/UbFileOutput.h rename to src/basics/utilities/UbFileOutput.h diff --git a/src/basics/basics/utilities/UbFileOutputASCII.cpp b/src/basics/utilities/UbFileOutputASCII.cpp similarity index 100% rename from src/basics/basics/utilities/UbFileOutputASCII.cpp rename to src/basics/utilities/UbFileOutputASCII.cpp diff --git a/src/basics/basics/utilities/UbFileOutputASCII.h b/src/basics/utilities/UbFileOutputASCII.h similarity index 100% rename from src/basics/basics/utilities/UbFileOutputASCII.h rename to src/basics/utilities/UbFileOutputASCII.h diff --git a/src/basics/basics/utilities/UbFileOutputBinary.cpp b/src/basics/utilities/UbFileOutputBinary.cpp similarity index 100% rename from src/basics/basics/utilities/UbFileOutputBinary.cpp rename to src/basics/utilities/UbFileOutputBinary.cpp diff --git a/src/basics/basics/utilities/UbFileOutputBinary.h b/src/basics/utilities/UbFileOutputBinary.h similarity index 100% rename from src/basics/basics/utilities/UbFileOutputBinary.h rename to src/basics/utilities/UbFileOutputBinary.h diff --git a/src/basics/basics/utilities/UbInfinity.h b/src/basics/utilities/UbInfinity.h similarity index 100% rename from src/basics/basics/utilities/UbInfinity.h rename to src/basics/utilities/UbInfinity.h diff --git a/src/basics/basics/utilities/UbKeys.h b/src/basics/utilities/UbKeys.h similarity index 100% rename from src/basics/basics/utilities/UbKeys.h rename to src/basics/utilities/UbKeys.h diff --git a/src/basics/basics/utilities/UbLimits.h b/src/basics/utilities/UbLimits.h similarity index 100% rename from src/basics/basics/utilities/UbLimits.h rename to src/basics/utilities/UbLimits.h diff --git a/src/basics/basics/utilities/UbLogger.cpp b/src/basics/utilities/UbLogger.cpp similarity index 100% rename from src/basics/basics/utilities/UbLogger.cpp rename to src/basics/utilities/UbLogger.cpp diff --git a/src/basics/basics/utilities/UbLogger.h b/src/basics/utilities/UbLogger.h similarity index 100% rename from src/basics/basics/utilities/UbLogger.h rename to src/basics/utilities/UbLogger.h diff --git a/src/basics/basics/utilities/UbMath.cpp b/src/basics/utilities/UbMath.cpp similarity index 100% rename from src/basics/basics/utilities/UbMath.cpp rename to src/basics/utilities/UbMath.cpp diff --git a/src/basics/basics/utilities/UbMath.h b/src/basics/utilities/UbMath.h similarity index 100% rename from src/basics/basics/utilities/UbMath.h rename to src/basics/utilities/UbMath.h diff --git a/src/basics/basics/utilities/UbNupsTimer.h b/src/basics/utilities/UbNupsTimer.h similarity index 100% rename from src/basics/basics/utilities/UbNupsTimer.h rename to src/basics/utilities/UbNupsTimer.h diff --git a/src/basics/basics/utilities/UbObservable.h b/src/basics/utilities/UbObservable.h similarity index 100% rename from src/basics/basics/utilities/UbObservable.h rename to src/basics/utilities/UbObservable.h diff --git a/src/basics/basics/utilities/UbObserver.h b/src/basics/utilities/UbObserver.h similarity index 100% rename from src/basics/basics/utilities/UbObserver.h rename to src/basics/utilities/UbObserver.h diff --git a/src/basics/basics/utilities/UbRandom.h b/src/basics/utilities/UbRandom.h similarity index 100% rename from src/basics/basics/utilities/UbRandom.h rename to src/basics/utilities/UbRandom.h diff --git a/src/basics/basics/utilities/UbScheduler.h b/src/basics/utilities/UbScheduler.h similarity index 100% rename from src/basics/basics/utilities/UbScheduler.h rename to src/basics/utilities/UbScheduler.h diff --git a/src/basics/basics/utilities/UbStringInputASCII.cpp b/src/basics/utilities/UbStringInputASCII.cpp similarity index 100% rename from src/basics/basics/utilities/UbStringInputASCII.cpp rename to src/basics/utilities/UbStringInputASCII.cpp diff --git a/src/basics/basics/utilities/UbStringInputASCII.h b/src/basics/utilities/UbStringInputASCII.h similarity index 100% rename from src/basics/basics/utilities/UbStringInputASCII.h rename to src/basics/utilities/UbStringInputASCII.h diff --git a/src/basics/basics/utilities/UbSystem.h b/src/basics/utilities/UbSystem.h similarity index 100% rename from src/basics/basics/utilities/UbSystem.h rename to src/basics/utilities/UbSystem.h diff --git a/src/basics/basics/utilities/UbTiming.h b/src/basics/utilities/UbTiming.h similarity index 100% rename from src/basics/basics/utilities/UbTiming.h rename to src/basics/utilities/UbTiming.h diff --git a/src/basics/basics/utilities/UbTuple.h b/src/basics/utilities/UbTuple.h similarity index 100% rename from src/basics/basics/utilities/UbTuple.h rename to src/basics/utilities/UbTuple.h diff --git a/src/basics/basics/utilities/Vector3D.cpp b/src/basics/utilities/Vector3D.cpp similarity index 100% rename from src/basics/basics/utilities/Vector3D.cpp rename to src/basics/utilities/Vector3D.cpp diff --git a/src/basics/basics/utilities/Vector3D.h b/src/basics/utilities/Vector3D.h similarity index 100% rename from src/basics/basics/utilities/Vector3D.h rename to src/basics/utilities/Vector3D.h diff --git a/src/basics/basics/utilities/Vector3DTest.cpp b/src/basics/utilities/Vector3DTest.cpp similarity index 100% rename from src/basics/basics/utilities/Vector3DTest.cpp rename to src/basics/utilities/Vector3DTest.cpp diff --git a/src/basics/basics/writer/WbWriter.h b/src/basics/writer/WbWriter.h similarity index 100% rename from src/basics/basics/writer/WbWriter.h rename to src/basics/writer/WbWriter.h diff --git a/src/basics/basics/writer/WbWriterAvsASCII.cpp b/src/basics/writer/WbWriterAvsASCII.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterAvsASCII.cpp rename to src/basics/writer/WbWriterAvsASCII.cpp diff --git a/src/basics/basics/writer/WbWriterAvsASCII.h b/src/basics/writer/WbWriterAvsASCII.h similarity index 100% rename from src/basics/basics/writer/WbWriterAvsASCII.h rename to src/basics/writer/WbWriterAvsASCII.h diff --git a/src/basics/basics/writer/WbWriterAvsBinary.cpp b/src/basics/writer/WbWriterAvsBinary.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterAvsBinary.cpp rename to src/basics/writer/WbWriterAvsBinary.cpp diff --git a/src/basics/basics/writer/WbWriterAvsBinary.h b/src/basics/writer/WbWriterAvsBinary.h similarity index 100% rename from src/basics/basics/writer/WbWriterAvsBinary.h rename to src/basics/writer/WbWriterAvsBinary.h diff --git a/src/basics/basics/writer/WbWriterBOBJ.cpp b/src/basics/writer/WbWriterBOBJ.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterBOBJ.cpp rename to src/basics/writer/WbWriterBOBJ.cpp diff --git a/src/basics/basics/writer/WbWriterBOBJ.h b/src/basics/writer/WbWriterBOBJ.h similarity index 100% rename from src/basics/basics/writer/WbWriterBOBJ.h rename to src/basics/writer/WbWriterBOBJ.h diff --git a/src/basics/basics/writer/WbWriterSunflow.cpp b/src/basics/writer/WbWriterSunflow.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterSunflow.cpp rename to src/basics/writer/WbWriterSunflow.cpp diff --git a/src/basics/basics/writer/WbWriterSunflow.h b/src/basics/writer/WbWriterSunflow.h similarity index 100% rename from src/basics/basics/writer/WbWriterSunflow.h rename to src/basics/writer/WbWriterSunflow.h diff --git a/src/basics/basics/writer/WbWriterTecPlotASCII.cpp b/src/basics/writer/WbWriterTecPlotASCII.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterTecPlotASCII.cpp rename to src/basics/writer/WbWriterTecPlotASCII.cpp diff --git a/src/basics/basics/writer/WbWriterTecPlotASCII.h b/src/basics/writer/WbWriterTecPlotASCII.h similarity index 100% rename from src/basics/basics/writer/WbWriterTecPlotASCII.h rename to src/basics/writer/WbWriterTecPlotASCII.h diff --git a/src/basics/basics/writer/WbWriterVtkASCII.cpp b/src/basics/writer/WbWriterVtkASCII.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterVtkASCII.cpp rename to src/basics/writer/WbWriterVtkASCII.cpp diff --git a/src/basics/basics/writer/WbWriterVtkASCII.h b/src/basics/writer/WbWriterVtkASCII.h similarity index 100% rename from src/basics/basics/writer/WbWriterVtkASCII.h rename to src/basics/writer/WbWriterVtkASCII.h diff --git a/src/basics/basics/writer/WbWriterVtkBinary.cpp b/src/basics/writer/WbWriterVtkBinary.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterVtkBinary.cpp rename to src/basics/writer/WbWriterVtkBinary.cpp diff --git a/src/basics/basics/writer/WbWriterVtkBinary.h b/src/basics/writer/WbWriterVtkBinary.h similarity index 100% rename from src/basics/basics/writer/WbWriterVtkBinary.h rename to src/basics/writer/WbWriterVtkBinary.h diff --git a/src/basics/basics/writer/WbWriterVtkXmlASCII.cpp b/src/basics/writer/WbWriterVtkXmlASCII.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterVtkXmlASCII.cpp rename to src/basics/writer/WbWriterVtkXmlASCII.cpp diff --git a/src/basics/basics/writer/WbWriterVtkXmlASCII.h b/src/basics/writer/WbWriterVtkXmlASCII.h similarity index 100% rename from src/basics/basics/writer/WbWriterVtkXmlASCII.h rename to src/basics/writer/WbWriterVtkXmlASCII.h diff --git a/src/basics/basics/writer/WbWriterVtkXmlBinary.cpp b/src/basics/writer/WbWriterVtkXmlBinary.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterVtkXmlBinary.cpp rename to src/basics/writer/WbWriterVtkXmlBinary.cpp diff --git a/src/basics/basics/writer/WbWriterVtkXmlBinary.h b/src/basics/writer/WbWriterVtkXmlBinary.h similarity index 100% rename from src/basics/basics/writer/WbWriterVtkXmlBinary.h rename to src/basics/writer/WbWriterVtkXmlBinary.h diff --git a/src/basics/basics/writer/WbWriterVtkXmlImageBinary.cpp b/src/basics/writer/WbWriterVtkXmlImageBinary.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterVtkXmlImageBinary.cpp rename to src/basics/writer/WbWriterVtkXmlImageBinary.cpp diff --git a/src/basics/basics/writer/WbWriterVtkXmlImageBinary.h b/src/basics/writer/WbWriterVtkXmlImageBinary.h similarity index 100% rename from src/basics/basics/writer/WbWriterVtkXmlImageBinary.h rename to src/basics/writer/WbWriterVtkXmlImageBinary.h diff --git a/src/basics/basics/writer/WbWriterX3D.cpp b/src/basics/writer/WbWriterX3D.cpp similarity index 100% rename from src/basics/basics/writer/WbWriterX3D.cpp rename to src/basics/writer/WbWriterX3D.cpp diff --git a/src/basics/basics/writer/WbWriterX3D.h b/src/basics/writer/WbWriterX3D.h similarity index 100% rename from src/basics/basics/writer/WbWriterX3D.h rename to src/basics/writer/WbWriterX3D.h diff --git a/src/cpu/VirtualFluidsCore/LBM/LBMSystem.h b/src/cpu/VirtualFluidsCore/LBM/LBMSystem.h index 14b4d223b2e07e3dbca9947cefd89de045bfb3cf..5cea71cd2054cc6755266e1b0b9b314ea06cb476 100644 --- a/src/cpu/VirtualFluidsCore/LBM/LBMSystem.h +++ b/src/cpu/VirtualFluidsCore/LBM/LBMSystem.h @@ -37,7 +37,7 @@ #include <iostream> #include <string> -#include "basics/Core/DataTypes.h" +#include "basics/DataTypes.h" //! \brief namespace for global system-functions diff --git a/src/cpu/simulationconfig/include/simulationconfig/KernelConfigStructs.h b/src/cpu/simulationconfig/include/simulationconfig/KernelConfigStructs.h index f346ea6cdbc8dffe164ddda2bff5808886160092..53ea667c9da3a9c57d5aeeac67588cab0afbff3f 100644 --- a/src/cpu/simulationconfig/include/simulationconfig/KernelConfigStructs.h +++ b/src/cpu/simulationconfig/include/simulationconfig/KernelConfigStructs.h @@ -2,7 +2,7 @@ #define VIRTUALFLUIDSPYTHONBINDINGS_KERNELCONFIGSTRUCTS_H #include <string> -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> struct LBMKernelConfiguration { KernelFactory::KernelType kernelType; diff --git a/src/gpu/GridGenerator/CMakeLists.txt b/src/gpu/GridGenerator/CMakeLists.txt index 8102ad3a10b53dded2ba6fe489753f20d1d2ed4f..7cc0f0e20e2b43601f9f70e639d0ecd61cadb2ae 100644 --- a/src/gpu/GridGenerator/CMakeLists.txt +++ b/src/gpu/GridGenerator/CMakeLists.txt @@ -1,6 +1,6 @@ project(GridGenerator LANGUAGES CXX) -vf_add_library(PRIVATE_LINK basics OpenMP::OpenMP_CXX) +vf_add_library(PUBLIC_LINK basics logger OpenMP::OpenMP_CXX) vf_add_tests() if(NOT MSVC) diff --git a/src/gpu/GridGenerator/TransientBCSetter/TransientBCSetter.h b/src/gpu/GridGenerator/TransientBCSetter/TransientBCSetter.h index 1663a3ff37ba1bb062647847462d4e364baed93b..bdf29745a0a60473d0454c33dcb10a193ca10780 100644 --- a/src/gpu/GridGenerator/TransientBCSetter/TransientBCSetter.h +++ b/src/gpu/GridGenerator/TransientBCSetter/TransientBCSetter.h @@ -1,8 +1,8 @@ #ifndef TRANSIENTBCSETTER_H_ #define TRANSIENTBCSETTER_H_ -#include "Core/DataTypes.h" -#include <Core/StringUtilities/StringUtil.h> +#include "DataTypes.h" +#include <StringUtilities/StringUtil.h> #include "PointerDefinitions.h" #include <string> diff --git a/src/gpu/GridGenerator/geometries/Conglomerate/Conglomerate.cpp b/src/gpu/GridGenerator/geometries/Conglomerate/Conglomerate.cpp index 9128323083f91fe21e2d2168c756ff7c7d0186fa..b41813e12da1727ba03b7f179c93b4c6b042b76f 100644 --- a/src/gpu/GridGenerator/geometries/Conglomerate/Conglomerate.cpp +++ b/src/gpu/GridGenerator/geometries/Conglomerate/Conglomerate.cpp @@ -177,5 +177,5 @@ void Conglomerate::findInnerNodes(SPtr<GridImp> grid) addObjects[i]->findInnerNodes(grid); if( numberOfSubtractObjects > 0 ) - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Warning: Conglomerate::substract() is currently nut fully implemented!\n"; + VF_LOG_WARNING("Warning: Conglomerate::substract() is currently nut fully implemented!"); } diff --git a/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMesh.cpp b/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMesh.cpp index 56545a8d4a3e38c86bf67f18ac8b899fbca0fd0a..91bb8f030e76fa6e083e7765feb18c7ccc517ee1 100644 --- a/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMesh.cpp +++ b/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMesh.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "TriangularMesh.h" -#include "Core/Timer/Timer.h" +#include "Timer/Timer.h" #include "basics/geometry3d/GbTriFaceMesh3D.h" @@ -95,7 +95,7 @@ uint TriangularMesh::getNumberOfTriangles() const void TriangularMesh::findNeighbors() { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "start finding neighbors ...\n"; + VF_LOG_INFO("start finding neighbors ..."); auto t = Timer::makeStart(); @@ -103,8 +103,7 @@ void TriangularMesh::findNeighbors() finder.fillWithNeighborAngles(this); t->end(); - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "time finding neighbors: " << t->getTimeInSeconds() << "s\n"; + VF_LOG_INFO("time finding neighbors = {}", t->getTimeInSeconds()); } void TriangularMesh::setTriangles(std::vector<Triangle> triangles) @@ -152,7 +151,7 @@ GRIDGENERATOR_EXPORT void TriangularMesh::generateGbTriFaceMesh3D() { if( this->VF_GbTriFaceMesh3D ) return; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start generating GbTriFaceMesh3D:\n"; + VF_LOG_INFO("Start generating GbTriFaceMesh3D"); std::vector<GbTriFaceMesh3D::Vertex> *gbVertices = new std::vector<GbTriFaceMesh3D::Vertex>(this->triangleVec.size() * 3); std::vector<GbTriFaceMesh3D::TriFace> *gbTriangles = new std::vector<GbTriFaceMesh3D::TriFace>(this->triangleVec.size()); @@ -168,7 +167,7 @@ GRIDGENERATOR_EXPORT void TriangularMesh::generateGbTriFaceMesh3D() this->VF_GbTriFaceMesh3D = std::make_shared<GbTriFaceMesh3D>( "stl", gbVertices, gbTriangles, GbTriFaceMesh3D::KDTREE_SAHPLIT, false ); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Done generating GbTriFaceMesh3D\n"; + VF_LOG_INFO("Done generating GbTriFaceMesh3D"); } diff --git a/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMeshStrategy.cpp b/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMeshStrategy.cpp index d9c1486e2ca9469d55174eca673f22f180a78294..f66b216525253d26d0402c08ec89131130245ca0 100644 --- a/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMeshStrategy.cpp +++ b/src/gpu/GridGenerator/geometries/TriangularMesh/TriangularMeshStrategy.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "TriangularMeshStrategy.h" -#include "Core/Timer/Timer.h" +#include "Timer/Timer.h" #include "basics/geometry3d/GbTriFaceMesh3D.h" @@ -56,7 +56,7 @@ void PointInObjectDiscretizationStrategy::doDiscretize(TriangularMesh* triangula { triangularMesh->generateGbTriFaceMesh3D(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start Point-In-Object Test:\n"; + VF_LOG_INFO("Start Point-In-Object Test"); // trigger the GbTriFaceMesh3D to generate a kd-tree triangularMesh->getGbTriFaceMesh3D()->isPointInGbObject3D(0.0, 0.0, 0.0); @@ -79,12 +79,11 @@ void PointInObjectDiscretizationStrategy::doDiscretize(TriangularMesh* triangula // grid->setNodeTo(i, OuterType); if( timer->getCurrentRuntimeInSeconds() > outputTime ){ - *logging::out << logging::Logger::INFO_INTERMEDIATE << " " << index << "/" << grid->getSize() <<" nodes tested!\n"; + VF_LOG_INFO(" {} / {} nodes tested", index, grid->getSize()); timer->start(); } } - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Done Point-In-Object Test\n"; + VF_LOG_INFO("Done Point-In-Object Test"); } diff --git a/src/gpu/GridGenerator/global.h b/src/gpu/GridGenerator/global.h index 79f62bb354bed18075f6a8327a18f24d1d0fd1e2..296c6727f248933e259065e68cb81d8bf4e6c119 100644 --- a/src/gpu/GridGenerator/global.h +++ b/src/gpu/GridGenerator/global.h @@ -43,8 +43,8 @@ #include "GridGenerator_export.h" #include "basics/PointerDefinitions.h" -#include "basics/Core/DataTypes.h" +#include "basics/DataTypes.h" -#include "basics/Core/Logger/Logger.h" +#include <logger/Logger.h> #endif diff --git a/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp b/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp index 003e6dcd223d2bf019c83f71349a9a7bec84efdc..87ec7bab021064de527d251b5fe2908af8b5055d 100644 --- a/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp +++ b/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp @@ -94,7 +94,7 @@ void LevelGridBuilder::setSlipBoundaryCondition(SideType sideType, real normalX, slipBoundaryCondition->fillSlipNormalLists(); boundaryConditions[level]->slipBoundaryConditions.push_back(slipBoundaryCondition); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Slip BC on level " << level << " with " << (int)slipBoundaryCondition->indices.size() << "\n"; + VF_LOG_INFO("Set Slip BC on level {} with {}", level, slipBoundaryCondition->indices.size()); } } } @@ -114,7 +114,7 @@ void LevelGridBuilder::setSlipGeometryBoundaryCondition(real normalX, real norma boundaryConditions[level]->geometryBoundaryCondition->fillSlipNormalLists(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Geometry Slip BC on level " << level << " with " << (int)boundaryConditions[level]->geometryBoundaryCondition->indices.size() <<"\n"; + VF_LOG_INFO("Set Geometry Slip BC on level {} with {}", level, boundaryConditions[level]->geometryBoundaryCondition->indices.size()); } } } @@ -144,7 +144,7 @@ void LevelGridBuilder::setStressBoundaryCondition( SideType sideType, boundaryConditions[level]->stressBoundaryConditions.push_back(stressBoundaryCondition); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Stress BC on level " << level << " with " << (int)stressBoundaryCondition->indices.size() << "\n"; + VF_LOG_INFO("Set Stress BC on level {} with {}", level, stressBoundaryCondition->indices.size()); } } @@ -167,7 +167,7 @@ void LevelGridBuilder::setVelocityBoundaryCondition(SideType sideType, real vx, boundaryConditions[level]->velocityBoundaryConditions.push_back(velocityBoundaryCondition); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Velocity BC on level " << level << " with " << (int)velocityBoundaryCondition->indices.size() <<"\n"; + VF_LOG_INFO("Set Velocity BC on level {} with {}", level, velocityBoundaryCondition->indices.size()); } } } @@ -187,7 +187,7 @@ void LevelGridBuilder::setVelocityGeometryBoundaryCondition(real vx, real vy, re boundaryConditions[level]->geometryBoundaryCondition->fillVelocityLists(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Geometry Velocity BC on level " << level << " with " << (int)boundaryConditions[level]->geometryBoundaryCondition->indices.size() <<"\n"; + VF_LOG_INFO("Set Geometry BC on level {} with {}", level, boundaryConditions[level]->geometryBoundaryCondition->indices.size()); } } } @@ -204,7 +204,7 @@ void LevelGridBuilder::setPressureBoundaryCondition(SideType sideType, real rho) boundaryConditions[level]->pressureBoundaryConditions.push_back(pressureBoundaryCondition); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Pressure BC on level " << level << " with " << (int)pressureBoundaryCondition->indices.size() <<"\n"; + VF_LOG_INFO("Set Pressure BC on level {} with {}", level, pressureBoundaryCondition->indices.size()); } } @@ -245,7 +245,7 @@ void LevelGridBuilder::setNoSlipGeometryBoundaryCondition() { boundaryConditions[level]->geometryBoundaryCondition->side->addIndices(grids, level, boundaryConditions[level]->geometryBoundaryCondition); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Geometry No-Slip BC on level " << level << " with " << (int)boundaryConditions[level]->geometryBoundaryCondition->indices.size() <<"\n"; + VF_LOG_INFO("Set Geometry No-Slip BC on level {} with {}", level, boundaryConditions[level]->geometryBoundaryCondition->indices.size()); } } } @@ -255,7 +255,7 @@ void LevelGridBuilder::setPrecursorBoundaryCondition(SideType sideType, SPtr<Fil { if(fileLevelToGridLevelMap.empty()) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Mapping precursor file levels to the corresponding grid levels" << "\n"; + VF_LOG_INFO("Mapping precursor file levels to the corresponding grid levels"); for (uint level = 0; level < getNumberOfGridLevels(); level++) fileLevelToGridLevelMap.push_back(level); @@ -264,7 +264,7 @@ void LevelGridBuilder::setPrecursorBoundaryCondition(SideType sideType, SPtr<Fil { if(fileLevelToGridLevelMap.size()!=getNumberOfGridLevels()) throw std::runtime_error("In setPrecursorBoundaryCondition: fileLevelToGridLevelMap does not match with the number of levels"); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Using user defined file to grid level mapping" << "\n"; + VF_LOG_INFO("Using user defined file to grid level mapping"); } for (uint level = 0; level < getNumberOfGridLevels(); level++) @@ -279,7 +279,7 @@ void LevelGridBuilder::setPrecursorBoundaryCondition(SideType sideType, SPtr<Fil boundaryConditions[level]->precursorBoundaryConditions.push_back(precursorBoundaryCondition); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Set Precursor BC on level " << level << " with " << (int)precursorBoundaryCondition->indices.size() << "\n"; + VF_LOG_INFO("Set Precursor BC on level {} with {}", level, precursorBoundaryCondition->indices.size()); } } @@ -790,10 +790,10 @@ GRIDGENERATOR_EXPORT SPtr<GeometryBoundaryCondition> LevelGridBuilder::getGeomet void LevelGridBuilder::findFluidNodes(bool splitDomain) { - *logging::out << logging::Logger::INFO_HIGH << "Start findFluidNodes()\n"; + VF_LOG_TRACE("Start findFluidNodes()"); for (uint i = 0; i < grids.size(); i++) grids[i]->findFluidNodeIndices(splitDomain); - *logging::out << logging::Logger::INFO_HIGH << "Done with findFluidNodes()\n"; + VF_LOG_TRACE("Done findFluidNodes()"); } diff --git a/src/gpu/GridGenerator/grid/GridBuilder/MultipleGridBuilder.cpp b/src/gpu/GridGenerator/grid/GridBuilder/MultipleGridBuilder.cpp index bf226f235b81190a796630fccd495e96d0cb9098..e45ad99d8a63c332aa3723eb682b61dbc267f4db 100644 --- a/src/gpu/GridGenerator/grid/GridBuilder/MultipleGridBuilder.cpp +++ b/src/gpu/GridGenerator/grid/GridBuilder/MultipleGridBuilder.cpp @@ -490,7 +490,7 @@ void MultipleGridBuilder::buildGrids(bool enableThinWalls ) // for( int level = (int)grids.size()-1; level >= 0; level-- ) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start initializing level " << level << "\n"; + VF_LOG_INFO("Start initializing level {}", level); // On the coarse grid every thing is Fluid (w.r.t. the refinement) // On the finest grid the Fluid region is defined by the Object @@ -502,7 +502,7 @@ void MultipleGridBuilder::buildGrids(bool enableThinWalls ) else grids[level]->inital( grids[level+1], this->numberOfLayersBetweenLevels ); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Done initializing level " << level << "\n"; + VF_LOG_INFO("Done initializing level {}", level); } ////////////////////////////////////////////////////////////////////////// @@ -516,8 +516,7 @@ void MultipleGridBuilder::buildGrids(bool enableThinWalls ) // if (solidObject) { - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start with Q Computation\n"; + VF_LOG_TRACE("Start with Q Computation"); // Currently the solid object is only used on the finest grid, // because refinement into solid objects is not yet implemented. @@ -554,7 +553,7 @@ void MultipleGridBuilder::buildGrids(bool enableThinWalls ) grids[level]->findQs(solidObject.get()); } - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Done with Q Computation\n"; + VF_LOG_TRACE("Done with Q Computation"); } ////////////////////////////////////////////////////////////////////////// @@ -603,24 +602,24 @@ GRIDGENERATOR_EXPORT void MultipleGridBuilder::setNumberOfLayers(uint numberOfLa void MultipleGridBuilder::emitNoCoarseGridExistsWarning() { - *logging::out << logging::Logger::WARNING << "No Coarse grid was added before. Actual Grid is not added, please create coarse grid before.\n"; + VF_LOG_WARNING("No Coarse grid was added before. Actual Grid is not added, please create coarse grid before."); } void MultipleGridBuilder::emitGridIsNotInCoarseGridWarning() { - *logging::out << logging::Logger::WARNING << "Grid lies not inside of coarse grid. Actual Grid is not added.\n"; + VF_LOG_WARNING("Grid lies not inside of coarse grid. Actual Grid is not added."); } void MultipleGridBuilder::findCommunicationIndices(int direction) { - *logging::out << logging::Logger::INFO_HIGH << "Start findCommunicationIndices()\n"; + VF_LOG_TRACE("Start findCommunicationIndices()"); if( this->subDomainBox ) for (size_t i = 0; i < grids.size(); i++) grids[i]->findCommunicationIndices(direction, this->subDomainBox); - *logging::out << logging::Logger::INFO_HIGH << "Done with findCommunicationIndices()\n"; + VF_LOG_TRACE("Done findCommunicationIndices()"); } void MultipleGridBuilder::writeGridsToVtk(const std::string& path) const diff --git a/src/gpu/GridGenerator/grid/GridImp.cpp b/src/gpu/GridGenerator/grid/GridImp.cpp index e709e42d06e136b5fb323971835095c81fcba328..8ece061168883544d9857f109d505614ca005a43 100644 --- a/src/gpu/GridGenerator/grid/GridImp.cpp +++ b/src/gpu/GridGenerator/grid/GridImp.cpp @@ -131,31 +131,31 @@ void GridImp::inital(const SPtr<Grid> fineGrid, uint numberOfLayers) for (uint i = 0; i < this->size; i++) this->qIndices[i] = INVALID_INDEX; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start initalNodesToOutOfGrid()\n"; + VF_LOG_TRACE("Start initalNodesToOutOfGrid()"); + #pragma omp parallel for for (int index = 0; index < (int)this->size; index++) this->initalNodeToOutOfGrid(index); if( this->innerRegionFromFinerGrid ){ - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start setInnerBasedOnFinerGrid()\n"; + VF_LOG_TRACE("Start setInnerBasedOnFinerGrid()"); this->setInnerBasedOnFinerGrid(fineGrid); } else{ - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start findInnerNodes()\n"; + VF_LOG_TRACE("Start findInnerNodes()"); this->object->findInnerNodes( shared_from_this() ); } - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start addOverlap()\n"; + VF_LOG_TRACE("Start addOverlap()"); this->addOverlap(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start fixOddCells()\n"; + VF_LOG_TRACE("Start fixOddCells()"); #pragma omp parallel for for (int index = 0; index < (int)this->size; index++) this->fixOddCell(index); if( enableFixRefinementIntoTheWall ) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start fixRefinementIntoWall()\n"; + VF_LOG_TRACE("Start fixRefinementIntoWall()"); #pragma omp parallel for for (int xIdx = 0; xIdx < (int)this->nx; xIdx++) { for (uint yIdx = 0; yIdx < this->ny; yIdx++) { @@ -180,15 +180,13 @@ void GridImp::inital(const SPtr<Grid> fineGrid, uint numberOfLayers) } } } - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start findEndOfGridStopperNodes()\n"; + VF_LOG_TRACE("Start findEndOfGridStopperNodes()"); #pragma omp parallel for for (int index = 0; index < (int)this->size; index++) this->findEndOfGridStopperNode(index); - *logging::out << logging::Logger::INFO_INTERMEDIATE - << "Grid created: " << "from (" << this->startX << ", " << this->startY << ", " << this->startZ << ") to (" << this->endX << ", " << this->endY << ", " << this->endZ << ")\n" - << "nodes: " << this->nx << " x " << this->ny << " x " << this->nz << " = " << this->size << "\n"; + VF_LOG_INFO("Grid created: from ({}, {}, {}) to ({}, {}, {})", this->startX, this->startY, this->startZ, this->endX, this->endY, this->endZ); + VF_LOG_INFO("nodes: {} x {} x {} = {}", this->nx, this->ny, this->nz, this->size); } void GridImp::setOddStart(bool xOddStart, bool yOddStart, bool zOddStart) @@ -862,7 +860,7 @@ void GridImp::setNumberOfLayers(uint numberOfLayers) void GridImp::findSparseIndices(SPtr<Grid> finerGrid) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Find sparse indices..."; + VF_LOG_TRACE("Find sparse indices..."); auto fineGrid = std::static_pointer_cast<GridImp>(finerGrid); this->updateSparseIndices(); @@ -877,8 +875,7 @@ void GridImp::findSparseIndices(SPtr<Grid> finerGrid) } const uint newGridSize = this->getSparseSize(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "... done. new size: " << newGridSize - << ", delete nodes:" << this->getSize() - newGridSize << "\n"; + VF_LOG_TRACE("... done. new size: {}, delete nodes: {}", newGridSize, this->getSize() - newGridSize); } void GridImp::findForGridInterfaceNewIndices(SPtr<GridImp> fineGrid) @@ -1112,8 +1109,7 @@ void GridImp::findGridInterface(SPtr<Grid> finerGrid) const auto coarseLevel = this->getLevel(); const auto fineLevel = fineGrid->getLevel(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "find interface level " << coarseLevel << " -> " - << fineLevel; + VF_LOG_TRACE("find interface level {} -> {}", coarseLevel, fineLevel); this->gridInterface = new GridInterface(); // TODO: this is stupid! concave refinements can easily have many more interface cells @@ -1134,7 +1130,7 @@ void GridImp::findGridInterface(SPtr<Grid> finerGrid) for (uint index = 0; index < this->getSize(); index++) this->findOverlapStopper(index, *fineGrid); - *logging::out << logging::Logger::INFO_INTERMEDIATE << " ... done. \n"; + VF_LOG_TRACE(" ... done."); } void GridImp::repairGridInterfaceOnMultiGPU(SPtr<Grid> fineGrid) @@ -1236,7 +1232,7 @@ void GridImp::mesh(TriangularMesh &triangularMesh) const clock_t end = clock(); const real time = (real)(real(end - begin) / CLOCKS_PER_SEC); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "time grid generation: " << time << "s\n"; + VF_LOG_INFO("time grid generation: {}s", time); } void GridImp::mesh(Triangle &triangle) @@ -1267,7 +1263,7 @@ void GridImp::mesh(Triangle &triangle) void GridImp::closeNeedleCells() { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start closeNeedleCells()\n"; + VF_LOG_TRACE("Start closeNeedleCells()"); uint numberOfClosedNeedleCells = 0; @@ -1279,7 +1275,7 @@ void GridImp::closeNeedleCells() numberOfClosedNeedleCells++; } - *logging::out << logging::Logger::INFO_INTERMEDIATE << numberOfClosedNeedleCells << " cells closed!\n"; + VF_LOG_TRACE("{} cells closed!", numberOfClosedNeedleCells); } while( numberOfClosedNeedleCells > 0 ); } @@ -1308,7 +1304,7 @@ bool GridImp::closeCellIfNeedle(uint index) void GridImp::closeNeedleCellsThinWall() { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start closeNeedleCellsThinWall()\n"; + VF_LOG_TRACE("Start closeNeedleCellsThinWall()"); uint numberOfClosedNeedleCells = 0; @@ -1319,8 +1315,7 @@ void GridImp::closeNeedleCellsThinWall() if (this->closeCellIfNeedleThinWall(index)) numberOfClosedNeedleCells++; } - - *logging::out << logging::Logger::INFO_INTERMEDIATE << numberOfClosedNeedleCells << " cells closed!\n"; + VF_LOG_TRACE("{} cells closed!", numberOfClosedNeedleCells); } while( numberOfClosedNeedleCells > 0 ); } @@ -1380,7 +1375,7 @@ void GridImp::findQs(TriangularMesh &triangularMesh) const clock_t end = clock(); const real time = (real)(real(end - begin) / CLOCKS_PER_SEC); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "time finding qs: " << time << "s\n"; + VF_LOG_TRACE("time finding qs: {}s", time); } void GridImp::findQs(Triangle &triangle) @@ -1727,12 +1722,8 @@ void GridImp::repairCommunicationIndices(int direction) this->communicationIndices[direction].receiveIndices = this->communicationIndices[direction+1].receiveIndices; - - - - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size send " << (int)this->communicationIndices[direction].sendIndices.size() << "\n"; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "recv send " << (int)this->communicationIndices[direction].receiveIndices.size() << "\n"; + VF_LOG_INFO("size send {}", (int)this->communicationIndices[direction].sendIndices.size()); + VF_LOG_INFO("recv send {}",(int)this->communicationIndices[direction].receiveIndices.size()); } diff --git a/src/gpu/GridGenerator/grid/GridImpTest.cpp b/src/gpu/GridGenerator/grid/GridImpTest.cpp index 397d76a7761cb68d34a3aaaa06045ce84a43ec5c..07b2a03f429ad8baf0badd0c966dd88235644c0a 100644 --- a/src/gpu/GridGenerator/grid/GridImpTest.cpp +++ b/src/gpu/GridGenerator/grid/GridImpTest.cpp @@ -175,12 +175,6 @@ protected: auto gridFactory = GridFactory::make(); gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::POINT_IN_OBJECT); gridBuilder = MultipleGridBuilder::makeShared(gridFactory); - - // init logger to avoid segmentation fault in buildGrids - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::Level::WARNING); - logging::Logger::timeStamp(logging::Logger::ENABLE); - logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); } }; diff --git a/src/gpu/GridGenerator/io/GridVTKWriter/GridVTKWriter.cpp b/src/gpu/GridGenerator/io/GridVTKWriter/GridVTKWriter.cpp index 7f818f3217e682f21c2b41c62070924243fcb3b0..e5ddf7932e8505c713387f96157a80626d37aa1e 100644 --- a/src/gpu/GridGenerator/io/GridVTKWriter/GridVTKWriter.cpp +++ b/src/gpu/GridGenerator/io/GridVTKWriter/GridVTKWriter.cpp @@ -38,8 +38,8 @@ #include <sstream> #include <memory> -#include "basics/basics/writer/WbWriterVtkXmlBinary.h" -#include "basics/basics/container/CbArray3D.h" +#include "basics/writer/WbWriterVtkXmlBinary.h" +#include "basics/container/CbArray3D.h" #include "geometries/Vertex/Vertex.h" @@ -85,7 +85,7 @@ void GridVTKWriter::writeGridToVTKXML(SPtr<Grid> grid, const std::string& name) std::vector<std::string> nodedatanames; std::vector< std::vector<double> > nodedata; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Write Grid to XML VTK (*.vtu) output file : " + name + "_Part_" + std::to_string(part) + "\n"; + VF_LOG_INFO("Write Grid to XML VTK (*.vtu) output file : {}_Part_{}", name, part); nodedatanames.emplace_back("types"); nodedatanames.emplace_back("sparse_id"); @@ -154,7 +154,7 @@ void GridVTKWriter::writeGridToVTKXML(SPtr<Grid> grid, const std::string& name) } } WbWriterVtkXmlBinary::getInstance()->writeOctsWithNodeData(name + "_Part_" + std::to_string(part), nodes, cells, nodedatanames, nodedata); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "done. \n"; + VF_LOG_INFO("done."); } } @@ -282,14 +282,14 @@ void GridVTKWriter::initalVtkWriter(WRITING_FORMAT format, const std::string& na { GridVTKWriter::format = format; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Write Grid to vtk output file : " + name + "\n"; + VF_LOG_INFO("Write Grid to vtk output file: {}", name); std::string mode = "w"; if (isBinaryWritingFormat()) mode = "wb"; GridVTKWriter::openFile(name, mode); - *logging::out << logging::Logger::INFO_INTERMEDIATE << " Output file opened ...\n"; + VF_LOG_INFO("Output file opened ..."); } bool GridVTKWriter::isBinaryWritingFormat() @@ -306,14 +306,14 @@ void GridVTKWriter::writeVtkFile(SPtr<Grid> grid) GridVTKWriter::writeTypes(grid); GridVTKWriter::closeFile(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Output file closed\n"; + VF_LOG_INFO("Output file closed"); } void GridVTKWriter::openFile(const std::string& name, const std::string& mode) { file = fopen(name.c_str(), mode.c_str()); if(file==NULL) - *logging::out << logging::Logger::INFO_HIGH << " cannot open file ...\n"; + VF_LOG_CRITICAL("cannot open file {}", name); } void GridVTKWriter::closeFile() diff --git a/src/gpu/GridGenerator/io/QLineWriter.cpp b/src/gpu/GridGenerator/io/QLineWriter.cpp index 29894e8d589fb59c1dbf57e08692dddfc03619a1..1aece49ceeabc5ca195146f2ac6dcb7ba960f3ea 100644 --- a/src/gpu/GridGenerator/io/QLineWriter.cpp +++ b/src/gpu/GridGenerator/io/QLineWriter.cpp @@ -36,7 +36,7 @@ #include <string> #include <fstream> -#include "basics/basics/utilities/UbTuple.h" +#include "basics/utilities/UbTuple.h" #include "geometries/Vertex/Vertex.h" @@ -50,7 +50,7 @@ void QLineWriter::writeArrows(std::string fileName, SPtr<GeometryBoundaryConditi { if (geometryBoundaryCondition == nullptr) { - *logging::out << logging::Logger::WARNING << "(QLineWriter::writeArrows) no geometry bc on this grid level.\n"; + VF_LOG_WARNING("(QLineWriter::writeArrows) no geometry bc on this grid level."); return; } std::vector<UbTupleFloat3> nodes; diff --git a/src/gpu/GridGenerator/io/STLReaderWriter/STLReader.cpp b/src/gpu/GridGenerator/io/STLReaderWriter/STLReader.cpp index d3eb221265b2f8c79d5aece8729585733c2d60e8..d73adc73eeffce56397829c115def5bfd1d8bc59 100644 --- a/src/gpu/GridGenerator/io/STLReaderWriter/STLReader.cpp +++ b/src/gpu/GridGenerator/io/STLReaderWriter/STLReader.cpp @@ -55,17 +55,17 @@ std::vector<Triangle> STLReader::readSTL(const std::string& name) line[strcspn(line.c_str(), "\r\n")] = 0; if (strcmp(line.c_str(), "solid ascii") == 0) { file.close(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "start reading ascii STL file: " + name + "\n"; + VF_LOG_INFO("start reading ascii STL file: {}" , name); return readASCIISTL(name); } else { file.close(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "start reading binary STL file: " + name + "\n"; + VF_LOG_INFO("start reading binary STL file: {}" , name); + return readBinarySTL(name); } } - - *logging::out << logging::Logger::INFO_INTERMEDIATE << "can't open STL-file" + name + " ... exit program! \n"; + VF_LOG_CRITICAL("can't open STL-file {} ... exit program!" , name); exit(1); } @@ -81,7 +81,7 @@ std::vector<Triangle> STLReader::readASCIISTL(const std::string& name) const int lines = countLinesInFile(name); const int nTriangles = (lines) / 7; // seven lines per triangle - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Number of Triangles: " << nTriangles << "\n"; + VF_LOG_INFO("Number of Triangles: {}" , nTriangles); std::vector<Triangle> triangles; std::string line; @@ -109,8 +109,7 @@ std::vector<Triangle> STLReader::readASCIISTL(const std::string& name) std::vector<Triangle> STLReader::readASCIISTLWithPatches(const std::string& name, const std::vector<uint> ignorePatches) { - *logging::out << logging::Logger::INFO_HIGH << "Start reading ascii STL file:\n"; - *logging::out << logging::Logger::INFO_HIGH << " " + name + "\n"; + VF_LOG_INFO("Start reading ascii STL file: {}" , name); std::vector<Triangle> triangles; @@ -141,9 +140,10 @@ std::vector<Triangle> STLReader::readASCIISTLWithPatches(const std::string& name ignoreCurrentPatch = std::find( ignorePatches.begin(), ignorePatches.end(), currentPatchIndex ) != ignorePatches.end(); if( !ignoreCurrentPatch ) - *logging::out << logging::Logger::INFO_INTERMEDIATE << " Reading STL-Group " << line.substr( line.find(' ') + 1 ) << " as patch " << currentPatchIndex << "\n"; + VF_LOG_INFO(" Reading STL-Group {} as patch {}" , line.substr( line.find(' ') + 1 ) , currentPatchIndex); else - *logging::out << logging::Logger::WARNING << " Ignoring STL-Group " << line.substr( line.find(' ') + 1 ) << " as patch " << currentPatchIndex << "\n"; + VF_LOG_WARNING(" Ignoring STL-Group {} as patch {}" , line.substr( line.find(' ') + 1 ) , currentPatchIndex); + currentFacetLine++; } @@ -202,7 +202,7 @@ std::vector<Triangle> STLReader::readASCIISTLWithPatches(const std::string& name file.close(); - *logging::out << logging::Logger::INFO_HIGH << "Done reading ascii STL file\n"; + VF_LOG_INFO("Done reading ascii STL file"); return triangles; } @@ -218,7 +218,7 @@ std::vector<Triangle> STLReader::readBinarySTL(const std::string& name) char nTri[4]; sizef = fread(nTri, sizeof(char), 4, file); unsigned long nTriLong = *((unsigned long*)nTri); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Number of Triangles: " << nTriLong << "\n"; + VF_LOG_INFO("Number of Triangles: {}" , nTriLong); std::vector<Triangle> triangles; char facet[50]; @@ -248,18 +248,18 @@ std::vector<Triangle> STLReader::readSTL(const BoundingBox &box, const std::stri line[strcspn(line.c_str(), "\r\n")] = 0; if (strcmp(line.c_str(), "solid ascii") == 0) { file.close(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "start reading ascii STL file: " + name + "\n"; + VF_LOG_INFO("start reading ascii STL file {}", name); return readASCIISTL(box, name); } else { file.close(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "start reading binary STL file: " + name + "\n"; + VF_LOG_INFO("start reading binary STL file {}", name); std::vector<Triangle> triangles = readBinarySTL(box, name); return triangles; } } else { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "can't open STL-file" + name + "\n"; + VF_LOG_CRITICAL("can't open STL-file {}", name); exit(1); } } @@ -311,7 +311,7 @@ std::vector<Triangle> STLReader::readBinarySTL(const BoundingBox &box, const std sizef = fread(nTri, sizeof(char), 4, file); nTriLong = *((unsigned long*)nTri); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Number of Triangles complete geometry: " << nTriLong << "\n"; + VF_LOG_INFO("Number of Triangles complete geometry: {}", nTriLong); std::vector<Triangle> triangles; char facet[50]; @@ -329,8 +329,8 @@ std::vector<Triangle> STLReader::readBinarySTL(const BoundingBox &box, const std triangles.push_back(t); } int size = (int)triangles.size(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Number of Triangles in process: " << size << "\n"; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Complete reading STL file. \n"; + VF_LOG_INFO("Number of Triangles in process: {}", size); + VF_LOG_INFO("Complete reading STL file"); (void)sizef; fclose(file); diff --git a/src/gpu/GridGenerator/io/STLReaderWriter/STLWriter.cpp b/src/gpu/GridGenerator/io/STLReaderWriter/STLWriter.cpp index e29320cbd6867e1ae5a65cf41623780cd83aead7..c1f306839e7ed7a9815c041c4e000df044d43630 100644 --- a/src/gpu/GridGenerator/io/STLReaderWriter/STLWriter.cpp +++ b/src/gpu/GridGenerator/io/STLReaderWriter/STLWriter.cpp @@ -42,7 +42,7 @@ void STLWriter::writeSTL(std::vector<Triangle> &vec, const std::string &name, bool writeBinary) { const int size = (int)vec.size(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Write " << size << " Triangles to STL : " + name + "\n"; + VF_LOG_INFO("Write {} Triangles to STL : {}" , size, name); std::ios_base::openmode mode = std::ios::out; if (writeBinary) @@ -51,7 +51,7 @@ void STLWriter::writeSTL(std::vector<Triangle> &vec, const std::string &name, bo std::ofstream ofstream(name, mode); if (!ofstream.is_open()) { - *logging::out << logging::Logger::INFO_HIGH << " Output file not open - exit function\n"; + VF_LOG_WARNING("Output file not open - exit function"); return; } @@ -61,7 +61,7 @@ void STLWriter::writeSTL(std::vector<Triangle> &vec, const std::string &name, bo writeAsciiSTL(ofstream, vec); ofstream.close(); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Output file closed\n"; + VF_LOG_INFO("Output file closed"); } diff --git a/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.cpp b/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.cpp index 0238434dc87b453dc21164577d8abd4ce1819793..eb7e6b22e160de4fedb5832be807dabf36531c9c 100644 --- a/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.cpp +++ b/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.cpp @@ -38,7 +38,7 @@ #include <omp.h> #include <cmath> -#include "Core/Timer/Timer.h" +#include "Timer/Timer.h" #include "grid/NodeValues.h" #include "grid/Grid.h" @@ -59,13 +59,13 @@ void SimulationFileWriter::write(const std::string& folder, SPtr<GridBuilder> bu { SimulationFileWriter::folder = folder; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Start writing simulation files to " << folder << ":\n"; + VF_LOG_INFO("Start writing simulation files to {}", folder); auto timer = Timer::makeStart(); write(builder, format); - *logging::out << logging::Logger::INFO_INTERMEDIATE << " Time writing files: " << timer->getCurrentRuntimeInSeconds() << " sec\n"; - *logging::out << logging::Logger::INFO_INTERMEDIATE << "Done writing simulation Files!\n"; + VF_LOG_INFO(" Time writing files: {} sec", timer->getCurrentRuntimeInSeconds()); + VF_LOG_INFO("Done writing simulation Files!"); } @@ -79,7 +79,7 @@ void SimulationFileWriter::write(SPtr<GridBuilder> builder, FILEFORMAT format) writeLevel(numberOfLevel); //auto qs = createBCVectors(builder->getGrid(0)); - *logging::out << logging::Logger::INFO_INTERMEDIATE << " Coordinate and neighbor files:\n"; + VF_LOG_INFO(" Coordinate and neighbor files:"); for (uint level = 0; level < numberOfLevel; level++) { writeNumberNodes(builder, level); @@ -95,10 +95,10 @@ void SimulationFileWriter::write(SPtr<GridBuilder> builder, FILEFORMAT format) } } - *logging::out << logging::Logger::INFO_INTERMEDIATE << " Boundary Condition files:\n"; + VF_LOG_INFO(" Boundary Condition files:"); writeBoundaryQsFile(builder); - *logging::out << logging::Logger::INFO_INTERMEDIATE << " Communication files:\n"; + VF_LOG_INFO(" Communication files:"); writeCommunicationFiles(builder); closeFiles(); diff --git a/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.h b/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.h index f3851abfd3372e5d3548cf7c0cd02344aa8acbaa..a4ba3d4b53f2feb63d0363bf47e92152bea05c57 100644 --- a/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.h +++ b/src/gpu/GridGenerator/io/SimulationFileWriter/SimulationFileWriter.h @@ -40,8 +40,6 @@ #include <vector> #include <array> -#include "Core/NonCreatable.h" - #include "gpu/GridGenerator/global.h" class UnstructuredGridBuilder; @@ -57,7 +55,7 @@ enum class FILEFORMAT BINARY, ASCII }; -class SimulationFileWriter : private NonCreatable +class SimulationFileWriter { public: GRIDGENERATOR_EXPORT static void write(const std::string& folder, SPtr<GridBuilder> builder, FILEFORMAT format); diff --git a/src/gpu/VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp b/src/gpu/VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp index 9572252965e1c619702370f8b9a3756bf035035e..681e4702b5f119c0f0c29273ee5d868a32fca0c7 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp @@ -8,7 +8,7 @@ #include "Calculation/CalcTurbulenceIntensity.h" #include <cuda_runtime.h> #include <helper_cuda.h> -#include <basics/Core/StringUtilities/StringUtil.h> +#include <basics/StringUtilities/StringUtil.h> void allocTurbulenceIntensity(Parameter *para, CudaMemoryManager *cudaMemoryManager) { diff --git a/src/gpu/VirtualFluids_GPU/Calculation/CollisisionStrategy.cpp b/src/gpu/VirtualFluids_GPU/Calculation/CollisisionStrategy.cpp index 49543f37df7fb54290f4ab6c09edb8d10c0b67be..334212f903e62608676a3473523182113a7a7723 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/CollisisionStrategy.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/CollisisionStrategy.cpp @@ -1,7 +1,7 @@ #include "CollisionStrategy.h" #include "Parameter/CudaStreamManager.h" #include "Parameter/Parameter.h" -#include "logger/Logger.h" +#include <logger/Logger.h> std::function<void(UpdateGrid27 *updateGrid, Parameter *para, int level, unsigned int t)> getFunctionForCollisionAndExchange(const bool useStreams, const int numberOfMpiProcesses, diff --git a/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp b/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp index bb20d25bbc6b82e1d2b3dddd8a2f732a384cdb6d..3956bcbee4478e7c780559ef2dc74b2bd1fc79f7 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp @@ -7,7 +7,7 @@ #include <fstream> #include <sstream> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include <cassert> //#include <math.h> diff --git a/src/gpu/VirtualFluids_GPU/Calculation/DragLift.cpp b/src/gpu/VirtualFluids_GPU/Calculation/DragLift.cpp index 97d2af28ef7f801e817dd6cae6ad58d244249e02..2c2dc19795959c87a02705778a9768210580be41 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/DragLift.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/DragLift.cpp @@ -7,7 +7,7 @@ #include <fstream> #include <sstream> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" //#include <math.h> //#include "LB.h" diff --git a/src/gpu/VirtualFluids_GPU/Calculation/ForceCalculations.cpp b/src/gpu/VirtualFluids_GPU/Calculation/ForceCalculations.cpp index cc1d2eb748b01835b46f5fc69f47ed3ddc17a28d..f220c9a811486d14977ac9e55527c9e3e60c2478 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/ForceCalculations.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/ForceCalculations.cpp @@ -9,7 +9,7 @@ #include <sstream> #include "GPU/CudaMemoryManager.h" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" //using namespace std; ////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/VirtualFluids_GPU/Calculation/PlaneCalculations.cpp b/src/gpu/VirtualFluids_GPU/Calculation/PlaneCalculations.cpp index 13b6bd662a1b51a9a7a850211751c8b8b5ecf329..6557a2a0730c14cc1b26097c5025827128d3a1ce 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/PlaneCalculations.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/PlaneCalculations.cpp @@ -9,7 +9,7 @@ #include <sstream> //using namespace std; ////////////////////////////////////////////////////////////////////////// -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" void setSizeOfPlane(Parameter* para, int lev, unsigned int z) { diff --git a/src/gpu/VirtualFluids_GPU/Calculation/RefinementStrategy.cpp b/src/gpu/VirtualFluids_GPU/Calculation/RefinementStrategy.cpp index f1c9bb8e53f81a554091a5e230ba09556b084167..9428b07987f832ae0101196a8a430495fe27d508 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/RefinementStrategy.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/RefinementStrategy.cpp @@ -1,7 +1,7 @@ #include "RefinementStrategy.h" #include "Parameter/CudaStreamManager.h" #include "Parameter/Parameter.h" -#include "logger/Logger.h" +#include <logger/Logger.h> std::function<void(UpdateGrid27 *updateGrid, Parameter *para, int level)> getFunctionForRefinementAndExchange(const bool useStreams, const int numberOfMpiProcesses, const int maxLevel, diff --git a/src/gpu/VirtualFluids_GPU/Communication/CommunicationRoutine.h b/src/gpu/VirtualFluids_GPU/Communication/CommunicationRoutine.h index 39866728b713c9c0c72cb5c62ba02f242e0ca68c..26c017f939b0795457d74008a21cb9e7a4b75bd0 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/CommunicationRoutine.h +++ b/src/gpu/VirtualFluids_GPU/Communication/CommunicationRoutine.h @@ -1,7 +1,7 @@ #ifndef INDEX_EXCHANGE #define INDEX_EXCHANGE -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> namespace vf::gpu { diff --git a/src/gpu/VirtualFluids_GPU/Communication/Communicator.h b/src/gpu/VirtualFluids_GPU/Communication/Communicator.h index d7f57c5630270f87cd7df08492d8ff96585d7a50..716eb6c7c2c091cb79ce502504d634d53ea40937 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/Communicator.h +++ b/src/gpu/VirtualFluids_GPU/Communication/Communicator.h @@ -8,7 +8,7 @@ #include "VirtualFluids_GPU_export.h" #include "CommunicationRoutine.h" -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> ////////////////////////////////// #ifdef VF_DOUBLE_ACCURACY diff --git a/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.cpp b/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.cpp index bdd747ee856cb88e3c46ee93a0fedd394707a074..48a27efa674e5fa85d47cb9439c52d0c558dac44 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.cpp +++ b/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.cpp @@ -82,7 +82,7 @@ void copyEdgeNodes(std::vector<LBMSimulationParameter::EdgeNodePositions> &edgeN int numNodesInBufferSend = 0; #pragma omp parallel for - for (uint i = 0; i < edgeNodes.size(); i++) { + for (int i = 0; i < (int)edgeNodes.size(); i++) { indexInSubdomainRecv = edgeNodes[i].indexOfProcessNeighborRecv; indexInSubdomainSend = edgeNodes[i].indexOfProcessNeighborSend; numNodesInBufferRecv = recvProcessNeighborHost[indexInSubdomainRecv].numberOfNodes; diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp index 647ab169b22dfd5973bb6ee6bbf80745ca647241..c126b2f79e02272a0bd86bfe0f76fe5efe09a5a7 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.cpp @@ -35,11 +35,6 @@ GridReader::GridReader(FILEFORMAT format, std::shared_ptr<Parameter> para, std:: channelDirections[5] = "bottom"; } -GridReader::~GridReader() -{ - -} - bool GridReader::getBinaer() { return binaer; @@ -58,7 +53,7 @@ void rearrangeGeometry(Parameter* para, int lev) void GridReader::allocArrays_CoordNeighborGeo() { - std::cout << "-----Config Arrays Coord, Neighbor, Geo------" << std::endl; + VF_LOG_TRACE("-----Config Arrays Coord, Neighbor, Geo------"); CoordNeighborGeoV coordX(para->getcoordX(), binaer, true); CoordNeighborGeoV coordY(para->getcoordY(), binaer, true); @@ -70,15 +65,15 @@ void GridReader::allocArrays_CoordNeighborGeo() CoordNeighborGeoV geoV(para->getgeoVec(), binaer, false); uint maxLevel = coordX.getLevel(); - std::cout << "Number of Level: " << maxLevel + 1 << std::endl; + VF_LOG_INFO("Number of Level: {}", maxLevel + 1); uint numberOfNodesGlobal = 0; - std::cout << "Number of Nodes: " << std::endl; + VF_LOG_INFO("Number of Nodes: "); for (uint level = 0; level <= maxLevel; level++) { const uint numberOfNodesPerLevel = coordX.getSize(level) + 1; numberOfNodesGlobal += numberOfNodesPerLevel; - std::cout << "Level " << level << " = " << numberOfNodesPerLevel << " Nodes" << std::endl; + VF_LOG_INFO("Level {} = {} Nodes", level, numberOfNodesPerLevel); setNumberOfNodes(numberOfNodesPerLevel, level); @@ -105,13 +100,14 @@ void GridReader::allocArrays_CoordNeighborGeo() cudaMemoryManager->cudaCopySP(level); cudaMemoryManager->cudaCopyCoord(level); } - std::cout << "Number of Nodes: " << numberOfNodesGlobal << std::endl; - std::cout << "-----finish Coord, Neighbor, Geo------" <<std::endl; + VF_LOG_INFO("Number of Nodes: {}", numberOfNodesGlobal); + VF_LOG_TRACE("-----finish Config Arrays Coord, Neighbor, Geo------"); } void GridReader::allocArrays_BoundaryValues() { - std::cout << "------read BoundaryValues------" <<std::endl; + VF_LOG_TRACE("------read BoundaryValues-------"); + this->makeReader(para); this->setChannelBoundaryCondition(); @@ -142,7 +138,7 @@ void GridReader::allocArrays_BoundaryValues() void GridReader::allocArrays_OffsetScale() { - std::cout << "-----Config Arrays OffsetScale------" << std::endl; + VF_LOG_TRACE("------Config Arrays OffsetScale-------"); OffsetScale *obj_offCF = new OffsetScale(para->getscaleOffsetCF(), true); OffsetScale *obj_offFC = new OffsetScale(para->getscaleOffsetFC(), true); OffsetScale *obj_scaleCFC = new OffsetScale(para->getscaleCFC(), false); @@ -157,9 +153,9 @@ void GridReader::allocArrays_OffsetScale() for (int i = 0; i<level; i++) { unsigned int tempCF = obj_offCF->getSize(i); - std::cout << "Groesse der Daten CF vom Level " << i << " : " << tempCF << std::endl; + VF_LOG_INFO("Size Data CF from Level {}: {}", i, tempCF); unsigned int tempFC = obj_offFC->getSize(i); - std::cout << "Groesse der Daten FC vom Level " << i << " : " << tempFC << std::endl; + VF_LOG_INFO("Size Data CF from Level {}: {}", i, tempFC); AnzahlKnotenGesCF += tempCF; AnzahlKnotenGesFC += tempFC; @@ -194,8 +190,8 @@ void GridReader::allocArrays_OffsetScale() cudaMemoryManager->cudaCopyInterfaceOffFC(i); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } - std::cout << "Gesamtanzahl Knoten CF = " << AnzahlKnotenGesCF << std::endl; - std::cout << "Gesamtanzahl Knoten FC = " << AnzahlKnotenGesFC << std::endl; + VF_LOG_INFO("Total number of Nodes CF = {}", AnzahlKnotenGesCF); + VF_LOG_INFO("Total number of Nodes FC = {}", AnzahlKnotenGesFC); delete obj_offCF; delete obj_offFC; @@ -203,21 +199,21 @@ void GridReader::allocArrays_OffsetScale() delete obj_scaleCFF; delete obj_scaleFCC; delete obj_scaleFCF; - std::cout << "-----Ende OffsetScale------" << std::endl; + VF_LOG_TRACE("Finish OffsetScale"); } void GridReader::allocArrays_taggedFluidNodes() { - std::cout << "GridReader::allocArrays_fluidNodeIndices not implemented" << std::endl; + VF_LOG_WARNING("GridReader::allocArrays_fluidNodeIndices not implemented"); // TODO } void GridReader::tagFluidNodeIndices(const std::vector<uint>& taggedFluidNodeIndices, CollisionTemplate tag, uint level){ - std::cout << "GridReader::tagFluidNodeIndices not implemented" << std::endl; + VF_LOG_WARNING("GridReader::tagFluidNodeIndices not implemented"); // TODO } void GridReader::sortFluidNodeTags(){ - std::cout << "GridReader::sortFluidNodeTags not implemented" << std::endl; + VF_LOG_WARNING("GridReader::sortFluidNodeTags not implemented"); // TODO } @@ -230,7 +226,7 @@ void GridReader::setPressureValues(int channelSide) const if (sizePerLevel > 0) { - std::cout << "size pressure level " << level << " : " << sizePerLevel << std::endl; + VF_LOG_INFO("size pressure level {}: {}", level, sizePerLevel); cudaMemoryManager->cudaAllocPress(level); @@ -261,7 +257,7 @@ void GridReader::fillVelocityVectors(int channelSide) real *veloY_ValuesPerSide = new real[sizePerLevel]; real *veloZ_ValuesPerSide = new real[sizePerLevel]; - std::cout << "size velocity level " << level << " : " << sizePerLevel << std::endl; + VF_LOG_INFO("size velocity level {}: {}", level, sizePerLevel); BC_Values[channelSide]->setVelocityValues(veloX_ValuesPerSide, veloY_ValuesPerSide, veloZ_ValuesPerSide, level); for (int i = 0; i < sizePerLevel; i++) { @@ -283,7 +279,7 @@ void GridReader::setVelocityValues() { for (int level = 0; level < (int)(velocityX_BCvalues.size()); level++) { int sizePerLevel = (int) velocityX_BCvalues[level].size(); - std::cout << "complete size velocity level " << level << " : " << sizePerLevel << std::endl; + VF_LOG_INFO("Complete size velocity level {}: {}", level, sizePerLevel); setVelocitySizePerLevel(level, sizePerLevel); if (sizePerLevel > 1) { @@ -314,7 +310,7 @@ void GridReader::setOutflowValues(int channelSide) const if (sizePerLevel > 1) { - std::cout << "size outflow level " << level << " : " << sizePerLevel << std::endl; + VF_LOG_INFO("size outflow level {}: {}", level, sizePerLevel); cudaMemoryManager->cudaAllocOutflowBC(level); @@ -390,7 +386,7 @@ void GridReader::initalValuesDomainDecompostion(int level) { //////////////////////////////////////////////////////////////////////////////////////// //send - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for X send buffer, Level " << i << " : " << tempSend << "\n"; + VF_LOG_INFO("size of Data for X send buffer, Level {} : {}", i, tempSend); //////////////////////////////////////////////////////////////////////////////////////// para->setNumberOfProcessNeighborsX((unsigned int)procNeighborsSendX.size(), i, "send"); para->getParH(i)->sendProcessNeighborX[j].rankNeighbor = neighborRankX[j]; @@ -548,7 +544,7 @@ void GridReader::initalValuesDomainDecompostion(int level) void GridReader::allocArrays_BoundaryQs() { - std::cout << "------read BoundaryQs-------" <<std::endl; + VF_LOG_TRACE("------read BoundaryQs-------"); std::vector<std::shared_ptr<BoundaryQs> > BC_Qs(channelDirections.size()); this->makeReader(BC_Qs, para); @@ -572,7 +568,7 @@ void GridReader::allocArrays_BoundaryQs() if (para->getIsGeo()) setGeoQs(obj_geomQ); - std::cout << "-----finish BoundaryQs------" <<std::endl; + VF_LOG_TRACE("------finish BoundaryQs-------"); } @@ -912,6 +908,6 @@ void GridReader::setChannelBoundaryCondition() for (std::size_t i = 0; i < channelDirections.size(); i++) { this->channelBoundaryConditions[i] = BC_Values[i]->getBoundaryCondition(); - std::cout << this->channelDirections[i] << " Boundary: " << channelBoundaryConditions[i] << std::endl; + VF_LOG_INFO("{} Boundary: {}", this->channelDirections[i], channelBoundaryConditions[i]); } } diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h index 041d2c3ce94592f792c5a850eebd14c07f4db1b4..d244e76569fe213978086ab412725e4450da66e4 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderFiles/GridReader.h @@ -35,7 +35,7 @@ private: public: GridReader(FILEFORMAT format, std::shared_ptr<Parameter> para, std::shared_ptr<CudaMemoryManager> cudaMemoryManager); - ~GridReader() override; + ~GridReader() {}; void allocArrays_CoordNeighborGeo() override; void allocArrays_BoundaryValues() override; void allocArrays_OffsetScale() override; diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp index 533382211dfba6c2d1ad88b1c75ef89e32beec0f..789db6d192cfffe5630eb093ad108df57b6870f4 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp @@ -31,7 +31,7 @@ GridGenerator::GridGenerator(std::shared_ptr<GridBuilder> builder, std::shared_p std::make_unique<InterpolationCellGrouper>(para->getParHallLevels(), para->getParDallLevels(), builder); } -GridGenerator::~GridGenerator() = default; +GridGenerator::~GridGenerator() {} void GridGenerator::setIndexRearrangementForStreams(std::unique_ptr<IndexRearrangementForStreams> &&indexRearrangement) { @@ -58,15 +58,15 @@ void GridGenerator::initalGridInformations() void GridGenerator::allocArrays_CoordNeighborGeo() { const uint numberOfLevels = builder->getNumberOfGridLevels(); - std::cout << "Number of Level: " << numberOfLevels << std::endl; + VF_LOG_INFO("Number of Level: {}", numberOfLevels); int numberOfNodesGlobal = 0; - std::cout << "Number of Nodes: " << std::endl; + VF_LOG_INFO("Number of Nodes: "); for (uint level = 0; level < numberOfLevels; level++) { const uint numberOfNodesPerLevel = builder->getNumberOfNodes(level) + 1; numberOfNodesGlobal += numberOfNodesPerLevel; - std::cout << "Level " << level << " = " << numberOfNodesPerLevel << " Nodes" << std::endl; + VF_LOG_INFO("Level {} = {} Nodes", level, numberOfNodesPerLevel); setNumberOfNodes(numberOfNodesPerLevel, level); @@ -99,11 +99,9 @@ void GridGenerator::allocArrays_CoordNeighborGeo() cudaMemoryManager->cudaCopyCoord(level); if(para->getIsBodyForce()) cudaMemoryManager->cudaCopyBodyForce(level); - - //std::cout << verifyNeighborIndices(level); } - std::cout << "Number of Nodes: " << numberOfNodesGlobal << std::endl; - std::cout << "-----finish Coord, Neighbor, Geo------" << std::endl; + VF_LOG_INFO("Number of Nodes: {}", numberOfNodesGlobal); + VF_LOG_TRACE("-----finish Coord, Neighbor, Geo------"); } void GridGenerator::allocArrays_taggedFluidNodes() { @@ -202,12 +200,12 @@ void GridGenerator::sortFluidNodeTags() { void GridGenerator::allocArrays_BoundaryValues() { - std::cout << "------read BoundaryValues------" << std::endl; + VF_LOG_TRACE("-----alloc BoundaryValues------"); int blocks; for (uint level = 0; level < builder->getNumberOfGridLevels(); level++) { const auto numberOfPressureValues = int(builder->getPressureSize(level)); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size pressure level " << level << " : " << numberOfPressureValues << "\n"; + VF_LOG_INFO("size pressure level {}: {}", level, numberOfPressureValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->pressureBC.numberOfBCnodes = 0; @@ -227,7 +225,7 @@ void GridGenerator::allocArrays_BoundaryValues() for (uint level = 0; level < builder->getNumberOfGridLevels(); level++) { const auto numberOfSlipValues = int(builder->getSlipSize(level)); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size slip level " << level << " : " << numberOfSlipValues << "\n"; + VF_LOG_INFO("size slip level {}: {}", level, numberOfSlipValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->slipBC.numberOfBCnodes = 0; @@ -246,7 +244,7 @@ void GridGenerator::allocArrays_BoundaryValues() for (uint level = 0; level < builder->getNumberOfGridLevels(); level++) { const auto numberOfStressValues = int(builder->getStressSize(level)); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size stress level " << level << " : " << numberOfStressValues << "\n"; + VF_LOG_INFO("size stress level {}: {}", level, numberOfStressValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->stressBC.numberOfBCnodes = 0; @@ -274,7 +272,7 @@ void GridGenerator::allocArrays_BoundaryValues() for (uint level = 0; level < builder->getNumberOfGridLevels(); level++) { const auto numberOfVelocityValues = int(builder->getVelocitySize(level)); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size velocity level " << level << " : " << numberOfVelocityValues << "\n"; + VF_LOG_INFO("size velocity level {}: {}", level, numberOfVelocityValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->velocityBC.numberOfBCnodes = 0; @@ -300,8 +298,8 @@ void GridGenerator::allocArrays_BoundaryValues() ////////////////////////////////////////////////////////////////////////// para->getParH(level)->TempVel.kTemp = para->getParH(level)->velocityBC.numberOfBCnodes; //cout << "Groesse kTemp = " << para->getParH(i)->TempPress.kTemp << endl; - std::cout << "getTemperatureInit = " << para->getTemperatureInit() << std::endl; - std::cout << "getTemperatureBC = " << para->getTemperatureBC() << std::endl; + VF_LOG_INFO("getTemperatureInit = {}", para->getTemperatureInit()); + VF_LOG_INFO("getTemperatureBC = {}", para->getTemperatureBC()); ////////////////////////////////////////////////////////////////////////// cudaMemoryManager->cudaAllocTempVeloBC(level); //cout << "nach alloc " << endl; @@ -328,7 +326,7 @@ void GridGenerator::allocArrays_BoundaryValues() for (uint level = 0; level < builder->getNumberOfGridLevels(); level++) { const auto numberOfPrecursorValues = int(builder->getPrecursorSize(level)); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size precursor level " << level << " : " << numberOfPrecursorValues << "\n"; + VF_LOG_INFO("size precursor level {}: {}", level, numberOfPrecursorValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// blocks = (numberOfPrecursorValues / para->getParH(level)->numberofthreads) + 1; para->getParH(level)->precursorBC.sizeQ = blocks * para->getParH(level)->numberofthreads; @@ -426,7 +424,7 @@ void GridGenerator::allocArrays_BoundaryValues() para->setUseGeometryValues(true); for (uint level = 0; level < builder->getNumberOfGridLevels(); level++) { int numberOfGeometryValues = builder->getGeometrySize(level); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size geometry values, Level " << level << " : " << numberOfGeometryValues << "\n"; + VF_LOG_INFO("size geometry values, Level {} : {}", level, numberOfGeometryValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->geometryBC.numberOfBCnodes = 0; @@ -521,8 +519,7 @@ void GridGenerator::initalValuesDomainDecompostion() para->getParH(level)->sendProcessNeighborX.back().rankNeighbor = builder->getCommunicationProcess(direction); //////////////////////////////////////////////////////////////////////////////////////// - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for X send buffer, \t\tLevel " << level << " : " << tempSend - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for X send buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempSend, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->sendProcessNeighborX.back().numberOfNodes = tempSend; para->getParD(level)->sendProcessNeighborX.back().numberOfNodes = tempSend; @@ -536,8 +533,7 @@ void GridGenerator::initalValuesDomainDecompostion() para->getParD(level)->sendProcessNeighborX.back().memsizeFs = sizeof(real) * tempSend; //////////////////////////////////////////////////////////////////////////////////////// // recv - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for X receive buffer, \tLevel " << level << " : " << tempRecv - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for X receive buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempRecv, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->recvProcessNeighborX.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -587,8 +583,7 @@ void GridGenerator::initalValuesDomainDecompostion() } //////////////////////////////////////////////////////////////////////////////////////// // send - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Y send buffer, \t\tLevel " << level << " : " << tempSend - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Y send buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempSend, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->sendProcessNeighborY.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -605,8 +600,7 @@ void GridGenerator::initalValuesDomainDecompostion() para->getParD(level)->sendProcessNeighborY.back().memsizeFs = sizeof(real) * tempSend; //////////////////////////////////////////////////////////////////////////////////////// // recv - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Y receive buffer, \tLevel " << level << " : " << tempRecv - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Y receive buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempRecv, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->recvProcessNeighborY.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -656,8 +650,7 @@ void GridGenerator::initalValuesDomainDecompostion() } //////////////////////////////////////////////////////////////////////////////////////// // send - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Z send buffer, \t\tLevel " << level << " : " << tempSend - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Z send buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempSend, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->sendProcessNeighborZ.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -674,8 +667,7 @@ void GridGenerator::initalValuesDomainDecompostion() para->getParD(level)->sendProcessNeighborZ.back().memsizeFs = sizeof(real) * tempSend; //////////////////////////////////////////////////////////////////////////////////////// // recv - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Z receive buffer, \tLevel " << level << " : " << tempRecv - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Z receive buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempRecv, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->recvProcessNeighborZ.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -729,8 +721,7 @@ void GridGenerator::initalValuesDomainDecompostion() if (tempSend > 0) { //////////////////////////////////////////////////////////////////////////////////////// // send - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for X send buffer, \t\tLevel " << level << " : " << tempSend - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for X send buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempSend, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->sendProcessNeighborF3X.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -749,8 +740,7 @@ void GridGenerator::initalValuesDomainDecompostion() sizeof(real) * para->getParH(level)->sendProcessNeighborF3X.back().numberOfGs; //////////////////////////////////////////////////////////////////////////////////////// // recv - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for X receive buffer, \tLevel " << level << " : " << tempRecv - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for X recv buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempRecv, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->recvProcessNeighborF3X.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -795,8 +785,7 @@ void GridGenerator::initalValuesDomainDecompostion() if (tempSend > 0) { //////////////////////////////////////////////////////////////////////////////////////// // send - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Y send buffer, \t\tLevel " << level << " : " << tempSend - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Y send buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempSend, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->sendProcessNeighborF3Y.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -815,8 +804,7 @@ void GridGenerator::initalValuesDomainDecompostion() sizeof(real) * para->getParH(level)->sendProcessNeighborF3Y.back().numberOfGs; //////////////////////////////////////////////////////////////////////////////////////// // recv - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Y receive buffer, \tLevel " << level << " : " << tempRecv - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Y recv buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempRecv, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->recvProcessNeighborF3Y.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -861,8 +849,7 @@ void GridGenerator::initalValuesDomainDecompostion() if (tempSend > 0) { //////////////////////////////////////////////////////////////////////////////////////// // send - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Z send buffer, \t\tLevel " << level << " : " << tempSend - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Z send buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempSend, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->sendProcessNeighborF3Z.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -881,8 +868,7 @@ void GridGenerator::initalValuesDomainDecompostion() sizeof(real) * para->getParH(level)->sendProcessNeighborF3Z.back().numberOfGs; //////////////////////////////////////////////////////////////////////////////////////// // recv - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of Data for Z receive buffer, \tLevel " << level << " : " << tempRecv - << " \t(neighbor rank: " << builder->getCommunicationProcess(direction) << ")\n"; + VF_LOG_INFO("size of Data for Z recv buffer, \t\tLevel {}: {} \t(neighbor rank: {})", level, tempRecv, builder->getCommunicationProcess(direction)); //////////////////////////////////////////////////////////////////////////////////////// para->getParH(level)->recvProcessNeighborF3Z.back().rankNeighbor = builder->getCommunicationProcess(direction); @@ -920,15 +906,14 @@ void GridGenerator::initalValuesDomainDecompostion() void GridGenerator::allocArrays_BoundaryQs() { - std::cout << "------read BoundaryQs-------" << std::endl; + VF_LOG_TRACE("allocArrays_BoundaryQs()"); for (uint i = 0; i < builder->getNumberOfGridLevels(); i++) { const auto numberOfPressureValues = (int)builder->getPressureSize(i); if (numberOfPressureValues > 0) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size Pressure: " << i << " : " << numberOfPressureValues << "\n"; - //cout << "Groesse Pressure: " << i << " : " << temp1 << "MyID: " << para->getMyID() << endl; + VF_LOG_INFO("size Pressure: {}: {}", i, numberOfPressureValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //preprocessing real* QQ = para->getParH(i)->pressureBC.q27[0]; @@ -940,17 +925,15 @@ void GridGenerator::allocArrays_BoundaryQs() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // advection - diffusion stuff - //cout << "vor advec diff" << endl; - if (para->getDiffOn() == true) { + // advection - diffusion + if (para->getDiffOn()) { ////////////////////////////////////////////////////////////////////////// //cout << "vor setzen von kTemp" << endl; para->getParH(i)->TempPress.kTemp = numberOfPressureValues; para->getParD(i)->TempPress.kTemp = numberOfPressureValues; - std::cout << "Groesse TempPress.kTemp = " << para->getParH(i)->TempPress.kTemp << std::endl; + VF_LOG_INFO("size TempPress.kTemp: {}: {}", i, para->getParH(i)->TempPress.kTemp); ////////////////////////////////////////////////////////////////////////// cudaMemoryManager->cudaAllocTempPressBC(i); - //cout << "nach alloc" << endl; ////////////////////////////////////////////////////////////////////////// for (int m = 0; m < numberOfPressureValues; m++) { @@ -959,9 +942,7 @@ void GridGenerator::allocArrays_BoundaryQs() para->getParH(i)->TempPress.k[m] = para->getParH(i)->pressureBC.k[m]; } ////////////////////////////////////////////////////////////////////////// - //cout << "vor copy" << endl; cudaMemoryManager->cudaCopyTempPressBCHD(i); - //cout << "nach copy" << endl; ////////////////////////////////////////////////////////////////////////// } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -974,8 +955,7 @@ void GridGenerator::allocArrays_BoundaryQs() int numberOfSlipValues = (int)builder->getSlipSize(i); if (numberOfSlipValues > 0) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size Slip: " << i << " : " << numberOfSlipValues << "\n"; - //cout << "Groesse Pressure: " << i << " : " << temp1 << "MyID: " << para->getMyID() << endl; + VF_LOG_INFO("size Slip: {}: {}", i, numberOfSlipValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //preprocessing real* QQ = para->getParH(i)->slipBC.q27[0]; @@ -994,8 +974,7 @@ void GridGenerator::allocArrays_BoundaryQs() int numberOfStressValues = (int)builder->getStressSize(i); if (numberOfStressValues > 0) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size Stress: " << i << " : " << numberOfStressValues << "\n"; - //cout << "Groesse Pressure: " << i << " : " << temp1 << "MyID: " << para->getMyID() << endl; + VF_LOG_INFO("size Stress: {}: {}", i, numberOfStressValues); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //preprocessing real* QQ = para->getParH(i)->stressBC.q27[0]; @@ -1014,8 +993,7 @@ void GridGenerator::allocArrays_BoundaryQs() const auto numberOfVelocityNodes = int(builder->getVelocitySize(i)); if (numberOfVelocityNodes > 0) { - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size velocity level " << i << " : " << numberOfVelocityNodes << "\n"; - //cout << "Groesse velocity level: " << i << " : " << temp3 << "MyID: " << para->getMyID() << "\n"; + VF_LOG_INFO("size velocity level {}: {}", i, numberOfVelocityNodes); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //preprocessing real* QQ = para->getParH(i)->velocityBC.q27[0]; @@ -1028,12 +1006,11 @@ void GridGenerator::allocArrays_BoundaryQs() ////////////////////////////////////////////////////////////////////////// para->getParH(i)->TempVel.kTemp = numberOfVelocityNodes; para->getParD(i)->TempVel.kTemp = numberOfVelocityNodes; - std::cout << "Groesse TempVel.kTemp = " << para->getParH(i)->TempPress.kTemp << std::endl; - std::cout << "getTemperatureInit = " << para->getTemperatureInit() << std::endl; - std::cout << "getTemperatureBC = " << para->getTemperatureBC() << std::endl; + VF_LOG_INFO("size TempVel.kTemp: {}", para->getParH(i)->TempVel.kTemp); + VF_LOG_INFO("getTemperatureInit: {}", para->getTemperatureInit()); + VF_LOG_INFO("getTemperatureBC: {}", para->getTemperatureBC()); ////////////////////////////////////////////////////////////////////////// cudaMemoryManager->cudaAllocTempVeloBC(i); - //cout << "nach alloc " << "\n"; ////////////////////////////////////////////////////////////////////////// for (int m = 0; m < numberOfVelocityNodes; m++) { @@ -1042,11 +1019,7 @@ void GridGenerator::allocArrays_BoundaryQs() para->getParH(i)->TempVel.velo[m] = para->getVelocity(); para->getParH(i)->TempVel.k[m] = para->getParH(i)->velocityBC.k[m]; } - ////////////////////////////////////////////////////////////////////////// - //cout << "vor copy " << "\n"; cudaMemoryManager->cudaCopyTempVeloBCHD(i); - //cout << "nach copy " << "\n"; - ////////////////////////////////////////////////////////////////////////// } cudaMemoryManager->cudaCopyVeloBC(i); } @@ -1056,7 +1029,7 @@ void GridGenerator::allocArrays_BoundaryQs() const auto numberOfPrecursorNodes = int(builder->getPrecursorSize(i)); if (numberOfPrecursorNodes > 0) { - std::cout << "size velocity level " << i << " : " << numberOfPrecursorNodes << std::endl; + VF_LOG_INFO("size velocity level {}: {}", i, numberOfPrecursorNodes); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //preprocessing real* QQ = para->getParH(i)->precursorBC.q27[0]; @@ -1099,7 +1072,7 @@ void GridGenerator::allocArrays_BoundaryQs() for (uint i = 0; i < builder->getNumberOfGridLevels(); i++) { const int numberOfGeometryNodes = builder->getGeometrySize(i); - *logging::out << logging::Logger::INFO_INTERMEDIATE << "size of GeomBoundaryQs, Level " << i << " : " << numberOfGeometryNodes << "\n"; + VF_LOG_INFO("size of GeomBoundaryQs, Level {}: {}", i, numberOfGeometryNodes); para->getParH(i)->geometryBC.numberOfBCnodes = numberOfGeometryNodes; para->getParD(i)->geometryBC.numberOfBCnodes = para->getParH(i)->geometryBC.numberOfBCnodes; @@ -1164,8 +1137,7 @@ void GridGenerator::allocArrays_BoundaryQs() } } - - std::cout << "-----finish BoundaryQs------" << std::endl; + VF_LOG_TRACE("-----finish BoundaryQs------"); } void GridGenerator::allocArrays_OffsetScale() @@ -1175,8 +1147,8 @@ void GridGenerator::allocArrays_OffsetScale() const uint numberOfNodesPerLevelCF = builder->getNumberOfNodesCF(level); const uint numberOfNodesPerLevelFC = builder->getNumberOfNodesFC(level); - std::cout << "number of nodes CF Level " << level << " : " << numberOfNodesPerLevelCF << std::endl; - std::cout << "number of nodes FC level " << level << " : " << numberOfNodesPerLevelFC << std::endl; + VF_LOG_INFO("number of nodes CF Level {}: {}", level, numberOfNodesPerLevelCF); + VF_LOG_INFO("number of nodes FC Level {}: {}", level, numberOfNodesPerLevelFC); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //size CF diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.h index c97ed02a64da1d5fafa18150c75d149f96484d44..157eb5c37660f4de5f5d547b7bac2bbc5c749fc8 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.h @@ -64,8 +64,7 @@ private: public: VIRTUALFLUIDS_GPU_EXPORT GridGenerator(std::shared_ptr<GridBuilder> builder, std::shared_ptr<Parameter> para, std::shared_ptr<CudaMemoryManager> cudaMemoryManager, vf::gpu::Communicator& communicator); - VIRTUALFLUIDS_GPU_EXPORT ~GridGenerator() override; - + ~GridGenerator() override; //! \brief overwrites the default IndexRearrangementForStreams void setIndexRearrangementForStreams(std::unique_ptr<IndexRearrangementForStreams>&& indexRearrangement); diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGeneratorTest.cpp b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGeneratorTest.cpp index 3009bc4ae449b917f494cdf39145a2e94df2ddb8..23d858f5bb5d8abcfda34a9ccfb5b3ff91ff313c 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGeneratorTest.cpp +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGeneratorTest.cpp @@ -104,9 +104,6 @@ protected: private: void SetUp() override { - logging::Logger::addStream(&std::cout); - logging::Logger::setDebugLevel(logging::Logger::WARNING); - para = std::make_shared<Parameter>(); para->setMaxLevel(level + 1); // setMaxLevel resizes parH and parD for (uint i = 0; i <= level; i++) { diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h index 014c725e30c58921e783810a8332ff0865e7938c..6102c2b10f70e54feb10c4b575cd8c07473b608b 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h @@ -9,7 +9,7 @@ #include <memory> #include <vector> -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> class Parameter; class GridBuilder; diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreamsTest.cpp b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreamsTest.cpp index 542eb07ec8651922c5d1474ed3c0bc108bc8de4e..3fe22394823e3c33d43f8fe8709d499e57ee66f9 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreamsTest.cpp +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreamsTest.cpp @@ -119,8 +119,6 @@ protected: private: void SetUp() override { - logging::Logger::addStream(&std::cout); - SPtr<GridImpDouble> grid = GridImpDouble::makeShared(nullptr, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, Distribution(), 1); std::shared_ptr<LevelGridBuilderDouble> builder = std::make_shared<LevelGridBuilderDouble>(grid); @@ -216,8 +214,6 @@ protected: private: void SetUp() override { - logging::Logger::addStream(&std::cout); - para = testingVF::createParameterForLevel(level); para->setNumberOfProcessNeighborsX(numberOfProcessNeighbors, level, "send"); @@ -337,8 +333,6 @@ protected: private: void SetUp() override { - logging::Logger::addStream(&std::cout); - para = testingVF::createParameterForLevel(level); para->setNumberOfProcessNeighborsY(numberOfProcessNeighbors, level, "send"); @@ -458,8 +452,6 @@ protected: private: void SetUp() override { - logging::Logger::addStream(&std::cout); - para = testingVF::createParameterForLevel(level); para->setNumberOfProcessNeighborsZ(numberOfProcessNeighbors, level, "send"); diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/InterpolationCellGrouper.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/InterpolationCellGrouper.h index 600b31aef4ff99080a8e580a24625b35463990ac..f619d785e1f6c30cee0c698cbc9d8dd8249f414f 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/InterpolationCellGrouper.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/InterpolationCellGrouper.h @@ -6,7 +6,7 @@ #ifndef InterpolationCellGrouper_H #define InterpolationCellGrouper_H -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> #include <basics/PointerDefinitions.h> #include <memory> #include <vector> diff --git a/src/gpu/VirtualFluids_GPU/FindQ/FindQ.cpp b/src/gpu/VirtualFluids_GPU/FindQ/FindQ.cpp index 19be37ed5324f48627506bb3e2508a9a1b97cf52..bc12456ceb632b3249d8757fe23c811aad6ec541 100644 --- a/src/gpu/VirtualFluids_GPU/FindQ/FindQ.cpp +++ b/src/gpu/VirtualFluids_GPU/FindQ/FindQ.cpp @@ -1,5 +1,5 @@ #include "FindQ/FindQ.h" -#include "logger/Logger.h" +#include <logger/Logger.h> #include "lbm/constants/D3Q27.h" using namespace vf::lbm::dir; diff --git a/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.cu b/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.cu index 54968be403374831b9db4277f6726f44e7a43485..e447062d292908c02800c4559cc4444476290629 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.cu +++ b/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.cu @@ -325,7 +325,6 @@ EnstrophyAnalyzer::EnstrophyAnalyzer(SPtr<Parameter> para, uint analyzeIter) void EnstrophyAnalyzer::writeToFile( std::string filename ) { - //*logging::out << logging::Logger::INFO_INTERMEDIATE << "EnstrophyAnalyzer::writeToFile( " << filename << " )" << "\n"; std::cout << "EnstrophyAnalyzer::writeToFile( " << filename << " )" << "\n"; std::ofstream file; @@ -338,7 +337,6 @@ void EnstrophyAnalyzer::writeToFile( std::string filename ) file.close(); std::cout << "done!\n"; - //*logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; } diff --git a/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.h b/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.h index 27915f1acdfc9bfecc291442727647dc4abda206..ab5c52e77cd4c028e044bfd6ec4b25b974f80ee2 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.h +++ b/src/gpu/VirtualFluids_GPU/GPU/EnstrophyAnalyzer.h @@ -7,7 +7,7 @@ #include "PointerDefinitions.h" -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "VirtualFluids_GPU_export.h" class Parameter; diff --git a/src/gpu/VirtualFluids_GPU/GPU/Init27.cu b/src/gpu/VirtualFluids_GPU/GPU/Init27.cu index d6d099fec7d3c77f9d55f9cc961b4b984dfb0cce..ff844cfecd9e4cad02e41879ddd68246d0fe9ab2 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/Init27.cu +++ b/src/gpu/VirtualFluids_GPU/GPU/Init27.cu @@ -358,7 +358,7 @@ __global__ void LBInitNonEqPartSP27( unsigned int* neighborX, ////////////////////////////////////////////////////////////////////////// - // the following code is copy and pasted from VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp + // the following code is copy and pasted from VirtualFluidsVisitors/InitDistributionsBlockVisitor.cpp // i.e. Konstantins code real ax = dvx1dx; diff --git a/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.cu b/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.cu index bc847aee5c208213698aaf1f92b007a8deb0bdb1..df88632f8fd48b3ae8d50b444a65076ab0a0c12f 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.cu +++ b/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.cu @@ -139,7 +139,6 @@ KineticEnergyAnalyzer::KineticEnergyAnalyzer(SPtr<Parameter> para, uint analyzeI void KineticEnergyAnalyzer::writeToFile(std::string filename) { - //*logging::out << logging::Logger::INFO_INTERMEDIATE << "KineticEnergyAnalyzer::writeToFile( " << filename << " )" << "\n"; std::cout << "KineticEnergyAnalyzer::writeToFile( " << filename << " )" << "\n"; std::ofstream file; @@ -151,7 +150,6 @@ void KineticEnergyAnalyzer::writeToFile(std::string filename) file.close(); - //*logging::out << logging::Logger::INFO_INTERMEDIATE << "done!\n"; std::cout << "done!\n"; } diff --git a/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.h b/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.h index ca5a97aaef3432dfef78a1ce8822e85dca115207..11759c24460a1541d9aa66e325e6b04c15c1d488 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.h +++ b/src/gpu/VirtualFluids_GPU/GPU/KineticEnergyAnalyzer.h @@ -7,7 +7,7 @@ #include "PointerDefinitions.h" -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "VirtualFluids_GPU_export.h" class Parameter; diff --git a/src/gpu/VirtualFluids_GPU/GPU/TurbulentViscosityKernels.h b/src/gpu/VirtualFluids_GPU/GPU/TurbulentViscosityKernels.h index c5c470a5f178f4377f6bf0d0ed29cd8191968529..74d0e69a181e94c6d34e9207f203fb852d9d2fd1 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/TurbulentViscosityKernels.h +++ b/src/gpu/VirtualFluids_GPU/GPU/TurbulentViscosityKernels.h @@ -38,7 +38,7 @@ #include <cuda_runtime.h> #include "LBM/LB.h" -#include "Core/DataTypes.h" +#include "DataTypes.h" #include <basics/constants/NumericConstants.h> using namespace vf::basics::constant; diff --git a/src/gpu/VirtualFluids_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp b/src/gpu/VirtualFluids_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp index 27c061ce99f71c349ac1c479efb5f9b780cff3b2..7b7b857d5c3ac157445bb154aecfb4dfa9c4b0bc 100644 --- a/src/gpu/VirtualFluids_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp +++ b/src/gpu/VirtualFluids_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp @@ -1,5 +1,7 @@ #include "KernelFactoryImp.h" +#include <logger/Logger.h> + #include "Parameter/Parameter.h" #include "Kernel/Utilities/KernelTypes.h" @@ -94,7 +96,7 @@ void KernelFactoryImp::setKernelAtLevel(std::vector<std::shared_ptr<Kernel>> ker std::shared_ptr<Kernel> KernelFactoryImp::makeKernel(std::shared_ptr<Parameter> para, std::string kernel, int level) { - printf("Instantiating Kernel: %s\n", kernel.c_str()); + VF_LOG_INFO("Instantiating Kernel: {}", kernel); std::shared_ptr<KernelImp> newKernel; std::shared_ptr<CheckParameterStrategy> checkStrategy; diff --git a/src/gpu/VirtualFluids_GPU/KernelManager/ADKernelManager.h b/src/gpu/VirtualFluids_GPU/KernelManager/ADKernelManager.h index 1c069a364ab5ef2837ffd05d0ef4b6488365e4e3..d961452575b905acb96fbc1c30ff0d5e71af2722 100644 --- a/src/gpu/VirtualFluids_GPU/KernelManager/ADKernelManager.h +++ b/src/gpu/VirtualFluids_GPU/KernelManager/ADKernelManager.h @@ -33,7 +33,7 @@ #ifndef ADVECTION_DIFFUSION_H #define ADVECTION_DIFFUSION_H -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "PointerDefinitions.h" #include "VirtualFluids_GPU_export.h" diff --git a/src/gpu/VirtualFluids_GPU/KernelManager/GridScalingKernelManager.h b/src/gpu/VirtualFluids_GPU/KernelManager/GridScalingKernelManager.h index ef1e175ed149e6a89016c76249ce31aa1f1828f9..0c24801506b9a19985d1a805b349d0b58e9bbf84 100644 --- a/src/gpu/VirtualFluids_GPU/KernelManager/GridScalingKernelManager.h +++ b/src/gpu/VirtualFluids_GPU/KernelManager/GridScalingKernelManager.h @@ -36,7 +36,7 @@ #include "LBM/LB.h" #include "PointerDefinitions.h" #include "VirtualFluids_GPU_export.h" -#include "logger/Logger.h" +#include <logger/Logger.h> #include <functional> #include <memory> #include <stdexcept> diff --git a/src/gpu/VirtualFluids_GPU/LBM/LB.h b/src/gpu/VirtualFluids_GPU/LBM/LB.h index de744cd6037d2a7129c627b1aa05688e94f170e4..a5ae5f5ceef213e8ec9b2306106035a09b1ffd0d 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/LB.h +++ b/src/gpu/VirtualFluids_GPU/LBM/LB.h @@ -70,7 +70,7 @@ #define INTERFACE_B 5 -#include "Core/DataTypes.h" +#include "DataTypes.h" #include <string> #include <vector> diff --git a/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp b/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp index a9c71e9550a31cc2572d1e231026a726eaa45345..e0cde2429d6c14c25baff2fa5c44143719fb405d 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp +++ b/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp @@ -25,7 +25,7 @@ #include "Output/VeloASCIIWriter.hpp" ////////////////////////////////////////////////////////////////////////// #include "Utilities/Buffer2D.hpp" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" ////////////////////////////////////////////////////////////////////////// #include "Init/InitLattice.h" #include "Init/VfReader.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/AnalysisData.hpp b/src/gpu/VirtualFluids_GPU/Output/AnalysisData.hpp index d091f38ea228d43345235132cd4947ff750436d6..882cc2b46c3faf3eb81a5296a7b8c6f2e1bc3ac8 100644 --- a/src/gpu/VirtualFluids_GPU/Output/AnalysisData.hpp +++ b/src/gpu/VirtualFluids_GPU/Output/AnalysisData.hpp @@ -3,7 +3,7 @@ #include "basics/utilities/UbFileOutputASCII.h" #include "Parameter/Parameter.h" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" class AnalysisData { diff --git a/src/gpu/VirtualFluids_GPU/Output/DataWriter.h b/src/gpu/VirtualFluids_GPU/Output/DataWriter.h index 48a9b56da3abd5337e1c6042a7dcba3304c449e6..67a50867c1ef957c2e80b338f8597262508c468d 100644 --- a/src/gpu/VirtualFluids_GPU/Output/DataWriter.h +++ b/src/gpu/VirtualFluids_GPU/Output/DataWriter.h @@ -2,7 +2,7 @@ #define DATA_WRITER_H #include "PointerDefinitions.h" -#include "Core/DataTypes.h" +#include "DataTypes.h" #include <memory> #include <vector> diff --git a/src/gpu/VirtualFluids_GPU/Output/EdgeNodeDebugWriter.hpp b/src/gpu/VirtualFluids_GPU/Output/EdgeNodeDebugWriter.hpp index 6498bbb0a2b787d70a3b11500549b2a8956ce67a..fb0423de958e16727eca8e5a40af2c3e32faf1ae 100644 --- a/src/gpu/VirtualFluids_GPU/Output/EdgeNodeDebugWriter.hpp +++ b/src/gpu/VirtualFluids_GPU/Output/EdgeNodeDebugWriter.hpp @@ -5,7 +5,7 @@ #include <sstream> #include <stdio.h> // #include <math.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "lbm/constants/D3Q27.h" #include "LBM/LB.h" #include "Parameter/Parameter.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp b/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp index 7169a82de21c3a6a479386a25670f7c0c75447f2..cb8cefa389c141b7f38bbc54a68d8cf9841ba699 100644 --- a/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp +++ b/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp @@ -13,7 +13,7 @@ #include <sstream> #include <cmath> -#include <Core/StringUtilities/StringUtil.h> +#include <StringUtilities/StringUtil.h> #include "Parameter/Parameter.h" #include "GPU/CudaMemoryManager.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/InterfaceDebugWriter.hpp b/src/gpu/VirtualFluids_GPU/Output/InterfaceDebugWriter.hpp index 1989f93159c4b00b340f2b8dd184f6e6c215f679..705d86992d9eac39b66cf5033f7c32b5cb4fb602 100644 --- a/src/gpu/VirtualFluids_GPU/Output/InterfaceDebugWriter.hpp +++ b/src/gpu/VirtualFluids_GPU/Output/InterfaceDebugWriter.hpp @@ -3,7 +3,7 @@ #include <fstream> #include <sstream> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "lbm/constants/D3Q27.h" #include "LBM/LB.h" #include "Parameter/Parameter.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/NeighborDebugWriter.hpp b/src/gpu/VirtualFluids_GPU/Output/NeighborDebugWriter.hpp index 57139d25ae4d046e1dd1be1f3ef5e179daf0872e..e506a56bb76a263ac8982a7e53f39e67c268e49b 100644 --- a/src/gpu/VirtualFluids_GPU/Output/NeighborDebugWriter.hpp +++ b/src/gpu/VirtualFluids_GPU/Output/NeighborDebugWriter.hpp @@ -9,7 +9,7 @@ #include "lbm/constants/D3Q27.h" #include <basics/writer/WbWriterVtkXmlBinary.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "Utilities/FindNeighbors.h" #include "gpu/VirtualFluids_GPU/Communication/Communicator.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/QDebugVtkWriter.hpp b/src/gpu/VirtualFluids_GPU/Output/QDebugVtkWriter.hpp index d567c695a0e33b7a88c2c8cf3bcb88093ce5b802..d075c78e53a45e96adea43c8846159f4ba128c6d 100644 --- a/src/gpu/VirtualFluids_GPU/Output/QDebugVtkWriter.hpp +++ b/src/gpu/VirtualFluids_GPU/Output/QDebugVtkWriter.hpp @@ -4,11 +4,11 @@ #include <array> #include <vector> -#include "basics/Core/StringUtilities/StringUtil.h" +#include "basics/StringUtilities/StringUtil.h" #include "basics/utilities/UbSystem.h" #include "basics/writer/WbWriterVtkXmlBinary.h" #include "lbm/constants/D3Q27.h" -#include "logger/Logger.h" +#include <logger/Logger.h> #include "gpu/GridGenerator/grid/NodeValues.h" #include "gpu/VirtualFluids_GPU/Communication/Communicator.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/QDebugWriter.hpp b/src/gpu/VirtualFluids_GPU/Output/QDebugWriter.hpp index c1a3658d318eb47e84530bf437afa0bb6ba91743..b24dab20be957fa27b9306d0bbabbec53694753c 100644 --- a/src/gpu/VirtualFluids_GPU/Output/QDebugWriter.hpp +++ b/src/gpu/VirtualFluids_GPU/Output/QDebugWriter.hpp @@ -11,7 +11,7 @@ #include "Parameter/Parameter.h" #include "basics/utilities/UbSystem.h" #include <basics/writer/WbWriterVtkXmlBinary.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" namespace QDebugWriter { diff --git a/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.cpp b/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.cpp index 78da4947d0c8196cda49fef754a3f44fc39d0a44..979c4349a084342a897a0269ffb86a3714065e96 100644 --- a/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.cpp +++ b/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.cpp @@ -1,6 +1,6 @@ #include "helper_cuda.h" #include <cuda_runtime.h> -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "UbScheduler.h" #include "Parameter/Parameter.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.h b/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.h index 982d1ce56bfadb7eddfd3d34d8d6b01ac6f92233..41bb9eba7ba09ddb092e644894eca0fde71fa27b 100644 --- a/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.h +++ b/src/gpu/VirtualFluids_GPU/Output/TimeStepTimer.h @@ -3,7 +3,7 @@ #include "helper_cuda.h" #include <cuda_runtime.h> -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "UbScheduler.h" #include "Parameter/Parameter.h" diff --git a/src/gpu/VirtualFluids_GPU/Output/Timer.h b/src/gpu/VirtualFluids_GPU/Output/Timer.h index d035cbb6cef7ea9f8edabbd2894671a868c37eec..55ada64ad245ee41aa99a1185eba134a652067c9 100644 --- a/src/gpu/VirtualFluids_GPU/Output/Timer.h +++ b/src/gpu/VirtualFluids_GPU/Output/Timer.h @@ -2,9 +2,9 @@ #define TIMER_H #include <cuda_runtime.h> -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "Parameter/Parameter.h" -#include "logger/Logger.h" +#include <logger/Logger.h> namespace vf::gpu{ class Communicator; diff --git a/src/gpu/VirtualFluids_GPU/Parameter/CudaStreamManager.h b/src/gpu/VirtualFluids_GPU/Parameter/CudaStreamManager.h index 5c59bcd3a5e6178d6e70a63f803caf8e29f32604..631a945a653e6b4b60924a650e94b3873ebacc7d 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/CudaStreamManager.h +++ b/src/gpu/VirtualFluids_GPU/Parameter/CudaStreamManager.h @@ -33,7 +33,7 @@ #include <map> #include <cuda.h> #include <cuda_runtime.h> -#include "Core/DataTypes.h" +#include "DataTypes.h" enum class CudaStreamIndex { diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp index a381bb7443e8fabe2cd5aed21340f2be7f208a46..bf0d72448fb5a69c849d93749e24f29290cf9621 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp @@ -39,7 +39,7 @@ #include <curand_kernel.h> -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include <basics/config/ConfigurationFile.h> diff --git a/src/gpu/VirtualFluids_GPU/Particles/Particles.h b/src/gpu/VirtualFluids_GPU/Particles/Particles.h index 7a6d003a08ef7f6517b6259c2c1b895676c6d80b..805817e2f7c6c64b27d60109ad8b6ee2c60cf5cc 100644 --- a/src/gpu/VirtualFluids_GPU/Particles/Particles.h +++ b/src/gpu/VirtualFluids_GPU/Particles/Particles.h @@ -4,7 +4,7 @@ #include "LBM/LB.h" #include "GPU/GPU_Interface.h" #include "GPU/CudaMemoryManager.h" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "Parameter/Parameter.h" //void calcDragLift(Parameter* para, int lev); diff --git a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/ActuatorFarm.cu b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/ActuatorFarm.cu index b8e5a66a48a1e4d26509db4f1ca8909938643517..bcdd63657d13cd8a9dcef3372fe02760a337b057 100644 --- a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/ActuatorFarm.cu +++ b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/ActuatorFarm.cu @@ -45,7 +45,7 @@ #include "DataStructureInitializer/GridProvider.h" #include "GPU/CudaMemoryManager.h" #include "basics/constants/NumericConstants.h" -#include "logger/Logger.h" +#include <logger/Logger.h> using namespace vf::basics::constant; diff --git a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PreCollisionInteractor.h b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PreCollisionInteractor.h index f9a87f613e7607301e59a7c1e67eb556418892e4..811045a32b18fd0f5d7f71be39b0dfec8982b352 100644 --- a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PreCollisionInteractor.h +++ b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PreCollisionInteractor.h @@ -4,7 +4,7 @@ #include <string> #include <vector> -#include "Core/DataTypes.h" +#include "DataTypes.h" #include "PointerDefinitions.h" #include "VirtualFluids_GPU_export.h" diff --git a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu index 1a8260ef936e2707fb38fbbba71cdbfac692f350..99c60fd3d2aae2e796e0c95e624b9d5d33c30ef1 100644 --- a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu +++ b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu @@ -39,7 +39,7 @@ #include "cuda/CudaGrid.h" #include "LBM/GPUHelperFunctions/KernelUtilities.h" -#include "Core/StringUtilities/StringUtil.h" +#include "StringUtilities/StringUtil.h" #include "Parameter/Parameter.h" #include "DataStructureInitializer/GridProvider.h" diff --git a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/Probes/Probe.cu b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/Probes/Probe.cu index fdd5fe6f0c90827153f558f9016b37e6c15c0c76..a7a0e79c0bcbf0f7a9e13e879debfb378e23f69d 100644 --- a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/Probes/Probe.cu +++ b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/Probes/Probe.cu @@ -39,7 +39,7 @@ #include "VirtualFluids_GPU/GPU/GeometryUtils.h" #include <basics/constants/NumericConstants.h> #include "basics/writer/WbWriterVtkXmlBinary.h" -#include <Core/StringUtilities/StringUtil.h> +#include <StringUtilities/StringUtil.h> #include "Parameter/Parameter.h" #include "DataStructureInitializer/GridProvider.h" diff --git a/src/gpu/VirtualFluids_GPU/PreProcessor/PreProcessorStrategy/InitCompSP27/InitCompSP27_Device.cu b/src/gpu/VirtualFluids_GPU/PreProcessor/PreProcessorStrategy/InitCompSP27/InitCompSP27_Device.cu index 59953c573c738c3bfadf119be6d173918e970ef4..109ea18edf183b65106ce6ed86fea05d6b005d90 100644 --- a/src/gpu/VirtualFluids_GPU/PreProcessor/PreProcessorStrategy/InitCompSP27/InitCompSP27_Device.cu +++ b/src/gpu/VirtualFluids_GPU/PreProcessor/PreProcessorStrategy/InitCompSP27/InitCompSP27_Device.cu @@ -355,7 +355,7 @@ __global__ void LB_Init_Comp_Neq_SP_27( unsigned int* neighborX, ////////////////////////////////////////////////////////////////////////// - // the following code is copy and pasted from VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp + // the following code is copy and pasted from VirtualFluidsVisitors/InitDistributionsBlockVisitor.cpp // i.e. Konstantins code real ax = dvx1dx; diff --git a/src/gpu/VirtualFluids_GPU/Restart/RestartObject.h b/src/gpu/VirtualFluids_GPU/Restart/RestartObject.h index 3d6db6e3a7aad82b2656d917a2b25b26c4ff4d92..963c6549fd41c80c77edc9a205679e8cbc627a1e 100644 --- a/src/gpu/VirtualFluids_GPU/Restart/RestartObject.h +++ b/src/gpu/VirtualFluids_GPU/Restart/RestartObject.h @@ -5,7 +5,7 @@ #include <string> #include <vector> -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> class Parameter; diff --git a/src/lbm/BGK.cpp b/src/lbm/BGK.cpp index cb7d091041f90d42a4ea8e794b26d2e92581ea1b..5d1993c872b1aefea801e6e2d2c602a82ecd9281 100644 --- a/src/lbm/BGK.cpp +++ b/src/lbm/BGK.cpp @@ -1,8 +1,7 @@ #include "BGK.h" -#include <basics/Core/DataTypes.h> -#include <basics/Core/RealConstants.h> +#include <basics/DataTypes.h> #include "constants/NumericConstants.h" #include "constants/D3Q27.h" diff --git a/src/lbm/BGK.h b/src/lbm/BGK.h index 2c82f5bd445ee008954add02fd0d6d6093364e90..6cde85013dd92472022bbf7b93bc73e7940049a1 100644 --- a/src/lbm/BGK.h +++ b/src/lbm/BGK.h @@ -8,7 +8,7 @@ #define __device__ #endif -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> #include "KernelParameter.h" diff --git a/src/lbm/Chimera.h b/src/lbm/Chimera.h index af86c4cbe24b4cccb194f65edd1b3a4fb89b9377..8e54d47a42e164a89060f5009c112f5a69afd257 100644 --- a/src/lbm/Chimera.h +++ b/src/lbm/Chimera.h @@ -8,7 +8,7 @@ #define __device__ #endif -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> #include <basics/constants/NumericConstants.h> diff --git a/src/lbm/CumulantChimera.cpp b/src/lbm/CumulantChimera.cpp index 4d3382e70357dde2c0e663b32c18a881018ea670..f8e11d468471efe96b3d9e17c356b8c1a3d59ff8 100644 --- a/src/lbm/CumulantChimera.cpp +++ b/src/lbm/CumulantChimera.cpp @@ -2,8 +2,7 @@ #include <cmath> -#include <basics/Core/DataTypes.h> -#include <basics/Core/RealConstants.h> +#include <basics/DataTypes.h> #include "constants/NumericConstants.h" #include "constants/D3Q27.h" diff --git a/src/lbm/CumulantChimera.h b/src/lbm/CumulantChimera.h index e8740c7d3f5b988a6fdc5c3b16ab6a90e0a28b83..c30a0c07912953cff45e3734c0b60fa7a03acd53 100644 --- a/src/lbm/CumulantChimera.h +++ b/src/lbm/CumulantChimera.h @@ -8,7 +8,7 @@ #define __device__ #endif -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> #include "KernelParameter.h" diff --git a/src/lbm/KernelParameter.h b/src/lbm/KernelParameter.h index 18c4f2a4b20b84d9d519993f3ddb54cf612d4306..9c07524226a40aaa9e2c65e7ab028b07aec62ddc 100644 --- a/src/lbm/KernelParameter.h +++ b/src/lbm/KernelParameter.h @@ -8,7 +8,7 @@ #define __device__ #endif -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> namespace vf::lbm diff --git a/src/lbm/MacroscopicQuantities.h b/src/lbm/MacroscopicQuantities.h index c464e955669fcaa39b5c300e5c2c7e25dffef696..751c874f1c240f5502ccaef5f6e540be1e5d28ff 100644 --- a/src/lbm/MacroscopicQuantities.h +++ b/src/lbm/MacroscopicQuantities.h @@ -8,7 +8,7 @@ #define __device__ #endif -#include <basics/Core/DataTypes.h> +#include <basics/DataTypes.h> #include "constants/NumericConstants.h" #include "constants/D3Q27.h" diff --git a/src/lbm/constants/D3Q27.h b/src/lbm/constants/D3Q27.h index c799331815ff92b41b3daf8433bcc10d026a8738..b6c05eae921ae66b43999ff01977f7a674ce505f 100644 --- a/src/lbm/constants/D3Q27.h +++ b/src/lbm/constants/D3Q27.h @@ -2,7 +2,7 @@ #define LBM_D3Q27_H #include <map> -#include "basics/Core/DataTypes.h" +#include "basics/DataTypes.h" namespace vf::lbm::dir {