Files
csendlinger 0a843f0a4c Electric field only used at the position at the beginning of the timestep,
the magnetic field is not changed since its value does not depend on the
particles;
Added a reflector for both ends of the cylinder
2026-01-27 14:19:44 +01:00

39 lines
1.0 KiB
C++
Executable File

#ifndef REFLECTOR_H
#define REFLECTOR_H
#include "simulation/particle.h"
class Reflector {
public:
virtual bool needsReflectionBackToDomain(
const particle::Particle* particle) const = 0;
virtual void reflectBackToDomain(particle::Particle* particle) const = 0;
};
class ReflectorDPS : public Reflector {
public:
ReflectorDPS(double z_position_dps);
bool needsReflectionBackToDomain(const particle::Particle* particle) const;
void reflectBackToDomain(particle::Particle* particle) const;
private:
const double z_position_dps_;
};
class LongitudinalReflector : public Reflector {
public:
LongitudinalReflector(double height);
bool needsReflectionBackToDomain(const particle::Particle* particle) const;
void reflectBackToDomain(particle::Particle* particle) const;
private:
const double height_;
};
class NoReflector : public Reflector {
bool needsReflectionBackToDomain(const particle::Particle* particle) const;
void reflectBackToDomain(particle::Particle* particle) const;
};
#endif /* REFLECTOR_H */