From 28e9fcfe099dd5f9eb3421606d7ed9aed35ad0e1 Mon Sep 17 00:00:00 2001 From: Christian Sendlinger Date: Thu, 22 Feb 2024 15:29:31 +0100 Subject: [PATCH] Fixed bug in drift mover --- src/simulation/mover.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation/mover.cpp b/src/simulation/mover.cpp index dbead53..e526b42 100755 --- a/src/simulation/mover.cpp +++ b/src/simulation/mover.cpp @@ -208,10 +208,10 @@ void DriftMover::move(particle::Particle* particle, const double v_perp_norm = kinematic::norm(v_perp); const double gyro_radius = particle->mass_kg() * v_perp_norm / - (B_norm * std::abs(particle->charge_C())); + (B_norm * particle->charge_C()); const blitz::TinyVector velocity_normal = - (-1) * blitz::cross(v_parallel, v_perp); + (-1) * blitz::cross(B, v_perp); const blitz::TinyVector offset_to_gyro_center = gyro_radius * velocity_normal / kinematic::norm(velocity_normal);