Particle base class More...
#include <particles.hpp>
Public Member Functions | |
particle_status_e | get_status () |
Return particle status. | |
void | set_status (particle_status_e status) |
Set particle status. | |
double | IQ () const |
Return current or charge carried by trajectory or particle cloud [A/C]. | |
double | q () const |
Return particle charge (q) [C]. | |
double | m () const |
Return particle mass (m) [kg]. | |
double | qm () const |
Return charge per mass ratio (q/m) [C/kg]. | |
void | save (std::ostream &s) const |
Saves data to stream. | |
Protected Member Functions | |
ParticleBase (double IQ, double q, double m) | |
ParticleBase (std::istream &s) | |
Constructor for loading particle from a file. | |
~ParticleBase () | |
Protected Attributes | |
particle_status_e | _status |
Status of particle. | |
double | _IQ |
Current or charge of particle. | |
double | _q |
Charge q [C]. | |
double | _m |
Mass m [kg]. |
Particle base class
A parent class for common (non-templated) parts of Particle classes.
ParticleBase::ParticleBase | ( | double | IQ, |
double | q, | ||
double | m | ||
) | [inline, protected] |
ParticleBase::ParticleBase | ( | std::istream & | s | ) | [inline, protected] |
Constructor for loading particle from a file.
ParticleBase::~ParticleBase | ( | ) | [inline, protected] |
particle_status_e ParticleBase::get_status | ( | ) | [inline] |
Return particle status.
double ParticleBase::IQ | ( | ) | const [inline] |
Return current or charge carried by trajectory or particle cloud [A/C].
With MODE_2D, this in A/m or C/m.
double ParticleBase::m | ( | void | ) | const [inline] |
Return particle mass (m) [kg].
double ParticleBase::q | ( | ) | const [inline] |
Return particle charge (q) [C].
double ParticleBase::qm | ( | ) | const [inline] |
Return charge per mass ratio (q/m) [C/kg].
void ParticleBase::save | ( | std::ostream & | s | ) | const [inline] |
Saves data to stream.
Reimplemented in Particle< PP >.
void ParticleBase::set_status | ( | particle_status_e | status | ) | [inline] |
Set particle status.
double ParticleBase::_IQ [protected] |
Current or charge of particle.
The sign is forced to be same as the sign of q/m.
In time-dependent simulations particles are localized and IQ is charge, in time-independent simulation IQ is current. In case of 2D simulations this is in units A/m or C/m. In 3D and cylindrically symmetric simulations unit is A or C.
double ParticleBase::_m [protected] |
Mass m [kg].
double ParticleBase::_q [protected] |
Charge q [C].
particle_status_e ParticleBase::_status [protected] |
Status of particle.