Implement external_B_field
This commit is contained in:
parent
f1f1eecf07
commit
f2e9004f96
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user