47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
/** @file Particle.hpp
|
|
*
|
|
* @author Cory Alexander Balaton (coryab)
|
|
* @author Janita Ovidie Sandtrøen Willumsen (janitaws)
|
|
*
|
|
* @version 0.1
|
|
*
|
|
* @brief A class that holds the properties of a particle.
|
|
*
|
|
* @bug No known bugs
|
|
* */
|
|
#ifndef __PARTICLE__
|
|
#define __PARTICLE__
|
|
|
|
#include <armadillo>
|
|
|
|
#include "typedefs.hpp"
|
|
|
|
/** @brief A class that holds attributes of a particle
|
|
* */
|
|
class Particle {
|
|
private:
|
|
double q; ///< Charge
|
|
double m; ///< Mass
|
|
vec_3d r_vec; ///< position
|
|
vec_3d v_vec; ///< velocity
|
|
|
|
public:
|
|
/** @brief Initialize the particle.
|
|
*
|
|
* @details Initialize the particle with a charge, mass, position and
|
|
* velocity.
|
|
*
|
|
* @param q The charge of the particle
|
|
* @param m The mass of the particle
|
|
* @param r_vec The initial position of the particle
|
|
* @param v_vec The initial velocity of the particle
|
|
* */
|
|
Particle(double q, double m, vec_3d r_vec, vec_3d v_vec);
|
|
|
|
/** @brief Make private attributes available for PenningTrap.
|
|
* */
|
|
friend class PenningTrap;
|
|
};
|
|
|
|
#endif
|