Coryab/implement penningtrap #3
1 changed files with 3 additions and 4 deletions
Correct external_B_field
commit
8d193cf469
|
|
@ -51,11 +51,10 @@ 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.;
|
||||
res(0) = 0.;
|
||||
res(1) = 0.;
|
||||
res(2) = this->B_0;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue