Skip to content
Snippets Groups Projects
Commit a92a0b07 authored by Timon Habenicht's avatar Timon Habenicht
Browse files

adds LogFileInformation for Simulation

parent 8542a4be
No related branches found
No related tags found
No related merge requests found
#include "ShearWaveLogFileInformation.h"
std::shared_ptr<LogFileInformation> ShearWaveInformation::getNewInstance(double u0, double v0, std::vector< bool> tests, std::vector< real> l)
std::shared_ptr<ShearWaveInformation> ShearWaveInformation::getNewInstance(double u0, double v0, std::vector< bool> tests, std::vector< real> l, int l0)
{
return std::shared_ptr<LogFileInformation>(new ShearWaveInformation(u0, v0, tests, l));
return std::shared_ptr<ShearWaveInformation>(new ShearWaveInformation(u0, v0, tests, l, l0));
}
std::string ShearWaveInformation::getOutput()
......@@ -19,7 +19,14 @@ std::string ShearWaveInformation::getOutput()
return oss.str();
}
ShearWaveInformation::ShearWaveInformation(double u0, double v0, std::vector< bool> tests, std::vector< real> l) : u0(u0), v0(v0), tests(tests), l(l)
std::string ShearWaveInformation::getFilePathExtension()
{
l0 = 32;
std::ostringstream oss;
oss << "ShearWave\\u0_" << u0 << "_v0_" << v0;
return oss.str();
}
ShearWaveInformation::ShearWaveInformation(double u0, double v0, std::vector< bool> tests, std::vector< real> l, int l0) : u0(u0), v0(v0), tests(tests), l(l), l0(l0)
{
}
\ No newline at end of file
......@@ -2,21 +2,24 @@
#define SHEAR_WAVE_INFORMATION_H
#include "Utilities/LogFileInformation/LogFileInformationImp.h"
#include "Utilities\LogFileInformation\SimulationLogFileInformation\SimulationLogFileInformation.h"
#include "LBM\LB.h"
#include <memory>
#include <vector>
class ShearWaveInformation : public LogFileInformationImp
class ShearWaveInformation : public LogFileInformationImp, public SimulationLogFileInformation
{
public:
static std::shared_ptr<LogFileInformation> getNewInstance(double u0, double v0, std::vector< bool> tests, std::vector< real> l);
static std::shared_ptr<ShearWaveInformation> getNewInstance(double u0, double v0, std::vector< bool> tests, std::vector< real> l, int l0);
std::string getOutput();
std::string getFilePathExtension();
private:
ShearWaveInformation() {};
ShearWaveInformation(double u0, double v0, std::vector< bool> tests, std::vector< real> l);
ShearWaveInformation(double u0, double v0, std::vector< bool> tests, std::vector< real> l, int l0);
double u0;
double v0;
......
#include "TaylorGreenLogFileInformation.h"
std::shared_ptr<LogFileInformation> TaylorGreenInformation::getNewInstance(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l)
std::shared_ptr<TaylorGreenInformation> TaylorGreenInformation::getNewInstance(double u0, double amplitude, std::vector< bool> tests, std::vector<double> l, int l0)
{
return std::shared_ptr<LogFileInformation>(new TaylorGreenInformation(u0, amplitude, tests, l));
return std::shared_ptr<TaylorGreenInformation>(new TaylorGreenInformation(u0, amplitude, tests, l, l0));
}
std::string TaylorGreenInformation::getOutput()
......@@ -20,7 +20,13 @@ std::string TaylorGreenInformation::getOutput()
return oss.str();
}
TaylorGreenInformation::TaylorGreenInformation(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l) : u0(u0), amplitude(amplitude), tests(tests), l(l)
std::string TaylorGreenInformation::getFilePathExtension()
{
std::ostringstream oss;
oss <<"TaylorGreenVortex\\u0_ " << u0 << "_Amplitude_ " << amplitude;
return oss.str();
}
TaylorGreenInformation::TaylorGreenInformation(double u0, double amplitude, std::vector< bool> tests, std::vector< double> l, int l0) : u0(u0), amplitude(amplitude), tests(tests), l(l), l0(l0)
{
l0 = 32;
}
......@@ -2,26 +2,27 @@
#define TAYLOR_GREEN_INFORMATION_H
#include "Utilities/LogFileInformation/LogFileInformationImp.h"
#include "LBM\LB.h"
#include "Utilities\LogFileInformation\SimulationLogFileInformation\SimulationLogFileInformation.h"
#include <memory>
#include <vector>
class TaylorGreenInformation : public LogFileInformationImp
class TaylorGreenInformation : public LogFileInformationImp, public SimulationLogFileInformation
{
public:
static std::shared_ptr<LogFileInformation> getNewInstance(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l);
static std::shared_ptr<TaylorGreenInformation> getNewInstance(double u0, double amplitude, std::vector< bool> tests, std::vector< double> l, int l0);
std::string getOutput();
std::string getFilePathExtension();
private:
TaylorGreenInformation() {};
TaylorGreenInformation(double u0, double amplitude, std::vector< bool> tests, std::vector< real> l);
TaylorGreenInformation(double u0, double amplitude, std::vector< bool> tests, std::vector< double> l, int l0);
double u0;
double amplitude;
std::vector< bool> tests;
std::vector< real> l;
std::vector< double> l;
int l0;
};
#endif
\ No newline at end of file
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