#include <particles.hpp>
Inheritance diagram for Particle< PP >:
Public Member Functions | |
Particle (double IQ, double q, double m, const PP &x) | |
Constructor for particle. | |
~Particle () | |
Destructor. | |
double & | operator() (int i) |
Operator for pointing to coordinate data. | |
const double & | operator() (int i) const |
Operator for pointing to coordinate data. | |
Vec3D | location () const |
Returns the location of particle in Vec3D. | |
Vec3D | velocity () const |
Returns the velocity of particle in Vec3D. | |
PP & | x () |
Return reference to coordinate data. | |
const PP & | x () const |
Return const reference to coordinate data. | |
PP & | traj (int i) |
Return reference to trajectory data. | |
const PP & | traj (int i) const |
Return const reference to trajectory data. | |
size_t | traj_size (void) const |
Return number of trajectory points of particle. | |
void | add_trajectory_point (const PP &x) |
Add trajectory point to the end of the trajectory. | |
void | copy_trajectory (const std::vector< PP > &traj) |
Define trajectory by copying. | |
void | clear_trajectory (void) |
Clears the particle trajectory. | |
void | debug_print (void) const |
Prints internal data to std::cout. |
Contains a templated description of one particle in some geometry. The geometry is selected throught templation, where PP is either ParticleP2D, ParticlePCyl or ParticleP3D. The particle classes for defined geometry modes can be used through defined types Particle2D, ParticleCyl and Particle3D.
Particle< PP >::Particle | ( | double | IQ, | |
double | q, | |||
double | m, | |||
const PP & | x | |||
) | [inline] |
Constructor for particle.
Make new particle with
IQ | Current or charge of the macroparticle (A/C). | |
q | charge state of microscopic particle (C). | |
m | mass of microscopic particle (kg). | |
x | particle coordinates (m and m/s). |
void Particle< PP >::add_trajectory_point | ( | const PP & | x | ) | [inline] |
Add trajectory point to the end of the trajectory.
void Particle< PP >::clear_trajectory | ( | void | ) | [inline] |
Clears the particle trajectory.
void Particle< PP >::copy_trajectory | ( | const std::vector< PP > & | traj | ) | [inline] |
Define trajectory by copying.
void Particle< PP >::debug_print | ( | void | ) | const [inline] |
Prints internal data to std::cout.
Returns the location of particle in Vec3D.
const double& Particle< PP >::operator() | ( | int | i | ) | const [inline] |
Operator for pointing to coordinate data.
double& Particle< PP >::operator() | ( | int | i | ) | [inline] |
Operator for pointing to coordinate data.
const PP& Particle< PP >::traj | ( | int | i | ) | const [inline] |
Return const reference to trajectory data.
PP& Particle< PP >::traj | ( | int | i | ) | [inline] |
Return reference to trajectory data.
size_t Particle< PP >::traj_size | ( | void | ) | const [inline] |
Return number of trajectory points of particle.
Returns the velocity of particle in Vec3D.
const PP& Particle< PP >::x | ( | ) | const [inline] |
Return const reference to coordinate data.
PP& Particle< PP >::x | ( | ) | [inline] |
Return reference to coordinate data.