.TH "PenningTrap" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*- .ad l .nh .SH NAME PenningTrap \- A class that simulates a Penning trap\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBPenningTrap\fP (double \fBB_0\fP=\fBT\fP, double \fBV_0\fP=25\&.*\fBV\fP/1000\&., double \fBd\fP=500\&.)" .br .RI "Set B_0, V_0 and d\&. " .ti -1c .RI "void \fBadd_particle\fP (\fBParticle\fP particle)" .br .RI "Add a particle to the system\&. " .ti -1c .RI "arma::vec \fBexternal_E_field\fP (arma::vec r)" .br .RI "Calculate E at point r\&. " .ti -1c .RI "arma::vec \fBexternal_B_field\fP (arma::vec r)" .br .RI "Calculate B at point r\&. " .ti -1c .RI "arma::vec \fBforce_on_particle\fP (int i, int j)" .br .RI "Calculate the force between 2 particles\&. " .ti -1c .RI "arma::vec \fBtotal_force_external\fP (int i)" .br .RI "Calculate the total external force on a particle\&. " .ti -1c .RI "arma::vec \fBtotal_force_particles\fP (int i)" .br .RI "Calculate the total force on a particle from other particles\&. " .ti -1c .RI "arma::vec \fBtotal_force\fP (int i)" .br .RI "calculate the total force on a particle\&. " .ti -1c .RI "void \fBevolve_RK4\fP (double dt)" .br .RI "Go forward one timestep using the RK4 method\&. " .ti -1c .RI "void \fBevolve_forward_euler\fP (double dt)" .br .RI "Go forward one timestep using the forward Euler method\&. " .ti -1c .RI "arma::vec \fBget_particle\fP (int i)" .br .ti -1c .RI "double \fBget_d\fP ()" .br .in -1c .SS "Private Attributes" .in +1c .ti -1c .RI "double \fBB_0\fP" .br .RI "Magnetic field strength\&. " .ti -1c .RI "double \fBV_0\fP" .br .RI "Applied potential\&. " .ti -1c .RI "double \fBd\fP" .br .RI "Characteristic dimension\&. " .ti -1c .RI "std::vector< \fBParticle\fP > \fBparticles\fP" .br .RI "The particles in the Penning trap\&. " .in -1c .SH "Detailed Description" .PP A class that simulates a Penning trap\&. This class simulates a Penning trap\&. It can take in a number of particles and simulate how they would behave inside a Penning trap\&. .PP Definition at line \fB25\fP of file \fBPenningTrap\&.hpp\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "PenningTrap::PenningTrap (double B_0 = \fC\fBT\fP\fP, double V_0 = \fC25\&.*\fBV\fP/1000\&.\fP, double d = \fC500\&.\fP)" .PP Set B_0, V_0 and d\&. .PP Definition at line \fB26\fP of file \fBPenningTrap\&.cpp\fP\&. .SH "Member Function Documentation" .PP .SS "void PenningTrap::add_particle (\fBParticle\fP particle)" .PP Add a particle to the system\&. .PP Definition at line \fB33\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "void PenningTrap::evolve_forward_euler (double dt)" .PP Go forward one timestep using the forward Euler method\&. .PP Definition at line \fB121\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "void PenningTrap::evolve_RK4 (double dt)" .PP Go forward one timestep using the RK4 method\&. .PP Definition at line \fB116\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::external_B_field (arma::vec r)" .PP Calculate B at point r\&. .PP Definition at line \fB49\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::external_E_field (arma::vec r)" .PP Calculate E at point r\&. .PP Definition at line \fB38\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::force_on_particle (int i, int j)" .PP Calculate the force between 2 particles\&. Calculate the force exhibited on particle p_i from particle p_j\&. .PP Definition at line \fB59\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "double PenningTrap::get_d ()" .PP Definition at line \fB142\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::get_particle (int i)" .PP Definition at line \fB137\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::total_force (int i)" .PP calculate the total force on a particle\&. .PP Definition at line \fB111\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::total_force_external (int i)" .PP Calculate the total external force on a particle\&. Calculate the total amount of force that E and B exhibits on particle p_i\&. .PP Definition at line \fB74\fP of file \fBPenningTrap\&.cpp\fP\&. .SS "arma::vec PenningTrap::total_force_particles (int i)" .PP Calculate the total force on a particle from other particles\&. .PP Definition at line \fB92\fP of file \fBPenningTrap\&.cpp\fP\&. .SH "Member Data Documentation" .PP .SS "double PenningTrap::B_0\fC [private]\fP" .PP Magnetic field strength\&. .PP Definition at line \fB27\fP of file \fBPenningTrap\&.hpp\fP\&. .SS "double PenningTrap::d\fC [private]\fP" .PP Characteristic dimension\&. .PP Definition at line \fB29\fP of file \fBPenningTrap\&.hpp\fP\&. .SS "std::vector<\fBParticle\fP> PenningTrap::particles\fC [private]\fP" .PP The particles in the Penning trap\&. .PP Definition at line \fB30\fP of file \fBPenningTrap\&.hpp\fP\&. .SS "double PenningTrap::V_0\fC [private]\fP" .PP Applied potential\&. .PP Definition at line \fB28\fP of file \fBPenningTrap\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.