Basic changes for time resolution.
Input from json still suboptimal.
This commit is contained in:
@@ -35,7 +35,9 @@ class Injector {
|
||||
std::shared_ptr<EventPositionDistribution> position_distribution,
|
||||
std::shared_ptr<DriftVelocity> mother_drift_velocity);
|
||||
|
||||
std::vector<particle::Particle> rollNewParticles(std::mt19937* engine);
|
||||
std::vector<particle::Particle> rollNewParticles(std::mt19937* engine,
|
||||
const double current_time,
|
||||
const int time_resolution_events);
|
||||
double timePassed() const;
|
||||
|
||||
private:
|
||||
@@ -48,7 +50,8 @@ class Injector {
|
||||
std::mt19937* engine,
|
||||
const Coordinate& position,
|
||||
std::shared_ptr<species::TrackedSpecie> created_specie,
|
||||
std::shared_ptr<VelocityDistribution> creation_velocity_distribution);
|
||||
std::shared_ptr<VelocityDistribution> creation_velocity_distribution,
|
||||
const double time_birth);
|
||||
};
|
||||
|
||||
#endif /* INJECTOR_H */
|
||||
|
||||
@@ -14,7 +14,8 @@ class Particle {
|
||||
// Vector* velocity);
|
||||
Particle(std::shared_ptr<species::TrackedSpecie> specie,
|
||||
const Coordinate& position,
|
||||
const Vector& velocity);
|
||||
const Vector& velocity,
|
||||
const double time_birth);
|
||||
|
||||
void position(const Coordinate& new_position);
|
||||
CartesianCoordinate position() const;
|
||||
|
||||
@@ -34,13 +34,15 @@ class Simulation {
|
||||
void init(Parameter& parameter);
|
||||
void start();
|
||||
void finalize();
|
||||
void processEvents(int events);
|
||||
void processEvents(int events, std::vector<particle::Particle>& backup_queue,
|
||||
const int time_resolution_events);
|
||||
void processUntilTermination(particle::Particle& particle,
|
||||
std::vector<particle::Particle>& particle_queue);
|
||||
std::vector<particle::Particle>& particle_queue,
|
||||
std::vector<particle::Particle>& backup_queue);
|
||||
|
||||
private:
|
||||
std::vector<particle::Particle> determineInjectedParticles(
|
||||
RandomNumbers* random);
|
||||
RandomNumbers* random, const int time_resolution_events);
|
||||
|
||||
double meanFreePath(particle::Particle& particle, RandomNumbers* random);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "simulation/particle.h"
|
||||
|
||||
class Geometry;
|
||||
|
||||
class DynamicDensityField;
|
||||
class Terminator {
|
||||
public:
|
||||
Terminator(long int max_interactions,
|
||||
|
||||
Reference in New Issue
Block a user