File Tracking Added.

This commit is contained in:
Christian
2018-10-11 14:00:40 +02:00
parent ab2bc174af
commit cf5cff083d
7 changed files with 88 additions and 181 deletions
+13 -22
View File
@@ -14,6 +14,9 @@
#include <deque>
#include <iostream>
#include <fstream>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include "blitz/array.h"
#include "blitz/tinyvec2.h"
#include <random/uniform.h>
@@ -23,6 +26,7 @@
#include "particle.h"
class Simulation: public Parameter
{
public:
@@ -30,46 +34,33 @@ public:
Simulation() {
numInjectedParticles = 0;
rngUni.seed(seed);
// Check OutFile already existing? -no-> Create Outfile_1
// -yes-> Create Outfile_i+1
initLogger();
};
void init(void);
void initLogger(void);
void doit(void);
protected:
// Simulation Objects
// Simulation
Katrin Kat;
ranlib::Uniform<double> rngUni;
int numInjectedParticles;
std::deque<Particle> particleQue;
// Simulation Methods
Particle inject();
bool move(Particle *inputParticle);
bool movedOutside(blitz::TinyVector<double,3> loc_m);
int getInteraction(Particle inPutParticle);
/*
// Logging Objects
int step;
std::string outputName;
std::vector<std::string> particleLogger;
std::vector<Particle>::iterator particleLoggerIt;
std::ofstream outFile;
// Logging Methods
void writeToLogger(Particle inputParticle);
void writeToFile(std::vector<Particle> *particleLogger);
*/
// Logging
std::vector<std::ofstream> outStream;
std::vector<double> zLogValues;
void logParticle(Particle *inputParticle,blitz::TinyVector<double,3> oldLoc_m);
std::string getTimeString();
};