Aktuelle Stand

This commit is contained in:
Christian
2018-09-26 15:12:27 +02:00
parent b702929cf7
commit bc6eb5cfbf
12 changed files with 367 additions and 241 deletions
+33 -16
View File
@@ -21,7 +21,6 @@
#include "parameter.h"
#include "katrin.h"
#include "particle.h"
#include "energyhisto.h"
class Simulation: public Parameter
@@ -31,33 +30,51 @@ public:
Simulation() {
numInjectedParticles = 0;
rngUni.seed(seed);
particleLogger.clear();
outputName = "TestRun";
// Check OutFile already existing? -no-> Create Outfile_1
// -yes-> Create Outfile_i+1
};
void init(void);
void doit(void);
void inject();
void output(void);
void move(double MFP,int queueNum=0);
bool movedOutside(int queueNum=0);
void moveToLocOfDeath(blitz::TinyVector<double,3> oldLoc, int queueNum=0);
double calcMFP();
protected:
Katrin KAT;
// Simulation Objects
Katrin Kat;
ranlib::Uniform<double> rngUni;
double t;
double id;
std::vector<Particle> particleQueue;
int numInjectedParticles;
std::vector<Particle> particleQueue, newParticles;
std::vector<Particle>::iterator particleQueueIt;
// Logging Objects
int step;
std::string outputName;
std::vector<std::string> particleLogger;
std::vector<Particle>::iterator particleLoggerIt;
std::ofstream outFile;
// Simulation Methods
Particle inject();
blitz::TinyVector<double,3> move(Particle inputParticle,double distance_m);
bool movedOutside(blitz::TinyVector<double,3> loc_m);
blitz::TinyVector<double,3> moveToLocOfDeath(Particle inputParticle);
// Logging Methods
void writeToLogger(Particle inputParticle);
void writeToFile(std::vector<Particle> *particleLogger);
// Cross Sections
double sigmaTot_m2(double Ekin_eV);
double sigmaEla_m2(double Ekin_eV);
double dSigmaEladOmega_m2 (double Ekin_eV, double Theta_rad, double Phi_rad);
};
#endif