From 1a7ba7195c602fe875e95f6b8906d942a2dd3396 Mon Sep 17 00:00:00 2001 From: Timon Habenicht <t.habenicht@tu-bs.de> Date: Sun, 3 Feb 2019 18:52:04 +0100 Subject: [PATCH] renames Nu to Ny and >> to > > --- .../ShearWaveAnalyticalResults.cpp | 4 +- .../ShearWaveAnalyticalResults.h | 6 +- .../InitialConditionShearWave.h | 2 +- .../ShearWaveLogFileInformation.h | 2 +- .../AnalyticalResultsTaylorGreenVortexUx.cpp | 6 +- .../AnalyticalResultsTaylorGreenVortexUx.h | 6 +- .../LogFileInformationTaylorGreenVortexUx.cpp | 4 +- .../LogFileInformationTaylorGreenVortexUx.h | 6 +- .../SimulationInfoTaylorGreenVortexUx.cpp | 4 +- .../SimulationInfoTaylorGreenVortexUx.h | 4 +- .../AnalyticalResultsTaylorGreenVortexUz.cpp | 6 +- .../AnalyticalResultsTaylorGreenVortexUz.h | 6 +- .../InitialConditionTaylorGreenVortexUz.h | 2 +- .../LogFileInformationTaylorGreenVortexUz.cpp | 4 +- .../LogFileInformationTaylorGreenVortexUz.h | 4 +- .../SimulationInfoTaylorGreenVortexUz.cpp | 4 +- .../SimulationInfoTaylorGreenVortexUz.h | 4 +- .../Tests/L2NormTest/L2NormTest.cpp | 4 +- .../Tests/L2NormTest/L2NormTest.h | 2 +- .../L2NormLogFileInformation.cpp | 4 +- .../L2NormLogFileInformation.h | 6 +- .../PostProcessingStrategyL2NormTest.cpp | 4 +- .../PostProcessingStrategyL2NormTest.h | 18 +-- .../L2NormTestBetweenKernels.cpp | 6 +- .../L2NormTestBetweenKernels.h | 10 +- .../L2NormTestBetweenKernelsParameterStruct.h | 2 +- ...L2NormLogFileInformationBetweenKernels.cpp | 4 +- .../L2NormLogFileInformationBetweenKernels.h | 6 +- ...ormBetweenKernelPostProcessingStrategy.cpp | 4 +- ...2NormBetweenKernelPostProcessingStrategy.h | 22 +-- .../PhiAndNuLogFileInformation.h | 36 ----- .../Tests/PhiAndNuTest/PhiAndNuTest.cpp | 136 ------------------ .../Tests/PhiAndNuTest/PhiAndNuTestStruct.h | 16 --- .../PostProcessingStrategyPhiAndNuTest.cpp | 89 ------------ .../PostProcessingStrategyPhiAndNuTest.h | 39 ----- .../PhiAndNyLogFileInformation.cpp} | 52 +++---- .../PhiAndNyLogFileInformation.h | 36 +++++ .../LogFileInformation/package.include | 0 .../Tests/PhiAndNyTest/PhiAndNyTest.cpp | 136 ++++++++++++++++++ .../PhiAndNyTest.h} | 34 ++--- .../PhiAndNyTestParameterStruct.h} | 6 +- .../Tests/PhiAndNyTest/PhiAndNyTestStruct.h | 16 +++ .../PostProcessingStrategyPhiAndNyTest.cpp | 89 ++++++++++++ .../PostProcessingStrategyPhiAndNyTest.h | 39 +++++ .../PostProcessingStrategy/package.include | 0 .../package.include | 0 .../FFTCalculator/FFTCalculator.cpp | 20 +-- .../Calculator/FFTCalculator/FFTCalculator.h | 20 +-- .../L2NormCalculator/L2NormCalculator.h | 4 +- .../ColorConsoleOutput/ColorConsoleOutput.h | 4 +- .../ColorConsoleOutputImp.cpp | 12 +- .../ColorConsoleOutputImp.h | 4 +- .../ConfigFileReader/ConfigFileReader.cpp | 24 ++-- .../ConfigFileReader/ConfigFileReader.h | 16 +-- .../AnalyticalResults2DToVTKWriterImp.cpp | 8 +- .../AnalyticalResults2DToVTKWriterImp.h | 2 +- .../Y2dSliceToResults/Y2dSliceToResults.h | 2 +- .../KernelConfigurationImp.h | 4 +- .../LogFileTimeInformation.cpp | 2 +- .../Utilities/LogFileQueue/LogFileQueueImp.h | 4 +- .../LogFileWriter/LogFileWriterImp.cpp | 4 +- .../LogFileWriter/LogFileWriterImp.h | 12 +- .../NumericalTestFactory.h | 6 +- .../NumericalTestFactoryImp.cpp | 60 ++++---- .../NumericalTestFactoryImp.h | 36 ++--- .../PostProcessingStrategyImp.h | 4 +- .../AnalyticalResults/AnalyticalResult.h | 2 +- .../AnalyticalResults/AnalyticalResultImp.h | 2 +- .../Utilities/Results/Results.h | 14 +- .../Utilities/Results/ResultsImp.cpp | 18 +-- .../Utilities/Results/ResultsImp.h | 28 ++-- .../SimulationParameter/SimulationParameter.h | 4 +- .../Utilities/Structs/ConfigDataStruct.h | 4 +- .../NumericalTests/Utilities/Test/Test.h | 2 +- .../NumericalTests/Utilities/Test/TestImp.cpp | 2 +- .../NumericalTests/Utilities/Test/TestImp.h | 4 +- .../Utilities/TestQueue/TestQueueImp.cpp | 4 +- .../Utilities/TestQueue/TestQueueImp.h | 10 +- .../TestSimulation/TestSimulationImp.cpp | 2 +- .../TestSimulation/TestSimulationImp.h | 6 +- .../VirtualFluidSimulationImp.h | 4 +- .../VirtualFluidSimulationFactoryImp.cpp | 8 +- .../VirtualFluidSimulationFactoryImp.h | 2 +- targets/tests/NumericalTests/main.cpp | 4 +- 84 files changed, 629 insertions(+), 629 deletions(-) delete mode 100644 targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.h delete mode 100644 targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.cpp delete mode 100644 targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestStruct.h delete mode 100644 targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.cpp delete mode 100644 targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.h rename targets/tests/NumericalTests/Tests/{PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.cpp => PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.cpp} (57%) create mode 100644 targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.h rename targets/tests/NumericalTests/Tests/{PhiAndNuTest => PhiAndNyTest}/LogFileInformation/package.include (100%) create mode 100644 targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.cpp rename targets/tests/NumericalTests/Tests/{PhiAndNuTest/PhiAndNuTest.h => PhiAndNyTest/PhiAndNyTest.h} (52%) rename targets/tests/NumericalTests/Tests/{PhiAndNuTest/PhiAndNuTestParameterStruct.h => PhiAndNyTest/PhiAndNyTestParameterStruct.h} (68%) create mode 100644 targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestStruct.h create mode 100644 targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.cpp create mode 100644 targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.h rename targets/tests/NumericalTests/Tests/{PhiAndNuTest => PhiAndNyTest}/PostProcessingStrategy/package.include (100%) rename targets/tests/NumericalTests/Tests/{PhiAndNuTest => PhiAndNyTest}/package.include (100%) diff --git a/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.cpp b/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.cpp index dddc7aba6..bc044aea8 100644 --- a/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.cpp +++ b/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.cpp @@ -5,7 +5,7 @@ #define _USE_MATH_DEFINES #include <math.h> -std::shared_ptr<AnalyticalResults> ShearWaveAnalyticalResults::getNewInstance(double viscosity, std::shared_ptr< ShearWaveParameterStruct> simParaStruct) +std::shared_ptr<AnalyticalResults> ShearWaveAnalyticalResults::getNewInstance(double viscosity, std::shared_ptr<ShearWaveParameterStruct> simParaStruct) { return std::shared_ptr<AnalyticalResults>(new ShearWaveAnalyticalResults(viscosity,simParaStruct)); } @@ -26,7 +26,7 @@ void ShearWaveAnalyticalResults::calc(std::shared_ptr<SimulationResults> simResu calculated = true; } -ShearWaveAnalyticalResults::ShearWaveAnalyticalResults(double viscosity, std::shared_ptr< ShearWaveParameterStruct> simParaStruct) +ShearWaveAnalyticalResults::ShearWaveAnalyticalResults(double viscosity, std::shared_ptr<ShearWaveParameterStruct> simParaStruct) : AnalyticalResultsImp() { this->viscosity = viscosity; diff --git a/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.h b/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.h index 89f1281a4..9dde1a2e5 100644 --- a/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.h +++ b/targets/tests/NumericalTests/Simulations/ShearWave/AnalyticalResults/ShearWaveAnalyticalResults.h @@ -8,12 +8,12 @@ struct ShearWaveParameterStruct; class ShearWaveAnalyticalResults : public AnalyticalResultsImp { public: - static std::shared_ptr< AnalyticalResults> getNewInstance(double viscosity, std::shared_ptr< ShearWaveParameterStruct> simParaStruct); - void calc(std::shared_ptr< SimulationResults> simResults); + static std::shared_ptr<AnalyticalResults> getNewInstance(double viscosity, std::shared_ptr<ShearWaveParameterStruct> simParaStruct); + void calc(std::shared_ptr<SimulationResults> simResults); private: ShearWaveAnalyticalResults() {}; - ShearWaveAnalyticalResults(double viscosity, std::shared_ptr< ShearWaveParameterStruct> simParaStruct); + ShearWaveAnalyticalResults(double viscosity, std::shared_ptr<ShearWaveParameterStruct> simParaStruct); double viscosity, rho0; double l0; diff --git a/targets/tests/NumericalTests/Simulations/ShearWave/InitialConditions/InitialConditionShearWave.h b/targets/tests/NumericalTests/Simulations/ShearWave/InitialConditions/InitialConditionShearWave.h index f8c98f427..df964b213 100644 --- a/targets/tests/NumericalTests/Simulations/ShearWave/InitialConditions/InitialConditionShearWave.h +++ b/targets/tests/NumericalTests/Simulations/ShearWave/InitialConditions/InitialConditionShearWave.h @@ -11,7 +11,7 @@ struct GridInformationStruct; class InitialConditionShearWave :public InitialConditionImp { public: - static std::shared_ptr< InitialConditionShearWave> getNewInstance(std::shared_ptr<ShearWaveParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct); + static std::shared_ptr<InitialConditionShearWave> getNewInstance(std::shared_ptr<ShearWaveParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct); real getInitVX(int i, int level); real getInitVY(int i, int level); diff --git a/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h b/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h index f452f9e77..8850c9b86 100644 --- a/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h +++ b/targets/tests/NumericalTests/Simulations/ShearWave/LogFileInformation/ShearWaveLogFileInformation.h @@ -27,7 +27,7 @@ private: double ux; double uz; - std::vector< real> lx; + std::vector<real> lx; int l0; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.cpp index beffea2a5..67cd01272 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.cpp @@ -5,12 +5,12 @@ #define _USE_MATH_DEFINES #include <math.h> -std::shared_ptr<AnalyticalResults> AnalyticalResultsTaylorGreenUx::getNewInstance(double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct) +std::shared_ptr<AnalyticalResults> AnalyticalResultsTaylorGreenUx::getNewInstance(double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct) { return std::shared_ptr<AnalyticalResults>(new AnalyticalResultsTaylorGreenUx(viscosity, simParaStruct)); } -void AnalyticalResultsTaylorGreenUx::calc(std::shared_ptr< SimulationResults> simResults) +void AnalyticalResultsTaylorGreenUx::calc(std::shared_ptr<SimulationResults> simResults) { AnalyticalResultsImp::init(simResults); @@ -26,7 +26,7 @@ void AnalyticalResultsTaylorGreenUx::calc(std::shared_ptr< SimulationResults> si calculated = true; } -AnalyticalResultsTaylorGreenUx::AnalyticalResultsTaylorGreenUx(double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct) +AnalyticalResultsTaylorGreenUx::AnalyticalResultsTaylorGreenUx(double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct) : AnalyticalResultsImp() { this->viscosity = viscosity; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.h index 2bcb55cf8..055bdb240 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUx.h @@ -8,12 +8,12 @@ struct TaylorGreenVortexUxParameterStruct; class AnalyticalResultsTaylorGreenUx : public AnalyticalResultsImp { public: - static std::shared_ptr< AnalyticalResults> getNewInstance(double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct); - void calc(std::shared_ptr< SimulationResults> simResults); + static std::shared_ptr<AnalyticalResults> getNewInstance(double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct); + void calc(std::shared_ptr<SimulationResults> simResults); private: AnalyticalResultsTaylorGreenUx() {}; - AnalyticalResultsTaylorGreenUx(double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct); + AnalyticalResultsTaylorGreenUx(double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct); double viscosity, rho0; double l0; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.cpp index bfe7087df..67df2a5fd 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.cpp @@ -3,7 +3,7 @@ #include "Simulations\TaylorGreenVortexUx\TaylorGreenVortexUxParameterStruct.h" #include "Utilities\Structs\GridInformationStruct.h" -std::shared_ptr<LogFileInformationTaylorGreenUx> LogFileInformationTaylorGreenUx::getNewInstance(std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector< std::shared_ptr< GridInformationStruct> > gridInfoStruct) +std::shared_ptr<LogFileInformationTaylorGreenUx> LogFileInformationTaylorGreenUx::getNewInstance(std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct) { return std::shared_ptr<LogFileInformationTaylorGreenUx>(new LogFileInformationTaylorGreenUx(simParaStruct, gridInfoStruct)); } @@ -45,7 +45,7 @@ std::string LogFileInformationTaylorGreenUx::getFilePathExtensionOne() return oss.str(); } -LogFileInformationTaylorGreenUx::LogFileInformationTaylorGreenUx(std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector< std::shared_ptr< GridInformationStruct> > gridInfoStruct) +LogFileInformationTaylorGreenUx::LogFileInformationTaylorGreenUx(std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct) { this->ux = simParaStruct->ux; this->amplitude = simParaStruct->amplitude; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.h index d242eb4fe..086a685cf 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/LogFileInformation/LogFileInformationTaylorGreenVortexUx.h @@ -13,7 +13,7 @@ struct GridInformationStruct; class LogFileInformationTaylorGreenUx : public SimulationLogFileInformation { public: - static std::shared_ptr<LogFileInformationTaylorGreenUx> getNewInstance(std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector< std::shared_ptr< GridInformationStruct> > gridInfoStruct); + static std::shared_ptr<LogFileInformationTaylorGreenUx> getNewInstance(std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct); std::string getOutput(); std::string getFilePathExtensionOne(); @@ -21,11 +21,11 @@ public: private: LogFileInformationTaylorGreenUx() {}; - LogFileInformationTaylorGreenUx(std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector< std::shared_ptr< GridInformationStruct> > gridInfoStruct); + LogFileInformationTaylorGreenUx(std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct); double ux; double amplitude; - std::vector< double> lx; + std::vector<double> lx; int l0; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.cpp index 12dead452..246cf58fe 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.cpp @@ -5,12 +5,12 @@ #include <sstream> -std::shared_ptr<SimulationInfoTaylorGreenUx> SimulationInfoTaylorGreenUx::getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations) +std::shared_ptr<SimulationInfoTaylorGreenUx> SimulationInfoTaylorGreenUx::getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations) { return std::shared_ptr<SimulationInfoTaylorGreenUx>(new SimulationInfoTaylorGreenUx(simID, kernelName, viscosity, simParaStruct, gridInfoStruct, numberOfSimulations)); } -SimulationInfoTaylorGreenUx::SimulationInfoTaylorGreenUx(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations) +SimulationInfoTaylorGreenUx::SimulationInfoTaylorGreenUx(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations) : SimulationInfoImp(simID, kernelName, viscosity, gridInfoStruct->lx, numberOfSimulations, "TaylorGreenVortex Ux") { std::ostringstream oss; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.h index 29728a3c8..4fda03569 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUx/SimulationInfo/SimulationInfoTaylorGreenVortexUx.h @@ -13,11 +13,11 @@ struct GridInformationStruct; class SimulationInfoTaylorGreenUx : public SimulationInfoImp { public: - static std::shared_ptr<SimulationInfoTaylorGreenUx> getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations); + static std::shared_ptr<SimulationInfoTaylorGreenUx> getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations); private: SimulationInfoTaylorGreenUx() {}; - SimulationInfoTaylorGreenUx(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations); + SimulationInfoTaylorGreenUx(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUxParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations); }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.cpp index 01b5e4c2b..01d0a518b 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.cpp @@ -5,12 +5,12 @@ #define _USE_MATH_DEFINES #include <math.h> -std::shared_ptr<AnalyticalResults> AnalyticalResultsTaylorGreenUz::getNewInstance(double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct) +std::shared_ptr<AnalyticalResults> AnalyticalResultsTaylorGreenUz::getNewInstance(double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct) { return std::shared_ptr<AnalyticalResults>(new AnalyticalResultsTaylorGreenUz(viscosity, simParaStruct)); } -void AnalyticalResultsTaylorGreenUz::calc(std::shared_ptr< SimulationResults> simResults) +void AnalyticalResultsTaylorGreenUz::calc(std::shared_ptr<SimulationResults> simResults) { AnalyticalResultsImp::init(simResults); @@ -26,7 +26,7 @@ void AnalyticalResultsTaylorGreenUz::calc(std::shared_ptr< SimulationResults> si calculated = true; } -AnalyticalResultsTaylorGreenUz::AnalyticalResultsTaylorGreenUz(double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct) : AnalyticalResultsImp() +AnalyticalResultsTaylorGreenUz::AnalyticalResultsTaylorGreenUz(double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct) : AnalyticalResultsImp() { this->viscosity = viscosity; this->uz = simParaStruct->uz; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.h index 0cd44ee60..6ccdd5176 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/AnalyticalResults/AnalyticalResultsTaylorGreenVortexUz.h @@ -8,13 +8,13 @@ struct TaylorGreenVortexUzParameterStruct; class AnalyticalResultsTaylorGreenUz : public AnalyticalResultsImp { public: - static std::shared_ptr< AnalyticalResults> getNewInstance(double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct); - void calc(std::shared_ptr< SimulationResults> simResults); + static std::shared_ptr<AnalyticalResults> getNewInstance(double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct); + void calc(std::shared_ptr<SimulationResults> simResults); private: AnalyticalResultsTaylorGreenUz() {}; - AnalyticalResultsTaylorGreenUz(double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct); + AnalyticalResultsTaylorGreenUz(double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct); double viscosity, rho0; double l0; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/InitialConditions/InitialConditionTaylorGreenVortexUz.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/InitialConditions/InitialConditionTaylorGreenVortexUz.h index 2c901c907..c793863f5 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/InitialConditions/InitialConditionTaylorGreenVortexUz.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/InitialConditions/InitialConditionTaylorGreenVortexUz.h @@ -11,7 +11,7 @@ struct GridInformationStruct; class InitialConditionTaylorGreenUz :public InitialConditionImp { public: - static std::shared_ptr< InitialConditionTaylorGreenUz> getNewInstance(std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct); + static std::shared_ptr<InitialConditionTaylorGreenUz> getNewInstance(std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct); real getInitVX(int i, int level); real getInitVY(int i, int level); diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.cpp index 34bf4595e..65ef278b6 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.cpp @@ -2,7 +2,7 @@ #include "Simulations\TaylorGreenVortexUz\TaylorGreenVortexUzParameterStruct.h" -std::shared_ptr<LogFileInformationTaylorGreenUz> LogFileInformationTaylorGreenUz::getNewInstance(std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::vector< std::shared_ptr< GridInformationStruct> > gridInfoStruct) +std::shared_ptr<LogFileInformationTaylorGreenUz> LogFileInformationTaylorGreenUz::getNewInstance(std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct) { return std::shared_ptr<LogFileInformationTaylorGreenUz>(new LogFileInformationTaylorGreenUz(simParaStruct, gridInfoStruct)); } @@ -44,7 +44,7 @@ std::string LogFileInformationTaylorGreenUz::getFilePathExtensionTwo() return oss.str(); } -LogFileInformationTaylorGreenUz::LogFileInformationTaylorGreenUz(std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::vector< std::shared_ptr< GridInformationStruct> > gridInfoStruct) +LogFileInformationTaylorGreenUz::LogFileInformationTaylorGreenUz(std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct) { this->uz = simParaStruct->uz; this->amplitude = simParaStruct->amplitude; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.h index 8992b20f6..9bd540dc1 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/LogFileInformation/LogFileInformationTaylorGreenVortexUz.h @@ -21,11 +21,11 @@ public: private: LogFileInformationTaylorGreenUz() {}; - LogFileInformationTaylorGreenUz(std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct); + LogFileInformationTaylorGreenUz(std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::vector<std::shared_ptr<GridInformationStruct> > gridInfoStruct); double uz; double amplitude; - std::vector< double> lz; + std::vector<double> lz; int l0; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.cpp b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.cpp index cc7858052..d370c7902 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.cpp +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.cpp @@ -5,12 +5,12 @@ #include <sstream> -std::shared_ptr<SimulationInfoTaylorGreenUz> SimulationInfoTaylorGreenUz::getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations) +std::shared_ptr<SimulationInfoTaylorGreenUz> SimulationInfoTaylorGreenUz::getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations) { return std::shared_ptr<SimulationInfoTaylorGreenUz>(new SimulationInfoTaylorGreenUz(simID, kernelName, viscosity, simParaStruct, gridInfoStruct, numberOfSimulations)); } -SimulationInfoTaylorGreenUz::SimulationInfoTaylorGreenUz(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations) +SimulationInfoTaylorGreenUz::SimulationInfoTaylorGreenUz(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations) : SimulationInfoImp(simID, kernelName, viscosity, gridInfoStruct->lz, numberOfSimulations, "TaylorGreenVortex Uz") { std::ostringstream oss; diff --git a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.h b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.h index bbf5d6f0d..d6b833c86 100644 --- a/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.h +++ b/targets/tests/NumericalTests/Simulations/TaylorGreenVortexUz/SimulationInfo/SimulationInfoTaylorGreenVortexUz.h @@ -13,11 +13,11 @@ struct GridInformationStruct; class SimulationInfoTaylorGreenUz : public SimulationInfoImp { public: - static std::shared_ptr< SimulationInfoTaylorGreenUz> getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations); + static std::shared_ptr<SimulationInfoTaylorGreenUz> getNewInstance(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations); private: SimulationInfoTaylorGreenUz() {}; - SimulationInfoTaylorGreenUz(int simID, std::string kernelName, double viscosity, std::shared_ptr< TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr< GridInformationStruct> gridInfoStruct, int numberOfSimulations); + SimulationInfoTaylorGreenUz(int simID, std::string kernelName, double viscosity, std::shared_ptr<TaylorGreenVortexUzParameterStruct> simParaStruct, std::shared_ptr<GridInformationStruct> gridInfoStruct, int numberOfSimulations); }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.cpp b/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.cpp index 4f88a74a9..b3ea325b3 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.cpp @@ -8,7 +8,7 @@ #include <iomanip> -std::shared_ptr<L2NormTest> L2NormTest::getNewInstance(std::shared_ptr< ColorConsoleOutput> colorOutput, std::shared_ptr<L2NormTestParameterStruct> testParameter, std::string dataToCalculate) +std::shared_ptr<L2NormTest> L2NormTest::getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput, std::shared_ptr<L2NormTestParameterStruct> testParameter, std::string dataToCalculate) { return std::shared_ptr<L2NormTest>(new L2NormTest(colorOutput, testParameter, dataToCalculate)); } @@ -67,7 +67,7 @@ void L2NormTest::makeConsoleOutput() colorOutput->makeL2NormTestOutput(testPassed, simInfos.at(0), basicTimeStep, divergentTimeStep, dataToCalculate, resultBasicTimestep, resultDivergentTimeStep, diffL2Norm); } -L2NormTest::L2NormTest(std::shared_ptr< ColorConsoleOutput> colorOutput, std::shared_ptr<L2NormTestParameterStruct> testParameter, std::string dataToCalculate) +L2NormTest::L2NormTest(std::shared_ptr<ColorConsoleOutput> colorOutput, std::shared_ptr<L2NormTestParameterStruct> testParameter, std::string dataToCalculate) : TestImp(colorOutput), dataToCalculate(dataToCalculate) { basicTimeStep = testParameter->basicTimeStep; diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.h b/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.h index 1bc500390..bc0f50682 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.h +++ b/targets/tests/NumericalTests/Tests/L2NormTest/L2NormTest.h @@ -20,7 +20,7 @@ public: void addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<L2NormPostProcessingStrategy> postProStrategy); void evaluate(); std::string getLogFileOutput(); - std::vector< bool> getPassedTests(); + std::vector<bool> getPassedTests(); void makeConsoleOutput(); private: diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp index 25a4419d3..a5d4f219f 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp @@ -6,7 +6,7 @@ #include <iomanip> #include <sstream> -std::shared_ptr<L2NormInformation> L2NormInformation::getNewInstance(std::vector<std::shared_ptr<L2NormTest>> tests, std::shared_ptr<L2NormTestParameterStruct> testParameter) +std::shared_ptr<L2NormInformation> L2NormInformation::getNewInstance(std::vector<std::shared_ptr<L2NormTest> > tests, std::shared_ptr<L2NormTestParameterStruct> testParameter) { return std::shared_ptr<L2NormInformation>(new L2NormInformation(tests, testParameter)); } @@ -27,7 +27,7 @@ std::string L2NormInformation::getOutput() return oss.str(); } -L2NormInformation::L2NormInformation(std::vector<std::shared_ptr<L2NormTest>> tests, std::shared_ptr<L2NormTestParameterStruct> testParameter) : tests(tests) +L2NormInformation::L2NormInformation(std::vector<std::shared_ptr<L2NormTest> > tests, std::shared_ptr<L2NormTestParameterStruct> testParameter) : tests(tests) { basicTimeStep = testParameter->basicTimeStep; divergentTimeStep = testParameter->divergentTimeStep; diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h index cf365298c..1df5c4057 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h +++ b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h @@ -12,15 +12,15 @@ struct L2NormTestParameterStruct; class L2NormInformation : public TestLogFileInformation { public: - static std::shared_ptr< L2NormInformation> getNewInstance(std::vector< std::shared_ptr< L2NormTest>> tests, std::shared_ptr<L2NormTestParameterStruct> testParameter); + static std::shared_ptr<L2NormInformation> getNewInstance(std::vector<std::shared_ptr<L2NormTest> > tests, std::shared_ptr<L2NormTestParameterStruct> testParameter); std::string getOutput(); private: L2NormInformation() {}; - L2NormInformation(std::vector< std::shared_ptr< L2NormTest>> tests, std::shared_ptr<L2NormTestParameterStruct> testParameter); + L2NormInformation(std::vector<std::shared_ptr<L2NormTest> > tests, std::shared_ptr<L2NormTestParameterStruct> testParameter); - std::vector< std::shared_ptr< L2NormTest>> tests; + std::vector<std::shared_ptr<L2NormTest> > tests; unsigned int basicTimeStep, divergentTimeStep; }; diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.cpp b/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.cpp index 377bde016..fa938302f 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.cpp @@ -6,12 +6,12 @@ #include "Utilities\Results\AnalyticalResults\AnalyticalResult.h" #include "Utilities\Results\SimulationResults\SimulationResults.h" -std::shared_ptr<L2NormPostProcessingStrategy> L2NormPostProcessingStrategy::getNewInstance(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara) +std::shared_ptr<L2NormPostProcessingStrategy> L2NormPostProcessingStrategy::getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara) { return std::shared_ptr<L2NormPostProcessingStrategy>(new L2NormPostProcessingStrategy(simResult, analyticalResult, testPara)); } -L2NormPostProcessingStrategy::L2NormPostProcessingStrategy(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara) +L2NormPostProcessingStrategy::L2NormPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara) : PostProcessingStrategyImp(simResult), analyticalResult(analyticalResult) { dataToCalculateL2 = testPara->basicTestParameter->dataToCalc; diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.h b/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.h index a29a72a4c..23c863e41 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.h +++ b/targets/tests/NumericalTests/Tests/L2NormTest/PostProcessingStrategy/PostProcessingStrategyL2NormTest.h @@ -12,21 +12,21 @@ struct L2NormTestParameterStruct; class L2NormPostProcessingStrategy : public PostProcessingStrategyImp { public: - static std::shared_ptr< L2NormPostProcessingStrategy> getNewInstance(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara); + static std::shared_ptr<L2NormPostProcessingStrategy> getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara); void evaluate(); - std::vector< double> getL2NormVx(); - std::vector< double> getL2NormVy(); - std::vector< double> getL2NormVz(); - std::vector< double> getL2NormPress(); - std::vector< double> getL2NormRho(); + std::vector<double> getL2NormVx(); + std::vector<double> getL2NormVy(); + std::vector<double> getL2NormVz(); + std::vector<double> getL2NormPress(); + std::vector<double> getL2NormRho(); private: - L2NormPostProcessingStrategy(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara); + L2NormPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestParameterStruct> testPara); bool isEvaluated; - std::shared_ptr< L2NormCalculator> l2Normcalculator; - std::shared_ptr< AnalyticalResults> analyticalResult; + std::shared_ptr<L2NormCalculator> l2Normcalculator; + std::shared_ptr<AnalyticalResults> analyticalResult; std::vector<std::string> dataToCalculateL2; unsigned int basicTimeStepL2Norm; unsigned int divergentTimeStepL2Norm; diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp index a96d57dbe..65cb70c4b 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp @@ -9,7 +9,7 @@ #include <iomanip> -std::shared_ptr<L2NormTestBetweenKernels> L2NormTestBetweenKernels::getNewInstance(std::shared_ptr< ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep) +std::shared_ptr<L2NormTestBetweenKernels> L2NormTestBetweenKernels::getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep) { return std::shared_ptr<L2NormTestBetweenKernels>(new L2NormTestBetweenKernels(colorOutput, dataToCalculate, timeStep)); } @@ -83,7 +83,7 @@ void L2NormTestBetweenKernels::makeConsoleOutput() colorOutput->makeL2NormBetweenKernelsTestOutput(testPassed, basicSimInfo, divergentSimInfo, dataToCalculate, timeStep, basicL2Result, divergentL2Result, resultL2ToBasicKernel); } -void L2NormTestBetweenKernels::setBasicSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr< L2NormBetweenKernelPostProcessingStrategy> postProcessingStrategy) +void L2NormTestBetweenKernels::setBasicSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> postProcessingStrategy) { TestImp::addSimulation(sim, simInfo, postProcessingStrategy); this->basicSim = sim; @@ -101,7 +101,7 @@ void L2NormTestBetweenKernels::setDivergentKernelSimulation(std::shared_ptr<Nume this->divergentSimResults = divergentPostProcessingStrategy->getSimulationResult(); } -L2NormTestBetweenKernels::L2NormTestBetweenKernels(std::shared_ptr< ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep) +L2NormTestBetweenKernels::L2NormTestBetweenKernels(std::shared_ptr<ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep) : TestImp(colorOutput), timeStep(timeStep), dataToCalculate(dataToCalculate) { l2Normcalculator = L2NormCalculator::getInstance(); diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.h b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.h index 5c2640da0..5dd1c364c 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.h +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.h @@ -13,20 +13,20 @@ class SimulationResults; class L2NormTestBetweenKernels : public TestImp { public: - static std::shared_ptr<L2NormTestBetweenKernels> getNewInstance(std::shared_ptr< ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep); + static std::shared_ptr<L2NormTestBetweenKernels> getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep); void update(); void evaluate(); std::string getLogFileOutput(); double getBasicL2Result(); - std::vector< bool> getPassedTests(); + std::vector<bool> getPassedTests(); void makeConsoleOutput(); - void setBasicSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr< SimulationInfo> simInfo, std::shared_ptr< L2NormBetweenKernelPostProcessingStrategy> postProcessingStrategy); - void setDivergentKernelSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr< SimulationInfo> simInfo, std::shared_ptr< L2NormBetweenKernelPostProcessingStrategy> postProcessingStrategy); + void setBasicSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> postProcessingStrategy); + void setDivergentKernelSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> postProcessingStrategy); private: - L2NormTestBetweenKernels(std::shared_ptr< ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep); + L2NormTestBetweenKernels(std::shared_ptr<ColorConsoleOutput> colorOutput, std::string dataToCalculate, unsigned int timeStep); int calcTimeStepInResults(unsigned int timeStep); unsigned int timeStep; diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernelsParameterStruct.h b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernelsParameterStruct.h index 4adcbcb12..57caa42b0 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernelsParameterStruct.h +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernelsParameterStruct.h @@ -14,7 +14,7 @@ struct L2NormTestBetweenKernelsParameterStruct std::string basicKernel; std::vector<std::string> kernelsToTest; - std::vector< int> timeSteps; + std::vector<int> timeSteps; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp index 7b000804c..44410f28c 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp @@ -6,7 +6,7 @@ #include <iomanip> #include <sstream> -std::shared_ptr<L2NormBetweenKernelsInformation> L2NormBetweenKernelsInformation::getNewInstance(std::vector<std::shared_ptr<L2NormTestBetweenKernels>> tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) +std::shared_ptr<L2NormBetweenKernelsInformation> L2NormBetweenKernelsInformation::getNewInstance(std::vector<std::shared_ptr<L2NormTestBetweenKernels> > tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) { return std::shared_ptr<L2NormBetweenKernelsInformation>(new L2NormBetweenKernelsInformation(tests, testPara)); } @@ -35,7 +35,7 @@ std::string L2NormBetweenKernelsInformation::getOutput() return oss.str(); } -L2NormBetweenKernelsInformation::L2NormBetweenKernelsInformation(std::vector<std::shared_ptr<L2NormTestBetweenKernels>> tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) +L2NormBetweenKernelsInformation::L2NormBetweenKernelsInformation(std::vector<std::shared_ptr<L2NormTestBetweenKernels> > tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) : tests(tests) { basicKernel = testPara->basicKernel; diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.h b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.h index 140008899..f2b6d6c39 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.h +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.h @@ -12,17 +12,17 @@ struct L2NormTestBetweenKernelsParameterStruct; class L2NormBetweenKernelsInformation : public TestLogFileInformation { public: - static std::shared_ptr< L2NormBetweenKernelsInformation> getNewInstance(std::vector< std::shared_ptr< L2NormTestBetweenKernels>> tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); + static std::shared_ptr<L2NormBetweenKernelsInformation> getNewInstance(std::vector<std::shared_ptr<L2NormTestBetweenKernels> > tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); std::string getOutput(); private: L2NormBetweenKernelsInformation() {}; - L2NormBetweenKernelsInformation(std::vector< std::shared_ptr< L2NormTestBetweenKernels>> tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); + L2NormBetweenKernelsInformation(std::vector<std::shared_ptr<L2NormTestBetweenKernels> > tests, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); void deleteLastCharInOss(); - std::vector< std::shared_ptr< L2NormTestBetweenKernels>> tests; + std::vector<std::shared_ptr<L2NormTestBetweenKernels> > tests; std::string basicKernel; std::vector<int> timeSteps; diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.cpp b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.cpp index aced6d158..e5eb87771 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.cpp @@ -6,7 +6,7 @@ #include "Tests\L2NormTestBetweenKernels\L2NormTestBetweenKernelsParameterStruct.h" -std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> L2NormBetweenKernelPostProcessingStrategy::getNewInstance(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) +std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> L2NormBetweenKernelPostProcessingStrategy::getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) { return std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy>(new L2NormBetweenKernelPostProcessingStrategy(simResult, analyticalResult, testPara)); } @@ -66,7 +66,7 @@ std::shared_ptr<SimulationResults> L2NormBetweenKernelPostProcessingStrategy::ge return simResult; } -L2NormBetweenKernelPostProcessingStrategy::L2NormBetweenKernelPostProcessingStrategy(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) +L2NormBetweenKernelPostProcessingStrategy::L2NormBetweenKernelPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara) : PostProcessingStrategyImp(simResult), analyticalResult(analyticalResult) { timeSteps = testPara->timeSteps; diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.h b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.h index 84b4fb1ea..a775ccadb 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.h +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/PostProcessingStrategy/L2NormBetweenKernelPostProcessingStrategy.h @@ -12,7 +12,7 @@ struct L2NormTestBetweenKernelsParameterStruct; class L2NormBetweenKernelPostProcessingStrategy : public PostProcessingStrategyImp { public: - static std::shared_ptr< L2NormBetweenKernelPostProcessingStrategy> getNewInstance(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); + static std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); void evaluate(); double getL2NormVx(int timeStep); @@ -21,23 +21,23 @@ public: double getL2NormPress(int timeStep); double getL2NormRho(int timeStep); - virtual std::shared_ptr< SimulationResults> getSimulationResult(); + virtual std::shared_ptr<SimulationResults> getSimulationResult(); private: - L2NormBetweenKernelPostProcessingStrategy(std::shared_ptr< SimulationResults> simResult, std::shared_ptr< AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); + L2NormBetweenKernelPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara); int calcPosInTimeStep(int time); std::vector<int> timeSteps; std::vector<double> l2Norm; - std::vector< double> l2Vx; - std::vector< double> l2Vy; - std::vector< double> l2Vz; - std::vector< double> l2Press; - std::vector< double> l2Rho; - std::vector< std::string> dataToCalculate; - std::shared_ptr< AnalyticalResults> analyticalResult; - std::shared_ptr< L2NormCalculator> l2Normcalculator; + std::vector<double> l2Vx; + std::vector<double> l2Vy; + std::vector<double> l2Vz; + std::vector<double> l2Press; + std::vector<double> l2Rho; + std::vector<std::string> dataToCalculate; + std::shared_ptr<AnalyticalResults> analyticalResult; + std::shared_ptr<L2NormCalculator> l2Normcalculator; bool isEvaluated; }; diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.h b/targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.h deleted file mode 100644 index 3f17dcedd..000000000 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef PHIANDNU_LOGFILE_INFORMATION_H -#define PHIANDNU_LOGFILE_INFORMATION_H - -#include "Utilities\LogFileInformation\TestLogFileInformation\TestLogFileInformation.h" - -#include <memory> -#include <vector> - -class PhiAndNuTest; -struct PhiAndNuTestParameterStruct; - -class PhiAndNuInformation : public TestLogFileInformation -{ -public: - static std::shared_ptr< PhiAndNuInformation> getNewInstance(std::shared_ptr<PhiAndNuTestParameterStruct> testPara); - - std::string getOutput(); - void addTestGroup(std::vector< std::shared_ptr< PhiAndNuTest>> tests); - -private: - PhiAndNuInformation() {}; - PhiAndNuInformation(std::shared_ptr<PhiAndNuTestParameterStruct> testPara); - - void fillMyData(std::vector< std::shared_ptr< PhiAndNuTest>> testGroup); - - std::vector< std::vector< std::shared_ptr< PhiAndNuTest>>> testGroups; - unsigned int startTimeStepCalculation, endTimeStepCalculation; - std::vector<int> lx; - std::vector<int> lxForErase; - std::vector<double> phiDiff; - std::vector<double> nu, nuDiff; - std::vector<double> orderOfAccuracyPhiDiff; - std::vector<double> orderOfAccuracyNuDiff; - std::vector<std::string> dataToCalc; -}; -#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.cpp b/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.cpp deleted file mode 100644 index efc7160cf..000000000 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.cpp +++ /dev/null @@ -1,136 +0,0 @@ -#include "PhiAndNuTest.h" - -#include "Utilities/ColorConsoleOutput/ColorConsoleOutput.h" -#include "Utilities\TestSimulation\TestSimulation.h" -#include "Utilities\SimulationInfo\SimulationInfo.h" - -#include "Tests\PhiAndNuTest\PostProcessingStrategy\PostProcessingStrategyPhiAndNuTest.h" -#include "Tests\PhiAndNuTest\PhiAndNuTestParameterStruct.h" - -#include <iomanip> - -std::shared_ptr<PhiAndNuTest> PhiAndNuTest::getNewInstance(std::shared_ptr< ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNuTestParameterStruct> testPara, std::string dataToCalculate) -{ - return std::shared_ptr<PhiAndNuTest>(new PhiAndNuTest(colorOutput, viscosity, testPara, dataToCalculate)); -} - -void PhiAndNuTest::evaluate() -{ - for (int i = 0; i < phiAndNuPostProStrategies.size(); i++) { - lx.push_back(phiAndNuPostProStrategies.at(i)->getNumberOfXNodes()); - if (dataToCalculate == "Vx") { - nu.push_back(phiAndNuPostProStrategies.at(i)->getNuVx()); - phiDiff.push_back(phiAndNuPostProStrategies.at(i)->getPhiDiffVx()); - } - if (dataToCalculate == "Vy") { - nu.push_back(phiAndNuPostProStrategies.at(i)->getNuVy()); - phiDiff.push_back(phiAndNuPostProStrategies.at(i)->getPhiDiffVy()); - } - if (dataToCalculate == "Vz") { - nu.push_back(phiAndNuPostProStrategies.at(i)->getNuVz()); - phiDiff.push_back(phiAndNuPostProStrategies.at(i)->getPhiDiffVz()); - } - } - nuDiff = calcNuDiff(nu); - orderOfAccuracyPhiDiff = calcOrderOfAccuracy(phiDiff); - orderOfAccuracyNuDiff = calcOrderOfAccuracy(nuDiff); - phiDiffTestPassed = checkTestPassed(orderOfAccuracyPhiDiff); - nuDiffTestPassed = checkTestPassed(orderOfAccuracyNuDiff); - - makeConsoleOutput(); -} - -void PhiAndNuTest::update() -{ - TestImp::update(); -} - -void PhiAndNuTest::addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PhiAndNuTestPostProcessingStrategy> postProStrategy) -{ - TestImp::addSimulation(sim, simInfo, postProStrategy); - phiAndNuPostProStrategies.push_back(postProStrategy); -} - -std::vector<bool> PhiAndNuTest::getPassedTests() -{ - std::vector< bool> passed; - passed.push_back(phiDiffTestPassed); - passed.push_back(nuDiffTestPassed); - return passed; -} - -void PhiAndNuTest::makeConsoleOutput() -{ - colorOutput->makeNuTestOutput(nuDiffTestPassed, simInfos.at(0), simInfos.at(1), startStepCalculation, endStepCalculation, dataToCalculate, nu.at(0), nu.at(1), nuDiff.at(0), nuDiff.at(1), orderOfAccuracyNuDiff); - colorOutput->makePhiTestOutput(phiDiffTestPassed, simInfos.at(0), simInfos.at(1), startStepCalculation, endStepCalculation, dataToCalculate, phiDiff.at(0), phiDiff.at(1), orderOfAccuracyPhiDiff); -} - -std::string PhiAndNuTest::getDataToCalculate() -{ - return dataToCalculate; -} - -std::vector<int> PhiAndNuTest::getLx() -{ - std::vector<int> lxINT; - for (int i = 0; i < lx.size(); i++) - lxINT.push_back((int)lx.at(i)); - return lxINT; -} - -std::vector<double> PhiAndNuTest::getNu() -{ - return nu; -} - -std::vector<double> PhiAndNuTest::getNuDiff() -{ - return nuDiff; -} - -std::vector<double> PhiAndNuTest::getPhiDiff() -{ - return phiDiff; -} - -double PhiAndNuTest::getOrderOfAccuracyNuDiff() -{ - return orderOfAccuracyNuDiff; -} - -double PhiAndNuTest::getOrderOfAccuracyPhiDiff() -{ - return orderOfAccuracyPhiDiff; -} - -PhiAndNuTest::PhiAndNuTest(std::shared_ptr< ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNuTestParameterStruct> testPara, std::string dataToCalculate) - : TestImp(colorOutput), viscosity(viscosity), dataToCalculate(dataToCalculate) -{ - minOrderOfAccuracy = testPara->minOrderOfAccuracy; - startStepCalculation = testPara->startTimeStepCalculation; - endStepCalculation = testPara->endTimeStepCalculation; - - lx.resize(0); - phiDiff.resize(0); - nuDiff.resize(0); -} - -double PhiAndNuTest::calcOrderOfAccuracy(std::vector<double> data) -{ - double ooa = log(data.at(0) / data.at(1)) / log(lx.at(1) / lx.at(0)); - - return ooa; -} - -bool PhiAndNuTest::checkTestPassed(double orderOfAccuracy) -{ - return orderOfAccuracy > minOrderOfAccuracy; -} - -std::vector<double> PhiAndNuTest::calcNuDiff(std::vector<double> nu) -{ - std::vector< double> results; - for(int i = 0; i < nu.size(); i++) - results.push_back((nu.at(i) - viscosity) / viscosity); - return results; -} diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestStruct.h b/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestStruct.h deleted file mode 100644 index 412b68d68..000000000 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestStruct.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef PHI_AND_NU_TEST_STRUCT_H -#define PHI_AND_NU_TEST_STRUCT_H - -#include <memory> -#include <vector> - -class PhiAndNuInformation; -class PhiAndNuTestPostProcessingStrategy; -class PhiAndNuTest; - -struct PhiAndNuTestStruct -{ - std::shared_ptr<PhiAndNuInformation> logFileInfo; - std::vector<std::shared_ptr<PhiAndNuTest> > tests; -}; -#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.cpp b/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.cpp deleted file mode 100644 index 9eb281120..000000000 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "PostProcessingStrategyPhiAndNuTest.h" - -#include "Utilities\Results\AnalyticalResults\AnalyticalResult.h" -#include "Utilities\Calculator\FFTCalculator\FFTCalculator.h" -#include "Utilities\Results\SimulationResults\SimulationResults.h" - -#include "Tests\PhiAndNuTest\PhiAndNuTestParameterStruct.h" - -std::shared_ptr<PhiAndNuTestPostProcessingStrategy> PhiAndNuTestPostProcessingStrategy::getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNuTestParameterStruct> testPara) -{ - return std::shared_ptr<PhiAndNuTestPostProcessingStrategy>(new PhiAndNuTestPostProcessingStrategy(simResult, analyticalResult, testPara)); -} - -PhiAndNuTestPostProcessingStrategy::PhiAndNuTestPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNuTestParameterStruct> testPara) - : PostProcessingStrategyImp(simResult), analyticalResult(analyticalResult) -{ - dataToCalculatePhiAndNu = testPara->basicTestParameter->dataToCalc; - startTimeStepCalculationPhiNu = testPara->startTimeStepCalculation; - endTimeStepCalculationPhiNu = testPara->endTimeStepCalculation; - - isEvaluated = false; - fftCalculator = FFTCalculator::getNewInstance(simResult->getNumberOfXNodes(), simResult->getNumberOfZNodes(), simResult->getTimeStepLength()); -} - -std::vector<std::vector<double>> PhiAndNuTestPostProcessingStrategy::reduceDataToTimeSteps(std::vector<std::vector<double>> data, unsigned int startTimeStep, unsigned int endTimeStep) -{ - std::vector<int> timeStepsToDelete; - - for (int i = simResult->getTimeSteps().size() - 1; i >= 0; i--) { - if (simResult->getTimeSteps().at(i) > endTimeStep) - timeStepsToDelete.push_back(i); - if (simResult->getTimeSteps().at(i) < startTimeStep) - timeStepsToDelete.push_back(i); - } - - for (int i = 0; i < timeStepsToDelete.size(); i++) - data.erase(data.begin() + timeStepsToDelete.at(i)); - - return data; -} - -void PhiAndNuTestPostProcessingStrategy::evaluate() -{ - if (!isEvaluated) { - analyticalResult->calc(simResult); - for (int i = 0; i < dataToCalculatePhiAndNu.size(); i++) { - if (dataToCalculatePhiAndNu.at(i) == "Vx") { - fftCalculator->calc(reduceDataToTimeSteps(simResult->getVx(), startTimeStepCalculationPhiNu, endTimeStepCalculationPhiNu), false); - nuVx = fftCalculator->getNu(); - phiDiffVx = fftCalculator->getPhiDiff(); - } - if (dataToCalculatePhiAndNu.at(i) == "Vz") { - fftCalculator->calc(reduceDataToTimeSteps(simResult->getVz(), startTimeStepCalculationPhiNu, endTimeStepCalculationPhiNu), true); - nuVz = fftCalculator->getNu(); - phiDiffVz = fftCalculator->getPhiDiff(); - } - } - } -} - -double PhiAndNuTestPostProcessingStrategy::getNuVx() -{ - return nuVx; -} - -double PhiAndNuTestPostProcessingStrategy::getNuVy() -{ - return nuVy; -} - -double PhiAndNuTestPostProcessingStrategy::getNuVz() -{ - return nuVz; -} - -double PhiAndNuTestPostProcessingStrategy::getPhiDiffVx() -{ - return phiDiffVx; -} - -double PhiAndNuTestPostProcessingStrategy::getPhiDiffVy() -{ - return phiDiffVy; -} - -double PhiAndNuTestPostProcessingStrategy::getPhiDiffVz() -{ - return phiDiffVz; -} \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.h b/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.h deleted file mode 100644 index 9b63e2be9..000000000 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNuTest.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef PHIANDNU_TEST_POST_PROCESSING_STRATEGY_H -#define PHIANDNU_TEST_POST_PROCESSING_STRATEGY_H - -#include "Utilities\PostProcessingStrategy\PostProcessingStrategyImp.h" - -#include <memory> - -class AnalyticalResults; -class FFTCalculator; -struct PhiAndNuTestParameterStruct; - -class PhiAndNuTestPostProcessingStrategy : public PostProcessingStrategyImp -{ -public: - static std::shared_ptr< PhiAndNuTestPostProcessingStrategy> getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNuTestParameterStruct> testPara); - void evaluate(); - - double getNuVx(); - double getNuVy(); - double getNuVz(); - double getPhiDiffVx(); - double getPhiDiffVy(); - double getPhiDiffVz(); - -private: - PhiAndNuTestPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNuTestParameterStruct> testPara); - - std::vector<std::vector<double>> reduceDataToTimeSteps(std::vector<std::vector<double>> data, unsigned int startTimeStep, unsigned int endTimeStep); - - std::shared_ptr< AnalyticalResults> analyticalResult; - std::vector<std::string> dataToCalculatePhiAndNu; - std::shared_ptr< FFTCalculator> fftCalculator; - unsigned int startTimeStepCalculationPhiNu; - unsigned int endTimeStepCalculationPhiNu; - double nuVx, nuVy, nuVz; - double phiDiffVx, phiDiffVy, phiDiffVz; - bool isEvaluated; -}; -#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.cpp b/targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.cpp similarity index 57% rename from targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.cpp rename to targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.cpp index a54e88d97..236b556a4 100644 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/PhiAndNuLogFileInformation.cpp +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.cpp @@ -1,21 +1,21 @@ -#include "PhiAndNuLogFileInformation.h" +#include "PhiAndNyLogFileInformation.h" -#include "Tests\PhiAndNuTest\PhiAndNuTest.h" -#include "Tests\PhiAndNuTest\PhiAndNuTestParameterStruct.h" +#include "Tests\PhiAndNyTest\PhiAndNyTest.h" +#include "Tests\PhiAndNyTest\PhiAndNyTestParameterStruct.h" #include <iomanip> #include <sstream> -std::shared_ptr<PhiAndNuInformation> PhiAndNuInformation::getNewInstance(std::shared_ptr<PhiAndNuTestParameterStruct> testPara) +std::shared_ptr<PhiAndNyInformation> PhiAndNyInformation::getNewInstance(std::shared_ptr<PhiAndNyTestParameterStruct> testPara) { - return std::shared_ptr<PhiAndNuInformation>(new PhiAndNuInformation(testPara)); + return std::shared_ptr<PhiAndNyInformation>(new PhiAndNyInformation(testPara)); } -std::string PhiAndNuInformation::getOutput() +std::string PhiAndNyInformation::getOutput() { std::ostringstream headName; - headName << testGroups.at(0).at(0)->getSimulationName() <<" Phi And Nu Test"; + headName << testGroups.at(0).at(0)->getSimulationName() <<" Phi And Ny Test"; makeCenterHead(headName.str()); oss << "StartTimeStepCalculation=" << startTimeStepCalculation << std::endl; @@ -24,14 +24,14 @@ std::string PhiAndNuInformation::getOutput() for (int i = 0; i < testGroups.size(); i++) { fillMyData(testGroups.at(i)); - for (int j = 0; j < nu.size(); j++) - oss << "Nu_" << lxForErase.at(j) << "_" << dataToCalc.at(j) << "=" << nu.at(j) << std::endl; + for (int j = 0; j < ny.size(); j++) + oss << "Ny_" << lxForErase.at(j) << "_" << dataToCalc.at(j) << "=" << ny.at(j) << std::endl; oss << std::endl; - for (int j = 0; j < nuDiff.size(); j++) - oss << "NuDiff_" << lxForErase.at(j) << "_" << dataToCalc.at(j) << "=" << nuDiff.at(j) << std::endl; + for (int j = 0; j < nyDiff.size(); j++) + oss << "NyDiff_" << lxForErase.at(j) << "_" << dataToCalc.at(j) << "=" << nyDiff.at(j) << std::endl; oss << std::endl; - for (int j = 0; j < orderOfAccuracyNuDiff.size(); j++) - oss << "OrderOfAccuracy_NuDiff_" << lx.at(2*j) << "_" << lx.at(2*j+1) << "_" << dataToCalc.at(j) << "=" << orderOfAccuracyNuDiff.at(j) << std::endl; + for (int j = 0; j < orderOfAccuracyNyDiff.size(); j++) + oss << "OrderOfAccuracy_NyDiff_" << lx.at(2*j) << "_" << lx.at(2*j+1) << "_" << dataToCalc.at(j) << "=" << orderOfAccuracyNyDiff.at(j) << std::endl; oss << std::endl; for (int j = 0; j < phiDiff.size(); j++) oss << "PhiDiff_" << lxForErase.at(j) << "_" << dataToCalc.at(j) << "=" << phiDiff.at(j) << std::endl; @@ -44,33 +44,33 @@ std::string PhiAndNuInformation::getOutput() return oss.str(); } -void PhiAndNuInformation::addTestGroup(std::vector<std::shared_ptr<PhiAndNuTest>> tests) +void PhiAndNyInformation::addTestGroup(std::vector<std::shared_ptr<PhiAndNyTest> > tests) { testGroups.push_back(tests); } -void PhiAndNuInformation::fillMyData(std::vector<std::shared_ptr<PhiAndNuTest>> testGroup) +void PhiAndNyInformation::fillMyData(std::vector<std::shared_ptr<PhiAndNyTest> > testGroup) { lxForErase.resize(0); lx.resize(0); - nu.resize(0); - nuDiff.resize(0); + ny.resize(0); + nyDiff.resize(0); phiDiff.resize(0); - orderOfAccuracyNuDiff.resize(0); + orderOfAccuracyNyDiff.resize(0); orderOfAccuracyPhiDiff.resize(0); dataToCalc.resize(0); for (int i = 0; i < testGroup.size(); i++) { std::vector<int> myLx = testGroup.at(i)->getLx(); - std::vector<double> myNu = testGroup.at(i)->getNu(); - std::vector<double> myNuDiff = testGroup.at(i)->getNuDiff(); + std::vector<double> myNy = testGroup.at(i)->getNy(); + std::vector<double> myNyDiff = testGroup.at(i)->getNyDiff(); std::vector<double> myPhiDiff = testGroup.at(i)->getPhiDiff(); lx.insert(lx.end(), myLx.begin(), myLx.end()); lxForErase.insert(lxForErase.end(), myLx.begin(), myLx.end()); - nu.insert(nu.end(), myNu.begin(), myNu.end()); - nuDiff.insert(nuDiff.end(), myNuDiff.begin(), myNuDiff.end()); + ny.insert(ny.end(), myNy.begin(), myNy.end()); + nyDiff.insert(nyDiff.end(), myNyDiff.begin(), myNyDiff.end()); phiDiff.insert(phiDiff.end(), myPhiDiff.begin(), myPhiDiff.end()); - orderOfAccuracyNuDiff.push_back(testGroup.at(i)->getOrderOfAccuracyNuDiff()); + orderOfAccuracyNyDiff.push_back(testGroup.at(i)->getOrderOfAccuracyNyDiff()); orderOfAccuracyPhiDiff.push_back(testGroup.at(i)->getOrderOfAccuracyPhiDiff()); dataToCalc.push_back(testGroup.at(i)->getDataToCalculate()); dataToCalc.push_back(testGroup.at(i)->getDataToCalculate()); @@ -83,8 +83,8 @@ void PhiAndNuInformation::fillMyData(std::vector<std::shared_ptr<PhiAndNuTest>> for (int i = lxForErase.size() - 1; i >= 0; i--) { if (lxForErase.at(i) == -1) { - nu.erase(nu.begin() + i); - nuDiff.erase(nuDiff.begin() + i); + ny.erase(ny.begin() + i); + nyDiff.erase(nyDiff.begin() + i); phiDiff.erase(phiDiff.begin() + i); lxForErase.erase(lxForErase.begin() + i); } @@ -93,7 +93,7 @@ void PhiAndNuInformation::fillMyData(std::vector<std::shared_ptr<PhiAndNuTest>> } -PhiAndNuInformation::PhiAndNuInformation(std::shared_ptr<PhiAndNuTestParameterStruct> testPara) +PhiAndNyInformation::PhiAndNyInformation(std::shared_ptr<PhiAndNyTestParameterStruct> testPara) { startTimeStepCalculation = testPara->startTimeStepCalculation; endTimeStepCalculation = testPara->endTimeStepCalculation; diff --git a/targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.h b/targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.h new file mode 100644 index 000000000..8c8c8ac68 --- /dev/null +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/PhiAndNyLogFileInformation.h @@ -0,0 +1,36 @@ +#ifndef PHIANDNY_LOGFILE_INFORMATION_H +#define PHIANDNY_LOGFILE_INFORMATION_H + +#include "Utilities\LogFileInformation\TestLogFileInformation\TestLogFileInformation.h" + +#include <memory> +#include <vector> + +class PhiAndNyTest; +struct PhiAndNyTestParameterStruct; + +class PhiAndNyInformation : public TestLogFileInformation +{ +public: + static std::shared_ptr<PhiAndNyInformation> getNewInstance(std::shared_ptr<PhiAndNyTestParameterStruct> testPara); + + std::string getOutput(); + void addTestGroup(std::vector<std::shared_ptr<PhiAndNyTest> > tests); + +private: + PhiAndNyInformation() {}; + PhiAndNyInformation(std::shared_ptr<PhiAndNyTestParameterStruct> testPara); + + void fillMyData(std::vector<std::shared_ptr<PhiAndNyTest> > testGroup); + + std::vector<std::vector<std::shared_ptr<PhiAndNyTest> > > testGroups; + unsigned int startTimeStepCalculation, endTimeStepCalculation; + std::vector<int> lx; + std::vector<int> lxForErase; + std::vector<double> phiDiff; + std::vector<double> ny, nyDiff; + std::vector<double> orderOfAccuracyPhiDiff; + std::vector<double> orderOfAccuracyNyDiff; + std::vector<std::string> dataToCalc; +}; +#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/package.include b/targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/package.include similarity index 100% rename from targets/tests/NumericalTests/Tests/PhiAndNuTest/LogFileInformation/package.include rename to targets/tests/NumericalTests/Tests/PhiAndNyTest/LogFileInformation/package.include diff --git a/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.cpp b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.cpp new file mode 100644 index 000000000..ac8514fca --- /dev/null +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.cpp @@ -0,0 +1,136 @@ +#include "PhiAndNyTest.h" + +#include "Utilities/ColorConsoleOutput/ColorConsoleOutput.h" +#include "Utilities\TestSimulation\TestSimulation.h" +#include "Utilities\SimulationInfo\SimulationInfo.h" + +#include "Tests\PhiAndNyTest\PostProcessingStrategy\PostProcessingStrategyPhiAndNyTest.h" +#include "Tests\PhiAndNyTest\PhiAndNyTestParameterStruct.h" + +#include <iomanip> + +std::shared_ptr<PhiAndNyTest> PhiAndNyTest::getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNyTestParameterStruct> testPara, std::string dataToCalculate) +{ + return std::shared_ptr<PhiAndNyTest>(new PhiAndNyTest(colorOutput, viscosity, testPara, dataToCalculate)); +} + +void PhiAndNyTest::evaluate() +{ + for (int i = 0; i < phiAndNyPostProStrategies.size(); i++) { + lx.push_back(phiAndNyPostProStrategies.at(i)->getNumberOfXNodes()); + if (dataToCalculate == "Vx") { + ny.push_back(phiAndNyPostProStrategies.at(i)->getNyVx()); + phiDiff.push_back(phiAndNyPostProStrategies.at(i)->getPhiDiffVx()); + } + if (dataToCalculate == "Vy") { + ny.push_back(phiAndNyPostProStrategies.at(i)->getNyVy()); + phiDiff.push_back(phiAndNyPostProStrategies.at(i)->getPhiDiffVy()); + } + if (dataToCalculate == "Vz") { + ny.push_back(phiAndNyPostProStrategies.at(i)->getNyVz()); + phiDiff.push_back(phiAndNyPostProStrategies.at(i)->getPhiDiffVz()); + } + } + nyDiff = calcNyDiff(ny); + orderOfAccuracyPhiDiff = calcOrderOfAccuracy(phiDiff); + orderOfAccuracyNyDiff = calcOrderOfAccuracy(nyDiff); + phiDiffTestPassed = checkTestPassed(orderOfAccuracyPhiDiff); + nyDiffTestPassed = checkTestPassed(orderOfAccuracyNyDiff); + + makeConsoleOutput(); +} + +void PhiAndNyTest::update() +{ + TestImp::update(); +} + +void PhiAndNyTest::addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PhiAndNyTestPostProcessingStrategy> postProStrategy) +{ + TestImp::addSimulation(sim, simInfo, postProStrategy); + phiAndNyPostProStrategies.push_back(postProStrategy); +} + +std::vector<bool> PhiAndNyTest::getPassedTests() +{ + std::vector<bool> passed; + passed.push_back(phiDiffTestPassed); + passed.push_back(nyDiffTestPassed); + return passed; +} + +void PhiAndNyTest::makeConsoleOutput() +{ + colorOutput->makeNyTestOutput(nyDiffTestPassed, simInfos.at(0), simInfos.at(1), startStepCalculation, endStepCalculation, dataToCalculate, ny.at(0), ny.at(1), nyDiff.at(0), nyDiff.at(1), orderOfAccuracyNyDiff); + colorOutput->makePhiTestOutput(phiDiffTestPassed, simInfos.at(0), simInfos.at(1), startStepCalculation, endStepCalculation, dataToCalculate, phiDiff.at(0), phiDiff.at(1), orderOfAccuracyPhiDiff); +} + +std::string PhiAndNyTest::getDataToCalculate() +{ + return dataToCalculate; +} + +std::vector<int> PhiAndNyTest::getLx() +{ + std::vector<int> lxINT; + for (int i = 0; i < lx.size(); i++) + lxINT.push_back((int)lx.at(i)); + return lxINT; +} + +std::vector<double> PhiAndNyTest::getNy() +{ + return ny; +} + +std::vector<double> PhiAndNyTest::getNyDiff() +{ + return nyDiff; +} + +std::vector<double> PhiAndNyTest::getPhiDiff() +{ + return phiDiff; +} + +double PhiAndNyTest::getOrderOfAccuracyNyDiff() +{ + return orderOfAccuracyNyDiff; +} + +double PhiAndNyTest::getOrderOfAccuracyPhiDiff() +{ + return orderOfAccuracyPhiDiff; +} + +PhiAndNyTest::PhiAndNyTest(std::shared_ptr<ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNyTestParameterStruct> testPara, std::string dataToCalculate) + : TestImp(colorOutput), viscosity(viscosity), dataToCalculate(dataToCalculate) +{ + minOrderOfAccuracy = testPara->minOrderOfAccuracy; + startStepCalculation = testPara->startTimeStepCalculation; + endStepCalculation = testPara->endTimeStepCalculation; + + lx.resize(0); + phiDiff.resize(0); + nyDiff.resize(0); +} + +double PhiAndNyTest::calcOrderOfAccuracy(std::vector<double> data) +{ + double ooa = log(data.at(0) / data.at(1)) / log(lx.at(1) / lx.at(0)); + + return ooa; +} + +bool PhiAndNyTest::checkTestPassed(double orderOfAccuracy) +{ + return orderOfAccuracy > minOrderOfAccuracy; +} + +std::vector<double> PhiAndNyTest::calcNyDiff(std::vector<double> ny) +{ + std::vector<double> results; + for(int i = 0; i < ny.size(); i++) + results.push_back((ny.at(i) - viscosity) / viscosity); + return results; +} diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.h b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.h similarity index 52% rename from targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.h rename to targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.h index 2378020f6..bc2c1a20b 100644 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTest.h +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTest.h @@ -1,5 +1,5 @@ -#ifndef PHI_AND_NU_TEST_H -#define PHI_AND_NU_TEST_H +#ifndef PHI_AND_NY_TEST_H +#define PHI_AND_NY_TEST_H #include "Utilities\Test\TestImp.h" @@ -8,49 +8,49 @@ #include <iostream> class FFTCalculator; -class PhiAndNuTestPostProcessingStrategy; -struct PhiAndNuTestParameterStruct; +class PhiAndNyTestPostProcessingStrategy; +struct PhiAndNyTestParameterStruct; -class PhiAndNuTest : public TestImp +class PhiAndNyTest : public TestImp { public: - static std::shared_ptr<PhiAndNuTest> getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNuTestParameterStruct> testPara, std::string dataToCalculate); + static std::shared_ptr<PhiAndNyTest> getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNyTestParameterStruct> testPara, std::string dataToCalculate); void update(); - void addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PhiAndNuTestPostProcessingStrategy> postProStrategy); + void addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PhiAndNyTestPostProcessingStrategy> postProStrategy); void evaluate(); - std::vector< bool> getPassedTests(); + std::vector<bool> getPassedTests(); void makeConsoleOutput(); std::string getDataToCalculate(); std::vector<int> getLx(); - std::vector<double> getNu(); - std::vector<double> getNuDiff(); + std::vector<double> getNy(); + std::vector<double> getNyDiff(); std::vector<double> getPhiDiff(); - double getOrderOfAccuracyNuDiff(); + double getOrderOfAccuracyNyDiff(); double getOrderOfAccuracyPhiDiff(); private: - PhiAndNuTest(std::shared_ptr<ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNuTestParameterStruct> testPara, std::string dataToCalculate); + PhiAndNyTest(std::shared_ptr<ColorConsoleOutput> colorOutput, double viscosity, std::shared_ptr<PhiAndNyTestParameterStruct> testPara, std::string dataToCalculate); double calcOrderOfAccuracy(std::vector<double> data); bool checkTestPassed(double orderOfAccuracy); - std::vector<double> calcNuDiff(std::vector< double> nu); + std::vector<double> calcNyDiff(std::vector<double> ny); unsigned int startStepCalculation, endStepCalculation; std::vector<double> lx; std::vector<double> phiDiff; - std::vector<double> nu, nuDiff; + std::vector<double> ny, nyDiff; double orderOfAccuracyPhiDiff; - double orderOfAccuracyNuDiff; + double orderOfAccuracyNyDiff; double minOrderOfAccuracy; double viscosity; bool phiDiffTestPassed; - bool nuDiffTestPassed; + bool nyDiffTestPassed; std::string dataToCalculate; - std::vector<std::shared_ptr< PhiAndNuTestPostProcessingStrategy>> phiAndNuPostProStrategies; + std::vector<std::shared_ptr<PhiAndNyTestPostProcessingStrategy> > phiAndNyPostProStrategies; }; #endif diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestParameterStruct.h b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestParameterStruct.h similarity index 68% rename from targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestParameterStruct.h rename to targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestParameterStruct.h index 4eb553755..20c1119e7 100644 --- a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PhiAndNuTestParameterStruct.h +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestParameterStruct.h @@ -1,11 +1,11 @@ -#ifndef PHI_AND_NU_TEST_PARAMETER_STRUCT_H -#define PHI_AND_NU_TEST_PARAMETER_STRUCT_H +#ifndef PHI_AND_NY_TEST_PARAMETER_STRUCT_H +#define PHI_AND_NY_TEST_PARAMETER_STRUCT_H #include <memory> #include "Utilities\Structs\BasicTestParameterStruct.h" -struct PhiAndNuTestParameterStruct +struct PhiAndNyTestParameterStruct { std::shared_ptr<BasicTestParameterStruct> basicTestParameter; diff --git a/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestStruct.h b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestStruct.h new file mode 100644 index 000000000..8867adba0 --- /dev/null +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PhiAndNyTestStruct.h @@ -0,0 +1,16 @@ +#ifndef PHI_AND_NY_TEST_STRUCT_H +#define PHI_AND_NY_TEST_STRUCT_H + +#include <memory> +#include <vector> + +class PhiAndNyInformation; +class PhiAndNyTestPostProcessingStrategy; +class PhiAndNyTest; + +struct PhiAndNyTestStruct +{ + std::shared_ptr<PhiAndNyInformation> logFileInfo; + std::vector<std::shared_ptr<PhiAndNyTest> > tests; +}; +#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.cpp b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.cpp new file mode 100644 index 000000000..4984c5414 --- /dev/null +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.cpp @@ -0,0 +1,89 @@ +#include "PostProcessingStrategyPhiAndNyTest.h" + +#include "Utilities\Results\AnalyticalResults\AnalyticalResult.h" +#include "Utilities\Calculator\FFTCalculator\FFTCalculator.h" +#include "Utilities\Results\SimulationResults\SimulationResults.h" + +#include "Tests\PhiAndNyTest\PhiAndNyTestParameterStruct.h" + +std::shared_ptr<PhiAndNyTestPostProcessingStrategy> PhiAndNyTestPostProcessingStrategy::getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNyTestParameterStruct> testPara) +{ + return std::shared_ptr<PhiAndNyTestPostProcessingStrategy>(new PhiAndNyTestPostProcessingStrategy(simResult, analyticalResult, testPara)); +} + +PhiAndNyTestPostProcessingStrategy::PhiAndNyTestPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNyTestParameterStruct> testPara) + : PostProcessingStrategyImp(simResult), analyticalResult(analyticalResult) +{ + dataToCalculatePhiAndNy = testPara->basicTestParameter->dataToCalc; + startTimeStepCalculationPhiNy = testPara->startTimeStepCalculation; + endTimeStepCalculationPhiNy = testPara->endTimeStepCalculation; + + isEvaluated = false; + fftCalculator = FFTCalculator::getNewInstance(simResult->getNumberOfXNodes(), simResult->getNumberOfZNodes(), simResult->getTimeStepLength()); +} + +std::vector<std::vector<double> > PhiAndNyTestPostProcessingStrategy::reduceDataToTimeSteps(std::vector<std::vector<double> > data, unsigned int startTimeStep, unsigned int endTimeStep) +{ + std::vector<int> timeStepsToDelete; + + for (int i = simResult->getTimeSteps().size() - 1; i >= 0; i--) { + if (simResult->getTimeSteps().at(i) > endTimeStep) + timeStepsToDelete.push_back(i); + if (simResult->getTimeSteps().at(i) < startTimeStep) + timeStepsToDelete.push_back(i); + } + + for (int i = 0; i < timeStepsToDelete.size(); i++) + data.erase(data.begin() + timeStepsToDelete.at(i)); + + return data; +} + +void PhiAndNyTestPostProcessingStrategy::evaluate() +{ + if (!isEvaluated) { + analyticalResult->calc(simResult); + for (int i = 0; i < dataToCalculatePhiAndNy.size(); i++) { + if (dataToCalculatePhiAndNy.at(i) == "Vx") { + fftCalculator->calc(reduceDataToTimeSteps(simResult->getVx(), startTimeStepCalculationPhiNy, endTimeStepCalculationPhiNy), false); + nyVx = fftCalculator->getNy(); + phiDiffVx = fftCalculator->getPhiDiff(); + } + if (dataToCalculatePhiAndNy.at(i) == "Vz") { + fftCalculator->calc(reduceDataToTimeSteps(simResult->getVz(), startTimeStepCalculationPhiNy, endTimeStepCalculationPhiNy), true); + nyVz = fftCalculator->getNy(); + phiDiffVz = fftCalculator->getPhiDiff(); + } + } + } +} + +double PhiAndNyTestPostProcessingStrategy::getNyVx() +{ + return nyVx; +} + +double PhiAndNyTestPostProcessingStrategy::getNyVy() +{ + return nyVy; +} + +double PhiAndNyTestPostProcessingStrategy::getNyVz() +{ + return nyVz; +} + +double PhiAndNyTestPostProcessingStrategy::getPhiDiffVx() +{ + return phiDiffVx; +} + +double PhiAndNyTestPostProcessingStrategy::getPhiDiffVy() +{ + return phiDiffVy; +} + +double PhiAndNyTestPostProcessingStrategy::getPhiDiffVz() +{ + return phiDiffVz; +} \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.h b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.h new file mode 100644 index 000000000..c0f225d1b --- /dev/null +++ b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/PostProcessingStrategyPhiAndNyTest.h @@ -0,0 +1,39 @@ +#ifndef PHIANDNY_TEST_POST_PROCESSING_STRATEGY_H +#define PHIANDNY_TEST_POST_PROCESSING_STRATEGY_H + +#include "Utilities\PostProcessingStrategy\PostProcessingStrategyImp.h" + +#include <memory> + +class AnalyticalResults; +class FFTCalculator; +struct PhiAndNyTestParameterStruct; + +class PhiAndNyTestPostProcessingStrategy : public PostProcessingStrategyImp +{ +public: + static std::shared_ptr<PhiAndNyTestPostProcessingStrategy> getNewInstance(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNyTestParameterStruct> testPara); + void evaluate(); + + double getNyVx(); + double getNyVy(); + double getNyVz(); + double getPhiDiffVx(); + double getPhiDiffVy(); + double getPhiDiffVz(); + +private: + PhiAndNyTestPostProcessingStrategy(std::shared_ptr<SimulationResults> simResult, std::shared_ptr<AnalyticalResults> analyticalResult, std::shared_ptr<PhiAndNyTestParameterStruct> testPara); + + std::vector<std::vector<double> > reduceDataToTimeSteps(std::vector<std::vector<double> > data, unsigned int startTimeStep, unsigned int endTimeStep); + + std::shared_ptr<AnalyticalResults> analyticalResult; + std::vector<std::string> dataToCalculatePhiAndNy; + std::shared_ptr<FFTCalculator> fftCalculator; + unsigned int startTimeStepCalculationPhiNy; + unsigned int endTimeStepCalculationPhiNy; + double nyVx, nyVy, nyVz; + double phiDiffVx, phiDiffVy, phiDiffVz; + bool isEvaluated; +}; +#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/package.include b/targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/package.include similarity index 100% rename from targets/tests/NumericalTests/Tests/PhiAndNuTest/PostProcessingStrategy/package.include rename to targets/tests/NumericalTests/Tests/PhiAndNyTest/PostProcessingStrategy/package.include diff --git a/targets/tests/NumericalTests/Tests/PhiAndNuTest/package.include b/targets/tests/NumericalTests/Tests/PhiAndNyTest/package.include similarity index 100% rename from targets/tests/NumericalTests/Tests/PhiAndNuTest/package.include rename to targets/tests/NumericalTests/Tests/PhiAndNyTest/package.include diff --git a/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.cpp b/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.cpp index de0e79e07..c88ac7054 100644 --- a/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.cpp +++ b/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.cpp @@ -1,7 +1,7 @@ #include "FFTCalculator.h" #include "Utilities/Results/SimulationResults/SimulationResults.h" -#include "Tests/PhiAndNuTest/PhiAndNuTest.h" +#include "Tests/PhiAndNyTest/PhiAndNyTest.h" #define _USE_MATH_DEFINES #include <math.h> @@ -19,7 +19,7 @@ FFTCalculator::FFTCalculator(int lx, int lz, int timeStepLength) this->timeStepLength = (double)timeStepLength; } -void FFTCalculator::calc(std::vector<std::vector<double>> data, bool transposeData) +void FFTCalculator::calc(std::vector<std::vector<double> > data, bool transposeData) { this->transposeData = transposeData; if (!transposeData) @@ -29,7 +29,7 @@ void FFTCalculator::calc(std::vector<std::vector<double>> data, bool transposeDa init(); - nu = calcNu(); + ny = calcNy(); phidiff = calcPhiDiff(); } @@ -50,7 +50,7 @@ void FFTCalculator::init() fftCalculated = false; } -double FFTCalculator::calcNu() +double FFTCalculator::calcNy() { std::vector<double> logAmplitude = calcLogAmplitudeForAllSteps(); std::vector<double> linReg = calcLinReg(logAmplitude); @@ -176,9 +176,9 @@ void FFTCalculator::calcFFT2D(unsigned int timeStep) fftw_free(out); } -std::vector<std::vector<double>> FFTCalculator::transpose(std::vector<std::vector<double>> dataToTranspose) +std::vector<std::vector<double> > FFTCalculator::transpose(std::vector<std::vector<double> > dataToTranspose) { - std::vector< std::vector< std::vector< double>>> dataInLx; + std::vector<std::vector<std::vector<double> >> dataInLx; dataInLx.resize(dataToTranspose.size()); for (int i = 0; i < dataInLx.size(); i++) { dataInLx.at(i).resize(lz); @@ -191,7 +191,7 @@ std::vector<std::vector<double>> FFTCalculator::transpose(std::vector<std::vecto dataInLx.at(timeStep).at(posInLZ).at(posInLX) = dataToTranspose.at(timeStep).at(posInLX + posInLZ*lx); } - std::vector< std::vector< std::vector< double>>> dataInLz; + std::vector<std::vector<std::vector<double> >> dataInLz; dataInLz.resize(dataToTranspose.size()); for (int i = 0; i < dataInLx.size(); i++) { dataInLz.at(i).resize(lx); @@ -205,7 +205,7 @@ std::vector<std::vector<double>> FFTCalculator::transpose(std::vector<std::vecto dataInLz.at(timeStep).at(posInLX).at(posInLZ) = dataInLx.at(timeStep).at(posInLZ).at(posInLX); } - std::vector< std::vector< double>> result; + std::vector<std::vector<double> > result; result.resize(dataToTranspose.size()); for (int timeStep = 0; timeStep < dataInLz.size(); timeStep++) { @@ -241,9 +241,9 @@ void FFTCalculator::setFFTResults(fftw_complex * result, unsigned int step) fftResultsRe.push_back(fftRe); } -double FFTCalculator::getNu() +double FFTCalculator::getNy() { - return nu; + return ny; } double FFTCalculator::getPhiDiff() diff --git a/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.h b/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.h index a5339dd44..a92055244 100644 --- a/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.h +++ b/targets/tests/NumericalTests/Utilities/Calculator/FFTCalculator/FFTCalculator.h @@ -15,37 +15,37 @@ class FFTCalculator public: static std::shared_ptr<FFTCalculator> getNewInstance(int lx, int lz, int timeStepLength); - void calc(std::vector<std::vector<double>> data, bool transposeData); + void calc(std::vector<std::vector<double> > data, bool transposeData); double calcAmplitudeForTimeStep(std::vector<double> data, bool transposeData); - double getNu(); + double getNy(); double getPhiDiff(); private: FFTCalculator() {}; FFTCalculator(int lx, int lz, int timeStepLength); void init(); - double calcNu(); + double calcNy(); double calcPhiDiff(); - std::vector< double> calcPhiForAllSteps(); - std::vector< double> calcLinReg(std::vector<double> y); + std::vector<double> calcPhiForAllSteps(); + std::vector<double> calcLinReg(std::vector<double> y); std::vector<double> calcLogAmplitudeForAllSteps(); std::vector<double> calcAmplitudeForAllSteps(); void calcFFT2D(unsigned int step); - std::vector<std::vector<double>> transpose(std::vector<std::vector<double>>); + std::vector<std::vector<double> > transpose(std::vector<std::vector<double> >); void initDataForFFT(fftw_complex* input, unsigned int step); void setFFTResults(fftw_complex* result, unsigned int step); - std::vector<std::vector<double>> data; - std::vector<std::vector<double>> fftResultsIm; - std::vector<std::vector<double>> fftResultsRe; + std::vector<std::vector<double> > data; + std::vector<std::vector<double> > fftResultsIm; + std::vector<std::vector<double> > fftResultsRe; bool fftCalculated; bool transposeData; double lx, lz; double timeStepLength; - double nu; + double ny; double phidiff; }; #endif diff --git a/targets/tests/NumericalTests/Utilities/Calculator/L2NormCalculator/L2NormCalculator.h b/targets/tests/NumericalTests/Utilities/Calculator/L2NormCalculator/L2NormCalculator.h index 9bc20e446..f20d55b6e 100644 --- a/targets/tests/NumericalTests/Utilities/Calculator/L2NormCalculator/L2NormCalculator.h +++ b/targets/tests/NumericalTests/Utilities/Calculator/L2NormCalculator/L2NormCalculator.h @@ -9,13 +9,13 @@ class FFTCalculator; class L2NormCalculator { public: - static std::shared_ptr< L2NormCalculator> getInstance(); + static std::shared_ptr<L2NormCalculator> getInstance(); double calc(std::vector<double> basicData, std::vector<double> divergentData, std::vector<unsigned int> level, double lx, double lz, double timeStepLength); private: L2NormCalculator(); - std::shared_ptr< FFTCalculator> fftCalc; + std::shared_ptr<FFTCalculator> fftCalc; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutput.h b/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutput.h index 9bad6f9c2..b4295055c 100644 --- a/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutput.h +++ b/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutput.h @@ -9,11 +9,11 @@ class SimulationInfo; class ColorConsoleOutput { public: - virtual void makeNuTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double nu1, double nu2, double nuDiff1, double nuDiff2, double ooa) = 0; + virtual void makeNyTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double nu1, double nu2, double nuDiff1, double nuDiff2, double ooa) = 0; virtual void makePhiTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double phiDiff1, double phiDiff2, double ooa) = 0; virtual void makeL2NormTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo, unsigned int basicTimeStep, unsigned int divergentTimeStep, std::string dataToCalc, double testWert1, double testWert2, double testWert3) = 0; virtual void makeL2NormBetweenKernelsTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> basicSimInfo, std::shared_ptr<SimulationInfo> divergentSimInfo, std::string dataToCalc, unsigned int timeStep, double l2NormBasicKernel, double l2NormDivergentKernel, double l2NormBetweenKernel) = 0; - virtual void makeSimulationHeadOutput(std::shared_ptr< SimulationInfo> simInfo) = 0; + virtual void makeSimulationHeadOutput(std::shared_ptr<SimulationInfo> simInfo) = 0; virtual void makeFinalTestOutputHead(int numberOfPassedTests, int numberOfTests) = 0; virtual void makeFinalTestOutputFoot(int numberOfPassedTests, int numberOfTests) = 0; diff --git a/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.cpp b/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.cpp index 6a71ae543..c621ba636 100644 --- a/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.cpp +++ b/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.cpp @@ -14,7 +14,7 @@ std::shared_ptr<ColorConsoleOutput> ColorConsoleOutputImp::getInstance() return uniqueInstance; } -void ColorConsoleOutputImp::makeNuTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double nu1, double nu2, double nuDiff1, double nuDiff2, double ooa) +void ColorConsoleOutputImp::makeNyTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double nu1, double nu2, double nuDiff1, double nuDiff2, double ooa) { setColor(testPassed); printTestStart(); @@ -59,16 +59,16 @@ void ColorConsoleOutputImp::makeNuTestOutput(bool testPassed, std::shared_ptr<Si oss.str(std::string()); print(oss.str()); - oss << "Nu" << simInfo1->getLx() << ": " << nu1; + oss << "Ny" << simInfo1->getLx() << ": " << nu1; print(oss.str()); oss.str(std::string()); - oss << "Nu" << simInfo2->getLx() << ": " << nu2; + oss << "Ny" << simInfo2->getLx() << ": " << nu2; print(oss.str()); oss.str(std::string()); - oss << "NuDiff" << simInfo1->getLx() << ": " << nuDiff1; + oss << "NyDiff" << simInfo1->getLx() << ": " << nuDiff1; print(oss.str()); oss.str(std::string()); - oss << "NuDiff" << simInfo2->getLx() << ": " << nuDiff2; + oss << "NyDiff" << simInfo2->getLx() << ": " << nuDiff2; print(oss.str()); oss.str(std::string()); oss << "OrderOfAccuracy: " << ooa; @@ -261,7 +261,7 @@ void ColorConsoleOutputImp::makeL2NormBetweenKernelsTestOutput(bool testPassed, printTestEnd(testPassed); } -void ColorConsoleOutputImp::makeSimulationHeadOutput(std::shared_ptr< SimulationInfo> simInfo) +void ColorConsoleOutputImp::makeSimulationHeadOutput(std::shared_ptr<SimulationInfo> simInfo) { std::ostringstream ossLine0; ossLine0 << "# Simulation Number " << simInfo->getSimulationID() << " of " << std::setfill(' ') << std::left << std::setw(23) << simInfo->getNumberOfSimulations() << "#"; diff --git a/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.h b/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.h index aac39c51d..f33587a02 100644 --- a/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.h +++ b/targets/tests/NumericalTests/Utilities/ColorConsoleOutput/ColorConsoleOutputImp.h @@ -33,11 +33,11 @@ class ColorConsoleOutputImp : public ColorConsoleOutput public: static std::shared_ptr<ColorConsoleOutput> getInstance(); - void makeNuTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double nu1, double nu2, double nuDiff1, double nuDiff2, double ooa); + void makeNyTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double nu1, double nu2, double nuDiff1, double nuDiff2, double ooa); void makePhiTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo1, std::shared_ptr<SimulationInfo> simInfo2, unsigned int startTimeStep, unsigned int endTimeStep, std::string dataToCalc, double phiDiff1, double phiDiff2, double ooa); void makeL2NormTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> simInfo, unsigned int basicTimeStep, unsigned int divergentTimeStep, std::string dataToCalc, double testWert1, double testWert2, double testWert3); void makeL2NormBetweenKernelsTestOutput(bool testPassed, std::shared_ptr<SimulationInfo> basicSimInfo, std::shared_ptr<SimulationInfo> divergentSimInfo, std::string dataToCalc, unsigned int timeStep, double l2NormBasicKernel, double l2NormDivergentKernel, double l2NormBetweenKernel); - void makeSimulationHeadOutput(std::shared_ptr< SimulationInfo> simInfo); + void makeSimulationHeadOutput(std::shared_ptr<SimulationInfo> simInfo); void makeFinalTestOutputHead(int numberOfPassedTests, int numberOfTests); void makeFinalTestOutputFoot(int numberOfPassedTests, int numberOfTests); diff --git a/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp b/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp index c9bf4fd84..6d223d708 100644 --- a/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp +++ b/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.cpp @@ -17,7 +17,7 @@ ConfigFileReader::ConfigFileReader(const std::string aFilePath) void ConfigFileReader::readConfigFile(const std::string aFilePath) { - configData = std::shared_ptr< ConfigDataStruct>(new ConfigDataStruct); + configData = std::shared_ptr<ConfigDataStruct>(new ConfigDataStruct); std::ifstream stream = openConfigFile(aFilePath); std::shared_ptr<input::Input> input = input::Input::makeInput(stream, "config"); @@ -32,7 +32,7 @@ void ConfigFileReader::readConfigFile(const std::string aFilePath) configData->logFilePath = input->getValue("PathLogFile"); configData->numberOfSimulations = calcNumberOfSimulations(input); - std::shared_ptr< BasicSimulationParameterStruct> basicSimPara = makeBasicSimulationParameter(input); + std::shared_ptr<BasicSimulationParameterStruct> basicSimPara = makeBasicSimulationParameter(input); configData->taylorGreenVortexUxParameter = makeTaylorGreenVortexUxParameter(input, basicSimPara); configData->taylorGreenVortexUxGridInformation = makeGridInformation(input, "TaylorGreenVortexUx");; @@ -43,7 +43,7 @@ void ConfigFileReader::readConfigFile(const std::string aFilePath) configData->shearWaveParameter = makeShearWaveParameter(input, basicSimPara); configData->shearWaveGridInformation = makeGridInformation(input, "ShearWave");; - configData->phiAndNuTestParameter = makePhiAndNuTestParameter(input); + configData->phiAndNuTestParameter = makePhiAndNyTestParameter(input); configData->l2NormTestParameter = makeL2NormTestParameter(input); configData->l2NormTestBetweenKernelsParameter = makeL2NormTestBetweenKernelsParameter(input); @@ -109,14 +109,14 @@ std::shared_ptr<BasicSimulationParameterStruct> ConfigFileReader::makeBasicSimul } -std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct>> ConfigFileReader::makeTaylorGreenVortexUxParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter) +std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct> > ConfigFileReader::makeTaylorGreenVortexUxParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter) { std::vector<int> basisTimeStepLength = StringUtil::toIntVector(input->getValue("BasisTimeStepLength_TGV_Ux")); std::vector<double> amplitude = StringUtil::toDoubleVector(input->getValue("Amplitude_TGV_Ux")); std::vector<double> u0 = StringUtil::toDoubleVector(input->getValue("ux_TGV_Ux")); int l0 = StringUtil::toInt(input->getValue("l0_TGV_Ux")); - std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct>> parameter; + std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct> > parameter; for (int i = 0; i < u0.size(); i++) { std::shared_ptr<TaylorGreenVortexUxParameterStruct> aParameter = std::shared_ptr<TaylorGreenVortexUxParameterStruct>(new TaylorGreenVortexUxParameterStruct); aParameter->basicSimulationParameter = basicSimParameter; @@ -132,7 +132,7 @@ std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct>> ConfigFileReade return parameter; } -std::vector< std::shared_ptr< TaylorGreenVortexUzParameterStruct> > ConfigFileReader::makeTaylorGreenVortexUzParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter) +std::vector<std::shared_ptr<TaylorGreenVortexUzParameterStruct> > ConfigFileReader::makeTaylorGreenVortexUzParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter) { std::vector<int> basisTimeStepLength = StringUtil::toIntVector(input->getValue("BasisTimeStepLength_TGV_Uz")); std::vector<double> amplitude = StringUtil::toDoubleVector(input->getValue("Amplitude_TGV_Uz")); @@ -153,7 +153,7 @@ std::vector< std::shared_ptr< TaylorGreenVortexUzParameterStruct> > ConfigFileRe } return parameter; } -std::vector<std::shared_ptr<ShearWaveParameterStruct>> ConfigFileReader::makeShearWaveParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter) +std::vector<std::shared_ptr<ShearWaveParameterStruct> > ConfigFileReader::makeShearWaveParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter) { std::vector<int> basisTimeStepLength = StringUtil::toIntVector(input->getValue("BasisTimeStepLength_SW")); std::vector<double> uz = StringUtil::toDoubleVector(input->getValue("v0_SW")); @@ -175,14 +175,14 @@ std::vector<std::shared_ptr<ShearWaveParameterStruct>> ConfigFileReader::makeShe return parameter; } -std::shared_ptr<PhiAndNuTestParameterStruct> ConfigFileReader::makePhiAndNuTestParameter(std::shared_ptr<input::Input> input) +std::shared_ptr<PhiAndNyTestParameterStruct> ConfigFileReader::makePhiAndNyTestParameter(std::shared_ptr<input::Input> input) { std::shared_ptr<BasicTestParameterStruct> basicTestParameter = std::shared_ptr<BasicTestParameterStruct>(new BasicTestParameterStruct); basicTestParameter->dataToCalc = StringUtil::toStringVector(input->getValue("DataToCalc_PhiAndNu")); basicTestParameter->runTest= StringUtil::toBool(input->getValue("PhiAndNuTest")); basicTestParameter->ySliceForCalculation = StringUtil::toInt(input->getValue("ySliceForCalculation")); - std::shared_ptr<PhiAndNuTestParameterStruct> testParameter = std::shared_ptr<PhiAndNuTestParameterStruct>(new PhiAndNuTestParameterStruct); + std::shared_ptr<PhiAndNyTestParameterStruct> testParameter = std::shared_ptr<PhiAndNyTestParameterStruct>(new PhiAndNyTestParameterStruct); testParameter->basicTestParameter = basicTestParameter; testParameter->endTimeStepCalculation = StringUtil::toInt(input->getValue("EndTimeStepCalculation_PhiNu")); testParameter->minOrderOfAccuracy = StringUtil::toDouble(input->getValue("MinOrderOfAccuracy")); @@ -223,7 +223,7 @@ std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> ConfigFileReader::makeL return testParameter; } -std::vector<std::shared_ptr<GridInformationStruct>> ConfigFileReader::makeGridInformation(std::shared_ptr<input::Input> input, std::string simName) +std::vector<std::shared_ptr<GridInformationStruct> > ConfigFileReader::makeGridInformation(std::shared_ptr<input::Input> input, std::string simName) { int number = 32; std::vector<std::string> valueNames; @@ -253,7 +253,7 @@ std::vector<std::shared_ptr<GridInformationStruct>> ConfigFileReader::makeGridIn } } - std::vector<std::shared_ptr<GridInformationStruct>> gridInformation; + std::vector<std::shared_ptr<GridInformationStruct> > gridInformation; for (int i = 0; i < lx.size(); i++) { std::shared_ptr<GridInformationStruct> aGridInformation = std::shared_ptr<GridInformationStruct> (new GridInformationStruct); aGridInformation->numberOfGridLevels = StringUtil::toInt(input->getValue("NumberOfGridLevels")); @@ -315,7 +315,7 @@ std::vector<std::string> ConfigFileReader::readKernelList(std::shared_ptr<input: unsigned int ConfigFileReader::calcStartStepForToVectorWriter(std::shared_ptr<input::Input> input) { - std::vector< unsigned int> startStepsTests; + std::vector<unsigned int> startStepsTests; startStepsTests.push_back(StringUtil::toInt(input->getValue("BasicTimeStep_L2"))); startStepsTests.push_back(StringUtil::toInt(input->getValue("StartTimeStepCalculation_PhiNu"))); std::sort(startStepsTests.begin(), startStepsTests.end()); diff --git a/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.h b/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.h index c4fba3135..7116abbbf 100644 --- a/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.h +++ b/targets/tests/NumericalTests/Utilities/ConfigFileReader/ConfigFileReader.h @@ -10,8 +10,8 @@ class ConfigFileReader { public: - static std::shared_ptr< ConfigFileReader> getNewInstance(const std::string aFilePath); - std::shared_ptr< ConfigDataStruct> getConfigData(); + static std::shared_ptr<ConfigFileReader> getNewInstance(const std::string aFilePath); + std::shared_ptr<ConfigDataStruct> getConfigData(); private: ConfigFileReader() {}; @@ -26,20 +26,20 @@ private: int calcNumberOfSimulationGroup(std::shared_ptr<input::Input> input, std::string simName); unsigned int calcStartStepForToVectorWriter(std::shared_ptr<input::Input> input); - std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct>> makeTaylorGreenVortexUxParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter); - std::vector<std::shared_ptr<TaylorGreenVortexUzParameterStruct>> makeTaylorGreenVortexUzParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter); - std::vector< std::shared_ptr< ShearWaveParameterStruct> > makeShearWaveParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter); + std::vector<std::shared_ptr<TaylorGreenVortexUxParameterStruct> > makeTaylorGreenVortexUxParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter); + std::vector<std::shared_ptr<TaylorGreenVortexUzParameterStruct> > makeTaylorGreenVortexUzParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter); + std::vector<std::shared_ptr<ShearWaveParameterStruct> > makeShearWaveParameter(std::shared_ptr<input::Input> input, std::shared_ptr<BasicSimulationParameterStruct> basicSimParameter); - std::shared_ptr<PhiAndNuTestParameterStruct> makePhiAndNuTestParameter(std::shared_ptr<input::Input> input); + std::shared_ptr<PhiAndNyTestParameterStruct> makePhiAndNyTestParameter(std::shared_ptr<input::Input> input); std::shared_ptr<L2NormTestParameterStruct> makeL2NormTestParameter(std::shared_ptr<input::Input> input); std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> makeL2NormTestBetweenKernelsParameter(std::shared_ptr<input::Input> input); std::shared_ptr<BasicSimulationParameterStruct> makeBasicSimulationParameter(std::shared_ptr<input::Input> input); - std::vector<std::shared_ptr<GridInformationStruct>> makeGridInformation(std::shared_ptr<input::Input> input, std::string simName); + std::vector<std::shared_ptr<GridInformationStruct> > makeGridInformation(std::shared_ptr<input::Input> input, std::string simName); std::shared_ptr<VectorWriterInformationStruct> makeVectorWriterInformationStruct(std::shared_ptr<input::Input> input); std::shared_ptr<LogFileParameterStruct> makeLogFilePara(std::shared_ptr<input::Input> input); - std::shared_ptr< ConfigDataStruct> configData; + std::shared_ptr<ConfigDataStruct> configData; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp b/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp index ed8e98a18..7eddc2513 100644 --- a/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp +++ b/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.cpp @@ -58,9 +58,9 @@ void AnalyticalResults2DToVTKWriterImp::writeAnalyticalResult(std::shared_ptr<Pa void AnalyticalResults2DToVTKWriterImp::writeTimeStep(std::shared_ptr<Parameter> para, std::shared_ptr<AnalyticalResults> analyticalResult, int level, std::vector<std::string> & fname, int timeStep) { - std::vector< UbTupleFloat3 > nodes; - std::vector< UbTupleUInt8 > cells; - std::vector< std::string > nodedatanames; + std::vector<UbTupleFloat3 > nodes; + std::vector<UbTupleUInt8 > cells; + std::vector<std::string > nodedatanames; nodedatanames.push_back("press"); nodedatanames.push_back("rho"); nodedatanames.push_back("vx1"); @@ -73,7 +73,7 @@ void AnalyticalResults2DToVTKWriterImp::writeTimeStep(std::shared_ptr<Parameter> unsigned int startpos = 0; unsigned int endpos = 0; unsigned int sizeOfNodes = 0; - std::vector< std::vector< double > > nodedata(nodedatanames.size()); + std::vector<std::vector<double > > nodedata(nodedatanames.size()); maxX = para->getGridX().at(level); maxY = para->getGridY().at(level); diff --git a/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.h b/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.h index 440fa50f5..12f8f3583 100644 --- a/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.h +++ b/targets/tests/NumericalTests/Utilities/DataWriter/AnalyticalResults2DToVTKWriter/AnalyticalResults2DToVTKWriterImp.h @@ -9,7 +9,7 @@ class AnalyticalResults2DToVTKWriterImp : public AnalyticalResults2DToVTKWriter { public: - static std::shared_ptr< AnalyticalResults2DToVTKWriterImp> getInstance(bool writeAnalyticalResults); + static std::shared_ptr<AnalyticalResults2DToVTKWriterImp> getInstance(bool writeAnalyticalResults); void writeAnalyticalResult(std::shared_ptr<Parameter> para, std::shared_ptr<AnalyticalResults> analyticalResult); diff --git a/targets/tests/NumericalTests/Utilities/DataWriter/Y2dSliceToResults/Y2dSliceToResults.h b/targets/tests/NumericalTests/Utilities/DataWriter/Y2dSliceToResults/Y2dSliceToResults.h index bf18dab58..fa4ed54d8 100644 --- a/targets/tests/NumericalTests/Utilities/DataWriter/Y2dSliceToResults/Y2dSliceToResults.h +++ b/targets/tests/NumericalTests/Utilities/DataWriter/Y2dSliceToResults/Y2dSliceToResults.h @@ -13,7 +13,7 @@ struct VectorWriterInformationStruct; class Y2dSliceToResults : public ToVectorWriter { public: - static std::shared_ptr< Y2dSliceToResults> getNewInstance(std::shared_ptr<VectorWriterInformationStruct> vectorWriterInfo, unsigned int timeStepLength, std::shared_ptr<SimulationResults> simResults, unsigned int ySliceForCalculation); + static std::shared_ptr<Y2dSliceToResults> getNewInstance(std::shared_ptr<VectorWriterInformationStruct> vectorWriterInfo, unsigned int timeStepLength, std::shared_ptr<SimulationResults> simResults, unsigned int ySliceForCalculation); private: Y2dSliceToResults(std::shared_ptr<VectorWriterInformationStruct> vectorWriterInfo, unsigned int timeStepLength, std::shared_ptr<SimulationResults> simResults, unsigned int ySliceForCalculation); diff --git a/targets/tests/NumericalTests/Utilities/KernelConfiguration/KernelConfigurationImp.h b/targets/tests/NumericalTests/Utilities/KernelConfiguration/KernelConfigurationImp.h index 1dd3d63f2..6093bc082 100644 --- a/targets/tests/NumericalTests/Utilities/KernelConfiguration/KernelConfigurationImp.h +++ b/targets/tests/NumericalTests/Utilities/KernelConfiguration/KernelConfigurationImp.h @@ -13,8 +13,8 @@ public: std::vector<int> getMultiKernelLevel(); std::vector<std::string> getMultiKernelName(); - static std::shared_ptr< KernelConfigurationImp> getNewInstance(std::string kernelName); - static std::shared_ptr< KernelConfigurationImp> getNewInstance(std::string mainKernelName, std::vector<int> multiKernelLevel, std::vector<std::string> multiKernelName); + static std::shared_ptr<KernelConfigurationImp> getNewInstance(std::string kernelName); + static std::shared_ptr<KernelConfigurationImp> getNewInstance(std::string mainKernelName, std::vector<int> multiKernelLevel, std::vector<std::string> multiKernelName); private: KernelConfigurationImp(std::string kernelName); diff --git a/targets/tests/NumericalTests/Utilities/LogFileInformation/LogFileTimeInformation/LogFileTimeInformation.cpp b/targets/tests/NumericalTests/Utilities/LogFileInformation/LogFileTimeInformation/LogFileTimeInformation.cpp index b67fa0dc3..4641c4985 100644 --- a/targets/tests/NumericalTests/Utilities/LogFileInformation/LogFileTimeInformation/LogFileTimeInformation.cpp +++ b/targets/tests/NumericalTests/Utilities/LogFileInformation/LogFileTimeInformation/LogFileTimeInformation.cpp @@ -19,7 +19,7 @@ std::string LogFileTimeInformation::getOutput() return oss.str(); } -LogFileTimeInformation::LogFileTimeInformation(std::vector<std::shared_ptr<SimulationInfo>> simInfo, bool fileWriting) : simInfo(simInfo), fileWriting(fileWriting) +LogFileTimeInformation::LogFileTimeInformation(std::vector<std::shared_ptr<SimulationInfo> > simInfo, bool fileWriting) : simInfo(simInfo), fileWriting(fileWriting) { } \ No newline at end of file diff --git a/targets/tests/NumericalTests/Utilities/LogFileQueue/LogFileQueueImp.h b/targets/tests/NumericalTests/Utilities/LogFileQueue/LogFileQueueImp.h index 4e2c9d136..3fe27faeb 100644 --- a/targets/tests/NumericalTests/Utilities/LogFileQueue/LogFileQueueImp.h +++ b/targets/tests/NumericalTests/Utilities/LogFileQueue/LogFileQueueImp.h @@ -12,7 +12,7 @@ public: static std::shared_ptr<LogFileQueueImp> getNewInstance(std::string basicLogFilePath); void writeLogFiles(); - void addLogFileWriter(std::shared_ptr< LogFileWriter> aLogFileWriter); + void addLogFileWriter(std::shared_ptr<LogFileWriter> aLogFileWriter); private: LogFileQueueImp() {}; @@ -21,7 +21,7 @@ private: std::string calcDateAndTime(); std::string basicLogFilePath; - std::vector< std::shared_ptr< LogFileWriter>> logFileWriter; + std::vector<std::shared_ptr<LogFileWriter> > logFileWriter; time_t now; struct tm nowLocal; }; diff --git a/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.cpp b/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.cpp index ad09b6bac..ca2eaf96e 100644 --- a/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.cpp +++ b/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.cpp @@ -11,7 +11,7 @@ #include <ctime> #include <experimental/filesystem> -LogFileWriterImp::LogFileWriterImp(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, std::shared_ptr< LogFileTimeInformation> logFileTimeInfo, std::shared_ptr< SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity) : kernelName(kernelName), viscosity(viscosity) +LogFileWriterImp::LogFileWriterImp(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, std::shared_ptr<LogFileTimeInformation> logFileTimeInfo, std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity) : kernelName(kernelName), viscosity(viscosity) { logFileInfo.push_back(logFileHead); logFileInfo.push_back(basicSimInfo); @@ -22,7 +22,7 @@ LogFileWriterImp::LogFileWriterImp(std::shared_ptr<LogFileHead> logFileHead, std logFileInfo.push_back(testLogFiles.at(i)); } -std::shared_ptr<LogFileWriterImp> LogFileWriterImp::getNewInstance(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector< std::shared_ptr< TestLogFileInformation> > testLogFiles, std::shared_ptr< LogFileTimeInformation> logFileTimeInfo, std::shared_ptr< SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity) +std::shared_ptr<LogFileWriterImp> LogFileWriterImp::getNewInstance(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, std::shared_ptr<LogFileTimeInformation> logFileTimeInfo, std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity) { return std::shared_ptr<LogFileWriterImp>(new LogFileWriterImp(logFileHead, basicSimInfo, testLogFiles, logFileTimeInfo, simLogInfo, kernelName, viscosity)); } diff --git a/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.h b/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.h index ccc8d7d44..ec5919393 100644 --- a/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.h +++ b/targets/tests/NumericalTests/Utilities/LogFileWriter/LogFileWriterImp.h @@ -17,15 +17,15 @@ class TestLogFileInformation; class LogFileWriterImp : public LogFileWriter { public: - static std::shared_ptr<LogFileWriterImp> getNewInstance(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector< std::shared_ptr< TestLogFileInformation>> testLogFiles, - std::shared_ptr< LogFileTimeInformation> logFileTimeInfo, - std::shared_ptr< SimulationLogFileInformation> simLogInfo, + static std::shared_ptr<LogFileWriterImp> getNewInstance(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, + std::shared_ptr<LogFileTimeInformation> logFileTimeInfo, + std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity); void writeLogFile(std::string basicFilePath); private: - LogFileWriterImp(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector< std::shared_ptr< TestLogFileInformation>> testLogFiles, std::shared_ptr< LogFileTimeInformation> logFileTimeInfo, std::shared_ptr< SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity); + LogFileWriterImp(std::shared_ptr<LogFileHead> logFileHead, std::shared_ptr<BasicSimulationInfo> basicSimInfo, std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, std::shared_ptr<LogFileTimeInformation> logFileTimeInfo, std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::string kernelName, double viscosity); std::string calcDateAndTime(); std::string buildFilePath(std::string basicFilePath); @@ -35,7 +35,7 @@ private: struct tm nowLocal; std::string kernelName; double viscosity; - std::vector< std::shared_ptr< LogFileInformation>> logFileInfo; - std::shared_ptr< SimulationLogFileInformation> simLogInfo; + std::vector<std::shared_ptr<LogFileInformation> > logFileInfo; + std::shared_ptr<SimulationLogFileInformation> simLogInfo; }; #endif diff --git a/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactory.h b/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactory.h index 347d5fe59..7fca7dbca 100644 --- a/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactory.h +++ b/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactory.h @@ -11,9 +11,9 @@ class LogFileQueue; class NumericalTestFactory { public: - virtual std::vector< std::shared_ptr< TestSimulation>> getTestSimulations() = 0; - virtual std::shared_ptr< TestQueue> getTestQueue() = 0; - virtual std::shared_ptr< LogFileQueue> getLogFileQueue() = 0; + virtual std::vector<std::shared_ptr<TestSimulation> > getTestSimulations() = 0; + virtual std::shared_ptr<TestQueue> getTestQueue() = 0; + virtual std::shared_ptr<LogFileQueue> getLogFileQueue() = 0; private: }; diff --git a/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.cpp b/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.cpp index c5d049e12..91a307d26 100644 --- a/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.cpp +++ b/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.cpp @@ -24,10 +24,10 @@ #include "Simulations\ShearWave\AnalyticalResults\ShearWaveAnalyticalResults.h" #include "Simulations\ShearWave\InitialConditions\InitialConditionShearWave.h" -#include "Tests/PhiAndNuTest/PhiAndNuTest.h" -#include "Tests\PhiAndNuTest\LogFileInformation\PhiAndNuLogFileInformation.h" -#include "Tests\PhiAndNuTest\PostProcessingStrategy\PostProcessingStrategyPhiAndNuTest.h" -#include "Tests\PhiAndNuTest\PhiAndNuTestStruct.h" +#include "Tests/PhiAndNyTest/PhiAndNyTest.h" +#include "Tests\PhiAndNyTest\LogFileInformation\PhiAndNyLogFileInformation.h" +#include "Tests\PhiAndNyTest\PostProcessingStrategy\PostProcessingStrategyPhiAndNyTest.h" +#include "Tests\PhiAndNyTest\PhiAndNyTestStruct.h" #include "Tests\L2NormTest\L2NormTest.h" #include "Tests\L2NormTest\LogFileInformation\L2NormLogFileInformation.h" @@ -72,7 +72,7 @@ NumericalTestFactoryImp::NumericalTestFactoryImp(std::shared_ptr<ConfigDataStruc init(configFileData); } -std::vector<std::shared_ptr<TestSimulation>> NumericalTestFactoryImp::getTestSimulations() +std::vector<std::shared_ptr<TestSimulation> > NumericalTestFactoryImp::getTestSimulations() { return myTestSimulations; } @@ -126,13 +126,13 @@ std::shared_ptr<NumericalTestStruct> NumericalTestFactoryImp::makeNumericalTestS std::vector<std::shared_ptr<TestSimulationImp> > testSim = makeTestSimulations(simDataStruct->testSimData, configFileData->vectorWriterInfo, configFileData->ySliceForCalculation); numTestStruct->testSimulations = testSim; - std::vector< std::shared_ptr< TestLogFileInformation>> testLogFileInfo; + std::vector<std::shared_ptr<TestLogFileInformation> > testLogFileInfo; - std::shared_ptr<PhiAndNuTestStruct> phiAndNuTestStruct = makePhiAndNuTestsStructs(configFileData->phiAndNuTestParameter, testSim, viscosity); - for (int i = 0; i < phiAndNuTestStruct->tests.size(); i++) - numTestStruct->tests.push_back(phiAndNuTestStruct->tests.at(i)); - if(phiAndNuTestStruct->tests.size() > 0) - testLogFileInfo.push_back(phiAndNuTestStruct->logFileInfo); + std::shared_ptr<PhiAndNyTestStruct> phiAndNyTestStruct = makePhiAndNyTestsStructs(configFileData->phiAndNuTestParameter, testSim, viscosity); + for (int i = 0; i < phiAndNyTestStruct->tests.size(); i++) + numTestStruct->tests.push_back(phiAndNyTestStruct->tests.at(i)); + if(phiAndNyTestStruct->tests.size() > 0) + testLogFileInfo.push_back(phiAndNyTestStruct->logFileInfo); std::shared_ptr<L2NormTestStruct> l2NormTestSruct = makeL2NormTestsStructs(configFileData->l2NormTestParameter, testSim); for (int i = 0; i < l2NormTestSruct->tests.size(); i++) @@ -236,45 +236,45 @@ std::vector<std::shared_ptr<TestSimulationImp> > NumericalTestFactoryImp::makeTe return testSimumlations; } -std::shared_ptr<PhiAndNuTestStruct> NumericalTestFactoryImp::makePhiAndNuTestsStructs(std::shared_ptr<PhiAndNuTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSimumlations, double viscosity) +std::shared_ptr<PhiAndNyTestStruct> NumericalTestFactoryImp::makePhiAndNyTestsStructs(std::shared_ptr<PhiAndNyTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSimumlations, double viscosity) { - std::shared_ptr<PhiAndNuTestStruct> testStruct = std::shared_ptr<PhiAndNuTestStruct> (new PhiAndNuTestStruct); + std::shared_ptr<PhiAndNyTestStruct> testStruct = std::shared_ptr<PhiAndNyTestStruct> (new PhiAndNyTestStruct); if (testParameter->basicTestParameter->runTest && testSimumlations.size() > 1) { - testStruct->logFileInfo = PhiAndNuInformation::getNewInstance(testParameter); + testStruct->logFileInfo = PhiAndNyInformation::getNewInstance(testParameter); - std::vector<std::shared_ptr<PhiAndNuTestPostProcessingStrategy> > postProcessingStrategies; + std::vector<std::shared_ptr<PhiAndNyTestPostProcessingStrategy> > postProcessingStrategies; for (int i = 0; i < testSimumlations.size(); i++) - postProcessingStrategies.push_back(PhiAndNuTestPostProcessingStrategy::getNewInstance(testSimumlations.at(i)->getSimulationResults(), testSimumlations.at(i)->getAnalyticalResults(), testParameter)); + postProcessingStrategies.push_back(PhiAndNyTestPostProcessingStrategy::getNewInstance(testSimumlations.at(i)->getSimulationResults(), testSimumlations.at(i)->getAnalyticalResults(), testParameter)); for (int i = 0; i < testParameter->basicTestParameter->dataToCalc.size(); i++) { - std::vector< std::shared_ptr< PhiAndNuTest>> phiAndNuTests = makePhiAndNuTests(testParameter, testSimumlations, postProcessingStrategies, viscosity, testParameter->basicTestParameter->dataToCalc.at(i)); - testStruct->logFileInfo->addTestGroup(phiAndNuTests); - for (int j = 0; j < phiAndNuTests.size(); j++) - testStruct->tests.push_back(phiAndNuTests.at(j)); + std::vector<std::shared_ptr<PhiAndNyTest> > phiAndNyTests = makePhiAndNyTests(testParameter, testSimumlations, postProcessingStrategies, viscosity, testParameter->basicTestParameter->dataToCalc.at(i)); + testStruct->logFileInfo->addTestGroup(phiAndNyTests); + for (int j = 0; j < phiAndNyTests.size(); j++) + testStruct->tests.push_back(phiAndNyTests.at(j)); } } return testStruct; } -std::vector<std::shared_ptr<PhiAndNuTest>> NumericalTestFactoryImp::makePhiAndNuTests(std::shared_ptr<PhiAndNuTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp>> testSim, std::vector< std::shared_ptr< PhiAndNuTestPostProcessingStrategy>> postProStrategy, double viscosity, std::string dataToCalculate) +std::vector<std::shared_ptr<PhiAndNyTest> > NumericalTestFactoryImp::makePhiAndNyTests(std::shared_ptr<PhiAndNyTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<PhiAndNyTestPostProcessingStrategy> > postProStrategy, double viscosity, std::string dataToCalculate) { - std::vector< std::shared_ptr< PhiAndNuTest>> phiAndNuTests; + std::vector<std::shared_ptr<PhiAndNyTest> > phiAndNyTests; for (int i = 1; i < testSim.size(); i++) { for (int j = 0; j < i; j++) { - std::shared_ptr< PhiAndNuTest> test = PhiAndNuTest::getNewInstance(colorOutput, viscosity, testParameter, dataToCalculate); + std::shared_ptr<PhiAndNyTest> test = PhiAndNyTest::getNewInstance(colorOutput, viscosity, testParameter, dataToCalculate); test->addSimulation(testSim.at(j), testSim.at(j)->getSimulationInfo(), postProStrategy.at(j)); test->addSimulation(testSim.at(i), testSim.at(i)->getSimulationInfo(), postProStrategy.at(i)); testSim.at(j)->registerSimulationObserver(test); testSim.at(i)->registerSimulationObserver(test); - phiAndNuTests.push_back(test); + phiAndNyTests.push_back(test); } } - return phiAndNuTests; + return phiAndNyTests; } std::shared_ptr<L2NormTestStruct> NumericalTestFactoryImp::makeL2NormTestsStructs(std::shared_ptr<L2NormTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSimumlations) @@ -292,9 +292,9 @@ std::shared_ptr<L2NormTestStruct> NumericalTestFactoryImp::makeL2NormTestsStruct return testStruct; } -std::vector<std::shared_ptr<L2NormTest>> NumericalTestFactoryImp::makeL2NormTests(std::vector<std::shared_ptr<TestSimulationImp>> testSim, std::vector< std::shared_ptr< L2NormPostProcessingStrategy>> postProStrategy, std::shared_ptr<L2NormTestParameterStruct> testParameter) +std::vector<std::shared_ptr<L2NormTest> > NumericalTestFactoryImp::makeL2NormTests(std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<L2NormPostProcessingStrategy> > postProStrategy, std::shared_ptr<L2NormTestParameterStruct> testParameter) { - std::vector<std::shared_ptr<L2NormTest>> l2Tests; + std::vector<std::shared_ptr<L2NormTest> > l2Tests; for (int i = 0; i < testSim.size(); i++) { for (int j = 0; j < testParameter->basicTestParameter->dataToCalc.size(); j++) { std::shared_ptr<L2NormTest> test = L2NormTest::getNewInstance(colorOutput, testParameter, testParameter->basicTestParameter->dataToCalc.at(j)); @@ -362,9 +362,9 @@ std::vector<std::vector<std::shared_ptr<L2NormTestBetweenKernels> > > Numerical return testsForAllKernels; } -std::vector<std::shared_ptr<L2NormTestBetweenKernels>> NumericalTestFactoryImp::linkL2NormTestsBetweenKernels(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector< std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> > postProcessingStrategies) +std::vector<std::shared_ptr<L2NormTestBetweenKernels> > NumericalTestFactoryImp::linkL2NormTestsBetweenKernels(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> > postProcessingStrategies) { - std::vector< std::shared_ptr< L2NormTestBetweenKernels>> tests; + std::vector<std::shared_ptr<L2NormTestBetweenKernels> > tests; if (testSim.size() > 0) if (l2NormTestsBetweenKernels.at(0).size() == 0) @@ -384,7 +384,7 @@ std::vector<std::shared_ptr<L2NormTestBetweenKernels>> NumericalTestFactoryImp:: return tests; } -std::shared_ptr<LogFileWriter> NumericalTestFactoryImp::makeLogFileWriter(std::vector<std::shared_ptr<TestLogFileInformation>> testLogFiles, std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::vector<std::shared_ptr<SimulationInfo> > simInfo, std::string kernelName, double viscosity, int basicTimeStepLength, std::shared_ptr<LogFileParameterStruct> logFilePara) +std::shared_ptr<LogFileWriter> NumericalTestFactoryImp::makeLogFileWriter(std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::vector<std::shared_ptr<SimulationInfo> > simInfo, std::string kernelName, double viscosity, int basicTimeStepLength, std::shared_ptr<LogFileParameterStruct> logFilePara) { std::shared_ptr<LogFileHead> logFileHead = LogFileHead::getNewInstance(logFilePara->devices); std::shared_ptr<BasicSimulationInfo> basicSimInfo = BasicSimulationInfo::getNewInstance(logFilePara->numberOfTimeSteps, viscosity, basicTimeStepLength, kernelName); diff --git a/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.h b/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.h index fc251d247..d7ecb2f36 100644 --- a/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.h +++ b/targets/tests/NumericalTests/Utilities/NumericalTestFactory/NumericalTestFactoryImp.h @@ -11,8 +11,8 @@ struct L2NormTestBetweenKernelsParameterStruct; struct L2NormTestBetweenKernelsStruct; struct LogFileParameterStruct; struct NumericalTestStruct; -struct PhiAndNuTestStruct; -struct PhiAndNuTestParameterStruct; +struct PhiAndNyTestStruct; +struct PhiAndNyTestParameterStruct; struct ShearWaveParameterStruct; struct SimulationDataStruct; struct TaylorGreenVortexUxParameterStruct; @@ -29,8 +29,8 @@ class L2NormTestBetweenKernels; class LogFileTimeInformation; class LogFileQueueImp; class LogFileWriter; -class PhiAndNuTest; -class PhiAndNuTestPostProcessingStrategy; +class PhiAndNyTest; +class PhiAndNyTestPostProcessingStrategy; class SimulationInfo; class SimulationLogFileInformation; class SimulationParameter; @@ -43,11 +43,11 @@ class TestLogFileInformation; class NumericalTestFactoryImp : public NumericalTestFactory { public: - static std::shared_ptr< NumericalTestFactoryImp> getNewInstance(std::shared_ptr<ConfigDataStruct> configFileData); + static std::shared_ptr<NumericalTestFactoryImp> getNewInstance(std::shared_ptr<ConfigDataStruct> configFileData); - std::vector< std::shared_ptr< TestSimulation>> getTestSimulations(); - std::shared_ptr< TestQueue> getTestQueue(); - std::shared_ptr< LogFileQueue> getLogFileQueue(); + std::vector<std::shared_ptr<TestSimulation> > getTestSimulations(); + std::shared_ptr<TestQueue> getTestQueue(); + std::shared_ptr<LogFileQueue> getLogFileQueue(); private: NumericalTestFactoryImp() {}; @@ -64,25 +64,25 @@ private: std::vector<std::shared_ptr<TestSimulationImp> > makeTestSimulations(std::vector<std::shared_ptr<TestSimulationDataStruct> > testSimDataStruct, std::shared_ptr<VectorWriterInformationStruct> vectorWriterInfo, unsigned int ySliceForCalculation); - std::shared_ptr<PhiAndNuTestStruct> makePhiAndNuTestsStructs(std::shared_ptr<PhiAndNuTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSimumlations, double viscosity); + std::shared_ptr<PhiAndNyTestStruct> makePhiAndNyTestsStructs(std::shared_ptr<PhiAndNyTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSimumlations, double viscosity); std::shared_ptr<L2NormTestStruct> makeL2NormTestsStructs(std::shared_ptr<L2NormTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSimumlations); - std::shared_ptr<L2NormTestBetweenKernelsStruct> makeL2NormTestsBetweenKernelsStructs(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp>> testSim, std::string kernelName); - std::vector<std::shared_ptr<PhiAndNuTest> > makePhiAndNuTests(std::shared_ptr<PhiAndNuTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp>> testSim, std::vector< std::shared_ptr< PhiAndNuTestPostProcessingStrategy>> phiAndNuPostProStrategy, double viscosity, std::string dataToCalculate); - std::vector<std::shared_ptr<L2NormTest> > makeL2NormTests(std::vector<std::shared_ptr<TestSimulationImp>> testSim, std::vector< std::shared_ptr< L2NormPostProcessingStrategy>> postProStrategy, std::shared_ptr<L2NormTestParameterStruct> testParameter); + std::shared_ptr<L2NormTestBetweenKernelsStruct> makeL2NormTestsBetweenKernelsStructs(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::string kernelName); + std::vector<std::shared_ptr<PhiAndNyTest> > makePhiAndNyTests(std::shared_ptr<PhiAndNyTestParameterStruct> testParameter, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<PhiAndNyTestPostProcessingStrategy> > phiAndNuPostProStrategy, double viscosity, std::string dataToCalculate); + std::vector<std::shared_ptr<L2NormTest> > makeL2NormTests(std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<L2NormPostProcessingStrategy> > postProStrategy, std::shared_ptr<L2NormTestParameterStruct> testParameter); std::vector<std::vector<std::shared_ptr<L2NormTestBetweenKernels> > > makeL2NormTestsBetweenKernels(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> > postProcessingStrategies); - std::vector<std::shared_ptr<L2NormTestBetweenKernels> > linkL2NormTestsBetweenKernels(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector< std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> > postProcessingStrategies); + std::vector<std::shared_ptr<L2NormTestBetweenKernels> > linkL2NormTestsBetweenKernels(std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> testPara, std::vector<std::shared_ptr<TestSimulationImp> > testSim, std::vector<std::shared_ptr<L2NormBetweenKernelPostProcessingStrategy> > postProcessingStrategies); - std::shared_ptr< LogFileWriter> makeLogFileWriter(std::vector< std::shared_ptr< TestLogFileInformation>> testLogFiles, std::shared_ptr< SimulationLogFileInformation> simLogInfo, std::vector<std::shared_ptr<SimulationInfo> > simInfo, std::string kernelName, double viscosity, int basicTimeStepLength, std::shared_ptr<LogFileParameterStruct> logFilePara); + std::shared_ptr<LogFileWriter> makeLogFileWriter(std::vector<std::shared_ptr<TestLogFileInformation> > testLogFiles, std::shared_ptr<SimulationLogFileInformation> simLogInfo, std::vector<std::shared_ptr<SimulationInfo> > simInfo, std::string kernelName, double viscosity, int basicTimeStepLength, std::shared_ptr<LogFileParameterStruct> logFilePara); - std::vector< std::shared_ptr< TestSimulation>> myTestSimulations; - std::shared_ptr< TestQueueImp> myTestQueue; - std::shared_ptr< LogFileQueueImp> myLogFileWriterQueue; + std::vector<std::shared_ptr<TestSimulation> > myTestSimulations; + std::shared_ptr<TestQueueImp> myTestQueue; + std::shared_ptr<LogFileQueueImp> myLogFileWriterQueue; std::vector<std::vector<std::shared_ptr<L2NormTestBetweenKernels> > > l2NormTestsBetweenKernels; - std::shared_ptr< ColorConsoleOutput> colorOutput; + std::shared_ptr<ColorConsoleOutput> colorOutput; std::shared_ptr<AnalyticalResults2DToVTKWriter> anaResultWriter; int simID; diff --git a/targets/tests/NumericalTests/Utilities/PostProcessingStrategy/PostProcessingStrategyImp.h b/targets/tests/NumericalTests/Utilities/PostProcessingStrategy/PostProcessingStrategyImp.h index 77b3e3b20..50786505f 100644 --- a/targets/tests/NumericalTests/Utilities/PostProcessingStrategy/PostProcessingStrategyImp.h +++ b/targets/tests/NumericalTests/Utilities/PostProcessingStrategy/PostProcessingStrategyImp.h @@ -17,10 +17,10 @@ public: int getNumberOfZNodes(); protected: - PostProcessingStrategyImp(std::shared_ptr< SimulationResults> simResult); + PostProcessingStrategyImp(std::shared_ptr<SimulationResults> simResult); int calcTimeStepInResults(unsigned int timeStep); - std::shared_ptr< SimulationResults> simResult; + std::shared_ptr<SimulationResults> simResult; private: PostProcessingStrategyImp() {}; diff --git a/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResult.h b/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResult.h index 6b4a9881f..afb78baef 100644 --- a/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResult.h +++ b/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResult.h @@ -10,7 +10,7 @@ class SimulationResults; class AnalyticalResults : public ResultsImp { public: - virtual void calc(std::shared_ptr< SimulationResults> simResults) = 0; + virtual void calc(std::shared_ptr<SimulationResults> simResults) = 0; virtual bool isCalculated() = 0; }; diff --git a/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResultImp.h b/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResultImp.h index d43ccdc6f..04c2c1708 100644 --- a/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResultImp.h +++ b/targets/tests/NumericalTests/Utilities/Results/AnalyticalResults/AnalyticalResultImp.h @@ -11,7 +11,7 @@ public: protected: AnalyticalResultsImp(); - void init(std::shared_ptr< SimulationResults> simResults); + void init(std::shared_ptr<SimulationResults> simResults); bool calculated; private: diff --git a/targets/tests/NumericalTests/Utilities/Results/Results.h b/targets/tests/NumericalTests/Utilities/Results/Results.h index 43983b91e..f24832b5d 100644 --- a/targets/tests/NumericalTests/Utilities/Results/Results.h +++ b/targets/tests/NumericalTests/Utilities/Results/Results.h @@ -7,18 +7,18 @@ class Results { public: virtual int getNumberOfTimeSteps() = 0; - virtual std::vector<std::vector<double>> getVx() = 0; - virtual std::vector<std::vector<double>> getVy() = 0; - virtual std::vector<std::vector<double>> getVz() = 0; + virtual std::vector<std::vector<double> > getVx() = 0; + virtual std::vector<std::vector<double> > getVy() = 0; + virtual std::vector<std::vector<double> > getVz() = 0; virtual int getNumberOfXNodes() = 0; virtual int getNumberOfYNodes() = 0; virtual int getNumberOfZNodes() = 0; - virtual std::vector<std::vector<double>> getXNodes() = 0; - virtual std::vector<std::vector<double>> getYNodes() = 0; - virtual std::vector<std::vector<double>> getZNodes() = 0; + virtual std::vector<std::vector<double> > getXNodes() = 0; + virtual std::vector<std::vector<double> > getYNodes() = 0; + virtual std::vector<std::vector<double> > getZNodes() = 0; virtual int getTimeStepLength() = 0; virtual std::vector<unsigned int> getTimeSteps() = 0; - virtual std::vector < std::vector< unsigned int>> getLevels() = 0; + virtual std::vector < std::vector<unsigned int> > getLevels() = 0; private: diff --git a/targets/tests/NumericalTests/Utilities/Results/ResultsImp.cpp b/targets/tests/NumericalTests/Utilities/Results/ResultsImp.cpp index 2158ba986..9249374bc 100644 --- a/targets/tests/NumericalTests/Utilities/Results/ResultsImp.cpp +++ b/targets/tests/NumericalTests/Utilities/Results/ResultsImp.cpp @@ -5,17 +5,17 @@ int ResultsImp::getNumberOfTimeSteps() return numberOfTimeSteps; } -std::vector<std::vector<double>> ResultsImp::getVx() +std::vector<std::vector<double> > ResultsImp::getVx() { return vx; } -std::vector<std::vector<double>> ResultsImp::getVy() +std::vector<std::vector<double> > ResultsImp::getVy() { return vy; } -std::vector<std::vector<double>> ResultsImp::getVz() +std::vector<std::vector<double> > ResultsImp::getVz() { return vz; } @@ -35,17 +35,17 @@ int ResultsImp::getNumberOfZNodes() return zNodes; } -std::vector<std::vector<double>> ResultsImp::getXNodes() +std::vector<std::vector<double> > ResultsImp::getXNodes() { return x; } -std::vector<std::vector<double>> ResultsImp::getYNodes() +std::vector<std::vector<double> > ResultsImp::getYNodes() { return y; } -std::vector<std::vector<double>> ResultsImp::getZNodes() +std::vector<std::vector<double> > ResultsImp::getZNodes() { return z; } @@ -65,17 +65,17 @@ std::vector<int> ResultsImp::getTime() return time; } -std::vector<std::vector<unsigned int>> ResultsImp::getLevels() +std::vector<std::vector<unsigned int> > ResultsImp::getLevels() { return level; } -std::vector<std::vector<double>> ResultsImp::getPress() +std::vector<std::vector<double> > ResultsImp::getPress() { return press; } -std::vector<std::vector<double>> ResultsImp::getRho() +std::vector<std::vector<double> > ResultsImp::getRho() { return rho; } diff --git a/targets/tests/NumericalTests/Utilities/Results/ResultsImp.h b/targets/tests/NumericalTests/Utilities/Results/ResultsImp.h index f5f8ab5e5..b7fa075ca 100644 --- a/targets/tests/NumericalTests/Utilities/Results/ResultsImp.h +++ b/targets/tests/NumericalTests/Utilities/Results/ResultsImp.h @@ -10,18 +10,18 @@ public: int getTimeStepLength(); std::vector<unsigned int> getTimeSteps(); std::vector<int> getTime(); - std::vector<std::vector<double>> getVx(); - std::vector<std::vector<double>> getVy(); - std::vector<std::vector<double>> getVz(); + std::vector<std::vector<double> > getVx(); + std::vector<std::vector<double> > getVy(); + std::vector<std::vector<double> > getVz(); int getNumberOfXNodes(); int getNumberOfYNodes(); int getNumberOfZNodes(); - std::vector<std::vector<double>> getXNodes(); - std::vector<std::vector<double>> getYNodes(); - std::vector<std::vector<double>> getZNodes(); - std::vector< std::vector< unsigned int> > getLevels(); - std::vector<std::vector<double>> getPress(); - std::vector<std::vector<double>> getRho(); + std::vector<std::vector<double> > getXNodes(); + std::vector<std::vector<double> > getYNodes(); + std::vector<std::vector<double> > getZNodes(); + std::vector<std::vector<unsigned int> > getLevels(); + std::vector<std::vector<double> > getPress(); + std::vector<std::vector<double> > getRho(); protected: ResultsImp() {}; @@ -33,11 +33,11 @@ protected: std::vector<unsigned int> timeStep; std::vector<int> time; - std::vector<std::vector<double>> x, y, z; - std::vector<std::vector<double>> vx, vy, vz; - std::vector<std::vector<double>> press; - std::vector<std::vector<double>> rho; - std::vector<std::vector<unsigned int>> level; + std::vector<std::vector<double> > x, y, z; + std::vector<std::vector<double> > vx, vy, vz; + std::vector<std::vector<double> > press; + std::vector<std::vector<double> > rho; + std::vector<std::vector<unsigned int> > level; private: diff --git a/targets/tests/NumericalTests/Utilities/SimulationParameter/SimulationParameter.h b/targets/tests/NumericalTests/Utilities/SimulationParameter/SimulationParameter.h index dccbe04ee..87d70b6f5 100644 --- a/targets/tests/NumericalTests/Utilities/SimulationParameter/SimulationParameter.h +++ b/targets/tests/NumericalTests/Utilities/SimulationParameter/SimulationParameter.h @@ -11,14 +11,14 @@ class KernelConfiguration; class SimulationParameter { public: - virtual std::shared_ptr< KernelConfiguration> getKernelConfiguration() = 0; + virtual std::shared_ptr<KernelConfiguration> getKernelConfiguration() = 0; virtual double getViscosity() = 0; virtual std::string getGridPath() = 0; virtual std::string getFilePath() = 0; virtual unsigned int getNumberOfGridLevels() = 0; virtual unsigned int getEndTime() = 0; virtual unsigned int getTimeStepLength() = 0; - virtual std::vector< int> getDevices() = 0; + virtual std::vector<int> getDevices() = 0; virtual double getMaxVelocity() = 0; virtual unsigned int getLx() = 0; diff --git a/targets/tests/NumericalTests/Utilities/Structs/ConfigDataStruct.h b/targets/tests/NumericalTests/Utilities/Structs/ConfigDataStruct.h index 40defaf05..43596c951 100644 --- a/targets/tests/NumericalTests/Utilities/Structs/ConfigDataStruct.h +++ b/targets/tests/NumericalTests/Utilities/Structs/ConfigDataStruct.h @@ -10,7 +10,7 @@ #include "Simulations\TaylorGreenVortexUz\TaylorGreenVortexUzParameterStruct.h" #include "Tests\L2NormTest\L2NormTestParameterStruct.h" #include "Tests\L2NormTestBetweenKernels\L2NormTestBetweenKernelsParameterStruct.h" -#include "Tests\PhiAndNuTest\PhiAndNuTestParameterStruct.h" +#include "Tests\PhiAndNyTest\PhiAndNyTestParameterStruct.h" #include "Utilities\Structs\BasicSimulationParameterStruct.h" #include "Utilities\Structs\VectorWriterInformationStruct.h" #include "Utilities\Structs\GridInformationStruct.h" @@ -40,7 +40,7 @@ struct ConfigDataStruct int numberOfSimulations; - std::shared_ptr<PhiAndNuTestParameterStruct> phiAndNuTestParameter; + std::shared_ptr<PhiAndNyTestParameterStruct> phiAndNuTestParameter; std::shared_ptr<L2NormTestParameterStruct> l2NormTestParameter; std::shared_ptr<L2NormTestBetweenKernelsParameterStruct> l2NormTestBetweenKernelsParameter; diff --git a/targets/tests/NumericalTests/Utilities/Test/Test.h b/targets/tests/NumericalTests/Utilities/Test/Test.h index c4bf0106f..88b74c442 100644 --- a/targets/tests/NumericalTests/Utilities/Test/Test.h +++ b/targets/tests/NumericalTests/Utilities/Test/Test.h @@ -10,7 +10,7 @@ class Test : public SimulationObserver { public: virtual void update() = 0; - virtual std::vector< bool> getPassedTests() = 0; + virtual std::vector<bool> getPassedTests() = 0; virtual void makeConsoleOutput() = 0; private: diff --git a/targets/tests/NumericalTests/Utilities/Test/TestImp.cpp b/targets/tests/NumericalTests/Utilities/Test/TestImp.cpp index 43146f403..b685f85f1 100644 --- a/targets/tests/NumericalTests/Utilities/Test/TestImp.cpp +++ b/targets/tests/NumericalTests/Utilities/Test/TestImp.cpp @@ -21,7 +21,7 @@ void TestImp::update() evaluate(); } -void TestImp::addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr< SimulationInfo> simInfo, std::shared_ptr<PostProcessingStrategy> postProStrategy) +void TestImp::addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PostProcessingStrategy> postProStrategy) { simulations.push_back(sim); simInfos.push_back(simInfo); diff --git a/targets/tests/NumericalTests/Utilities/Test/TestImp.h b/targets/tests/NumericalTests/Utilities/Test/TestImp.h index ed4e0a6e4..403d937a6 100644 --- a/targets/tests/NumericalTests/Utilities/Test/TestImp.h +++ b/targets/tests/NumericalTests/Utilities/Test/TestImp.h @@ -19,13 +19,13 @@ public: void addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PostProcessingStrategy> postProStrategy); virtual void evaluate() = 0; - virtual std::vector< bool> getPassedTests() = 0; + virtual std::vector<bool> getPassedTests() = 0; virtual void makeConsoleOutput() = 0; std::string getSimulationName(); protected: - TestImp(std::shared_ptr< ColorConsoleOutput> colorOutput); + TestImp(std::shared_ptr<ColorConsoleOutput> colorOutput); bool CheckAllSimulationRun(); std::vector<std::shared_ptr<NumericalTestSimulation> > simulations; diff --git a/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.cpp b/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.cpp index a2fad08ec..1a779a7d8 100644 --- a/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.cpp +++ b/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.cpp @@ -12,7 +12,7 @@ void TestQueueImp::makeFinalOutput() colorOutput->makeFinalTestOutputFoot(numberOfPassedTest, numberOfTests); } -std::shared_ptr<TestQueueImp> TestQueueImp::getNewInstance(std::shared_ptr< ColorConsoleOutput> colorOutput) +std::shared_ptr<TestQueueImp> TestQueueImp::getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput) { return std::shared_ptr<TestQueueImp>(new TestQueueImp(colorOutput)); } @@ -22,7 +22,7 @@ void TestQueueImp::addTest(std::shared_ptr<Test> test) tests.push_back(test); } -TestQueueImp::TestQueueImp(std::shared_ptr< ColorConsoleOutput> colorOutput) : colorOutput(colorOutput) +TestQueueImp::TestQueueImp(std::shared_ptr<ColorConsoleOutput> colorOutput) : colorOutput(colorOutput) { tests.resize(0); } diff --git a/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.h b/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.h index bafb824ec..81210f078 100644 --- a/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.h +++ b/targets/tests/NumericalTests/Utilities/TestQueue/TestQueueImp.h @@ -14,16 +14,16 @@ class TestQueueImp : public TestQueue public: void makeFinalOutput(); - static std::shared_ptr< TestQueueImp> getNewInstance(std::shared_ptr< ColorConsoleOutput> colorOutput); - void addTest(std::shared_ptr< Test> test); + static std::shared_ptr<TestQueueImp> getNewInstance(std::shared_ptr<ColorConsoleOutput> colorOutput); + void addTest(std::shared_ptr<Test> test); private: - TestQueueImp(std::shared_ptr< ColorConsoleOutput> colorOutput); + TestQueueImp(std::shared_ptr<ColorConsoleOutput> colorOutput); void calcNumberOfPassedTest(); - std::shared_ptr< ColorConsoleOutput> colorOutput; - std::vector< std::shared_ptr< Test>> tests; + std::shared_ptr<ColorConsoleOutput> colorOutput; + std::vector<std::shared_ptr<Test> > tests; int numberOfPassedTest; int numberOfTests; }; diff --git a/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.cpp b/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.cpp index 72f836627..cf7d805ff 100644 --- a/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.cpp +++ b/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.cpp @@ -70,7 +70,7 @@ bool TestSimulationImp::getSimulationRun() return simualtionRun; } -void TestSimulationImp::registerSimulationObserver(std::shared_ptr< SimulationObserver> simObserver) +void TestSimulationImp::registerSimulationObserver(std::shared_ptr<SimulationObserver> simObserver) { this->simObserver.push_back(simObserver); } diff --git a/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.h b/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.h index 4b97004c6..faea76387 100644 --- a/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.h +++ b/targets/tests/NumericalTests/Utilities/TestSimulation/TestSimulationImp.h @@ -20,10 +20,10 @@ struct TestSimulationDataStruct; class TestSimulationImp : public TestSimulation, public NumericalTestSimulation { public: - static std::shared_ptr< TestSimulationImp> getNewInsance(std::shared_ptr<TestSimulationDataStruct> testSimData, std::shared_ptr<SimulationResults> simResult, std::shared_ptr<TimeTracking> timeTracking, std::shared_ptr<ToVectorWriter> toVectorWriter, std::shared_ptr<AnalyticalResults2DToVTKWriter> anaResultWriter, std::shared_ptr<ColorConsoleOutput> colorOutput); + static std::shared_ptr<TestSimulationImp> getNewInsance(std::shared_ptr<TestSimulationDataStruct> testSimData, std::shared_ptr<SimulationResults> simResult, std::shared_ptr<TimeTracking> timeTracking, std::shared_ptr<ToVectorWriter> toVectorWriter, std::shared_ptr<AnalyticalResults2DToVTKWriter> anaResultWriter, std::shared_ptr<ColorConsoleOutput> colorOutput); - std::shared_ptr< SimulationParameter> getSimulationParameter(); - std::shared_ptr< DataWriter> getDataWriter(); + std::shared_ptr<SimulationParameter> getSimulationParameter(); + std::shared_ptr<DataWriter> getDataWriter(); std::shared_ptr<InitialCondition> getInitialCondition(); std::shared_ptr<SimulationInfo> getSimulationInfo(); std::shared_ptr<TimeTracking> getTimeTracking(); diff --git a/targets/tests/NumericalTests/Utilities/VirtualFluidSimulation/VirtualFluidSimulationImp.h b/targets/tests/NumericalTests/Utilities/VirtualFluidSimulation/VirtualFluidSimulationImp.h index 9c82cf193..488f60135 100644 --- a/targets/tests/NumericalTests/Utilities/VirtualFluidSimulation/VirtualFluidSimulationImp.h +++ b/targets/tests/NumericalTests/Utilities/VirtualFluidSimulation/VirtualFluidSimulationImp.h @@ -20,11 +20,11 @@ class VirtualFluidSimulationImp : public VirtualFluidSimulation public: void run(); - static std::shared_ptr< VirtualFluidSimulationImp> getNewInstance(); + static std::shared_ptr<VirtualFluidSimulationImp> getNewInstance(); void setParameter(std::shared_ptr<Parameter> para); void setGridProvider(std::shared_ptr<GridProvider> grid); - void setDataWriter(std::shared_ptr< DataWriter> dataWriter); + void setDataWriter(std::shared_ptr<DataWriter> dataWriter); void setNumericalTestSuite(std::shared_ptr<NumericalTestSuite> numericalTestSuite); void setTimeTracking(std::shared_ptr<TimeTracking> timeTracking); diff --git a/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.cpp b/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.cpp index a98851cc8..809fb03fd 100644 --- a/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.cpp +++ b/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.cpp @@ -11,7 +11,7 @@ std::shared_ptr<VirtualFluidSimulationFactory> VirtualFluidSimulationFactoryImp::getNewInstance() { - return std::shared_ptr< VirtualFluidSimulationFactory>(new VirtualFluidSimulationFactoryImp()); + return std::shared_ptr<VirtualFluidSimulationFactory>(new VirtualFluidSimulationFactoryImp()); } VirtualFluidSimulationFactoryImp::VirtualFluidSimulationFactoryImp() @@ -119,12 +119,12 @@ void VirtualFluidSimulationFactoryImp::initInitialConditions(std::shared_ptr<Ini initialCondition->setParameter(para); } -std::vector<std::shared_ptr<VirtualFluidSimulation>> VirtualFluidSimulationFactoryImp::makeVirtualFluidSimulations(std::vector<std::shared_ptr<TestSimulation> > testSim) +std::vector<std::shared_ptr<VirtualFluidSimulation> > VirtualFluidSimulationFactoryImp::makeVirtualFluidSimulations(std::vector<std::shared_ptr<TestSimulation> > testSim) { - std::vector< std::shared_ptr< VirtualFluidSimulation>> vfSimulations; + std::vector<std::shared_ptr<VirtualFluidSimulation> > vfSimulations; for (int i = 0; i < testSim.size(); i++) { - std::shared_ptr< VirtualFluidSimulationImp> vfSim = VirtualFluidSimulationImp::getNewInstance(); + std::shared_ptr<VirtualFluidSimulationImp> vfSim = VirtualFluidSimulationImp::getNewInstance(); std::shared_ptr<Parameter> para = makeParameter(testSim.at(i)->getSimulationParameter()); vfSim->setParameter(para); diff --git a/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.h b/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.h index 5272af829..6978f0de9 100644 --- a/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.h +++ b/targets/tests/NumericalTests/Utilities/VirtualFluidSimulationFactory/VirtualFluidSimulationFactoryImp.h @@ -11,7 +11,7 @@ class SimulationParameter; class VirtualFluidSimulationFactoryImp: public VirtualFluidSimulationFactory { public: - static std::shared_ptr< VirtualFluidSimulationFactory> getNewInstance(); + static std::shared_ptr<VirtualFluidSimulationFactory> getNewInstance(); std::vector<std::shared_ptr<VirtualFluidSimulation> > makeVirtualFluidSimulations(std::vector<std::shared_ptr<TestSimulation> > testSim); protected: diff --git a/targets/tests/NumericalTests/main.cpp b/targets/tests/NumericalTests/main.cpp index a3c527277..bdfd2b104 100644 --- a/targets/tests/NumericalTests/main.cpp +++ b/targets/tests/NumericalTests/main.cpp @@ -18,8 +18,8 @@ static void startNumericalTests(const std::string &configFile) std::shared_ptr<TestQueue> testQueue = numericalTestFactory->getTestQueue(); std::shared_ptr<LogFileQueue> logFileQueue = numericalTestFactory->getLogFileQueue(); - std::shared_ptr< VirtualFluidSimulationFactory> factory = VirtualFluidSimulationFactoryImp::getNewInstance(); - std::vector< std::shared_ptr< VirtualFluidSimulation> > vfSimulations = factory->makeVirtualFluidSimulations(testSim); + std::shared_ptr<VirtualFluidSimulationFactory> factory = VirtualFluidSimulationFactoryImp::getNewInstance(); + std::vector<std::shared_ptr<VirtualFluidSimulation> > vfSimulations = factory->makeVirtualFluidSimulations(testSim); for (int i = 0; i < vfSimulations.size(); i++) vfSimulations.at(i)->run(); -- GitLab