42 lines
928 B
C++
42 lines
928 B
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>
|
|
|
|
/** @brief A class that holds attributes of a particle
|
|
* */
|
|
class Particle {
|
|
private:
|
|
double q; ///< Charge
|
|
double m; ///< Mass
|
|
arma::vec::fixed<3> r_vec; ///< position
|
|
arma::vec::fixed<3> v_vec; ///< velocity
|
|
|
|
public:
|
|
/** @brief Initialize the particle.
|
|
*
|
|
* @details Initialize the particle with a charge, mass, position and
|
|
* velocity.
|
|
* */
|
|
Particle(double q, double m,
|
|
arma::vec::fixed<3> r_vec,
|
|
arma::vec::fixed<3> v_vec);
|
|
|
|
/** @brief Make private attributes available for PenningTrap.
|
|
* */
|
|
friend class PenningTrap;
|
|
};
|
|
|
|
#endif
|