Make some changes

This commit is contained in:
2023-10-23 21:43:09 +02:00
parent 1eb386237a
commit 9cacf7bbc2
4 changed files with 158 additions and 79 deletions

View File

@@ -30,6 +30,9 @@
* */
class PenningTrap
{
/** @brief Make PenningTrapTest a friend of PenningTrap.
* */
friend class PenningTrapTest;
private:
double B_0; ///< Magnetic field strength
double V_0; ///< Applied potential
@@ -37,10 +40,16 @@ private:
double d; ///< Characteristic dimension
double t; ///< Current time
std::vector<Particle> particles; ///< The particles in the Penning trap
sim_arr k_v; ///< A 2D vector containing all \f$k_{i,j}\f$ where \f$j\f$ is
///< the index of a particle
sim_arr k_r; ///< A 2D vector containing all \f$k_{i,j}\f$ where \f$j\f$ is
///< the index of a particle
/** @brief A 2D vector containing all \f$k_{v,i,j}\f$ where \f$j\f$ is the
* index of a particle
* */
sim_arr k_v;
/** @brief A 2D vector containing all \f$k_{r,i,j}\f$ where \f$j\f$ is the
* index of a particle
* */
sim_arr k_r;
/** @brief Helper for evolve_RK4 when calculating \f$k_{v,i,j}\f$ values
*
@@ -122,6 +131,14 @@ private:
* */
vec3 total_force(uint i);
/** @brief calculate the total force on a particle p_i without interaction
*
* @param i The index of particle p_i
*
* @return vec3
* */
vec3 total_force_no_interaction(uint i);
public:
/** @brief Constructor for the PenningTrap class
*
@@ -229,7 +246,6 @@ public:
std::string method = "rk4",
bool particle_interaction = true);
friend class PenningTrapTest;
};
#endif