Fixed to state that drawing from density works.

Some debugging elements not removed.
This commit is contained in:
2024-08-12 14:20:45 +02:00
parent b57f6ff201
commit 9dda12b60a
13 changed files with 100 additions and 31 deletions
+2 -1
View File
@@ -79,7 +79,7 @@ void Injector::rollNewParticleFromDensityField(std::mt19937* engine,
const double weight,
const double injection_time) {
blitz::TinyVector<double, 4> particle_specs =
specie->dynamicDensityField()->drawPositionAndEnergy(engine);
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)
@@ -89,6 +89,7 @@ void Injector::rollNewParticleFromDensityField(std::mt19937* engine,
}
DEBUG_LEVEL_3("Injected z position: " + std::to_string(particle_specs(2)));
DEBUG_LEVEL_3("Injected r position: " + std::to_string(particle_specs(0)));
const double v_abs = kinematic::velocity(particle_specs[3], specie->mass_kg());