Coryab/implement penningtrap #3

Merged
coryab merged 20 commits from coryab/implement-Penningtrap into develop 2023-10-02 19:53:15 +00:00
Showing only changes of commit f1f1eecf07 - Show all commits

View File

@ -36,7 +36,14 @@ void PenningTrap::add_particle(Particle particle)
arma::vec PenningTrap::external_E_field(arma::vec r)
{
arma::vec::fixed<3> res;
double x = r(0), y = r(1), z = r(2);
double f = this->V_0/2*this->d*this->d;
res(0) = f*2*x;
res(1) = f*2*y;
res(2) = -f*4*z;
return res;
}
arma::vec PenningTrap::external_B_field(arma::vec r)