Particles don't reset interaction between timesteps,
added possibility to stride the injection of new beta particles
This commit is contained in:
@@ -60,13 +60,10 @@ void Injector::initInjectionTimeDistribution(double delta_t) {
|
||||
std::vector<particle::Particle> Injector::rollNewParticles(
|
||||
std::mt19937* engine, const double current_time,
|
||||
const double beta_particle_weight) {
|
||||
// pull drawing from the position distribution into the "multiplicity" loop?
|
||||
// (would improve resolution stuff in space as well as just in velocity direction
|
||||
// especially for slow particles, i.e. ions)
|
||||
|
||||
std::vector<particle::Particle> new_particles;
|
||||
|
||||
const double time_birth = current_time - injection_time_distribution_(*engine);
|
||||
const double time_birth = injection_time_distribution_(*engine);
|
||||
|
||||
for (auto& injector_info : injector_infos_) {
|
||||
|
||||
@@ -76,12 +73,11 @@ std::vector<particle::Particle> Injector::rollNewParticles(
|
||||
std::to_string(position.cylinderEntries()(2)));
|
||||
#endif
|
||||
|
||||
// for (int i = 0; i < injector_info.multiplicity; i++) {
|
||||
new_particles.push_back(
|
||||
rollNewParticle(engine, position, injector_info.created_specie,
|
||||
injector_info.creation_velocity_distribution,
|
||||
time_birth, beta_particle_weight));
|
||||
// }
|
||||
new_particles.push_back(
|
||||
rollNewParticle(engine, position, injector_info.created_specie,
|
||||
injector_info.creation_velocity_distribution,
|
||||
time_birth, beta_particle_weight));
|
||||
|
||||
}
|
||||
return new_particles;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user