diff --git a/docs/PenningTrap_8cpp.html b/docs/PenningTrap_8cpp.html
index e66d85b..ceb79d5 100644
--- a/docs/PenningTrap_8cpp.html
+++ b/docs/PenningTrap_8cpp.html
@@ -104,7 +104,12 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp.html',''); initResiza
The implementation of the PenningTrap class.
More...
-#include "PenningTrap.hpp"
+
#include "utils.hpp"
+
#include "PenningTrap.hpp"
+
#include "constants.hpp"
+
#include <algorithm>
+
#include <stdexcept>
+
#include <omp.h>
Go to the source code of this file.
@@ -114,15 +119,7 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp.html',''); initResiza
Janita Ovidie Sandtrøen Willumsen (janitaws)
- Version
- 0.1
- Bug:
- No known bugs
-
- Todo:
Implement constructor
-Implement add_particle
-Implement external_E_field
-Implement external_B_field
-Implement force_on_particle
-Implement total_force_external
-Implement total_force_particles
-Implement total_force
-Implement evolve_RK4
+- Todo:
Implement evolve_RK4
Implement evolve_forward_euler
diff --git a/docs/PenningTrap_8cpp_source.html b/docs/PenningTrap_8cpp_source.html
index a4eb76f..0be7c11 100644
--- a/docs/PenningTrap_8cpp_source.html
+++ b/docs/PenningTrap_8cpp_source.html
@@ -102,69 +102,159 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp_source.html',''); ini
Go to the documentation of this file.
-
+
+
+
+
+
+
+
+
23#pragma omp declare reduction( + : arma::vec : omp_out += omp_in ) \
+
24 initializer( omp_priv = omp_orig )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
40 arma::vec::fixed<3> res;
+
41 double f = this->
V_0/(this->
d*this->
d);
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
51 arma::vec::fixed<3> res;
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
62 arma::vec::fixed<3> res = this->
particles.at(i).r_vec
+
+
+
+
66 double norm = arma::norm(res);
+
+
+
69 res *= this->
particles.at(j).q/(norm*norm*norm);
-
-
+
+
-
+
+
+
+
+
78 arma::vec::fixed<3> v_cross_B;
+
+
+
+
82 v_cross_B(0) = p.
v_vec(1)*B(2) - p.
v_vec(2)*B(1);
+
83 v_cross_B(1) = p.
v_vec(2)*B(0) - p.
v_vec(0)*B(2);
+
84 v_cross_B(2) = p.
v_vec(0)*B(1) - p.
v_vec(1)*B(0);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
98 for (
int j=0; j < this->
particles.size(); j++) {
+
+
+
+
+
+
+
+
106 res *=
K_E*(p.
q/p.
m);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
123 std::vector<Particle> new_state = this->
particles;
+
+
+
+
127 #pragma omp parallel for private(p)
+
128 for (
int i=0; i < this->
particles.size(); i++) {
+
129 p = &new_state.at(i);
+
+
+
+
+
+
+
+
137arma::vec PenningTrap::get_particle(
int i)
+
+
+
+
+
142double PenningTrap::get_d()
+
+
+
A class for simulating a Penning trap.
A class that holds attributes of a particle.
-
arma::vec total_force_external(int i)
Calculate the total external force on a particle.
-
arma::vec total_force_particles(int i)
Calculate the total force on a particle from other particles.
-
arma::vec external_B_field(arma::vec r)
Calculate B at point r.
-
arma::vec force_on_particle(int i, int j)
Calculate the force between 2 particles.
-
void evolve_forward_euler(double dt)
Go forward one timestep using the forward Euler method.
-
void add_particle(Particle particle)
Add a particle to the system.
+
arma::vec::fixed< 3 > v_vec
velocity
+
+
arma::vec::fixed< 3 > r_vec
position
+
+
std::vector< Particle > particles
The particles in the Penning trap.
+
arma::vec total_force_external(int i)
Calculate the total external force on a particle.
+
double B_0
Magnetic field strength.
+
arma::vec total_force_particles(int i)
Calculate the total force on a particle from other particles.
+
arma::vec external_B_field(arma::vec r)
Calculate B at point r.
+
arma::vec force_on_particle(int i, int j)
Calculate the force between 2 particles.
+
void evolve_forward_euler(double dt)
Go forward one timestep using the forward Euler method.
+
double d
Characteristic dimension.
+
void add_particle(Particle particle)
Add a particle to the system.
+
double V_0
Applied potential.
PenningTrap(double B_0=T, double V_0=25.*V/1000., double d=500.)
Set B_0, V_0 and d.
-
arma::vec total_force(int i)
calculate the total force on a particle.
-
arma::vec external_E_field(arma::vec r)
Calculate E at point r.
-
void evolve_RK4(double dt)
Go forward one timestep using the RK4 method.
+
arma::vec total_force(int i)
calculate the total force on a particle.
+
arma::vec external_E_field(arma::vec r)
Calculate E at point r.
+
void evolve_RK4(double dt)
Go forward one timestep using the RK4 method.
+
+
#define K_E
Coulomb constant. unit: .
+
Function prototypes and macros that are useful.
diff --git a/docs/PenningTrap_8hpp_source.html b/docs/PenningTrap_8hpp_source.html
index 6ed7402..b8a0d43 100644
--- a/docs/PenningTrap_8hpp_source.html
+++ b/docs/PenningTrap_8hpp_source.html
@@ -137,25 +137,29 @@ $(document).ready(function(){initNavTree('PenningTrap_8hpp_source.html',''); ini
-
-
-
+
+ 79 arma::vec get_particle(
int i);
+
+
+
+
+
A class that holds the properties of a particle.
A class that holds attributes of a particle.
A class that simulates a Penning trap.
std::vector< Particle > particles
The particles in the Penning trap.
-arma::vec total_force_external(int i)
Calculate the total external force on a particle.
+arma::vec total_force_external(int i)
Calculate the total external force on a particle.
double B_0
Magnetic field strength.
-arma::vec total_force_particles(int i)
Calculate the total force on a particle from other particles.
-arma::vec external_B_field(arma::vec r)
Calculate B at point r.
-arma::vec force_on_particle(int i, int j)
Calculate the force between 2 particles.
-void evolve_forward_euler(double dt)
Go forward one timestep using the forward Euler method.
+arma::vec total_force_particles(int i)
Calculate the total force on a particle from other particles.
+arma::vec external_B_field(arma::vec r)
Calculate B at point r.
+arma::vec force_on_particle(int i, int j)
Calculate the force between 2 particles.
+void evolve_forward_euler(double dt)
Go forward one timestep using the forward Euler method.
double d
Characteristic dimension.
-void add_particle(Particle particle)
Add a particle to the system.
+void add_particle(Particle particle)
Add a particle to the system.
double V_0
Applied potential.
-arma::vec total_force(int i)
calculate the total force on a particle.
-arma::vec external_E_field(arma::vec r)
Calculate E at point r.
-void evolve_RK4(double dt)
Go forward one timestep using the RK4 method.
+arma::vec total_force(int i)
calculate the total force on a particle.
+arma::vec external_E_field(arma::vec r)
Calculate E at point r.
+void evolve_RK4(double dt)
Go forward one timestep using the RK4 method.
diff --git a/docs/classPenningTrap-members.html b/docs/classPenningTrap-members.html
index dd46fd6..5a26d52 100644
--- a/docs/classPenningTrap-members.html
+++ b/docs/classPenningTrap-members.html
@@ -112,6 +112,8 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
| external_B_field(arma::vec r) | PenningTrap | |
| external_E_field(arma::vec r) | PenningTrap | |
| force_on_particle(int i, int j) | PenningTrap | |
+ | get_d() (defined in PenningTrap) | PenningTrap | |
+ | get_particle(int i) (defined in PenningTrap) | PenningTrap | |
| particles | PenningTrap | private |
| PenningTrap(double B_0=T, double V_0=25.*V/1000., double d=500.) | PenningTrap | |
| total_force(int i) | PenningTrap | |
diff --git a/docs/classPenningTrap.html b/docs/classPenningTrap.html
index fcbbf79..7809dc2 100644
--- a/docs/classPenningTrap.html
+++ b/docs/classPenningTrap.html
@@ -143,6 +143,10 @@ Public Member Functions
| void | evolve_forward_euler (double dt) |
| | Go forward one timestep using the forward Euler method.
|
| |
+| arma::vec | get_particle (int i) |
+| |
+| double | get_d () |
+| |
|
@@ -222,7 +226,7 @@ Private Attributes
Add a particle to the system.
-Definition at line 31 of file PenningTrap.cpp.
+Definition at line 33 of file PenningTrap.cpp.
@@ -244,7 +248,7 @@ Private Attributes
Go forward one timestep using the forward Euler method.
-Definition at line 71 of file PenningTrap.cpp.
+Definition at line 121 of file PenningTrap.cpp.
@@ -266,7 +270,7 @@ Private Attributes
Go forward one timestep using the RK4 method.
-Definition at line 66 of file PenningTrap.cpp.
+Definition at line 116 of file PenningTrap.cpp.
@@ -288,7 +292,7 @@ Private Attributes
Calculate B at point r.
-Definition at line 41 of file PenningTrap.cpp.
+Definition at line 49 of file PenningTrap.cpp.
@@ -310,7 +314,7 @@ Private Attributes
Calculate E at point r.
-Definition at line 36 of file PenningTrap.cpp.
+Definition at line 38 of file PenningTrap.cpp.
@@ -343,7 +347,46 @@ Private Attributes
Calculate the force between 2 particles.
Calculate the force exhibited on particle p_i from particle p_j.
-Definition at line 46 of file PenningTrap.cpp.
+Definition at line 59 of file PenningTrap.cpp.
+
+
+
+
+◆ get_d()
+
+
+
+
+
+ | double PenningTrap::get_d |
+ ( |
+ | ) |
+ |
+
+
+
+
+
+◆ get_particle()
+
+
+
+
+
+ | arma::vec PenningTrap::get_particle |
+ ( |
+ int |
+ i | ) |
+ |
+
+
+
@@ -365,7 +408,7 @@ Private Attributes
calculate the total force on a particle.
-Definition at line 61 of file PenningTrap.cpp.
+Definition at line 111 of file PenningTrap.cpp.
@@ -388,7 +431,7 @@ Private Attributes
Calculate the total external force on a particle.
Calculate the total amount of force that E and B exhibits on particle p_i.
-Definition at line 51 of file PenningTrap.cpp.
+Definition at line 74 of file PenningTrap.cpp.
@@ -410,7 +453,7 @@ Private Attributes
Calculate the total force on a particle from other particles.
-Definition at line 56 of file PenningTrap.cpp.
+Definition at line 92 of file PenningTrap.cpp.
diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html
index fe23dd4..2f63e67 100644
--- a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html
+++ b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html
@@ -113,6 +113,8 @@ Files
| file | PenningTrap.cpp [code] |
| | The implementation of the PenningTrap class.
|
| |
+| file | test.py [code] |
+| |
| file | test_suite.cpp [code] |
| | The test suite for the project.
|
| |
diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js
index 17c90f6..f72184d 100644
--- a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js
+++ b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js
@@ -3,6 +3,7 @@ var dir_68267d1309a1af8e8297ef4c3efbcdba =
[ "main.cpp", "main_8cpp.html", null ],
[ "Particle.cpp", "Particle_8cpp.html", null ],
[ "PenningTrap.cpp", "PenningTrap_8cpp.html", null ],
+ [ "test.py", "test_8py_source.html", null ],
[ "test_suite.cpp", "test__suite_8cpp.html", null ],
[ "utils.cpp", "utils_8cpp.html", "utils_8cpp" ]
];
\ No newline at end of file
diff --git a/docs/files.html b/docs/files.html
index a998ae5..f3ab17f 100644
--- a/docs/files.html
+++ b/docs/files.html
@@ -112,8 +112,9 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
| main.cpp | The main program for this project |
| Particle.cpp | The implementation of the Particle class |
| PenningTrap.cpp | The implementation of the PenningTrap class |
-| test_suite.cpp | The test suite for the project |
-| utils.cpp | Implementation of the utils |
+| test.py | |
+| test_suite.cpp | The test suite for the project |
+| utils.cpp | Implementation of the utils |
diff --git a/docs/main_8cpp.html b/docs/main_8cpp.html
index cf16990..d86dfaa 100644
--- a/docs/main_8cpp.html
+++ b/docs/main_8cpp.html
@@ -99,6 +99,7 @@ $(document).ready(function(){initNavTree('main_8cpp.html',''); initResizable();
@@ -106,11 +107,30 @@ $(document).ready(function(){initNavTree('main_8cpp.html',''); initResizable();
The main program for this project.
More...
-
+#include <filesystem>
+
#include <fstream>
+
#include <string>
+
#include <omp.h>
+
#include <sys/stat.h>
+
#include "PenningTrap.hpp"
+
Go to the source code of this file.
@@ -123,7 +143,91 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)
- Bug:
- No known bugs
Definition in file main.cpp.
-
+
+
+◆ CHARGE
+
+
+
+
+
+ | #define CHARGE 1. |
+
+
+
+
+
+◆ MASS
+
+
+
+
+
+
+
+◆ PARTICLES
+
+
+
+
+
+ | #define PARTICLES 100 |
+
+
+
+
+
+
+◆ euler_100_particles()
+
+
+
+
+
+ | void euler_100_particles |
+ ( |
+ | ) |
+ |
+
+
+
+
◆ main()
@@ -139,7 +243,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)
diff --git a/docs/main_8cpp_source.html b/docs/main_8cpp_source.html
index bf66ff8..3cc7c06 100644
--- a/docs/main_8cpp_source.html
+++ b/docs/main_8cpp_source.html
@@ -102,10 +102,87 @@ $(document).ready(function(){initNavTree('main_8cpp_source.html',''); initResiza
Go to the documentation of this file.
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
26void euler_100_particles()
+
+
+
+
+
31 for (
int i=0; i < PARTICLES; i++) {
+
32 arma::vec r = arma::vec(3).randn() * 0.1 * trap.get_d();
+
33 arma::vec v = arma::vec(3).randn() * 0.1 * trap.get_d();
+
+
+
+
+
38 double dt = time / (double) N;
+
+
40 auto res =
new arma::vec::fixed<3>[PARTICLES][N];
+
+
+
+
+
45 for (
int j=0; j < N; j++) {
+
46 #pragma omp parallel for
+
47 for (
int i=0; i < PARTICLES; i++) {
+
48 res[i][j] = trap.get_particle(i);
+
+
+
+
+
53 std::cout << counter << std::endl;
+
+
55 arma::vec::fixed<3>* cur_row;
+
56 arma::vec::fixed<3> cur_elem;
+
+
58 mkdir(
"output", 0777);
+
+
+
+
+
63 #pragma omp parallel for private(cur_row, cur_elem, ofile)
+
64 for (
int i=0; i < PARTICLES; i++) {
+
+
66 ofile.open(
"output/p" + std::to_string(i) +
".txt");
+
67 for (
int j=0; j < N; j++) {
+
68 cur_elem = cur_row[j];
+
69 ofile << cur_elem(0) <<
","
+
+
71 << cur_elem(2) <<
"\n";
+
+
+
+
+
+
+
+
79 double start = omp_get_wtime();
+
+
81 euler_100_particles();
+
+
83 double end = omp_get_wtime();
+
+
85 std::cout <<
"Time: " << end - start <<
" seconds" << std::endl;
+
+
+
+
A class for simulating a Penning trap.
+
A class that holds attributes of a particle.
+
A class that simulates a Penning trap.
+
void evolve_forward_euler(double dt)
Go forward one timestep using the forward Euler method.
+
void add_particle(Particle particle)
Add a particle to the system.
diff --git a/docs/navtreeindex0.js b/docs/navtreeindex0.js
index 6d8de5d..75ec38f 100644
--- a/docs/navtreeindex0.js
+++ b/docs/navtreeindex0.js
@@ -53,13 +53,14 @@ var NAVTREEINDEX0 =
"main_8cpp.html":[4,0,1,0],
"main_8cpp_source.html":[4,0,1,0],
"pages.html":[],
-"test__suite_8cpp.html":[4,0,1,3],
-"test__suite_8cpp_source.html":[4,0,1,3],
+"test_8py_source.html":[4,0,1,3],
+"test__suite_8cpp.html":[4,0,1,4],
+"test__suite_8cpp_source.html":[4,0,1,4],
"todo.html":[2],
-"utils_8cpp.html":[4,0,1,4],
-"utils_8cpp.html#a58565270b643b24e3132f38c653e0199":[4,0,1,4,0],
-"utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[4,0,1,4,1],
-"utils_8cpp_source.html":[4,0,1,4],
+"utils_8cpp.html":[4,0,1,5],
+"utils_8cpp.html#a58565270b643b24e3132f38c653e0199":[4,0,1,5,0],
+"utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[4,0,1,5,1],
+"utils_8cpp_source.html":[4,0,1,5],
"utils_8hpp.html":[4,0,0,3],
"utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d":[4,0,0,3,1],
"utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384":[4,0,0,3,2],
diff --git a/docs/test_8py_source.html b/docs/test_8py_source.html
new file mode 100644
index 0000000..17942db
--- /dev/null
+++ b/docs/test_8py_source.html
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+Penning Trap Simulation: src/test.py Source File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ Penning Trap Simulation
+
+ Simulate particle behavior inside a Penning Trap
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
1import matplotlib.pyplot
as plt
+
+
3from mpl_toolkits.mplot3d
import Axes3D
+
4from matplotlib
import animation
+
+
+
+
+
+
+
+
+
+
14 xi,yi,zi = map(
lambda x: float(x), line.strip().split(
","))
+
+
+
+
+
+
+
+
22def update(num, lines, arr):
+
23 for line, a
in zip(lines, arr):
+
24 line.set_data(a[:2, num])
+
25 line.set_3d_properties(a[2, num])
+
+
+
+
+
+
31 ax = fig.add_subplot(projection=
"3d")
+
+
+
34 arr = get_data([f
"output/p{i}.txt" for i
in range(100)])
+
+
+
+
+
+
40 lines = [ax.plot(*a[:,1],
"o")[0]
for a
in arr]
+
+
42 ax.set_xlim3d([-500.0, 500.0])
+
+
+
45 ax.set_ylim3d([-500.0, 500.0])
+
+
+
48 ax.set_zlim3d([-500.0, 500.0])
+
+
+
51 ani = animation.FuncAnimation(fig, update, N, fargs=(lines, arr),
+
+
+
+
+
+
+
+
+
60if __name__ ==
"__main__":
+
+
+
+
+
+
+
+
+
diff --git a/docs/todo.html b/docs/todo.html
index c4ad491..b6363dc 100644
--- a/docs/todo.html
+++ b/docs/todo.html
@@ -103,23 +103,7 @@ $(document).ready(function(){initNavTree('todo.html',''); initResizable(); });
- File PenningTrap.cpp
-Implement constructor
-
-Implement add_particle
-
-Implement external_E_field
-
-Implement external_B_field
-
-Implement force_on_particle
-
-Implement total_force_external
-
-Implement total_force_particles
-
-Implement total_force
-
-Implement evolve_RK4
+Implement evolve_RK4
Implement evolve_forward_euler
diff --git a/man_pages/man3/Particle.3 b/man_pages/man3/Particle.3
index f882401..db9056a 100644
--- a/man_pages/man3/Particle.3
+++ b/man_pages/man3/Particle.3
@@ -1,4 +1,4 @@
-.TH "Particle" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "Particle" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/Particle.cpp.3 b/man_pages/man3/Particle.cpp.3
index 3116a7f..2799e38 100644
--- a/man_pages/man3/Particle.cpp.3
+++ b/man_pages/man3/Particle.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/Particle.cpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/Particle.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/Particle.hpp.3 b/man_pages/man3/Particle.hpp.3
index dd3470d..2a5a85e 100644
--- a/man_pages/man3/Particle.hpp.3
+++ b/man_pages/man3/Particle.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/Particle.hpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/Particle.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/PenningTrap.3 b/man_pages/man3/PenningTrap.3
index 5511293..42c26cf 100644
--- a/man_pages/man3/PenningTrap.3
+++ b/man_pages/man3/PenningTrap.3
@@ -1,4 +1,4 @@
-.TH "PenningTrap" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "PenningTrap" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -52,6 +52,12 @@ PenningTrap \- A class that simulates a Penning trap\&.
.RI "void \fBevolve_forward_euler\fP (double dt)"
.br
.RI "Go forward one timestep using the forward Euler method\&. "
+.ti -1c
+.RI "arma::vec \fBget_particle\fP (int i)"
+.br
+.ti -1c
+.RI "double \fBget_d\fP ()"
+.br
.in -1c
.SS "Private Attributes"
@@ -95,55 +101,63 @@ Definition at line \fB26\fP of file \fBPenningTrap\&.cpp\fP\&.
.PP
Add a particle to the system\&.
.PP
-Definition at line \fB31\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB33\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "void PenningTrap::evolve_forward_euler (double dt)"
.PP
Go forward one timestep using the forward Euler method\&.
.PP
-Definition at line \fB71\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB121\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "void PenningTrap::evolve_RK4 (double dt)"
.PP
Go forward one timestep using the RK4 method\&.
.PP
-Definition at line \fB66\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB116\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::external_B_field (arma::vec r)"
.PP
Calculate B at point r\&.
.PP
-Definition at line \fB41\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB49\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::external_E_field (arma::vec r)"
.PP
Calculate E at point r\&.
.PP
-Definition at line \fB36\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB38\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::force_on_particle (int i, int j)"
.PP
Calculate the force between 2 particles\&. Calculate the force exhibited on particle p_i from particle p_j\&.
.PP
-Definition at line \fB46\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB59\fP of file \fBPenningTrap\&.cpp\fP\&.
+.SS "double PenningTrap::get_d ()"
+
+.PP
+Definition at line \fB142\fP of file \fBPenningTrap\&.cpp\fP\&.
+.SS "arma::vec PenningTrap::get_particle (int i)"
+
+.PP
+Definition at line \fB137\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::total_force (int i)"
.PP
calculate the total force on a particle\&.
.PP
-Definition at line \fB61\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB111\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::total_force_external (int i)"
.PP
Calculate the total external force on a particle\&. Calculate the total amount of force that E and B exhibits on particle p_i\&.
.PP
-Definition at line \fB51\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB74\fP of file \fBPenningTrap\&.cpp\fP\&.
.SS "arma::vec PenningTrap::total_force_particles (int i)"
.PP
Calculate the total force on a particle from other particles\&.
.PP
-Definition at line \fB56\fP of file \fBPenningTrap\&.cpp\fP\&.
+Definition at line \fB92\fP of file \fBPenningTrap\&.cpp\fP\&.
.SH "Member Data Documentation"
.PP
.SS "double PenningTrap::B_0\fC [private]\fP"
diff --git a/man_pages/man3/PenningTrap.cpp.3 b/man_pages/man3/PenningTrap.cpp.3
index bcd7ee7..fecf53b 100644
--- a/man_pages/man3/PenningTrap.cpp.3
+++ b/man_pages/man3/PenningTrap.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/PenningTrap.cpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/PenningTrap.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,8 +7,18 @@ src/PenningTrap.cpp \- The implementation of the \fBPenningTrap\fP class\&.
.SH SYNOPSIS
.br
.PP
+\fC#include 'utils\&.hpp'\fP
+.br
\fC#include 'PenningTrap\&.hpp'\fP
.br
+\fC#include 'constants\&.hpp'\fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
.SH "Detailed Description"
.PP
@@ -37,22 +47,6 @@ No known bugs
.PP
\fBTodo\fP
.RS 4
-Implement constructor
-.PP
-Implement add_particle
-.PP
-Implement external_E_field
-.PP
-Implement external_B_field
-.PP
-Implement force_on_particle
-.PP
-Implement total_force_external
-.PP
-Implement total_force_particles
-.PP
-Implement total_force
-.PP
Implement evolve_RK4
.PP
Implement evolve_forward_euler
diff --git a/man_pages/man3/PenningTrap.hpp.3 b/man_pages/man3/PenningTrap.hpp.3
index c115455..4d434f2 100644
--- a/man_pages/man3/PenningTrap.hpp.3
+++ b/man_pages/man3/PenningTrap.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/PenningTrap.hpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/PenningTrap.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/bug.3 b/man_pages/man3/bug.3
index 77546ad..0362f46 100644
--- a/man_pages/man3/bug.3
+++ b/man_pages/man3/bug.3
@@ -1,4 +1,4 @@
-.TH "bug" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "bug" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/constants.hpp.3 b/man_pages/man3/constants.hpp.3
index 9db21e3..2002a1b 100644
--- a/man_pages/man3/constants.hpp.3
+++ b/man_pages/man3/constants.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/constants.hpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/constants.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/main.cpp.3 b/man_pages/man3/main.cpp.3
index ef000f5..4cab7a6 100644
--- a/man_pages/man3/main.cpp.3
+++ b/man_pages/man3/main.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/main.cpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/main.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,10 +7,42 @@ src/main.cpp \- The main program for this project\&.
.SH SYNOPSIS
.br
.PP
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+\fC#include \fP
+.br
+\fC#include 'PenningTrap\&.hpp'\fP
+.br
+
+.SS "Macros"
+
+.in +1c
+.ti -1c
+.RI "#define \fBPARTICLES\fP 100"
+.br
+.ti -1c
+.RI "#define \fBN\fP 10000"
+.br
+.ti -1c
+.RI "#define \fBCHARGE\fP 1\&."
+.br
+.ti -1c
+.RI "#define \fBMASS\fP 40\&."
+.br
+.in -1c
.SS "Functions"
.in +1c
.ti -1c
+.RI "void \fBeuler_100_particles\fP ()"
+.br
+.ti -1c
.RI "int \fBmain\fP ()"
.br
.in -1c
@@ -41,12 +73,34 @@ No known bugs
.PP
Definition in file \fBmain\&.cpp\fP\&.
+.SH "Macro Definition Documentation"
+.PP
+.SS "#define CHARGE 1\&."
+
+.PP
+Definition at line \fB23\fP of file \fBmain\&.cpp\fP\&.
+.SS "#define MASS 40\&."
+
+.PP
+Definition at line \fB24\fP of file \fBmain\&.cpp\fP\&.
+.SS "#define N 10000"
+
+.PP
+Definition at line \fB22\fP of file \fBmain\&.cpp\fP\&.
+.SS "#define PARTICLES 100"
+
+.PP
+Definition at line \fB21\fP of file \fBmain\&.cpp\fP\&.
.SH "Function Documentation"
.PP
+.SS "void euler_100_particles ()"
+
+.PP
+Definition at line \fB26\fP of file \fBmain\&.cpp\fP\&.
.SS "int main ()"
.PP
-Definition at line \fB13\fP of file \fBmain\&.cpp\fP\&.
+Definition at line \fB77\fP of file \fBmain\&.cpp\fP\&.
.SH "Author"
.PP
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
diff --git a/man_pages/man3/test_suite.cpp.3 b/man_pages/man3/test_suite.cpp.3
index 670feba..35cfa4b 100644
--- a/man_pages/man3/test_suite.cpp.3
+++ b/man_pages/man3/test_suite.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/test_suite.cpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/test_suite.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/todo.3 b/man_pages/man3/todo.3
index 2073548..c342666 100644
--- a/man_pages/man3/todo.3
+++ b/man_pages/man3/todo.3
@@ -1,4 +1,4 @@
-.TH "todo" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "todo" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -6,30 +6,6 @@ todo \- Todo List
.PP
.IP "\fBFile \fBPenningTrap\&.cpp\fP \fP" 1c
-Implement constructor
-.PP
-.PP
-Implement add_particle
-.PP
-.PP
-Implement external_E_field
-.PP
-.PP
-Implement external_B_field
-.PP
-.PP
-Implement force_on_particle
-.PP
-.PP
-Implement total_force_external
-.PP
-.PP
-Implement total_force_particles
-.PP
-.PP
-Implement total_force
-.PP
-.PP
Implement evolve_RK4
.PP
.PP
diff --git a/man_pages/man3/utils.cpp.3 b/man_pages/man3/utils.cpp.3
index 41031ad..910bd0a 100644
--- a/man_pages/man3/utils.cpp.3
+++ b/man_pages/man3/utils.cpp.3
@@ -1,4 +1,4 @@
-.TH "src/utils.cpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "src/utils.cpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man_pages/man3/utils.hpp.3 b/man_pages/man3/utils.hpp.3
index 6ce37f1..76556bd 100644
--- a/man_pages/man3/utils.hpp.3
+++ b/man_pages/man3/utils.hpp.3
@@ -1,4 +1,4 @@
-.TH "include/utils.hpp" 3 "Fri Sep 29 2023" "Penning Trap Simulation" \" -*- nroff -*-
+.TH "include/utils.hpp" 3 "Mon Oct 2 2023" "Penning Trap Simulation" \" -*- nroff -*-
.ad l
.nh
.SH NAME