This commit is contained in:
2023-10-17 17:01:50 +02:00
parent 95432102ea
commit 5ed7cedfae
26 changed files with 142 additions and 1779 deletions

View File

@@ -22,6 +22,11 @@
#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \
initializer(omp_priv = omp_orig)
typedef struct simulation {
sim_arr r_vecs;
sim_arr v_vecs;
} simulation_t;
/** @brief A class that simulates a Penning trap.
*
* This class simulates a Penning trap. It can take in a number of particles
@@ -188,9 +193,9 @@ public:
* @param method The method to use when moving forward a timestep
* @param particle_interaction Turn particle interactions on/off
* */
sim_arr simulate(double time, unsigned int steps,
std::string method = "rk4",
bool particle_interaction = true);
simulation_t simulate(double time, unsigned int steps,
std::string method = "rk4",
bool particle_interaction = true);
/** @brief Simulate and write the displacement of all particles to files.
*