Update docs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.TH "Particle" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "Particle" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -13,7 +13,7 @@ Particle \- A class that holds attributes of a particle\&.
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "\fBParticle\fP (double \fBq\fP, double \fBm\fP, arma::vec::fixed< 3 > \fBr_vec\fP, arma::vec::fixed< 3 > \fBv_vec\fP)"
|
||||
.RI "\fBParticle\fP (double \fBq\fP, double \fBm\fP, \fBvec_3d\fP \fBr_vec\fP, \fBvec_3d\fP \fBv_vec\fP)"
|
||||
.br
|
||||
.RI "Initialize the particle\&. "
|
||||
.in -1c
|
||||
@@ -29,11 +29,11 @@ Particle \- A class that holds attributes of a particle\&.
|
||||
.br
|
||||
.RI "Mass\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec::fixed< 3 > \fBr_vec\fP"
|
||||
.RI "\fBvec_3d\fP \fBr_vec\fP"
|
||||
.br
|
||||
.RI "position "
|
||||
.ti -1c
|
||||
.RI "arma::vec::fixed< 3 > \fBv_vec\fP"
|
||||
.RI "\fBvec_3d\fP \fBv_vec\fP"
|
||||
.br
|
||||
.RI "velocity "
|
||||
.in -1c
|
||||
@@ -49,15 +49,28 @@ Particle \- A class that holds attributes of a particle\&.
|
||||
.PP
|
||||
A class that holds attributes of a particle\&.
|
||||
.PP
|
||||
Definition at line \fB19\fP of file \fBParticle\&.hpp\fP\&.
|
||||
Definition at line \fB21\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SH "Constructor & Destructor Documentation"
|
||||
.PP
|
||||
.SS "Particle::Particle (double q, double m, arma::vec::fixed< 3 > r_vec, arma::vec::fixed< 3 > v_vec)"
|
||||
.SS "Particle::Particle (double q, double m, \fBvec_3d\fP r_vec, \fBvec_3d\fP v_vec)"
|
||||
|
||||
.PP
|
||||
Initialize the particle\&. Initialize the particle with a charge, mass, position and velocity\&.
|
||||
Initialize the particle\&. Initialize the particle with a charge, mass, position and velocity\&.
|
||||
.PP
|
||||
Definition at line \fB16\fP of file \fBParticle\&.cpp\fP\&.
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIq\fP The charge of the particle
|
||||
.br
|
||||
\fIm\fP The mass of the particle
|
||||
.br
|
||||
\fIr_vec\fP The initial position of the particle
|
||||
.br
|
||||
\fIv_vec\fP The initial velocity of the particle
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB15\fP of file \fBParticle\&.cpp\fP\&.
|
||||
.SH "Friends And Related Function Documentation"
|
||||
.PP
|
||||
.SS "friend class \fBPenningTrap\fP\fC [friend]\fP"
|
||||
@@ -65,7 +78,7 @@ Definition at line \fB16\fP of file \fBParticle\&.cpp\fP\&.
|
||||
.PP
|
||||
Make private attributes available for \fBPenningTrap\fP\&.
|
||||
.PP
|
||||
Definition at line \fB38\fP of file \fBParticle\&.hpp\fP\&.
|
||||
Definition at line \fB43\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SH "Member Data Documentation"
|
||||
.PP
|
||||
.SS "double Particle::m\fC [private]\fP"
|
||||
@@ -73,25 +86,25 @@ Definition at line \fB38\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.PP
|
||||
Mass\&.
|
||||
.PP
|
||||
Definition at line \fB22\fP of file \fBParticle\&.hpp\fP\&.
|
||||
Definition at line \fB24\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SS "double Particle::q\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
Charge\&.
|
||||
.PP
|
||||
Definition at line \fB21\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SS "arma::vec::fixed<3> Particle::r_vec\fC [private]\fP"
|
||||
Definition at line \fB23\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SS "\fBvec_3d\fP Particle::r_vec\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
position
|
||||
.PP
|
||||
Definition at line \fB23\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SS "arma::vec::fixed<3> Particle::v_vec\fC [private]\fP"
|
||||
Definition at line \fB25\fP of file \fBParticle\&.hpp\fP\&.
|
||||
.SS "\fBvec_3d\fP Particle::v_vec\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
velocity
|
||||
.PP
|
||||
Definition at line \fB24\fP of file \fBParticle\&.hpp\fP\&.
|
||||
Definition at line \fB26\fP of file \fBParticle\&.hpp\fP\&.
|
||||
|
||||
.SH "Author"
|
||||
.PP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "src/Particle.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "src/Particle.cpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -31,7 +31,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)
|
||||
.PP
|
||||
\fBBug\fP
|
||||
.RS 4
|
||||
No known bugs
|
||||
No known bugs
|
||||
.RE
|
||||
.PP
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "include/Particle.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "include/Particle.hpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -9,6 +9,8 @@ include/Particle.hpp \- A class that holds the properties of a particle\&.
|
||||
.PP
|
||||
\fC#include <armadillo>\fP
|
||||
.br
|
||||
\fC#include 'typedefs\&.hpp'\fP
|
||||
.br
|
||||
|
||||
.SS "Classes"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "PenningTrap" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "PenningTrap" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -13,51 +13,77 @@ PenningTrap \- A class that simulates a Penning trap\&.
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "\fBPenningTrap\fP (double \fBB_0\fP=\fBT\fP, double \fBV_0\fP=25\&.*\fBV\fP/1000\&., double \fBd\fP=500\&.)"
|
||||
.RI "\fBPenningTrap\fP (double \fBB_0\fP=\fBT\fP, std::function< double(double)> \fBV_0\fP=[](double \fBt\fP) { return 25\&. *\fBV\fP/1000\&.;}, double \fBd\fP=500\&., double \fBt\fP=0\&.)"
|
||||
.br
|
||||
.RI "Set B_0, V_0 and d\&. "
|
||||
.RI "Constructor for the \fBPenningTrap\fP class\&. "
|
||||
.ti -1c
|
||||
.RI "\fBPenningTrap\fP (unsigned int i, double \fBB_0\fP=\fBT\fP, std::function< double(double)> \fBV_0\fP=[](double \fBt\fP) { return 25\&. *\fBV\fP/1000\&.;}, double \fBd\fP=500\&., double \fBt\fP=0\&.)"
|
||||
.br
|
||||
.RI "Constructor for the \fBPenningTrap\fP class\&. "
|
||||
.ti -1c
|
||||
.RI "\fBPenningTrap\fP (std::vector< \fBParticle\fP > \fBparticles\fP, double \fBB_0\fP=\fBT\fP, std::function< double(double)> \fBV_0\fP=[](double \fBt\fP) { return 25\&. *\fBV\fP/1000\&.;}, double \fBd\fP=500\&., double \fBt\fP=0\&.)"
|
||||
.br
|
||||
.RI "Constructor for the \fBPenningTrap\fP class\&. "
|
||||
.ti -1c
|
||||
.RI "void \fBadd_particle\fP (\fBParticle\fP particle)"
|
||||
.br
|
||||
.RI "Add a particle to the system\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBexternal_E_field\fP (arma::vec r)"
|
||||
.RI "\fBvec_3d\fP \fBexternal_E_field\fP (\fBvec_3d\fP r)"
|
||||
.br
|
||||
.RI "Calculate E at point r\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBexternal_B_field\fP (arma::vec r)"
|
||||
.RI "\fBvec_3d\fP \fBexternal_B_field\fP (\fBvec_3d\fP r)"
|
||||
.br
|
||||
.RI "Calculate B at point r\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBforce_on_particle\fP (int i, int j)"
|
||||
.RI "\fBvec_3d\fP \fBforce_on_particle\fP (unsigned int i, unsigned int j)"
|
||||
.br
|
||||
.RI "Calculate the force between 2 particles\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBtotal_force_external\fP (int i)"
|
||||
.RI "\fBvec_3d\fP \fBtotal_force_external\fP (unsigned int i)"
|
||||
.br
|
||||
.RI "Calculate the total external force on a particle\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBtotal_force_particles\fP (int i)"
|
||||
.RI "\fBvec_3d\fP \fBtotal_force_particles\fP (unsigned int i)"
|
||||
.br
|
||||
.RI "Calculate the total force on a particle from other particles\&. "
|
||||
.RI "Calculate the total force on a particle p_i from other particles\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBtotal_force\fP (int i)"
|
||||
.RI "\fBvec_3d\fP \fBtotal_force\fP (unsigned int i)"
|
||||
.br
|
||||
.RI "calculate the total force on a particle\&. "
|
||||
.RI "calculate the total force on a particle p_i\&. "
|
||||
.ti -1c
|
||||
.RI "void \fBevolve_RK4\fP (double dt)"
|
||||
.RI "void \fBevolve_RK4\fP (double dt, bool particle_interaction=true)"
|
||||
.br
|
||||
.RI "Go forward one timestep using the RK4 method\&. "
|
||||
.ti -1c
|
||||
.RI "void \fBevolve_forward_euler\fP (double dt)"
|
||||
.RI "void \fBevolve_forward_euler\fP (double dt, bool particle_interaction=true)"
|
||||
.br
|
||||
.RI "Go forward one timestep using the forward Euler method\&. "
|
||||
.ti -1c
|
||||
.RI "arma::vec \fBget_particle\fP (int i)"
|
||||
.RI "\fBsim_arr\fP \fBsimulate\fP (double time, unsigned int steps, std::string method='rk4', bool particle_interaction=true)"
|
||||
.br
|
||||
.RI "Simulate the particle system inside the Penning trap over a certain amount of time\&. "
|
||||
.ti -1c
|
||||
.RI "double \fBget_d\fP ()"
|
||||
.RI "void \fBwrite_simulation_to_dir\fP (std::string path, double time, unsigned int steps, std::string method='rk4', bool particle_interaction=true)"
|
||||
.br
|
||||
.RI "Simulate and write the displacement of all particles to files\&. "
|
||||
.ti -1c
|
||||
.RI "double \fBfraction_of_particles_left\fP (double time, unsigned int steps, std::string method='rk4', bool particle_interaction=true)"
|
||||
.br
|
||||
.RI "Simulate and calculate what fraction of particles are still left inside the Penning trap after the simulation\&. "
|
||||
.in -1c
|
||||
.SS "Private Member Functions"
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "\fBvec_3d\fP \fBv_func\fP (unsigned int i, unsigned int j, double dt)"
|
||||
.br
|
||||
.RI "Helper for evolve_RK4 when calculating $k_{v,i,j}$ values\&. "
|
||||
.ti -1c
|
||||
.RI "\fBvec_3d\fP \fBr_func\fP (unsigned int i, unsigned int j, double dt)"
|
||||
.br
|
||||
.RI "Helper for evolve_RK4 when calculating $k_{r,i,j}$ values\&. "
|
||||
.in -1c
|
||||
.SS "Private Attributes"
|
||||
|
||||
@@ -67,7 +93,7 @@ PenningTrap \- A class that simulates a Penning trap\&.
|
||||
.br
|
||||
.RI "Magnetic field strength\&. "
|
||||
.ti -1c
|
||||
.RI "double \fBV_0\fP"
|
||||
.RI "std::function< double(double)> \fBV_0\fP"
|
||||
.br
|
||||
.RI "Applied potential\&. "
|
||||
.ti -1c
|
||||
@@ -75,9 +101,19 @@ PenningTrap \- A class that simulates a Penning trap\&.
|
||||
.br
|
||||
.RI "Characteristic dimension\&. "
|
||||
.ti -1c
|
||||
.RI "double \fBt\fP"
|
||||
.br
|
||||
.RI "Current time\&. "
|
||||
.ti -1c
|
||||
.RI "std::vector< \fBParticle\fP > \fBparticles\fP"
|
||||
.br
|
||||
.RI "The particles in the Penning trap\&. "
|
||||
.ti -1c
|
||||
.RI "\fBsim_arr\fP \fBk_v\fP"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "\fBsim_arr\fP \fBk_r\fP"
|
||||
.br
|
||||
.in -1c
|
||||
.SH "Detailed Description"
|
||||
.PP
|
||||
@@ -85,15 +121,70 @@ A class that simulates a Penning trap\&.
|
||||
|
||||
This class simulates a Penning trap\&. It can take in a number of particles and simulate how they would behave inside a Penning trap\&.
|
||||
.PP
|
||||
Definition at line \fB29\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
Definition at line \fB30\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SH "Constructor & Destructor Documentation"
|
||||
.PP
|
||||
.SS "PenningTrap::PenningTrap (double B_0 = \fC\fBT\fP\fP, double V_0 = \fC25\&.*\fBV\fP/1000\&.\fP, double d = \fC500\&.\fP)"
|
||||
.SS "PenningTrap::PenningTrap (double B_0 = \fC\fBT\fP\fP, std::function< double(double)> V_0 = \fC[](double \fBt\fP) { return 25\&. * \fBV\fP / 1000\&.; }\fP, double d = \fC500\&.\fP, double t = \fC0\&.\fP)"
|
||||
|
||||
.PP
|
||||
Set B_0, V_0 and d\&.
|
||||
Constructor for the \fBPenningTrap\fP class\&.
|
||||
.PP
|
||||
Definition at line \fB20\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIB_0\fP The magnetic field strength
|
||||
.br
|
||||
\fIV_0\fP The time dependent applied potential
|
||||
.br
|
||||
\fId\fP The characteristic dimension
|
||||
.br
|
||||
\fIt\fP The starting time
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB18\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "PenningTrap::PenningTrap (unsigned int i, double B_0 = \fC\fBT\fP\fP, std::function< double(double)> V_0 = \fC[](double \fBt\fP) { return 25\&. * \fBV\fP / 1000\&.; }\fP, double d = \fC500\&.\fP, double t = \fC0\&.\fP)"
|
||||
|
||||
.PP
|
||||
Constructor for the \fBPenningTrap\fP class\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP The number of particles to generate
|
||||
.br
|
||||
\fIB_0\fP The magnetic field strength
|
||||
.br
|
||||
\fIV_0\fP The time dependent applied potential
|
||||
.br
|
||||
\fId\fP The characteristic dimension
|
||||
.br
|
||||
\fIt\fP The starting time
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB27\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "PenningTrap::PenningTrap (std::vector< \fBParticle\fP > particles, double B_0 = \fC\fBT\fP\fP, std::function< double(double)> V_0 = \fC[](double \fBt\fP) { return 25\&. * \fBV\fP / 1000\&.; }\fP, double d = \fC500\&.\fP, double t = \fC0\&.\fP)"
|
||||
|
||||
.PP
|
||||
Constructor for the \fBPenningTrap\fP class\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIparticles\fP The starting particles
|
||||
.br
|
||||
\fIB_0\fP The magnetic field strength
|
||||
.br
|
||||
\fIV_0\fP The time dependent applied potential
|
||||
.br
|
||||
\fId\fP The characteristic dimension
|
||||
.br
|
||||
\fIt\fP The starting time
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB39\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SH "Member Function Documentation"
|
||||
.PP
|
||||
.SS "void PenningTrap::add_particle (\fBParticle\fP particle)"
|
||||
@@ -101,63 +192,262 @@ Definition at line \fB20\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.PP
|
||||
Add a particle to the system\&.
|
||||
.PP
|
||||
Definition at line \fB27\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "void PenningTrap::evolve_forward_euler (double dt)"
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIparticle\fP The particle to add to the Penning trap
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB82\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "void PenningTrap::evolve_forward_euler (double dt, bool particle_interaction = \fCtrue\fP)"
|
||||
|
||||
.PP
|
||||
Go forward one timestep using the forward Euler method\&.
|
||||
.PP
|
||||
Definition at line \fB167\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "void PenningTrap::evolve_RK4 (double dt)"
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIdt\fP The step length
|
||||
.br
|
||||
\fIparticle_interaction\fP Turn particle interactions on/off
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB186\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "void PenningTrap::evolve_RK4 (double dt, bool particle_interaction = \fCtrue\fP)"
|
||||
|
||||
.PP
|
||||
Go forward one timestep using the RK4 method\&.
|
||||
.PP
|
||||
Definition at line \fB104\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "arma::vec PenningTrap::external_B_field (arma::vec r)"
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIdt\fP The step length
|
||||
.br
|
||||
\fIparticle_interaction\fP Turn particle interactions on/off
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB151\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::external_B_field (\fBvec_3d\fP r)"
|
||||
|
||||
.PP
|
||||
Calculate B at point r\&.
|
||||
.PP
|
||||
Definition at line \fB43\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "arma::vec PenningTrap::external_E_field (arma::vec r)"
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIr\fP The position where we want to calculate the B field
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB95\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::external_E_field (\fBvec_3d\fP r)"
|
||||
|
||||
.PP
|
||||
Calculate E at point r\&.
|
||||
.PP
|
||||
Definition at line \fB32\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "arma::vec PenningTrap::force_on_particle (int i, int j)"
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIr\fP The position where we want to calculate the E field
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Calculate the force between 2 particles\&. Calculate the force exhibited on particle p_i from particle p_j\&.
|
||||
.PP
|
||||
Definition at line \fB50\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "double PenningTrap::get_d ()"
|
||||
Definition at line \fB87\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::force_on_particle (unsigned int i, unsigned int j)"
|
||||
|
||||
.PP
|
||||
Definition at line \fB188\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "arma::vec PenningTrap::get_particle (int i)"
|
||||
Calculate the force between 2 particles\&. Calculate the force exhibited on particle p_i from particle p_j\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP The index of particle p_i
|
||||
.br
|
||||
\fIj\fP The index of particle p_j
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB183\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "arma::vec PenningTrap::total_force (int i)"
|
||||
Definition at line \fB100\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "double PenningTrap::fraction_of_particles_left (double time, unsigned int steps, std::string method = \fC'rk4'\fP, bool particle_interaction = \fCtrue\fP)"
|
||||
|
||||
.PP
|
||||
calculate the total force on a particle\&.
|
||||
Simulate and calculate what fraction of particles are still left inside the Penning trap after the simulation\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fItime\fP The time to simulate in microseconds
|
||||
.br
|
||||
\fIsteps\fP The amount of steps for the whole simulation
|
||||
.br
|
||||
\fImethod\fP The method to use when moving forward a timestep
|
||||
.br
|
||||
\fIparticle_interaction\fP Turn particle interactions on/off
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
double
|
||||
.RE
|
||||
.PP
|
||||
Definition at line \fB99\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 \fB65\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "arma::vec PenningTrap::total_force_particles (int i)"
|
||||
Definition at line \fB266\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::r_func (unsigned int i, unsigned int j, double dt)\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
Calculate the total force on a particle from other particles\&.
|
||||
Helper for evolve_RK4 when calculating $k_{r,i,j}$ values\&. Something
|
||||
.PP
|
||||
Definition at line \fB80\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP Index i for $k_{r,i,j}$
|
||||
.br
|
||||
\fIj\fP Index j for $k_{r,i,j}$
|
||||
.br
|
||||
\fIdt\fP the step length (delta time)
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB64\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBsim_arr\fP PenningTrap::simulate (double time, unsigned int steps, std::string method = \fC'rk4'\fP, bool particle_interaction = \fCtrue\fP)"
|
||||
|
||||
.PP
|
||||
Simulate the particle system inside the Penning trap over a certain amount of time\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fItime\fP The time to simulate in microseconds
|
||||
.br
|
||||
\fIsteps\fP The amount of steps for the whole simulation
|
||||
.br
|
||||
\fImethod\fP The method to use when moving forward a timestep
|
||||
.br
|
||||
\fIparticle_interaction\fP Turn particle interactions on/off
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB211\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::total_force (unsigned int i)"
|
||||
|
||||
.PP
|
||||
calculate the total force on a particle p_i\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP The index of particle p_i
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB146\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::total_force_external (unsigned 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
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP The index of particle p_i
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB114\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::total_force_particles (unsigned int i)"
|
||||
|
||||
.PP
|
||||
Calculate the total force on a particle p_i from other particles\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP The index of particle p_i
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB129\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "\fBvec_3d\fP PenningTrap::v_func (unsigned int i, unsigned int j, double dt)\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
Helper for evolve_RK4 when calculating $k_{v,i,j}$ values\&. Something
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIi\fP Index i for $k_{v,i,j}$
|
||||
.br
|
||||
\fIj\fP Index j for $k_{v,i,j}$
|
||||
.br
|
||||
\fIdt\fP the step length (delta time)
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
vec_3d
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB46\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SS "void PenningTrap::write_simulation_to_dir (std::string path, double time, unsigned int steps, std::string method = \fC'rk4'\fP, bool particle_interaction = \fCtrue\fP)"
|
||||
|
||||
.PP
|
||||
Simulate and write the displacement of all particles to files\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIpath\fP The directory to save the data
|
||||
.br
|
||||
\fItime\fP The time to simulate in microseconds
|
||||
.br
|
||||
\fIsteps\fP The amount of steps for the whole simulation
|
||||
.br
|
||||
\fImethod\fP The method to use when moving forward a timestep
|
||||
.br
|
||||
\fIparticle_interaction\fP Turn particle interactions on/off
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB240\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.SH "Member Data Documentation"
|
||||
.PP
|
||||
.SS "double PenningTrap::B_0\fC [private]\fP"
|
||||
@@ -165,25 +455,39 @@ Definition at line \fB80\fP of file \fBPenningTrap\&.cpp\fP\&.
|
||||
.PP
|
||||
Magnetic field strength\&.
|
||||
.PP
|
||||
Definition at line \fB31\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
Definition at line \fB32\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "double PenningTrap::d\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
Characteristic dimension\&.
|
||||
.PP
|
||||
Definition at line \fB33\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
Definition at line \fB34\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "\fBsim_arr\fP PenningTrap::k_r\fC [private]\fP"
|
||||
A 2D vector containing all $k_{i,j}$ where $j$ is the index of a particle
|
||||
.PP
|
||||
Definition at line \fB39\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "\fBsim_arr\fP PenningTrap::k_v\fC [private]\fP"
|
||||
A 2D vector containing all $k_{i,j}$ where $j$ is the index of a particle
|
||||
.PP
|
||||
Definition at line \fB37\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "std::vector<\fBParticle\fP> PenningTrap::particles\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
The particles in the Penning trap\&.
|
||||
.PP
|
||||
Definition at line \fB34\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "double PenningTrap::V_0\fC [private]\fP"
|
||||
Definition at line \fB36\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "double PenningTrap::t\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
Current time\&.
|
||||
.PP
|
||||
Definition at line \fB35\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
.SS "std::function<double(double)> PenningTrap::V_0\fC [private]\fP"
|
||||
|
||||
.PP
|
||||
Applied potential\&.
|
||||
.PP
|
||||
Definition at line \fB32\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
Definition at line \fB33\fP of file \fBPenningTrap\&.hpp\fP\&.
|
||||
|
||||
.SH "Author"
|
||||
.PP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "src/PenningTrap.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "src/PenningTrap.cpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -11,6 +11,8 @@ src/PenningTrap.cpp \- The implementation of the \fBPenningTrap\fP class\&.
|
||||
.br
|
||||
\fC#include 'constants\&.hpp'\fP
|
||||
.br
|
||||
\fC#include 'typedefs\&.hpp'\fP
|
||||
.br
|
||||
\fC#include 'utils\&.hpp'\fP
|
||||
.br
|
||||
|
||||
@@ -35,15 +37,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)
|
||||
.PP
|
||||
\fBBug\fP
|
||||
.RS 4
|
||||
No known bugs
|
||||
.RE
|
||||
.PP
|
||||
.PP
|
||||
\fBTodo\fP
|
||||
.RS 4
|
||||
Implement evolve_RK4
|
||||
.PP
|
||||
Implement evolve_forward_euler
|
||||
No known bugs
|
||||
.RE
|
||||
.PP
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "include/PenningTrap.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "include/PenningTrap.hpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -15,6 +15,8 @@ include/PenningTrap.hpp \- A class for simulating a Penning trap\&.
|
||||
.br
|
||||
\fC#include 'constants\&.hpp'\fP
|
||||
.br
|
||||
\fC#include 'typedefs\&.hpp'\fP
|
||||
.br
|
||||
|
||||
.SS "Classes"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "PenningTrapTest" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "PenningTrapTest" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "bug" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "bug" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -10,15 +10,17 @@ No known bugs
|
||||
.IP "\fBFile \fBmain\&.cpp\fP \fP" 1c
|
||||
No known bugs
|
||||
.IP "\fBFile \fBParticle\&.cpp\fP \fP" 1c
|
||||
No known bugs
|
||||
No known bugs
|
||||
.IP "\fBFile \fBParticle\&.hpp\fP \fP" 1c
|
||||
No known bugs
|
||||
.IP "\fBFile \fBPenningTrap\&.cpp\fP \fP" 1c
|
||||
No known bugs
|
||||
No known bugs
|
||||
.IP "\fBFile \fBPenningTrap\&.hpp\fP \fP" 1c
|
||||
No known bugs
|
||||
.IP "\fBFile \fBtest_suite\&.cpp\fP \fP" 1c
|
||||
No known bugs
|
||||
.IP "\fBFile \fBtypedefs\&.hpp\fP \fP" 1c
|
||||
No known bugs
|
||||
.IP "\fBFile \fButils\&.cpp\fP \fP" 1c
|
||||
No known bugs
|
||||
.IP "\fBFile \fButils\&.hpp\fP \fP" 1c
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "include/constants.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "include/constants.hpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "src/main.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "src/main.cpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -7,14 +7,22 @@ src/main.cpp \- The main program for this project\&.
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.PP
|
||||
\fC#include <cmath>\fP
|
||||
.br
|
||||
\fC#include <fstream>\fP
|
||||
.br
|
||||
\fC#include <omp\&.h>\fP
|
||||
.br
|
||||
\fC#include <string>\fP
|
||||
.br
|
||||
\fC#include <sys/stat\&.h>\fP
|
||||
.br
|
||||
\fC#include <vector>\fP
|
||||
.br
|
||||
\fC#include 'PenningTrap\&.hpp'\fP
|
||||
.br
|
||||
\fC#include 'utils\&.hpp'\fP
|
||||
.br
|
||||
|
||||
.SS "Macros"
|
||||
|
||||
@@ -36,12 +44,34 @@ src/main.cpp \- The main program for this project\&.
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "void \fBsimulate_single_particle\fP ()"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "void \fBsimulate_two_particles\fP ()"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "void \fBsimulate_single_particle_with_different_steps\fP ()"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "void \fBsimulate_100_particles\fP ()"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "void \fBsimulate_100_particles_with_time_potential\fP ()"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "int \fBmain\fP ()"
|
||||
.br
|
||||
.in -1c
|
||||
.SS "Variables"
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "\fBParticle\fP \fBp1\fP (CHARGE, MASS, \fBvec_3d\fP{20\&., 0\&., 20\&.}, \fBvec_3d\fP{0\&., 25\&., 0\&.})"
|
||||
.br
|
||||
.ti -1c
|
||||
.RI "\fBParticle\fP \fBp2\fP (CHARGE, MASS, \fBvec_3d\fP{25\&., 25\&., 0\&.}, \fBvec_3d\fP{0\&., 40\&., 5\&.})"
|
||||
.br
|
||||
.in -1c
|
||||
.SH "Detailed Description"
|
||||
.PP
|
||||
The main program for this project\&.
|
||||
@@ -74,29 +104,45 @@ Definition in file \fBmain\&.cpp\fP\&.
|
||||
.SS "#define CHARGE 1\&."
|
||||
|
||||
.PP
|
||||
Definition at line \fB21\fP of file \fBmain\&.cpp\fP\&.
|
||||
Definition at line \fB25\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "#define MASS 40\&."
|
||||
|
||||
.PP
|
||||
Definition at line \fB22\fP of file \fBmain\&.cpp\fP\&.
|
||||
Definition at line \fB26\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "#define N 10000"
|
||||
|
||||
.PP
|
||||
Definition at line \fB20\fP of file \fBmain\&.cpp\fP\&.
|
||||
Definition at line \fB24\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "#define PARTICLES 100"
|
||||
|
||||
.PP
|
||||
Definition at line \fB19\fP of file \fBmain\&.cpp\fP\&.
|
||||
Definition at line \fB23\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SH "Function Documentation"
|
||||
.PP
|
||||
.SS "int main ()"
|
||||
|
||||
.PP
|
||||
Definition at line \fB77\fP of file \fBmain\&.cpp\fP\&.
|
||||
Definition at line \fB124\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "void simulate_100_particles ()"
|
||||
|
||||
.PP
|
||||
Definition at line \fB24\fP of file \fBmain\&.cpp\fP\&.
|
||||
Definition at line \fB77\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "void simulate_100_particles_with_time_potential ()"
|
||||
|
||||
.PP
|
||||
Definition at line \fB91\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "void simulate_single_particle ()"
|
||||
|
||||
.PP
|
||||
Definition at line \fB31\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "void simulate_single_particle_with_different_steps ()"
|
||||
|
||||
.PP
|
||||
Definition at line \fB55\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SS "void simulate_two_particles ()"
|
||||
|
||||
.PP
|
||||
Definition at line \fB42\fP of file \fBmain\&.cpp\fP\&.
|
||||
.SH "Author"
|
||||
.PP
|
||||
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "src/test_suite.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "src/test_suite.cpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "todo" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "todo" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
|
||||
92
man_pages/man3/typedefs.hpp.3
Normal file
92
man_pages/man3/typedefs.hpp.3
Normal file
@@ -0,0 +1,92 @@
|
||||
.TH "include/typedefs.hpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
include/typedefs.hpp \- Useful typedefs for cleaner code\&.
|
||||
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.PP
|
||||
\fC#include <vector>\fP
|
||||
.br
|
||||
\fC#include <armadillo>\fP
|
||||
.br
|
||||
|
||||
.SS "Typedefs"
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "typedef std::vector< arma::vec::fixed< 3 > > \fBsim_cols\fP"
|
||||
.br
|
||||
.RI "Typedef for the column of the result vector from simulating particles\&. "
|
||||
.ti -1c
|
||||
.RI "typedef std::vector< arma::vec::fixed< 3 > > \fBsim_rows\fP"
|
||||
.br
|
||||
.RI "Typedef for the row of the result vector from simulating particles\&. "
|
||||
.ti -1c
|
||||
.RI "typedef std::vector< \fBsim_cols\fP > \fBsim_arr\fP"
|
||||
.br
|
||||
.RI "Typedef for the result of the simulate method\&. "
|
||||
.ti -1c
|
||||
.RI "typedef arma::vec::fixed< 3 > \fBvec_3d\fP"
|
||||
.br
|
||||
.RI "Typedef for a fixed 3d arma vector\&. "
|
||||
.in -1c
|
||||
.SH "Detailed Description"
|
||||
.PP
|
||||
Useful typedefs for cleaner code\&.
|
||||
|
||||
|
||||
.PP
|
||||
\fBAuthor\fP
|
||||
.RS 4
|
||||
Cory Alexander Balaton (coryab)
|
||||
.PP
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)
|
||||
.RE
|
||||
.PP
|
||||
\fBVersion\fP
|
||||
.RS 4
|
||||
1\&.0
|
||||
.RE
|
||||
.PP
|
||||
.PP
|
||||
These typedefs make the code more readable and easy to follow along\&.
|
||||
.PP
|
||||
\fBBug\fP
|
||||
.RS 4
|
||||
No known bugs
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition in file \fBtypedefs\&.hpp\fP\&.
|
||||
.SH "Typedef Documentation"
|
||||
.PP
|
||||
.SS "typedef std::vector<\fBsim_cols\fP> \fBsim_arr\fP"
|
||||
|
||||
.PP
|
||||
Typedef for the result of the simulate method\&.
|
||||
.PP
|
||||
Definition at line \fB32\fP of file \fBtypedefs\&.hpp\fP\&.
|
||||
.SS "typedef std::vector<arma::vec::fixed<3> > \fBsim_cols\fP"
|
||||
|
||||
.PP
|
||||
Typedef for the column of the result vector from simulating particles\&.
|
||||
.PP
|
||||
Definition at line \fB24\fP of file \fBtypedefs\&.hpp\fP\&.
|
||||
.SS "typedef std::vector<arma::vec::fixed<3> > \fBsim_rows\fP"
|
||||
|
||||
.PP
|
||||
Typedef for the row of the result vector from simulating particles\&.
|
||||
.PP
|
||||
Definition at line \fB28\fP of file \fBtypedefs\&.hpp\fP\&.
|
||||
.SS "typedef arma::vec::fixed<3> \fBvec_3d\fP"
|
||||
|
||||
.PP
|
||||
Typedef for a fixed 3d arma vector\&.
|
||||
.PP
|
||||
Definition at line \fB36\fP of file \fBtypedefs\&.hpp\fP\&.
|
||||
.SH "Author"
|
||||
.PP
|
||||
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "src/utils.cpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "src/utils.cpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -7,6 +7,8 @@ src/utils.cpp \- Implementation of the utils\&.
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.PP
|
||||
\fC#include <sys/stat\&.h>\fP
|
||||
.br
|
||||
\fC#include 'utils\&.hpp'\fP
|
||||
.br
|
||||
|
||||
@@ -29,6 +31,10 @@ src/utils.cpp \- Implementation of the utils\&.
|
||||
.RI "bool \fBarma_vector_close_to\fP (arma::vec &a, arma::vec &b, double tol)"
|
||||
.br
|
||||
.RI "Test if two armadillo vectors are close to each other\&. "
|
||||
.ti -1c
|
||||
.RI "bool \fBmkpath\fP (std::string path, int mode)"
|
||||
.br
|
||||
.RI "Make path given\&. "
|
||||
.in -1c
|
||||
.SH "Detailed Description"
|
||||
.PP
|
||||
@@ -75,12 +81,12 @@ Test if two armadillo vectors are close to each other\&. This function takes in
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
Boolean
|
||||
bool
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB59\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB62\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "void m_assert (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)"
|
||||
|
||||
.PP
|
||||
@@ -103,11 +109,31 @@ Test an expression, confirm that test is ok, or abort execution\&. This function
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB40\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB43\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "bool mkpath (std::string path, int mode = \fC0777\fP)"
|
||||
|
||||
.PP
|
||||
Make path given\&. This tries to be the equivalent to 'mkdir -p' and creates a new directory whenever it needs to\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIpath\fP The path to be created
|
||||
.br
|
||||
\fImode\fP The mode/permissions for all the new directories
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
bool
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB76\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "std::string scientific_format (const std::vector< double > & v, int width = \fC20\fP, int prec = \fC10\fP)"
|
||||
|
||||
.PP
|
||||
Turns a vector of doubles into a string written in scientific format\&.
|
||||
Turns a vector of doubles into a string written in scientific format\&. The code is stolen from https://github.com/anderkve/FYS3150\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
@@ -120,16 +146,16 @@ Turns a vector of doubles into a string written in scientific format\&.
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
String
|
||||
std::string
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB21\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB24\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "std::string scientific_format (double d, int width = \fC20\fP, int prec = \fC10\fP)"
|
||||
|
||||
.PP
|
||||
Turns a double into a string written in scientific format\&. Code stolen from https://github.com/anderkve/FYS3150 Header: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp Source: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp
|
||||
Turns a double into a string written in scientific format\&. The code is stolen from https://github.com/anderkve/FYS3150\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
@@ -142,12 +168,12 @@ Turns a double into a string written in scientific format\&. Code stolen from ht
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
String
|
||||
std::string
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB14\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB17\fP of file \fButils\&.cpp\fP\&.
|
||||
.SH "Author"
|
||||
.PP
|
||||
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "include/utils.hpp" 3 "Sun Oct 8 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.TH "include/utils.hpp" 3 "Sat Oct 14 2023" "Penning Trap Simulation" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
@@ -32,6 +32,7 @@ include/utils.hpp \- Function prototypes and macros that are useful\&.
|
||||
.ti -1c
|
||||
.RI "#define \fB__METHOD_NAME__\fP methodName(__PRETTY_FUNCTION__)"
|
||||
.br
|
||||
.RI "Get the name of the current method/function\&. "
|
||||
.in -1c
|
||||
.SS "Functions"
|
||||
|
||||
@@ -52,6 +53,10 @@ include/utils.hpp \- Function prototypes and macros that are useful\&.
|
||||
.RI "bool \fBarma_vector_close_to\fP (arma::vec &a, arma::vec &b, double tol=1e\-8)"
|
||||
.br
|
||||
.RI "Test if two armadillo vectors are close to each other\&. "
|
||||
.ti -1c
|
||||
.RI "bool \fBmkpath\fP (std::string path, int mode=0777)"
|
||||
.br
|
||||
.RI "Make path given\&. "
|
||||
.in -1c
|
||||
.SH "Detailed Description"
|
||||
.PP
|
||||
@@ -87,7 +92,9 @@ Definition in file \fButils\&.hpp\fP\&.
|
||||
.SS "#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)"
|
||||
|
||||
.PP
|
||||
Definition at line \fB48\fP of file \fButils\&.hpp\fP\&.
|
||||
Get the name of the current method/function\&.
|
||||
.PP
|
||||
Definition at line \fB51\fP of file \fButils\&.hpp\fP\&.
|
||||
.SS "#define ASSERT(expr, msg)"
|
||||
\fBValue:\fP.PP
|
||||
.nf
|
||||
@@ -123,12 +130,12 @@ Test if two armadillo vectors are close to each other\&. This function takes in
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
Boolean
|
||||
bool
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB59\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB62\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "void m_assert (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)"
|
||||
|
||||
.PP
|
||||
@@ -151,11 +158,31 @@ Test an expression, confirm that test is ok, or abort execution\&. This function
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB40\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB43\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "bool mkpath (std::string path, int mode = \fC0777\fP)"
|
||||
|
||||
.PP
|
||||
Make path given\&. This tries to be the equivalent to 'mkdir -p' and creates a new directory whenever it needs to\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
\fIpath\fP The path to be created
|
||||
.br
|
||||
\fImode\fP The mode/permissions for all the new directories
|
||||
.RE
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
bool
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB76\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "std::string scientific_format (const std::vector< double > & v, int width = \fC20\fP, int prec = \fC10\fP)"
|
||||
|
||||
.PP
|
||||
Turns a vector of doubles into a string written in scientific format\&.
|
||||
Turns a vector of doubles into a string written in scientific format\&. The code is stolen from https://github.com/anderkve/FYS3150\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
@@ -168,16 +195,16 @@ Turns a vector of doubles into a string written in scientific format\&.
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
String
|
||||
std::string
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB21\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB24\fP of file \fButils\&.cpp\fP\&.
|
||||
.SS "std::string scientific_format (double d, int width = \fC20\fP, int prec = \fC10\fP)"
|
||||
|
||||
.PP
|
||||
Turns a double into a string written in scientific format\&. Code stolen from https://github.com/anderkve/FYS3150 Header: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp Source: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp
|
||||
Turns a double into a string written in scientific format\&. The code is stolen from https://github.com/anderkve/FYS3150\&.
|
||||
.PP
|
||||
\fBParameters\fP
|
||||
.RS 4
|
||||
@@ -190,12 +217,12 @@ Turns a double into a string written in scientific format\&. Code stolen from ht
|
||||
.PP
|
||||
\fBReturns\fP
|
||||
.RS 4
|
||||
String
|
||||
std::string
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.PP
|
||||
Definition at line \fB14\fP of file \fButils\&.cpp\fP\&.
|
||||
Definition at line \fB17\fP of file \fButils\&.cpp\fP\&.
|
||||
.SH "Author"
|
||||
.PP
|
||||
Generated automatically by Doxygen for Penning Trap Simulation from the source code\&.
|
||||
|
||||
Reference in New Issue
Block a user