diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp index 5f064a54b26f0d65265e4e81b910e4673725304f..50bf699a00c575c87e4142759c0e7f411d881210 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.cpp @@ -19,6 +19,14 @@ std::string L2NormInformation::getOutput() oss << "BasicTimeStep_L2Norm=" << basicTimeStep << std::endl; oss << "DivergentTimeStep_L2Norm=" << divergentTimeStep << std::endl; + oss << "DataToCalc_L2Norm=\""; + for (int i = 0; i < dataToCalc.size(); i++) { + oss << dataToCalc.at(i); + if (i < dataToCalc.size() - 1) + oss << " "; + else + oss << "\"" << std::endl; + } oss << std::endl; for (int i = 0; i < tests.size(); i++) @@ -31,4 +39,5 @@ L2NormInformation::L2NormInformation(std::vector<std::shared_ptr<L2NormTest> > t { basicTimeStep = testParameter->basicTimeStep; divergentTimeStep = testParameter->divergentTimeStep; + dataToCalc = testParameter->basicTestParameter->dataToCalc; } \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h index 12fa87bef54898bf9ea72e20175c7dbbba687862..ccba5418845c290db084aa63da37a001cf2c6ca4 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h +++ b/targets/tests/NumericalTests/Tests/L2NormTest/LogFileInformation/L2NormLogFileInformation.h @@ -23,5 +23,6 @@ private: std::vector<std::shared_ptr<L2NormTest> > tests; unsigned int basicTimeStep, divergentTimeStep; + std::vector<std::string> dataToCalc; }; #endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp index 09bf1b2045dcb6a2b947c48eef10dde36fb56afc..eb51948b25c9d60b8ce5a85d1906b03c69c2f01e 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/L2NormTestBetweenKernels.cpp @@ -52,7 +52,7 @@ void L2NormTestBetweenKernels::evaluate() resultL2ToBasicKernel = l2Normcalculator->calc(basicSimResults->getRho().at(tS), divergentSimResults->getRho().at(tS), basicSimResults->getLevels().at(tS), basicSimResults->getNumberOfXNodes(), basicSimResults->getNumberOfZNodes(), basicSimResults->getTimeStepLength()); } - if (basicL2Result < divergentL2Result) + if (basicL2Result <= divergentL2Result) testPassed = true; makeConsoleOutput(); @@ -61,8 +61,8 @@ void L2NormTestBetweenKernels::evaluate() std::string L2NormTestBetweenKernels::getLogFileOutput() { std::ostringstream oss; - oss << "L2Norm_" << dataToCalculate << "_TimeStep_" << timeStep << "=" << divergentL2Result << std::endl; - oss << "L2Norm_BasicKernel_" << dataToCalculate << "_TimeStep_" << timeStep << "=" << basicL2Result << std::endl; + oss << "L2Norm_BasicKernel_" << dataToCalculate << "_TimeStep_" << timeStep << "_L" << basicPostProcessingStrategy->getNumberOfXNodes() << "=" << basicL2Result << std::endl; + oss << "L2Norm_DivergentKernel_" << dataToCalculate << "_TimeStep_" << timeStep << "_L" << basicPostProcessingStrategy->getNumberOfXNodes() << "=" << divergentL2Result << std::endl; oss << "L2Norm_Between_Kernels_" << dataToCalculate << "_TimeStep_" << timeStep << "_L" << basicPostProcessingStrategy->getNumberOfXNodes() << "=" << resultL2ToBasicKernel << std::endl << std::endl; return oss.str(); diff --git a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp index cbce9ee2b595d8075e8617bc3de18f22ac66a7e9..65918efbfa453373870c2d46758e5a23cd71a5e7 100644 --- a/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp +++ b/targets/tests/NumericalTests/Tests/L2NormTestBetweenKernels/LogFileInformation/L2NormLogFileInformationBetweenKernels.cpp @@ -18,7 +18,7 @@ std::string L2NormBetweenKernelsInformation::getOutput() makeCenterHead(headName.str()); oss << "BasicKernel=" << basicKernel << std::endl; - oss << "DataToCalculate=\""; + oss << "DataToCalculate_L2Norm_BK=\""; for (int i = 0; i < dataToCalc.size(); i++) oss << dataToCalc.at(i) << " "; deleteLastCharInOss(); diff --git a/targets/tests/NumericalTests/Utilities/LogFileInformation/BasicTestLogFileInformation/BasicTestLogFileInformation.cpp b/targets/tests/NumericalTests/Utilities/LogFileInformation/BasicTestLogFileInformation/BasicTestLogFileInformation.cpp index b86f9e3648b5094e4757672b70c035bc32a33efd..8bf0b9b0673b9b668a37bd18bb588a05e039f22d 100644 --- a/targets/tests/NumericalTests/Utilities/LogFileInformation/BasicTestLogFileInformation/BasicTestLogFileInformation.cpp +++ b/targets/tests/NumericalTests/Utilities/LogFileInformation/BasicTestLogFileInformation/BasicTestLogFileInformation.cpp @@ -18,6 +18,7 @@ std::string BasicTestLogFileInformation::getOutput() void BasicTestLogFileInformation::addTest(std::string testName, bool testRun) { bool isRegistered = false; + for (int i = 0; i < this->testName.size(); i++) { if (this->testName.at(i) == testName) isRegistered = true; diff --git a/targets/tests/NumericalTests/config.txt b/targets/tests/NumericalTests/config.txt index e0bec2e25180aa65a13b9875daef52f9ba82e05a..6a31364f0f196168296f732e6eed10c6ed9ed953 100644 --- a/targets/tests/NumericalTests/config.txt +++ b/targets/tests/NumericalTests/config.txt @@ -6,8 +6,7 @@ Devices="1" ################################################## # Basic Simulation Parameter # ################################################## -KernelsToTest="CumulantOneCompSP27" - CumulantAA2016CompSP27 CumulantAll4CompSP27" +KernelsToTest="CumulantOneCompSP27 CumulantAA2016CompSP27 CumulantAll4CompSP27" NumberOfTimeSteps=20 Viscosity="0.001" Rho0=1.0 @@ -43,7 +42,7 @@ ySliceForCalculation=0 ################################################## PhiAndNuTest=true MinOrderOfAccuracy=1.95 -DataToCalc_PhiAndNu="Vx" +DataToCalc_PhiAndNu="Vx Vz" StartTimeStepCalculation_PhiNu=11 EndTimeStepCalculation_PhiNu=20 @@ -99,10 +98,10 @@ GridPath512="C:\Users\Timon\Documents\studienarbeitIRMB\grids\gridUni512x4x768" ################################################## # File Writing Information # ################################################## -WriteVTKFiles=true +WriteVTKFiles=false PathForVTKFileWriting="C:\Users\Timon\Documents\studienarbeitIRMB\Output" StartStepFileWriter=0 -WriteAnalyResultsToVTK=true +WriteAnalyResultsToVTK=false PathLogFile="C:\Users\Timon\Documents\studienarbeitIRMB\logFiles" \ No newline at end of file