Coryab/code #11
@ -158,7 +158,7 @@ void PenningTrap::reinitialize(double f, double omega_V, double t)
|
||||
|
||||
for (size_t i = 0; i < this->particles.size(); i++) {
|
||||
p = &this->particles[i];
|
||||
p->v_vec = vec3().randn() * .1 * this->d;
|
||||
p->r_vec = vec3().randn() * .1 * this->d;
|
||||
p->v_vec = vec3().randn() * .1 * this->d;
|
||||
}
|
||||
}
|
||||
@ -172,6 +172,7 @@ void PenningTrap::evolve_RK4(double dt, bool particle_interaction)
|
||||
{
|
||||
Particle *p;
|
||||
|
||||
// Keep original particles
|
||||
std::vector<Particle> original_particles = this->particles;
|
||||
std::vector<Particle> tmp_particles = this->particles;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user