diff --git a/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.cpp b/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.cpp index c33c5caa75f8f2257aa77e318e787eec4c359400..c15936673368d884e2ac45b7177fa341421ca575 100644 --- a/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.cpp +++ b/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.cpp @@ -1,19 +1,25 @@ #include "ShearWaveLogFileInformation.h" -std::shared_ptr<LogFileInformation> ShearWaveInformation::getNewInstance(double u0, double v0) +std::shared_ptr<LogFileInformation> ShearWaveInformation::getNewInstance(double u0, double v0, std::vector< bool> tests, std::vector< real> l) { - return std::shared_ptr<LogFileInformation>(new ShearWaveInformation(u0,v0)); + return std::shared_ptr<LogFileInformation>(new ShearWaveInformation(u0, v0, tests, l)); } std::string ShearWaveInformation::getOutput() { makeCenterHead("ShearWave Information"); - oss << "u0: " << u0 << std::endl; - oss << "v0: " << v0 << std::endl; - oss << std::endl; + for (int i = 0; i < tests.size(); i++) { + if (tests.at(i)) { + oss << "Lx:" << l.at(i) << std::endl; + oss << "u0: " << u0 / (l.at(i) / l0) << std::endl; + oss << "v0: " << v0 / (l.at(i) / l0) << std::endl; + oss << std::endl; + } + } return oss.str(); } -ShearWaveInformation::ShearWaveInformation(double u0, double v0) : u0(u0), v0(v0) +ShearWaveInformation::ShearWaveInformation(double u0, double v0, std::vector< bool> tests, std::vector< real> l) : u0(u0), v0(v0), tests(tests), l(l) { + l0 = 32; } \ No newline at end of file diff --git a/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h b/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h index 5e4e7e43c2e7e46467ce66671aa210dff1c559e8..bc34349d29c05f589c69c117a88c4442eaf89eab 100644 --- a/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h +++ b/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h @@ -3,19 +3,25 @@ #include "Utilities/LogFileInformation/LogFileInformationImp.h" +#include "LBM\LB.h" + #include <memory> +#include <vector> class ShearWaveInformation : public LogFileInformationImp { public: - static std::shared_ptr<LogFileInformation> getNewInstance(double u0, double v0); + static std::shared_ptr<LogFileInformation> getNewInstance(double u0, double v0, std::vector< bool> tests, std::vector< real> l); std::string getOutput(); private: ShearWaveInformation() {}; - ShearWaveInformation(double u0, double v0); + ShearWaveInformation(double u0, double v0, std::vector< bool> tests, std::vector< real> l); double u0; double v0; + std::vector< bool> tests; + std::vector< real> l; + int l0; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.cpp index c3c6bda88da67f26a30cd31e89bfe0b8037b3ae2..2afc5cb73b79b568d34e9fd7fa8465d0ae1ff36c 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.cpp @@ -1,19 +1,26 @@ #include "TaylorGreenLogFileInformation.h" -std::shared_ptr<LogFileInformation> TaylorGreenInformation::getNewInstance(double u0, double amplitude) +std::shared_ptr<LogFileInformation> TaylorGreenInformation::getNewInstance(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l) { - return std::shared_ptr<LogFileInformation>(new TaylorGreenInformation(u0, amplitude)); + return std::shared_ptr<LogFileInformation>(new TaylorGreenInformation(u0, amplitude, tests, l)); } std::string TaylorGreenInformation::getOutput() { makeCenterHead("TaylorGreenVortex Information"); - oss << "u0: " << u0 << std::endl; - oss << "Amplitude: " << amplitude << std::endl; - oss << std::endl; + for (int i = 0; i < tests.size(); i++) { + if (tests.at(i)) { + oss << "Lx:" << l.at(i) << std::endl; + oss << "u0: " << u0 / (l.at(i) / l0) << std::endl; + oss << "Amplitude: " << amplitude / (l.at(i) / l0) << std::endl; + oss << std::endl; + } + } + return oss.str(); } -TaylorGreenInformation::TaylorGreenInformation(double u0, double amplitude) : u0(u0), amplitude(amplitude) +TaylorGreenInformation::TaylorGreenInformation(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l) : u0(u0), amplitude(amplitude), tests(tests), l(l) { + l0 = 32; } diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.h index 9f9d86076666b52ebca017925ad25ea352b04bfe..294f8caeaea1eb83215659456fb8cf06f630b4f4 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortex/LogFileInformation/TaylorGreenLogFileInformation.h @@ -3,19 +3,25 @@ #include "Utilities/LogFileInformation/LogFileInformationImp.h" +#include "LBM\LB.h" + #include <memory> +#include <vector> class TaylorGreenInformation : public LogFileInformationImp { public: - static std::shared_ptr<LogFileInformation> getNewInstance(double u0, double amplitude); + static std::shared_ptr<LogFileInformation> getNewInstance(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l); std::string getOutput(); private: TaylorGreenInformation() {}; - TaylorGreenInformation(double u0, double amplitude); + TaylorGreenInformation(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l); double u0; double amplitude; + std::vector< bool> tests; + std::vector< real> l; + int l0; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp b/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp index 0e838586d5e4e4edb471fa0213e2ee2e9cb2f894..8c533214f2d3e783a97cf226e2d46afea44142df 100644 --- a/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp +++ b/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp @@ -174,9 +174,9 @@ void ConfigFileReader::makeLogFileInformation() logInfo.push_back(BasicSimulationInfo::getNewInstance(numberOfTimeSteps, basisTimeStepLength, startStepCalculation, viscosity)); if (testShouldRun(tgv)) - logInfo.push_back(TaylorGreenInformation::getNewInstance(u0TGV, amplitudeTGV)); + logInfo.push_back(TaylorGreenInformation::getNewInstance(u0TGV, amplitudeTGV, tgv, l)); if (testShouldRun(sw)) - logInfo.push_back(ShearWaveInformation::getNewInstance(u0SW, v0SW)); + logInfo.push_back(ShearWaveInformation::getNewInstance(u0SW, v0SW, sw, l)); logInfo.push_back(SimulationTimeInformation::getNewInstance(simInfo, writeFiles));