Loading...
Searching...
No Matches
Particle.hpp
Go to the documentation of this file.
#ifndef __PARTICLE__
#define __PARTICLE__
#include <armadillo>
#include "constants.hpp"
#include "typedefs.hpp"
class Particle
{
private:
vec3 r_vec;
vec3 v_vec;
double q;
double m;
public:
Particle(vec3 r_vec, vec3 v_vec, double q = CA_CHARGE, double m = CA_MASS);
friend class PenningTrap;
};
#endif
Particle
A class that holds attributes of a particle.
Definition: Particle.hpp:23
Particle::r_vec
vec3 r_vec
position
Definition: Particle.hpp:25
Particle::v_vec
vec3 v_vec
velocity
Definition: Particle.hpp:26
Particle::q
double q
Charge.
Definition: Particle.hpp:27
Particle::m
double m
Mass.
Definition: Particle.hpp:28
PenningTrap
A class that simulates a Penning trap.
Definition: PenningTrap.hpp:32
constants.hpp
Library of constants.
CA_MASS
#define CA_MASS
Mass of a single calcium ion. unit: amu.
Definition: constants.hpp:29
CA_CHARGE
#define CA_CHARGE
Charge of a singly charged calcium ion. unit: e.
Definition: constants.hpp:33
typedefs.hpp
Useful typedefs for cleaner code.
vec3
arma::vec::fixed< 3 > vec3
Typedef for a fixed 3d arma vector.
Definition: typedefs.hpp:23