Implement external_B_field

This commit is contained in:
Cory Balaton 2023-09-29 14:07:27 +02:00
parent f1f1eecf07
commit f2e9004f96
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B

View File

@ -48,7 +48,13 @@ arma::vec PenningTrap::external_E_field(arma::vec r)
arma::vec PenningTrap::external_B_field(arma::vec r)
{
double x = r(0), y = r(1);
arma::vec::fixed<3> res;
res(0) = y*this->B_0;
res(1) = -x*this->B_0;
res(2) = 0.;
return res;
}
arma::vec PenningTrap::force_on_particle(int i, int j)