Skip to content
Snippets Groups Projects
Commit 5c9e38b6 authored by Sven Marcus's avatar Sven Marcus
Browse files

Removes redundant test output

parent 2c782380
No related branches found
No related tags found
1 merge request!127Numerical tests run again
...@@ -264,7 +264,6 @@ nvidia_test: ...@@ -264,7 +264,6 @@ nvidia_test:
gpu_numerical_tests: gpu_numerical_tests:
stage: benchmark stage: benchmark
# when: manual
rules: rules:
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
......
...@@ -3,12 +3,9 @@ ...@@ -3,12 +3,9 @@
#include "Utilities/Results/SimulationResults/SimulationResults.h" #include "Utilities/Results/SimulationResults/SimulationResults.h"
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#include <math.h> #include <cmath>
#include <stdlib.h>
#include <fstream> #include <fstream>
#include <iostream>
std::shared_ptr<FFTCalculator> FFTCalculator::getInstance() std::shared_ptr<FFTCalculator> FFTCalculator::getInstance()
{ {
static std::shared_ptr<FFTCalculator> uniqueInstance; static std::shared_ptr<FFTCalculator> uniqueInstance;
...@@ -77,24 +74,9 @@ void FFTCalculator::init() ...@@ -77,24 +74,9 @@ void FFTCalculator::init()
double FFTCalculator::calcNy() double FFTCalculator::calcNy()
{ {
std::cout << "======== BEGIN SUPER IMPORTANT OUTPUT ========" << std::endl;
std::vector<double> logAmplitude = calcLogAmplitudeForAllSteps(); std::vector<double> logAmplitude = calcLogAmplitudeForAllSteps();
std::vector<double> linReg = calcLinReg(logAmplitude); std::vector<double> linReg = calcLinReg(logAmplitude);
std::cout << "lz: " << lz << "\t" << "lx: " << lx << "\t" << std::endl;
std::cout << "timestepLength: " << timeStepLength << "\t" << "linReg[0]: " << linReg.at(0) << "\t" << std::endl;
std::cout << "amplitude: " << "\t";
for (auto ampli : logAmplitude) {
std::cout << ampli << "\t";
}
std::cout << std::endl;
double nu = -(1.0 / (((2.0 * M_PI / lz) * (2.0 * M_PI / lz) + (2.0 * M_PI / lx)*(2.0 * M_PI / lx)) * timeStepLength)) * linReg.at(0); double nu = -(1.0 / (((2.0 * M_PI / lz) * (2.0 * M_PI / lz) + (2.0 * M_PI / lx)*(2.0 * M_PI / lx)) * timeStepLength)) * linReg.at(0);
std::cout << nu << std::endl;
std::cout << "======== END SUPER IMPORTANT OUTPUT ========" << std::endl;
return nu; return nu;
} }
...@@ -169,10 +151,6 @@ std::vector<double> FFTCalculator::calcAmplitudeForAllSteps() ...@@ -169,10 +151,6 @@ std::vector<double> FFTCalculator::calcAmplitudeForAllSteps()
else else
pos = 2 + (lz - 1); pos = 2 + (lz - 1);
std::cout << "DataSize: " << data.size() << std::endl;
std::cout << "fftResultsRe Size: " << fftResultsRe.size() << std::endl;
std::cout << "fftResultsIm Size: " << fftResultsIm.size() << std::endl;
for (int step = 0; step < data.size(); step++) for (int step = 0; step < data.size(); step++)
amplitude.push_back(4.0 / (lx * lz) * sqrt(fftResultsRe.at(step).at(pos) * fftResultsRe.at(step).at(pos) + fftResultsIm.at(step).at(pos) * fftResultsIm.at(step).at(pos))); amplitude.push_back(4.0 / (lx * lz) * sqrt(fftResultsRe.at(step).at(pos) * fftResultsRe.at(step).at(pos) + fftResultsIm.at(step).at(pos) * fftResultsIm.at(step).at(pos)));
......
...@@ -51,19 +51,6 @@ void Y2dSliceToResults::writeTimestep(std::shared_ptr<Parameter> para, unsigned ...@@ -51,19 +51,6 @@ void Y2dSliceToResults::writeTimestep(std::shared_ptr<Parameter> para, unsigned
y.at(posResults) = (double)para->getParH(level)->coordinateY[posPara] - (double)1.0; y.at(posResults) = (double)para->getParH(level)->coordinateY[posPara] - (double)1.0;
z.at(posResults) = (double)para->getParH(level)->coordinateZ[posPara] - (double)1.0; z.at(posResults) = (double)para->getParH(level)->coordinateZ[posPara] - (double)1.0;
vx.at(posResults) = (double)para->getParH(level)->velocityX[posPara] * (double)para->getVelocityRatio(); vx.at(posResults) = (double)para->getParH(level)->velocityX[posPara] * (double)para->getVelocityRatio();
// if (std::isnan(para->getParH(level)->velocityX[posPara])) {
// std::ostringstream oss;
// oss << "Vx is nan. Velocity in para->getParH(" << level << ")->velocityX[" << posPara
// << "] = " << para->getParH(level)->velocityX[posPara] << std::endl
// << "posResults is " << posResults << std::endl
// << "velocityRatio: " << para->getVelocityRatio() << std::endl
// << "maxY= " << maxY << std::endl
// << "ySlice= " << ySliceForCalculation << std::endl
// << "Broken 3D Index: (" << posX << ", " << ySliceForCalculation << ", " << posZ << ")" << std::endl;
// throw std::runtime_error(oss.str());
// }
vy.at(posResults) = (double)para->getParH(level)->velocityY[posPara] * (double)para->getVelocityRatio(); vy.at(posResults) = (double)para->getParH(level)->velocityY[posPara] * (double)para->getVelocityRatio();
vz.at(posResults) = (double)para->getParH(level)->velocityZ[posPara] * (double)para->getVelocityRatio(); vz.at(posResults) = (double)para->getParH(level)->velocityZ[posPara] * (double)para->getVelocityRatio();
press.at(posResults) = (double)para->getParH(level)->pressure[posPara] / (double)3.0 * press.at(posResults) = (double)para->getParH(level)->pressure[posPara] / (double)3.0 *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment