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
This commit is contained in:
2026-01-27 14:19:44 +01:00
parent 32521298d4
commit 0a843f0a4c
8 changed files with 88 additions and 3 deletions
+10
View File
@@ -103,6 +103,12 @@ class Particle {
void deposited(bool truthValue=true);
bool wasDeposited();
void setLocalFields(const blitz::TinyVector<double,3>& E,
const blitz::TinyVector<double,3>& B);
blitz::TinyVector<double, 3> getLocalE() const;
blitz::TinyVector<double, 3> getLocalB() const;
bool areLocalFieldsSet() const;
// note: particle id is not being stored!
particle::SerializedParticle serialize();
@@ -113,11 +119,15 @@ class Particle {
CartesianCoordinate position_cart_;
CylinderCoordinate position_cyl_;
blitz::TinyVector<double, 3> local_E_cart_ = 0.;
blitz::TinyVector<double, 3> local_B_cart_ = 0.;
double time_alive_s_;
// double time_in_bin_s_;
long int interaction_counter_;
bool deposited_ = false;
bool set_local_fields_ = false;
// index of the interaction with the sortest distance (-1 if that's none of them)
int index_next_interaction_ = -1;
double time_until_collision_;