small fixes and cosmetic changes

This commit is contained in:
2024-09-05 09:33:12 +02:00
parent 9c45fce644
commit 75bb2e4d85
11 changed files with 69 additions and 131 deletions
+5 -6
View File
@@ -80,7 +80,6 @@ void Injector::rollNewParticleFromDensityField(std::mt19937* engine,
const double injection_time) {
blitz::TinyVector<double, 4> particle_specs =
specie->densityForDrawing()->drawPositionAndEnergy(engine);
// blitz::TinyVector<double, 4> particle_specs(0.01, 0, 1, 1);
// check if density was empty (i.e. Energy component is 0)
if (particle_specs[3] == 0) {
@@ -97,7 +96,7 @@ void Injector::rollNewParticleFromDensityField(std::mt19937* engine,
const double theta = distribution(*engine) * 2 * M_PI;
const double phi = std::acos(1. - 2.*distribution(*engine));
// for now draw the particles with an isotropic velocity distribution,
// for now, draw the particles with an isotropic velocity distribution,
// is not realistic but as of now there is no information about the
// velocity vector distribution in the respective cell
blitz::TinyVector<double, 3> v_normal(std::cos(theta) * std::sin(phi),
@@ -105,11 +104,11 @@ void Injector::rollNewParticleFromDensityField(std::mt19937* engine,
std::cos(phi));
particle::Particle drawn_particle(specie, CylinderCoordinate(
blitz::TinyVector<double, 3>(particle_specs[0],
particle_specs[1], particle_specs[2])),
CartesianVector(v_normal*v_abs), injection_time, weight);
blitz::TinyVector<double, 3>(particle_specs[0],
particle_specs[1], particle_specs[2])),
CartesianVector(v_normal*v_abs), injection_time, weight);
queue.push_back(drawn_particle);
queue.push_back(drawn_particle);
}
double Injector::timePassed() const {