Decoupled the number of events simulated from
the timestep; Bug with density drawing present (if CPU syncs don't line up with the timestep)
This commit is contained in:
@@ -28,7 +28,7 @@ struct InjectorInfo {
|
||||
public:
|
||||
std::shared_ptr<species::TrackedSpecie> created_specie;
|
||||
std::shared_ptr<VelocityDistribution> creation_velocity_distribution;
|
||||
int multiplicity;
|
||||
// int multiplicity;
|
||||
};
|
||||
|
||||
class Injector {
|
||||
@@ -39,7 +39,8 @@ class Injector {
|
||||
std::shared_ptr<DriftVelocity> mother_drift_velocity);
|
||||
|
||||
std::vector<particle::Particle> rollNewParticles(std::mt19937* engine,
|
||||
const double current_time);
|
||||
const double current_time,
|
||||
const double beta_particle_weight);
|
||||
|
||||
// draw new particles from the DynamicDensityField of the provided specie
|
||||
// the new particles are then appened to the vector queue
|
||||
|
||||
@@ -36,11 +36,13 @@ class Simulation {
|
||||
void finalize();
|
||||
// cpu_syncs only included for debug purposes, e.g. only drawing decay particles
|
||||
// at the 0th timestep
|
||||
void processEvents(int events, int density_events, int cpu_syncs);
|
||||
void processEvents(int events, int density_events, int cpu_syncs,
|
||||
const double beta_particle_weight);
|
||||
void processUntilTermination(particle::Particle& particle);
|
||||
|
||||
private:
|
||||
std::vector<particle::Particle> determineInjectedParticles(RandomNumbers* random);
|
||||
std::vector<particle::Particle> determineInjectedParticles(RandomNumbers* random,
|
||||
const double beta_particle_weight);
|
||||
std::vector<particle::Particle>
|
||||
determineInjectedDensityParticles(RandomNumbers* random,
|
||||
const int numberParticlesToDraw, const int current,
|
||||
|
||||
Reference in New Issue
Block a user