Injection stride on a per injected species basis

This commit is contained in:
2025-10-07 13:15:15 +02:00
parent 8425535f9d
commit 4a11245994
5 changed files with 116 additions and 134 deletions
+12 -5
View File
@@ -28,7 +28,9 @@ struct InjectorInfo {
public:
std::shared_ptr<species::TrackedSpecie> created_specie;
std::shared_ptr<VelocityDistribution> creation_velocity_distribution;
// int multiplicity;
double weight = 0;
int injection_group;
int injection_stride;
};
class Injector {
@@ -39,11 +41,16 @@ class Injector {
std::shared_ptr<DriftVelocity> mother_drift_velocity);
std::vector<particle::Particle> rollNewParticles(std::mt19937* engine,
const double current_time,
const double beta_particle_weight);
const int timestep);
// draw new particles from the DynamicDensityField of the provided specie
// the new particles are then appened to the vector queue
// physical_number: physical number of particles that are injected in one
// timestep
// numerical_number: number of numerical beta particles to be injected on
// a single process
void setWeights(const double physical_number, const int numerical_number);
// draw new particles from the DynamicDensityField of the provided specie,
// the new particles are then appened to the vector 'queue'
// the magnetic field is necessary for the determination of the direction of the
// injected particles
// the weight_factor scales the time a particle contributes to a certain bin