From 6e65e24854c82e6690f850a7373a1fd3b6e68b78 Mon Sep 17 00:00:00 2001 From: peters <peters@irmb.tu-bs.de> Date: Fri, 11 Jun 2021 10:50:09 +0200 Subject: [PATCH] Move Configuration file from cpu to basics. --- .gitignore | 7 ------- CMakeLists.txt | 2 +- apps/cpu/BoxBenchmark/bb.cpp | 2 +- apps/cpu/CheckpointConverter/cpc.cpp | 2 +- apps/cpu/CouetteFlow/cflow.cpp | 2 +- apps/cpu/DHIT/dhit.cpp | 2 +- apps/cpu/DLR-F16-Porous/f16.cpp | 5 +++-- apps/cpu/DLR-F16-Solid/f16.cpp | 5 +++-- apps/cpu/DLR-F16/f16.cpp | 2 +- apps/cpu/FlowAroundCylinder/cylinder.cpp | 2 +- apps/cpu/Hagen_Poiseuille_flow/pflow.cpp | 6 +++--- apps/cpu/Hagen_Poiseuille_flow2/pflow2.cpp | 2 +- apps/cpu/HerschelBulkleyModel/hbflow.cpp | 2 +- apps/cpu/HerschelBulkleySphere/hbsphere.cpp | 2 +- apps/cpu/JetBreakup/JetBreakup.cpp | 2 +- apps/cpu/LaminarTubeFlow/ltf.cpp | 2 +- .../Multiphase (Droplet Test).cpp.backup | 2 +- ...ultiphase (Jet breakup on Phoenix).cpp.backup | 2 +- apps/cpu/Multiphase/Multiphase.cpp | 2 +- .../backup/Multiphase (Droplet Test).cpp | 2 +- .../Multiphase (Final before automation).cpp | 2 +- .../backup/Multiphase (Flow Focusing).cpp | 2 +- .../Multiphase (Jet breakup on Phoenix).cpp | 2 +- .../backup/Multiphase (T-Junction).cpp | 2 +- .../Multiphase/backup/Multiphase (Thermal).cpp | 2 +- apps/cpu/Multiphase/backup/Multiphase (Tube).cpp | 2 +- apps/cpu/Multiphase/backup/Multiphase.cpp | 2 +- apps/cpu/MultiphaseDropletTest/droplet.cpp | 2 +- apps/cpu/OrganPipe/OrganPipe.cpp | 2 +- apps/cpu/Thermoplast/thermoplast.cpp | 2 +- apps/cpu/ViskomatXL/viskomat.cpp | 4 ++-- apps/cpu/aperm/aperm.cpp | 2 +- apps/cpu/aperm/aperm.cpp.old | 2 +- apps/cpu/aperm/aperm.cpp.old2 | 2 +- apps/cpu/bChannelA/bChannelA.cpp | 2 +- apps/cpu/f16Test/f16test.cpp | 2 +- apps/cpu/levels/levels.cpp | 2 +- apps/cpu/mirror/mirror.cpp | 2 +- apps/cpu/mpi_benchmark/mpib.cpp | 2 +- apps/cpu/pChannel/pChannel.cpp | 2 +- apps/cpu/pChannel/pChannel.cpp.hlrn | 2 +- apps/cpu/perm/perm.cpp | 2 +- apps/cpu/rheometer/rheometer.cpp | 4 ++-- apps/cpu/screw/screw.cpp | 2 +- apps/cpu/sphere/sphere.cpp | 2 +- apps/cpu/teperm/teperm.cpp | 2 +- .../config}/ConfigurationFile.hpp | 16 +++++++++++++--- src/cpu/VirtualFluids.h | 3 ++- 48 files changed, 68 insertions(+), 62 deletions(-) rename src/{cpu/VirtualFluidsCore/Utilities => basics/config}/ConfigurationFile.hpp (97%) diff --git a/.gitignore b/.gitignore index df134f3d8..82c6dcbe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,7 @@ # build directories -buildDev/ build/ -buildDev/ bin/ cmake-build-debug/ -MSVC2017/ -VS2017/ run/ # Python @@ -25,6 +21,3 @@ output/ # MacOS .DS_Store - -#Cluster -run/ diff --git a/CMakeLists.txt b/CMakeLists.txt index d74febdac..a5aea2eff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.15..3.20 FATAL_ERROR) project(VirtualFluids CXX) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/apps/cpu/BoxBenchmark/bb.cpp b/apps/cpu/BoxBenchmark/bb.cpp index 547e654b3..719df7738 100644 --- a/apps/cpu/BoxBenchmark/bb.cpp +++ b/apps/cpu/BoxBenchmark/bb.cpp @@ -14,7 +14,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/CheckpointConverter/cpc.cpp b/apps/cpu/CheckpointConverter/cpc.cpp index 1ef1ad8f4..c26e7df4c 100644 --- a/apps/cpu/CheckpointConverter/cpc.cpp +++ b/apps/cpu/CheckpointConverter/cpc.cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string path = config.getString("path"); diff --git a/apps/cpu/CouetteFlow/cflow.cpp b/apps/cpu/CouetteFlow/cflow.cpp index 2ac32915a..e37bafade 100644 --- a/apps/cpu/CouetteFlow/cflow.cpp +++ b/apps/cpu/CouetteFlow/cflow.cpp @@ -10,7 +10,7 @@ void bflow(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/DHIT/dhit.cpp b/apps/cpu/DHIT/dhit.cpp index 7eb78c37e..957c823ef 100644 --- a/apps/cpu/DHIT/dhit.cpp +++ b/apps/cpu/DHIT/dhit.cpp @@ -12,7 +12,7 @@ void run(string configname) { //Sleep(30000); - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/DLR-F16-Porous/f16.cpp b/apps/cpu/DLR-F16-Porous/f16.cpp index 422c2dead..9197aca45 100644 --- a/apps/cpu/DLR-F16-Porous/f16.cpp +++ b/apps/cpu/DLR-F16-Porous/f16.cpp @@ -53,7 +53,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); @@ -207,7 +207,8 @@ void run(string configname) bcProc = SPtr<BCProcessor>(new ThinWallBCProcessor()); SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulant4thOrderViscosityLBMKernel()); - //t = 21.8, P = 1.0145 atm, Relative Humidity = 45.8, Second Coefficient of Viscosity = 3120 //Ash, R. L., Zuckerwar, A. J., & Zheng, Z. (1991). Second coefficient of viscosity in air. + //t = 21.8, P = 1.0145 atm, Relative Humidity = 45.8, Second Coefficient of Viscosity = 3120 + //Ash, R. L., Zuckerwar, A. J., & Zheng, Z. (1991). Second coefficient of viscosity in air. double bulckViscosity = 3120 * nuLB; dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(bulckViscosity); kernel->setBCProcessor(bcProc); diff --git a/apps/cpu/DLR-F16-Solid/f16.cpp b/apps/cpu/DLR-F16-Solid/f16.cpp index 99983c3c3..d88b650b1 100644 --- a/apps/cpu/DLR-F16-Solid/f16.cpp +++ b/apps/cpu/DLR-F16-Solid/f16.cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); @@ -169,7 +169,8 @@ void run(string configname) bcProc = SPtr<BCProcessor>(new BCProcessor()); SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulant4thOrderViscosityLBMKernel()); - //t = 21.8, P = 1.0145 atm, Relative Humidity = 45.8, Second Coefficient of Viscosity = 3120 //Ash, R. L., Zuckerwar, A. J., & Zheng, Z. (1991). Second coefficient of viscosity in air. + //t = 21.8, P = 1.0145 atm, Relative Humidity = 45.8, Second Coefficient of Viscosity = 3120 + //Ash, R. L., Zuckerwar, A. J., & Zheng, Z. (1991). Second coefficient of viscosity in air. double bulckViscosity = 3120 * nuLB; dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(bulckViscosity); diff --git a/apps/cpu/DLR-F16/f16.cpp b/apps/cpu/DLR-F16/f16.cpp index ca204d380..523a9c7c0 100644 --- a/apps/cpu/DLR-F16/f16.cpp +++ b/apps/cpu/DLR-F16/f16.cpp @@ -160,7 +160,7 @@ void run(string configname) try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); diff --git a/apps/cpu/FlowAroundCylinder/cylinder.cpp b/apps/cpu/FlowAroundCylinder/cylinder.cpp index 3ae5f2ab5..81bfd5ff3 100644 --- a/apps/cpu/FlowAroundCylinder/cylinder.cpp +++ b/apps/cpu/FlowAroundCylinder/cylinder.cpp @@ -14,7 +14,7 @@ void run(string configname) //DEBUG/////////////////////////////////////// //Sleep(30000); ///////////////////////////////////////////// - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); diff --git a/apps/cpu/Hagen_Poiseuille_flow/pflow.cpp b/apps/cpu/Hagen_Poiseuille_flow/pflow.cpp index c448a5de5..05f6c625b 100644 --- a/apps/cpu/Hagen_Poiseuille_flow/pflow.cpp +++ b/apps/cpu/Hagen_Poiseuille_flow/pflow.cpp @@ -10,7 +10,7 @@ using namespace std; //{ // try // { -// ConfigurationFile config; +// vf::basics::ConfigurationFile config; // config.load(configname); // // string pathname = config.getString("pathname"); @@ -301,7 +301,7 @@ void pflowdp(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); @@ -544,7 +544,7 @@ void pflowdp(string configname) intHelper.addInteractor(outflowInt); - //die Geschwindigkeit Randbedingung soll Ausflüß überdecken !!!!! + //die Geschwindigkeit Randbedingung soll Ausfl�� �berdecken !!!!! diff --git a/apps/cpu/Hagen_Poiseuille_flow2/pflow2.cpp b/apps/cpu/Hagen_Poiseuille_flow2/pflow2.cpp index 76124d72e..5bcf21ed9 100644 --- a/apps/cpu/Hagen_Poiseuille_flow2/pflow2.cpp +++ b/apps/cpu/Hagen_Poiseuille_flow2/pflow2.cpp @@ -10,7 +10,7 @@ void pflowdp(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/HerschelBulkleyModel/hbflow.cpp b/apps/cpu/HerschelBulkleyModel/hbflow.cpp index 6de995e2a..976635bde 100644 --- a/apps/cpu/HerschelBulkleyModel/hbflow.cpp +++ b/apps/cpu/HerschelBulkleyModel/hbflow.cpp @@ -10,7 +10,7 @@ void bflow(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/HerschelBulkleySphere/hbsphere.cpp b/apps/cpu/HerschelBulkleySphere/hbsphere.cpp index f4b50325d..eff2c2c62 100644 --- a/apps/cpu/HerschelBulkleySphere/hbsphere.cpp +++ b/apps/cpu/HerschelBulkleySphere/hbsphere.cpp @@ -10,7 +10,7 @@ void bflow(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string outputPath = config.getValue<string>("outputPath"); diff --git a/apps/cpu/JetBreakup/JetBreakup.cpp b/apps/cpu/JetBreakup/JetBreakup.cpp index e2dc0f0e3..d6cff6366 100644 --- a/apps/cpu/JetBreakup/JetBreakup.cpp +++ b/apps/cpu/JetBreakup/JetBreakup.cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/LaminarTubeFlow/ltf.cpp b/apps/cpu/LaminarTubeFlow/ltf.cpp index e523dd2de..c2c3866fc 100644 --- a/apps/cpu/LaminarTubeFlow/ltf.cpp +++ b/apps/cpu/LaminarTubeFlow/ltf.cpp @@ -11,7 +11,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/Multiphase/Multiphase (Droplet Test).cpp.backup b/apps/cpu/Multiphase/Multiphase (Droplet Test).cpp.backup index 46297d526..389b754f8 100644 --- a/apps/cpu/Multiphase/Multiphase (Droplet Test).cpp.backup +++ b/apps/cpu/Multiphase/Multiphase (Droplet Test).cpp.backup @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/Multiphase (Jet breakup on Phoenix).cpp.backup b/apps/cpu/Multiphase/Multiphase (Jet breakup on Phoenix).cpp.backup index 9f2800898..1adc07f8b 100644 --- a/apps/cpu/Multiphase/Multiphase (Jet breakup on Phoenix).cpp.backup +++ b/apps/cpu/Multiphase/Multiphase (Jet breakup on Phoenix).cpp.backup @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/Multiphase.cpp b/apps/cpu/Multiphase/Multiphase.cpp index deb2845f4..77bcfd0c0 100644 --- a/apps/cpu/Multiphase/Multiphase.cpp +++ b/apps/cpu/Multiphase/Multiphase.cpp @@ -12,7 +12,7 @@ void run(string configname) //Sleep(20000); - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (Droplet Test).cpp b/apps/cpu/Multiphase/backup/Multiphase (Droplet Test).cpp index b5a8a9eac..18989d360 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (Droplet Test).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (Droplet Test).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (Final before automation).cpp b/apps/cpu/Multiphase/backup/Multiphase (Final before automation).cpp index b4a6b3478..b6160314e 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (Final before automation).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (Final before automation).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (Flow Focusing).cpp b/apps/cpu/Multiphase/backup/Multiphase (Flow Focusing).cpp index 33333fc0d..11e064e30 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (Flow Focusing).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (Flow Focusing).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (Jet breakup on Phoenix).cpp b/apps/cpu/Multiphase/backup/Multiphase (Jet breakup on Phoenix).cpp index 9f2800898..1adc07f8b 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (Jet breakup on Phoenix).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (Jet breakup on Phoenix).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (T-Junction).cpp b/apps/cpu/Multiphase/backup/Multiphase (T-Junction).cpp index 18651e4a5..2f3e94e7a 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (T-Junction).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (T-Junction).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (Thermal).cpp b/apps/cpu/Multiphase/backup/Multiphase (Thermal).cpp index a5d20b94a..a61d7b754 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (Thermal).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (Thermal).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase (Tube).cpp b/apps/cpu/Multiphase/backup/Multiphase (Tube).cpp index 5795ec610..7febd0cf1 100644 --- a/apps/cpu/Multiphase/backup/Multiphase (Tube).cpp +++ b/apps/cpu/Multiphase/backup/Multiphase (Tube).cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/Multiphase/backup/Multiphase.cpp b/apps/cpu/Multiphase/backup/Multiphase.cpp index eae4ab93d..df4c311d8 100644 --- a/apps/cpu/Multiphase/backup/Multiphase.cpp +++ b/apps/cpu/Multiphase/backup/Multiphase.cpp @@ -10,7 +10,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/MultiphaseDropletTest/droplet.cpp b/apps/cpu/MultiphaseDropletTest/droplet.cpp index 092d5a16a..829ad3862 100644 --- a/apps/cpu/MultiphaseDropletTest/droplet.cpp +++ b/apps/cpu/MultiphaseDropletTest/droplet.cpp @@ -9,7 +9,7 @@ using namespace std; void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/OrganPipe/OrganPipe.cpp b/apps/cpu/OrganPipe/OrganPipe.cpp index 2435b3567..8ad094bc9 100644 --- a/apps/cpu/OrganPipe/OrganPipe.cpp +++ b/apps/cpu/OrganPipe/OrganPipe.cpp @@ -15,7 +15,7 @@ void run(string configname) SPtr<LBMUnitConverter> conv = SPtr<LBMUnitConverter>(new LBMUnitConverter()); - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); bool newStart = config.getValue<bool>("newStart"); diff --git a/apps/cpu/Thermoplast/thermoplast.cpp b/apps/cpu/Thermoplast/thermoplast.cpp index 60057f28e..dc77db67a 100644 --- a/apps/cpu/Thermoplast/thermoplast.cpp +++ b/apps/cpu/Thermoplast/thermoplast.cpp @@ -197,7 +197,7 @@ void thermoplast(string configname) SPtr<Communicator> comm = MPICommunicator::getInstance(); int myid = comm->getProcessID(); - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); vector<int> blocknx = config.getVector<int>("blocknx"); diff --git a/apps/cpu/ViskomatXL/viskomat.cpp b/apps/cpu/ViskomatXL/viskomat.cpp index 91dfb0509..12eea28c3 100644 --- a/apps/cpu/ViskomatXL/viskomat.cpp +++ b/apps/cpu/ViskomatXL/viskomat.cpp @@ -10,7 +10,7 @@ void bflow(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string outputPath = config.getValue<string>("outputPath"); @@ -35,7 +35,7 @@ void bflow(string configname) double scaleFactor = config.getValue<double>("scaleFactor"); double resolution = config.getValue<double>("resolution"); - ConfigurationFile viscosity; + vf::basics::ConfigurationFile viscosity; //viscosity.load(viscosityPath + "/viscosity.cfg"); //double nuLB = viscosity.getValue<double>("nuLB"); diff --git a/apps/cpu/aperm/aperm.cpp b/apps/cpu/aperm/aperm.cpp index 8745b732b..0172975c6 100644 --- a/apps/cpu/aperm/aperm.cpp +++ b/apps/cpu/aperm/aperm.cpp @@ -12,7 +12,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/aperm/aperm.cpp.old b/apps/cpu/aperm/aperm.cpp.old index ce21e06c2..87f055274 100644 --- a/apps/cpu/aperm/aperm.cpp.old +++ b/apps/cpu/aperm/aperm.cpp.old @@ -12,7 +12,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/aperm/aperm.cpp.old2 b/apps/cpu/aperm/aperm.cpp.old2 index 0a4d41cfa..fd2b40d89 100644 --- a/apps/cpu/aperm/aperm.cpp.old2 +++ b/apps/cpu/aperm/aperm.cpp.old2 @@ -12,7 +12,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/bChannelA/bChannelA.cpp b/apps/cpu/bChannelA/bChannelA.cpp index 388ca594c..75e263bbe 100644 --- a/apps/cpu/bChannelA/bChannelA.cpp +++ b/apps/cpu/bChannelA/bChannelA.cpp @@ -87,7 +87,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); diff --git a/apps/cpu/f16Test/f16test.cpp b/apps/cpu/f16Test/f16test.cpp index 8e3bb726e..58921f91e 100644 --- a/apps/cpu/f16Test/f16test.cpp +++ b/apps/cpu/f16Test/f16test.cpp @@ -16,7 +16,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getString("pathOut"); diff --git a/apps/cpu/levels/levels.cpp b/apps/cpu/levels/levels.cpp index 2f9297f3a..7173a4ba5 100644 --- a/apps/cpu/levels/levels.cpp +++ b/apps/cpu/levels/levels.cpp @@ -20,7 +20,7 @@ void run(string configname) int mybundle = comm->getBundleID(); int root = comm->getRoot(); - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("path"); diff --git a/apps/cpu/mirror/mirror.cpp b/apps/cpu/mirror/mirror.cpp index a5c877bf6..e4a2f3302 100644 --- a/apps/cpu/mirror/mirror.cpp +++ b/apps/cpu/mirror/mirror.cpp @@ -9,7 +9,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); diff --git a/apps/cpu/mpi_benchmark/mpib.cpp b/apps/cpu/mpi_benchmark/mpib.cpp index 7874e2ea5..05a251bb2 100644 --- a/apps/cpu/mpi_benchmark/mpib.cpp +++ b/apps/cpu/mpi_benchmark/mpib.cpp @@ -20,7 +20,7 @@ void run(string configname) { //UbLog::reportingLevel() = UbLog::logLevelFromString("DEBUG5"); - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getString("pathOut"); diff --git a/apps/cpu/pChannel/pChannel.cpp b/apps/cpu/pChannel/pChannel.cpp index 85a34a51c..f036c22b6 100644 --- a/apps/cpu/pChannel/pChannel.cpp +++ b/apps/cpu/pChannel/pChannel.cpp @@ -169,7 +169,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathOut = config.getValue<string>("pathOut"); diff --git a/apps/cpu/pChannel/pChannel.cpp.hlrn b/apps/cpu/pChannel/pChannel.cpp.hlrn index 808b8cf49..a0592ec5b 100644 --- a/apps/cpu/pChannel/pChannel.cpp.hlrn +++ b/apps/cpu/pChannel/pChannel.cpp.hlrn @@ -13,7 +13,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/apps/cpu/perm/perm.cpp b/apps/cpu/perm/perm.cpp index 4cb2b6eb1..21b4bc47a 100644 --- a/apps/cpu/perm/perm.cpp +++ b/apps/cpu/perm/perm.cpp @@ -9,7 +9,7 @@ void perm(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getValue<string>("pathname"); diff --git a/apps/cpu/rheometer/rheometer.cpp b/apps/cpu/rheometer/rheometer.cpp index f6f98c122..3c7907d3b 100644 --- a/apps/cpu/rheometer/rheometer.cpp +++ b/apps/cpu/rheometer/rheometer.cpp @@ -10,7 +10,7 @@ void bflow(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string outputPath = config.getValue<string>("outputPath"); @@ -34,7 +34,7 @@ void bflow(string configname) double scaleFactor = config.getValue<double>("scaleFactor"); double resolution = config.getValue<double>("resolution"); - ConfigurationFile viscosity; + vf::basics::ConfigurationFile viscosity; viscosity.load(viscosityPath + "/viscosity.cfg"); double nuLB = viscosity.getValue<double>("nuLB"); diff --git a/apps/cpu/screw/screw.cpp b/apps/cpu/screw/screw.cpp index 3f48efaf9..099ae7849 100644 --- a/apps/cpu/screw/screw.cpp +++ b/apps/cpu/screw/screw.cpp @@ -14,7 +14,7 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(argv[1]); string pathname = config.getString("pathname"); diff --git a/apps/cpu/sphere/sphere.cpp b/apps/cpu/sphere/sphere.cpp index 310766ad0..3b725f98c 100644 --- a/apps/cpu/sphere/sphere.cpp +++ b/apps/cpu/sphere/sphere.cpp @@ -13,7 +13,7 @@ void run(string configname) int myid = comm->getProcessID(); - //ConfigurationFile config; + //vf::basics::ConfigurationFile config; //config.load(configname); //string pathname = config.getValue<string>("path"); diff --git a/apps/cpu/teperm/teperm.cpp b/apps/cpu/teperm/teperm.cpp index b88149591..51638fa26 100644 --- a/apps/cpu/teperm/teperm.cpp +++ b/apps/cpu/teperm/teperm.cpp @@ -14,7 +14,7 @@ void run(string configname) { try { - ConfigurationFile config; + vf::basics::ConfigurationFile config; config.load(configname); string pathname = config.getString("pathname"); diff --git a/src/cpu/VirtualFluidsCore/Utilities/ConfigurationFile.hpp b/src/basics/config/ConfigurationFile.hpp similarity index 97% rename from src/cpu/VirtualFluidsCore/Utilities/ConfigurationFile.hpp rename to src/basics/config/ConfigurationFile.hpp index 5c8050826..f48161557 100644 --- a/src/cpu/VirtualFluidsCore/Utilities/ConfigurationFile.hpp +++ b/src/basics/config/ConfigurationFile.hpp @@ -1,5 +1,5 @@ -#ifndef Configuration_h__ -#define Configuration_h__ +#ifndef BASICS_CONFIGURATIONFILE_H +#define BASICS_CONFIGURATIONFILE_H #include <map> #include <vector> @@ -9,6 +9,8 @@ #include <iostream> #include <stdlib.h> +#include <basics/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: //!# @@ -37,6 +39,11 @@ //! //! \author Konstantin Kutscher + +namespace vf::basics +{ + + class ConfigurationFile { public: @@ -240,4 +247,7 @@ T ConfigurationFile::getValue(const std::string& key) const return x; } -#endif // Configuration_h__ + +} + +#endif diff --git a/src/cpu/VirtualFluids.h b/src/cpu/VirtualFluids.h index 363c9c046..64c8382cd 100644 --- a/src/cpu/VirtualFluids.h +++ b/src/cpu/VirtualFluids.h @@ -42,6 +42,8 @@ #include <basics/PointerDefinitions.h> +#include <basics/config/ConfigurationFile.hpp> + #include <basics/container/CbArray2D.h> #include <basics/container/CbArray3D.h> #include <basics/container/CbArray4D.h> @@ -291,7 +293,6 @@ #include <Utilities/ChangeRandomQs.hpp> #include <Utilities/CheckpointConverter.h> -#include <Utilities/ConfigurationFile.hpp> #include <Utilities/MathUtil.hpp> #include <Utilities/MemoryUtil.h> #include <Utilities/VoxelMatrixUtil.hpp> -- GitLab