Particle class in some geometry. More...
#include <particles.hpp>
Public Member Functions | |
Particle (double IQ, double q, double m, const PP &x) | |
Constructor for particle. More... | |
Particle (std::istream &s) | |
Constructor for loading particle from a file. More... | |
~Particle () | |
Destructor. More... | |
double & | operator() (int i) |
Operator for pointing to coordinate data. More... | |
const double & | operator() (int i) const |
Operator for pointing to coordinate data. More... | |
double & | operator[] (int i) |
Operator for pointing to coordinate data. More... | |
const double & | operator[] (int i) const |
Operator for pointing to coordinate data. More... | |
Vec3D | location () const |
Returns the location of particle in Vec3D. More... | |
Vec3D | velocity () const |
Returns the velocity of particle in Vec3D. More... | |
PP & | x () |
Return reference to coordinate data. More... | |
const PP & | x () const |
Return const reference to coordinate data. More... | |
PP & | traj (int i) |
Return reference to trajectory data. More... | |
const PP & | traj (int i) const |
Return const reference to trajectory data. More... | |
size_t | traj_size (void) const |
Return number of trajectory points of particle. More... | |
void | add_trajectory_point (const PP &x) |
Add trajectory point to the end of the trajectory. More... | |
void | copy_trajectory (const std::vector< PP > &traj) |
Define trajectory by copying. More... | |
void | clear_trajectory (void) |
Clears the particle trajectory. More... | |
void | save (std::ostream &s) const |
Saves data to stream. More... | |
void | debug_print (std::ostream &os) const |
Print debugging information to os. More... | |
![]() | |
particle_status_e | get_status () |
Return particle status. More... | |
void | set_status (particle_status_e status) |
Set particle status. More... | |
double | IQ () const |
Return current or charge carried by trajectory or particle cloud [A/C]. More... | |
double | q () const |
Return particle charge (q) [C]. More... | |
double | m () const |
Return particle mass (m) [kg]. More... | |
double | qm () const |
Return charge per mass ratio (q/m) [C/kg]. More... | |
void | save (std::ostream &s) const |
Saves data to stream. More... | |
Additional Inherited Members | |
![]() | |
ParticleBase (double IQ, double q, double m) | |
ParticleBase (std::istream &s) | |
Constructor for loading particle from a file. More... | |
~ParticleBase () | |
![]() | |
particle_status_e | _status |
Status of particle. More... | |
double | _IQ |
Current or charge of particle. More... | |
double | _q |
Charge q [C]. More... | |
double | _m |
Mass m [kg]. More... | |
Particle class in some geometry.
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.
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). |
Constructor for loading particle from a file.
|
inline |
Add trajectory point to the end of the trajectory.
|
inline |
Clears the particle trajectory.
|
inline |
Define trajectory by copying.
|
inline |
Print debugging information to os.
Returns the location of particle in Vec3D.
|
inline |
Operator for pointing to coordinate data.
|
inline |
Operator for pointing to coordinate data.
|
inline |
Operator for pointing to coordinate data.
|
inline |
Operator for pointing to coordinate data.
|
inline |
Saves data to stream.
|
inline |
Return reference to trajectory data.
|
inline |
Return const reference to trajectory data.
|
inline |
Return number of trajectory points of particle.
Returns the velocity of particle in Vec3D.
|
inline |
Return reference to coordinate data.
|
inline |
Return const reference to coordinate data.