Many, many more comments

This commit is contained in:
2024-12-04 17:15:04 +01:00
parent 8696517336
commit 03854339ca
100 changed files with 1702 additions and 49 deletions
+12
View File
@@ -3,18 +3,30 @@
#include "simulation/particle.h"
// defined in "simulation/geometry.h"
class Geometry;
// class for checking if a paricle has to be terminated due to
// any reason except interaction effects
class Terminator {
public:
// Constructor: takes the maximum number of interactions a particle is allowed to perform
// the maximum amount of time a paticle is allowed to live
// a Geometry object defining the boundaries of the volume particles are allowed to exist in
Terminator(long int max_interactions,
double max_time_alive,
std::shared_ptr<Geometry> geometry);
// check if particle has not reached the maximum interaction count, the maximal time its allowed to live
// and that it has not reached a geometry boundary
bool isAlive(const particle::Particle* particle) const;
// check if particle has crossed any boundary of the Geometry
bool leftSimulationDomain(const particle::Particle* particle) const;
// check if particle has reached the maximum interaction count
bool reachedMaxInteractions(const particle::Particle* particle) const;
// check if the particle has reached its maximum lifetime
bool reachedMaxTimeAlive(const particle::Particle* particle) const;
// return the maximum lifetime
double maxTimeAlive() const;
private: