87 Commits

Author SHA1 Message Date
c799d8e19f Add seaborn 2023-10-24 22:44:55 +02:00
df38780e69 Add docs for Python 2023-10-24 21:49:26 +02:00
36ee519964 Update docs 2023-10-24 21:49:13 +02:00
bd67af34c0 Update doc 2023-10-24 21:33:44 +02:00
111d267385 Exclude Python scripts 2023-10-24 21:33:30 +02:00
e4e608248f Fix some things for the long program 2023-10-24 21:25:41 +02:00
95af969987 Add batch system 2023-10-24 21:24:27 +02:00
9bc6038af0 Plots 2023-10-24 20:22:37 +02:00
5c44103471 Remove -lblas -llapack 2023-10-24 15:56:07 +02:00
82bbd1c2f4 Fix bug 2023-10-24 15:52:35 +02:00
6b6231fcf3 Modify batch program 2023-10-24 15:52:08 +02:00
7257e40c4e Some stuff 2023-10-24 14:18:26 +02:00
6847938827 Update particles 2023-10-24 12:44:48 +02:00
16d7622283 Add ofile as private 2023-10-24 12:44:25 +02:00
f7eee8dc61 Change scripts 2023-10-24 12:43:52 +02:00
cd90d29970 Edit plots 2023-10-24 12:43:13 +02:00
3eb652be83 Merge branch 'janitaws/latex-setup' into coryab/code 2023-10-23 21:49:52 +02:00
f767cdc99b Merge branch 'janitaws/latex-setup' of github.uio.no:FYS3150-G2-2023/Project-3 into janitaws/latex-setup 2023-10-23 21:45:31 +02:00
684b38abba Small change 2023-10-23 21:44:54 +02:00
0dfcdd5e2a Add run times 2023-10-23 21:43:26 +02:00
9cacf7bbc2 Make some changes 2023-10-23 21:43:09 +02:00
1eb386237a Update docs 2023-10-23 12:53:58 +02:00
f1ca42fcf5 Rearrange implementations to match definitions 2023-10-23 12:53:10 +02:00
9c4e99a327 Comment options 2023-10-23 12:43:48 +02:00
d2824d7c1d Update docs 2023-10-23 12:43:32 +02:00
1ae665e7e7 Update versions and some other things
- Update version numbers for Doxygen
- Use vec3 instead of vec_3d
2023-10-23 12:42:12 +02:00
0dfb102cef Update versions and some other things
- Update version number for Doxygen
- Use vec3 instead of vec_3d
2023-10-23 12:41:03 +02:00
79da936956 Update formatting 2023-10-23 10:52:38 +02:00
d08a4a046c Update formatting 2023-10-23 10:50:08 +02:00
8f315a0955 Change Particle
- Give Particle default values for mass and charge
- Modify PenningTrap to use the new Particle constructor
- Modify main.cpp to use the new Particle constructor
- Modify test_suite.cpp to use the new Particle constructor
2023-10-23 09:54:13 +02:00
8fc0bf8c13 Refactor
- Change PenningTrap so that perturbation is its own field
- Add Calcium mass and charge to constants
2023-10-23 09:45:08 +02:00
Janita Willumsen
346a800428 Merge branch 'develop' into janitaws/latex-setup 2023-10-22 17:51:18 +02:00
bbb0203d35 Merge pull request #9 from FYS3150-G2-2023/coryab/code
Coryab/code
2023-10-22 17:46:55 +02:00
Janita Willumsen
937e681195 Update methods 2023-10-22 17:46:45 +02:00
2b69094ff4 Update constant 2023-10-22 17:45:34 +02:00
bd9600b6d1 Fix dumb mistake 2023-10-22 17:44:08 +02:00
Janita Willumsen
1224700312 Update references 2023-10-22 17:24:06 +02:00
b985a2c25f Changes 2023-10-22 17:17:28 +02:00
Janita Willumsen
4e14915b04 Stuff 2023-10-22 17:16:47 +02:00
Janita Willumsen
872b84d0d1 Change labels 2023-10-22 17:15:13 +02:00
Janita Willumsen
493bac88c3 Update document 2023-10-22 17:14:03 +02:00
8373deea81 Update plots 2023-10-22 16:34:48 +02:00
e42c108d20 Made some changes 2023-10-22 15:19:45 +02:00
0dfda79fda Update plots 2023-10-22 15:09:14 +02:00
f37385dc87 Merge branch 'janitaws/latex-setup' of github.uio.no:FYS3150-G2-2023/Project-3 into janitaws/latex-setup 2023-10-22 14:32:53 +02:00
eab84f52e9 Stuff 2023-10-22 14:32:29 +02:00
Janita Willumsen
1918dfb3f7 Update plots 2023-10-22 14:22:44 +02:00
Janita Willumsen
b8f32f1fd9 Update plot with seaborn theme 2023-10-22 14:22:03 +02:00
944c52d22f Add commments 2023-10-22 14:11:15 +02:00
a99eeab8b5 Optimize
- Use the new reinitialize method to reuse PenningTrap instances
2023-10-22 03:50:48 +02:00
eb2a985b3b Bunch of stuff
- Add reinitialize to reuse PenningTrap instance and its particles
- Reformatting
- Refactor fraction_of_particles_left to not use simulate
2023-10-22 03:47:23 +02:00
19e35f25ec Add instrumentation for scorep and scalasca 2023-10-22 03:45:56 +02:00
Janita Willumsen
405493a888 Update plots, not finished result 2023-10-20 15:59:39 +02:00
Janita Willumsen
f52892c1a6 Latexify the plots 2023-10-20 15:58:49 +02:00
2348d06070 Uncomment 2023-10-20 11:24:41 +02:00
335907d435 Formatting 2023-10-20 11:20:57 +02:00
b6a3024613 Add some formatting rules 2023-10-19 22:37:11 +02:00
7269429a37 Optimizations 2023-10-19 22:36:54 +02:00
4551b233e9 Update README 2023-10-19 18:38:15 +02:00
c2f089ee0f Add scripts directory 2023-10-19 18:37:55 +02:00
14a6d4ba15 Update docs 2023-10-19 18:37:42 +02:00
76dd30df23 Add documentation 2023-10-19 18:37:28 +02:00
9c17608066 Add Python requirements 2023-10-19 18:36:56 +02:00
520728a9c2 Move typedef 2023-10-19 18:36:34 +02:00
8412e2f643 Cleanup 2023-10-19 13:17:58 +02:00
1741b107f7 Cleanup 2023-10-19 13:17:45 +02:00
6d002cf564 Update 2023-10-19 13:17:33 +02:00
d9f9940451 Cleanup 2023-10-19 13:17:08 +02:00
763a34ea8c Use close_to 2023-10-19 13:16:18 +02:00
af2712cccd Change name 2023-10-19 13:15:56 +02:00
555c397d76 Fix directories list 2023-10-19 13:15:12 +02:00
Janita Willumsen
10a565eb24 pdf stuff 2023-10-18 15:55:00 +02:00
58db1d9928 Merge branch 'coryab/code' into develop 2023-10-18 15:51:54 +02:00
Janita Willumsen
f359789767 Remove compiled pdf 2023-10-18 15:47:47 +02:00
e636bf17a2 Update latex 2023-10-18 14:51:01 +02:00
8783e15e9e Merge branch 'coryab/latex' into develop 2023-10-18 13:59:00 +02:00
eb55d9b3c9 Merge branch 'janitaws/latex-setup' into develop 2023-10-18 13:49:46 +02:00
7714f80f8c Merge branch 'janitaws/latex-setup' of github.uio.no:FYS3150-G2-2023/Project-3 into janitaws/latex-setup 2023-10-18 13:37:24 +02:00
d8059a92e1 Delete file 2023-10-18 13:36:19 +02:00
4f38357db7 Stuff 2023-10-18 13:34:23 +02:00
Janita Willumsen
d07e5a9eff Update introduction 2023-10-18 13:31:45 +02:00
Janita Willumsen
4d2c24e92b Merge branch 'janitaws/latex-setup' of github.uio.no:FYS3150-G2-2023/Project-3 into janitaws/latex-setup 2023-10-18 08:42:17 +02:00
Janita Willumsen
0163bc3d21 Add introduction and (a somewhat messy) method part 2023-10-17 19:41:01 +02:00
d7246b05b1 Fix last update of RK4 2023-10-17 17:31:56 +02:00
5ed7cedfae Stuff 2023-10-17 17:01:50 +02:00
95432102ea Small fix 2023-10-16 13:33:00 +02:00
0fc1ec1e33 Fix signature 2023-10-16 13:01:21 +02:00
193 changed files with 8719 additions and 3836 deletions

View File

@@ -1,10 +1,44 @@
# Set the language to C++
Language: Cpp
# Set the language standard to C++11
Standard: Cpp11
# Never use tab for indentation
UseTab: Never
# Set the indent width to be 4 columns
IndentWidth: 4
# Set tab width to be 4 columns
TabWidth: 4
# Set access modifier (public, private, protected) offset to indent left
AccessModifierOffset: -4
# Stop indentation of access modifiers
IndentAccessModifiers: false
# Don't allow a function to be defined on a single line
AllowShortFunctionsOnASingleLine: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: true
BeforeElse: true
# Set the column limit to 80 characters
ColumnLimit: 80
# If an expression has to be split, then split before binary operators unless
# it's an assignment operator.
BreakBeforeBinaryOperators: NonAssignment
# Use a Linux style brace break.
# Break before braces on function, namespace and class definitions.
BreakBeforeBraces: Linux
# If true, spaces will be inserted after ( and before ).
SpacesInParentheses: false
# If true, spaces will be inserted after [ and before ].
SpacesInSquareBrackets: false
# Separate definition blocks (classes, functions, structs, enums)
SeparateDefinitionBlocks: Always

4
.gitignore vendored
View File

@@ -47,3 +47,7 @@ src/*
!src/*.hpp
!src/*.py
!src/Doxyfile
!src/scripts
# Job
!src/job.script

View File

@@ -917,7 +917,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = include src README.md
INPUT = include src src/scripts README.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2174,7 +2174,7 @@ RTF_EXTENSIONS_FILE =
# classes and files.
# The default value is: NO.
GENERATE_MAN = YES
GENERATE_MAN = NO
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

134
README.md
View File

@@ -2,6 +2,140 @@
![](./images/100_particles.gif)
[Repo](https://github.uio.no/FYS3150-G2-2023/Project-3)
[Documentation](https://pages.github.uio.no/FYS3150-G2-2023/Project-3/)
## Requirements
### Operating systems
- Linux
- Has been tested on [Fedora 38](https://fedoraproject.org/)
- Will most likely work on other Linux distributions
- MacOS
- Might work, but hasn't been tested
- Windows
- Will most likely not work
### Tools
- Profiling
- [gprof](https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_mono/gprof.html)
- [scalasca](https://www.scalasca.org/)
- [score-p](https://www.vi-hps.org/projects/score-p)
### Libraries
- Python
- [matplotlib](https://matplotlib.org/)
- [numpy](https://numpy.org/)
- C++
- [openmp](https://www.openmp.org/)
- [armadillo](https://arma.sourceforge.net/)
## Compiling
Compiling is as easy as running this command while being inside the src directory:
```shell
make
```
## Running programs
### C++ binaries
To run **main** or **test_suite**, just run this command while being inside src:
```shell
./<program-name>
```
### Python scripts
#### Install libraries
Before running the scripts, make sure that all libraries are installed.
Using pip, you can install all requirements like this:
```shell
pip install -r requirements.txt
```
This recursively install all the packages that are listed in **requirements.txt**.
#### Running scripts
For the Python scripts, run them from the src directory like this:
```shell
python scripts/<script-name>
```
If you have any problems running the scripts, you might have to run this instead:
```shell
python3 scripts/<script-name>
```
### Batch system
For the **frequency_narrow_sweeps_long** program, the is a script called
**job.script** that comes along with it. This is to be able to run it on a
batch system using Slurm if you have access to one.
This is the recommended way to use this program as it takes approximately 90
minutes to complete when using 16 cores.
If you happen to have such a system available to you, then you should clone
this repo on that system, then compile it by running:
```shell
make frequency_narrow_sweeps_long
```
You might have to load the Armadillo library before compiling.
After compiling, you can schedule it by running:
```shell
sbatch job.script
```
## Performance
This section aims to give an idea to the time it takes for the program to
run so that you know a bit what to expect if you decide to run it for
yourself.
### CPU
The times mentioned here are times achieved on a computer with these
specifications:
- CPU model
- Intel i7-9850H
- Threads
- 12
- Clock speed
- 4.6GHz
### Times
All times mentioned use the **evolve_RK4** method.
Running a simulation with 100 particles without particle interactions over
40000 steps takes around 1.8 seconds. With particle interactions, it takes
around 4.8 seconds.
**potential_resonance_wide_sweep** takes around 56 seconds to complete.
**potential_resonance_narrow_sweep** takes around 172 seconds to complete.
**potential_resonance_narrow_sweep_interaction** takes around 936 seconds to
complete.
## Credits

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -112,8 +112,8 @@ $(document).ready(function(){initNavTree('Particle_8cpp.html',''); initResizable
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000007">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="Particle_8cpp_source.html">Particle.cpp</a>.</p>
</div></div><!-- contents -->

View File

@@ -104,22 +104,21 @@ $(document).ready(function(){initNavTree('Particle_8cpp_source.html',''); initRe
<a href="Particle_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &quot;<a class="code" href="Particle_8hpp.html">Particle.hpp</a>&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4"> 15</a></span><a class="code hl_function" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle::Particle</a>(<span class="keywordtype">double</span> q, <span class="keywordtype">double</span> m,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> arma::vec::fixed&lt;3&gt; r_vec,</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> arma::vec::fixed&lt;3&gt; v_vec)</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>{</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// Giving the particle its properties</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4"> 15</a></span><a class="code hl_function" href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4">Particle::Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r_vec, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> v_vec, <span class="keywordtype">double</span> q, <span class="keywordtype">double</span> m)</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>{</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="comment">// Giving the particle its properties</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> this-&gt;r_vec = <a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> this-&gt;v_vec = <a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> this-&gt;q = <a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> this-&gt;m = <a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> this-&gt;r_vec = <a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> this-&gt;v_vec = <a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>}</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>}</div>
<div class="ttc" id="aParticle_8hpp_html"><div class="ttname"><a href="Particle_8hpp.html">Particle.hpp</a></div><div class="ttdoc">A class that holds the properties of a particle.</div></div>
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00023">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassParticle_html_a7af9f8d1fef63dd7643b06629ac7bef4"><div class="ttname"><a href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle::Particle</a></div><div class="ttdeci">Particle(double q, double m, vec_3d r_vec, vec_3d v_vec)</div><div class="ttdoc">Initialize the particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8cpp_source.html#l00015">Particle.cpp:15</a></div></div>
<div class="ttc" id="aclassParticle_html_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
<div class="ttc" id="aclassParticle_html_a1c59101411db43624828b766f87ad460"><div class="ttname"><a href="classParticle.html#a1c59101411db43624828b766f87ad460">Particle::r_vec</a></div><div class="ttdeci">vec3 r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
<div class="ttc" id="aclassParticle_html_a3a10400add8dd22b8031330c2aafb6fe"><div class="ttname"><a href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">Particle::v_vec</a></div><div class="ttdeci">vec3 v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00027">Particle.hpp:27</a></div></div>
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00028">Particle.hpp:28</a></div></div>
<div class="ttc" id="aclassParticle_html_af1d7535fb8311eaa77d2b7b345882ec4"><div class="ttname"><a href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4">Particle::Particle</a></div><div class="ttdeci">Particle(vec3 r_vec, vec3 v_vec, double q=CA_CHARGE, double m=CA_MASS)</div><div class="ttdoc">Initialize the particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8cpp_source.html#l00015">Particle.cpp:15</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a3bdfb73a02f88ae32b6128ef747c4aea"><div class="ttname"><a href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec3</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00023">typedefs.hpp:23</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -107,6 +107,7 @@ $(document).ready(function(){initNavTree('Particle_8hpp.html',''); initResizable
<p>A class that holds the properties of a particle.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;armadillo&gt;</code><br />
<code>#include &quot;<a class="el" href="constants_8hpp_source.html">constants.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>&quot;</code><br />
</div>
<p><a href="Particle_8hpp_source.html">Go to the source code of this file.</a></p>
@@ -122,7 +123,7 @@ Classes</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000002">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>

View File

@@ -107,30 +107,35 @@ $(document).ready(function(){initNavTree('Particle_8hpp_source.html',''); initRe
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;armadillo&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &quot;<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classParticle.html"> 21</a></span><span class="keyword">class </span><a class="code hl_class" href="classParticle.html">Particle</a> {</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1"> 23</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>; </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563"> 24</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>; </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6"> 25</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>; </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e"> 26</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>; </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_class" href="classParticle.html">Particle</a>(<span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232"> 43</a></span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>};</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00021">Particle.hpp:21</a></div></div>
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00023">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassParticle_html_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &quot;<a class="code" href="constants_8hpp.html">constants.hpp</a>&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &quot;<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classParticle.html"> 22</a></span><span class="keyword">class </span><a class="code hl_class" href="classParticle.html">Particle</a></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="classParticle.html#a1c59101411db43624828b766f87ad460"> 25</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>; </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe"> 26</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>; </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1"> 27</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>; </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563"> 28</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>; </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a> = <a class="code hl_define" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">CA_CHARGE</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a> = <a class="code hl_define" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a>);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232"> 45</a></span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>};</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00022">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassParticle_html_a1c59101411db43624828b766f87ad460"><div class="ttname"><a href="classParticle.html#a1c59101411db43624828b766f87ad460">Particle::r_vec</a></div><div class="ttdeci">vec3 r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
<div class="ttc" id="aclassParticle_html_a3a10400add8dd22b8031330c2aafb6fe"><div class="ttname"><a href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">Particle::v_vec</a></div><div class="ttdeci">vec3 v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00027">Particle.hpp:27</a></div></div>
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00028">Particle.hpp:28</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00031">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
<div class="ttc" id="aconstants_8hpp_html_a2ff491cc7958ffd5e749c518a4a60ec8"><div class="ttname"><a href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a></div><div class="ttdeci">#define CA_MASS</div><div class="ttdoc">Mass of a single calcium ion. unit: amu.</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00029">constants.hpp:29</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_af7602a3a314957137ad1cd719aa23789"><div class="ttname"><a href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">CA_CHARGE</a></div><div class="ttdeci">#define CA_CHARGE</div><div class="ttdoc">Charge of a singly charged calcium ion. unit: e.</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00033">constants.hpp:33</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html"><div class="ttname"><a href="typedefs_8hpp.html">typedefs.hpp</a></div><div class="ttdoc">Useful typedefs for cleaner code.</div></div>
<div class="ttc" id="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec_3d</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a3bdfb73a02f88ae32b6128ef747c4aea"><div class="ttname"><a href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec3</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00023">typedefs.hpp:23</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -104,10 +104,12 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp.html',''); initResiza
<p>The implementation of the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="constants_8hpp_source.html">constants.hpp</a>&quot;</code><br />
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;functional&gt;</code><br />
<code>#include &lt;sys/types.h&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &quot;<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
</div>
<p><a href="PenningTrap_8cpp_source.html">Go to the source code of this file.</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
@@ -115,8 +117,8 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp.html',''); initResiza
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000009">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div></div><!-- contents -->

View File

@@ -102,311 +102,377 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp_source.html',''); ini
</div><!--header-->
<div class="contents">
<a href="PenningTrap_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &quot;<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &quot;<a class="code" href="constants_8hpp.html">constants.hpp</a>&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &quot;<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>&quot;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8hpp.html">utils.hpp</a>&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;sys/types.h&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63"> 18</a></span><a class="code hl_function" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a>(<span class="keywordtype">double</span> B_0, std::function&lt;<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)&gt; V_0,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>{</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> this-&gt;B_0 = <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> = <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> this-&gt;d = <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> this-&gt;t = <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span>}</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1"> 27</a></span><a class="code hl_function" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">double</span> B_0,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> std::function&lt;<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)&gt; V_0, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> : <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(B_0, V_0, d)</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>{</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r, v;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; i; j++) {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> r = <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>().randn() * .1 * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> v = <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>().randn() * .1 * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> this-&gt;<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., r, v));</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> }</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>}</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73"> 39</a></span><a class="code hl_function" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a>(std::vector&lt;Particle&gt; particles, <span class="keywordtype">double</span> B_0,</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> std::function&lt;<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)&gt; V_0, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> : <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(B_0, V_0, d)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>{</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> this-&gt;particles = <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e"> 46</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap::v_func</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j, <span class="keywordtype">double</span> dt)</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>{</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">case</span> 0:</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[0][j];</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;k_v[1][j];</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">return</span> dt * this-&gt;k_v[2][j];</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">return</span> (dt / 6.) * (this-&gt;k_v[0][j].eval() + this-&gt;k_v[1][j].eval() +</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> this-&gt;k_v[2][j].eval() + this-&gt;k_v[3][j].eval());</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not valid!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> abort();</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648"> 64</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap::r_func</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j, <span class="keywordtype">double</span> dt)</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>{</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">case</span> 0:</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[0][j];</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;k_r[1][j];</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">return</span> dt * this-&gt;k_r[2][j];</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">return</span> (dt / 6.) * (this-&gt;k_r[0][j].eval() + this-&gt;k_r[1][j].eval() +</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> this-&gt;k_r[2][j].eval() + this-&gt;k_r[3][j].eval());</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not valid!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> abort();</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> }</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>}</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8"> 82</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a> particle)</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>{</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> this-&gt;particles.push_back(particle);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &quot;<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &quot;<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2"> 21</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">PenningTrap::v_func</a>(uint i, uint j, <span class="keywordtype">double</span> dt)</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>{</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">case</span> 0:</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[0][j];</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;k_v[1][j];</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">return</span> dt * this-&gt;k_v[2][j];</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>((dt / 6.)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> * (this-&gt;k_v[0][j] + 2. * this-&gt;k_v[1][j]</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> + 2. * this-&gt;k_v[2][j] + this-&gt;k_v[3][j]));</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not valid!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> abort();</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span>}</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08"> 40</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">PenningTrap::r_func</a>(uint i, uint j, <span class="keywordtype">double</span> dt)</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>{</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">case</span> 0:</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[0][j];</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;k_r[1][j];</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">return</span> dt * this-&gt;k_r[2][j];</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>((dt / 6.)</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> * (this-&gt;k_r[0][j] + 2. * this-&gt;k_r[1][j]</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> + 2. * this-&gt;k_r[2][j] + this-&gt;k_r[3][j]));</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not valid!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> abort();</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22"> 59</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">PenningTrap::external_E_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r)</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>{</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> r(2) *= -2.;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> ((this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a> * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">perturbation</a>(this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>)) / (this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>)) * r);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>}</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655"> 67</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">PenningTrap::external_B_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>{</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>};</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598"> 72</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">PenningTrap::force_on_particle</a>(uint i, uint j)</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span>{</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// Calculate the difference between the particles&#39; position</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> res = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec - this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[j].r_vec;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// Get the distance between the particles</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">double</span> norm = arma::norm(res, 2);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>((this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[j].q / (norm * norm * norm)) * res);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>}</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682"> 83</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap::total_force_external</a>(uint i)</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>{</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p = &amp;this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i];</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9"> 87</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap::external_E_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r)</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>{</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> r(2) *= -2.;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">double</span> f = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>(this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) / (this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(p-&gt;<a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> * (this-&gt;external_E_field(p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>)</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> + arma::cross(p-&gt;<a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>, this-&gt;external_B_field(p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>))));</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">return</span> f * r;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span>}</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c"> 95</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap::external_B_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r)</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span>{</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., this-&gt;B_0};</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce"> 100</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j)</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>{</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_class" href="classParticle.html">Particle</a> p_j = this-&gt;particles[j];</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="comment">// Calculate the difference between the particles&#39; position</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> res = this-&gt;particles[i].<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> - p_j.<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="comment">// Get the distance between the particles</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">double</span> norm = arma::norm(res, 2);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// Multiply res with p_j&#39;s charge divided by the norm cubed</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>(res * p_j.<a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a> / (norm * norm * norm));</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>}</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56"> 114</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i)</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span>{</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_class" href="classParticle.html">Particle</a> p = this-&gt;particles[i];</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (arma::norm(p.<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>) &gt; this-&gt;d) {</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 0.};</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> force =</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> p.<a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a> * (this-&gt;<a class="code hl_function" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a>(p.<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>) +</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> arma::cross(p.<a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>, this-&gt;external_B_field(p.<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>)));</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">return</span> force;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c"> 92</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">PenningTrap::total_force_particles</a>(uint i)</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span>{</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> res;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size(); j++) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">if</span> (i != j)</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> res += this-&gt;<a class="code hl_function" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">force_on_particle</a>(i, j);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(res * (<a class="code hl_define" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a> * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].q));</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>}</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3"> 104</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a>(uint i)</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>{</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">if</span> (arma::norm(this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec) &gt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>) {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.};</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> }</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(this-&gt;<a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">total_force_external</a>(i) - this-&gt;<a class="code hl_function" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">total_force_particles</a>(i));</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>}</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018"> 112</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap::total_force_no_interaction</a>(uint i)</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span>{</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">if</span> (arma::norm(this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec) &gt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>) {</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.};</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> }</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(this-&gt;<a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">total_force_external</a>(i));</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span>}</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8"> 120</a></span><a class="code hl_function" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap::PenningTrap</a>(<span class="keywordtype">double</span> B_0, <span class="keywordtype">double</span> V_0, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>{</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> this-&gt;B_0 = <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> this-&gt;V_0 = <a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a>;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> this-&gt;d = <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> this-&gt;t = <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">perturbation</a> = [](<span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { <span class="keywordflow">return</span> 1.; };</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>}</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b"> 129</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap::total_force_particles</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i)</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>{</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <a class="code hl_class" href="classParticle.html">Particle</a> p = this-&gt;particles[i];</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> res;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; this-&gt;particles.size(); j++) {</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (i == j) {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> res += this-&gt;<a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(i, j);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>(res * <a class="code hl_define" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a> * (p.<a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a> / p.<a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>));</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f"> 129</a></span><a class="code hl_function" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap::PenningTrap</a>(uint i, <span class="keywordtype">double</span> B_0, <span class="keywordtype">double</span> V_0, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> : <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(B_0, V_0, d)</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>{</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; i; j++) {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.push_back(</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>().randn() * .1 * this-&gt;d),</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>().randn() * .1 * this-&gt;d)));</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span>}</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f"> 139</a></span><a class="code hl_function" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap::PenningTrap</a>(std::vector&lt;Particle&gt; particles, <span class="keywordtype">double</span> B_0,</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordtype">double</span> V_0, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> : <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(B_0, V_0, d)</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span>{</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> this-&gt;particles = <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8"> 146</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i)</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43"> 146</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">PenningTrap::set_pertubation</a>(<span class="keywordtype">double</span> f, <span class="keywordtype">double</span> omega_V)</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>{</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">return</span> this-&gt;<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(i) - this-&gt;<a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(i);</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span>}</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e"> 151</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span>{</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> std::vector&lt;Particle&gt; original_particles = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> std::vector&lt;Particle&gt; tmp_particles = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*force)(<span class="keywordtype">unsigned</span> int);</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (particle_interaction) {</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> force = &amp;<a class="code hl_function" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a>;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> force = &amp;<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a>;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">perturbation</a> = [f, omega_V](<span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) {</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">return</span> 1 + f * std::cos(omega_V * <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>);</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> };</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span>}</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"><a class="line" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea"> 153</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap::reinitialize</a>(<span class="keywordtype">double</span> f, <span class="keywordtype">double</span> omega_V, <span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span>{</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> this-&gt;t = <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> this-&gt;<a class="code hl_function" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">set_pertubation</a>(f, omega_V);</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size(); i++) {</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> p = &amp;this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i];</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a> = <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>().randn() * .1 * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a> = <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>().randn() * .1 * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordtype">size_t</span> size = this-&gt;particles.size();</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a> = <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(4, <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>(size));</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a> = <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(4, <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>(size));</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; this-&gt;particles.size(); j++) {</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[i][j] = (this-&gt;*force)(j) / this-&gt;particles[j].m;</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[i][j] = this-&gt;particles[j].v_vec;</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p = &amp;tmp_particles[j];</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a> = original_particles[j].v_vec + this-&gt;<a class="code hl_function" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">v_func</a>(i, j, dt);</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> p-&gt;<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> = original_particles[j].r_vec + this-&gt;<a class="code hl_function" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a>(i, j, dt);</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> }</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> this-&gt;particles = tmp_particles;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> }</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>}</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e"> 186</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span>{</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> std::vector&lt;Particle&gt; new_state = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span>}</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8"> 166</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a> particle)</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>{</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.push_back(particle);</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span>}</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e"> 171</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>{</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="comment">// Keep original particles</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> std::vector&lt;Particle&gt; original_particles = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> std::vector&lt;Particle&gt; tmp_particles = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*force)(uint) =</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> particle_interaction ? &amp;<a class="code hl_function" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> : &amp;<a class="code hl_function" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap::total_force_no_interaction</a>;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordtype">size_t</span> size = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size();</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="comment">// Allocating takes a long time, so reuse sim_arr if possible</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">if</span> (this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>.size() != 4 || this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>.size() != 4</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> || this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[0].size() != size || this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[0].size() != size) {</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a> = <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(4, <a class="code hl_typedef" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a>(size));</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a> = <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(4, <a class="code hl_typedef" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a>(size));</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*force)(<span class="keywordtype">unsigned</span> int);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">if</span> (particle_interaction) {</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> force = &amp;<a class="code hl_function" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a>;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> }</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> force = &amp;<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a>;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> }</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="comment">// Each k_{i+1} is dependent on k_i, so outer loop is not parallelizable</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="comment">// Inner loop is able to be parallelized</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span><span class="preprocessor">#pragma omp parallel for private(p)</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; size; j++) {</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[i][j] = (this-&gt;*force)(j) / this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[j].m;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[i][j] = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[j].v_vec;</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span><span class="preprocessor">#pragma omp parallel for private(p)</span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; this-&gt;particles.size(); i++) {</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> p = &amp;new_state[i];</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a> += dt * (this-&gt;*force)(i) / p-&gt;<a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>;</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> p-&gt;<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> += dt * this-&gt;particles[i].v_vec;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> }</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> this-&gt;particles = new_state;</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> p = &amp;tmp_particles[j];</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a> = original_particles[j].v_vec + this-&gt;<a class="code hl_function" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">v_func</a>(i, j, dt);</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a> = original_particles[j].r_vec + this-&gt;<a class="code hl_function" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">r_func</a>(i, j, dt);</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> }</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a> = tmp_particles;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> }</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span>}</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854"> 211</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> <a class="code hl_function" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap::simulate</a>(<span class="keywordtype">double</span> time, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps,</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> std::string method, <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>{</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordtype">double</span> dt = time / (double)steps;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> res(this-&gt;particles.size(), <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>(steps));</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> </div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> void (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*func)(double, bool);</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;rk4&quot;</span>) {</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>;</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> }</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;euler&quot;</span>) {</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> }</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not a valid method!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> abort();</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> }</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> </div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; steps; j++) {</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; this-&gt;particles.size(); i++) {</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> res[i][j] = this-&gt;particles[i].r_vec;</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> }</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> (this-&gt;*func)(dt, particle_interaction);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e"> 211</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span>{</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">size_t</span> size = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size();</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> force_res[size];</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*force)(uint) =</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> particle_interaction ? &amp;<a class="code hl_function" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a></div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> : &amp;<a class="code hl_function" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap::total_force_no_interaction</a>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="comment">// Calculating the force for each particle is independent and therefore</span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="comment">// a good candidate for parallel execution</span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> force_res[i] = (this-&gt;*force)(i);</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> }</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="comment">// Updating the particles is also independent, so we can parallelize</span></div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// this as well</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> p = &amp;this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i];</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a> += dt * p-&gt;<a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>;</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> p-&gt;<a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a> += dt * force_res[i] / p-&gt;<a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> }</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> </div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">return</span> res;</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span>}</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> </div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57"> 240</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap::write_simulation_to_dir</a>(std::string path, <span class="keywordtype">double</span> time,</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="keywordtype">int</span> steps, std::string method,</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span>{</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keywordflow">if</span> (path.back() != <span class="charliteral">&#39;/&#39;</span>) {</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> path += <span class="charliteral">&#39;/&#39;</span>;</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> }</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path, 0777) != 0) {</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Hello&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> }</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> </div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> res = this-&gt;<a class="code hl_function" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a>(time, steps, method, particle_interaction);</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> </div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> std::ofstream ofile;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span><span class="preprocessor">#pragma omp parallel for private(ofile)</span></div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; this-&gt;particles.size(); i++) {</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> ofile.open(path + <span class="stringliteral">&quot;particle_&quot;</span> + std::to_string(i) + <span class="stringliteral">&quot;.txt&quot;</span>);</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="keywordflow">for</span> (<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> &amp;vec : res[i]) {</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> ofile &lt;&lt; vec(0) &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; vec(1) &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; vec(2) &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> }</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> ofile.close();</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> }</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span>}</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b"> 266</a></span><span class="keywordtype">double</span> <a class="code hl_function" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap::fraction_of_particles_left</a>(<span class="keywordtype">double</span> time, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps, std::string method, <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span>{</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> res = this-&gt;<a class="code hl_function" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a>(time, steps, method, particle_interaction);</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a"> 240</a></span><a class="code hl_struct" href="structsimulation.html">simulation_t</a> <a class="code hl_function" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap::simulate</a>(<span class="keywordtype">double</span> time, uint steps, std::string method,</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span>{</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keywordtype">double</span> dt = time / (double)steps;</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> </div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> uint size = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size();</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> </div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res{<a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(size, <a class="code hl_typedef" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a>(steps)),</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(size, <a class="code hl_typedef" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a>(steps))};</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> </div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> void (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*func)(double, bool);</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;rk4&quot;</span>) {</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;euler&quot;</span>) {</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>;</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not a valid method!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> abort();</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> }</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> </div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; steps; j++) {</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> p = &amp;this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i];</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> res.r_vecs[i][j] = p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>;</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> res.v_vecs[i][j] = p-&gt;<a class="code hl_variable" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>;</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> }</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> (this-&gt;*func)(dt, particle_interaction);</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> }</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordtype">int</span> particles_left = 0;</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> </div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">for</span> (<a class="code hl_class" href="classParticle.html">Particle</a> p : this-&gt;particles) {</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordflow">if</span> (arma::norm(p.r_vec) &lt; this-&gt;d) {</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> particles_left++;</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> }</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> }</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> </div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="keywordflow">return</span> (<span class="keywordtype">double</span>) particles_left / (double) this-&gt;particles.size();</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span>}</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordflow">return</span> res;</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span>}</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> </div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b"> 273</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">PenningTrap::write_simulation_to_dir</a>(std::string path, <span class="keywordtype">double</span> time,</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> uint steps, std::string method,</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span>{</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordflow">if</span> (path.back() != <span class="charliteral">&#39;/&#39;</span>) {</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> path += <span class="charliteral">&#39;/&#39;</span>;</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> }</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path, 0777) != 0) {</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Failed to make path&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> abort();</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> }</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> </div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res =</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> this-&gt;<a class="code hl_function" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">simulate</a>(time, steps, method, particle_interaction);</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> </div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> std::ofstream ofile;</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="comment">// Writing each particle to its own file is independent and can be run in</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="comment">// parallel.</span></div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span><span class="preprocessor">#pragma omp parallel for private(ofile)</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size(); i++) {</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> ofile.open(path + <span class="stringliteral">&quot;particle_&quot;</span> + std::to_string(i) + <span class="stringliteral">&quot;_r.txt&quot;</span>);</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="keywordflow">for</span> (<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> &amp;vec : res.r_vecs[i]) {</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> ofile &lt;&lt; <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(0), 10, 8) &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> &lt;&lt; <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(1), 10, 8) &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> &lt;&lt; <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(2), 10, 8) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> }</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> ofile.close();</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> ofile.open(path + <span class="stringliteral">&quot;particle_&quot;</span> + std::to_string(i) + <span class="stringliteral">&quot;_v.txt&quot;</span>);</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <span class="keywordflow">for</span> (<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> &amp;vec : res.v_vecs[i]) {</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> ofile &lt;&lt; <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(0), 10, 8) &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> &lt;&lt; <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(1), 10, 8) &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> &lt;&lt; <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(2), 10, 8) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> }</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> ofile.close();</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> }</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span>}</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> </div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f"> 311</a></span><span class="keywordtype">double</span> <a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap::fraction_of_particles_left</a>(<span class="keywordtype">double</span> time, uint steps,</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> std::string method,</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span>{</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="keywordtype">double</span> dt = time / (double)steps;</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> void (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*func)(double, bool);</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;rk4&quot;</span>) {</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>;</div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;euler&quot;</span>) {</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>;</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not a valid method!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> abort();</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> }</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> </div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; steps; j++) {</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> (this-&gt;*func)(dt, particle_interaction);</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> }</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> </div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> <span class="keywordtype">int</span> particles_left = 0;</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> </div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> <span class="comment">// A reduction is perfect here</span></div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span><span class="preprocessor">#pragma omp parallel for reduction(+ : particles_left)</span></div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size(); i++) {</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keywordflow">if</span> (arma::norm(this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec) &lt; this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>) {</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> particles_left++;</div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> }</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> }</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> </div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keywordflow">return</span> (<span class="keywordtype">double</span>)particles_left / (double)this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size();</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span>}</div>
<div class="ttc" id="aPenningTrap_8hpp_html"><div class="ttname"><a href="PenningTrap_8hpp.html">PenningTrap.hpp</a></div><div class="ttdoc">A class for simulating a Penning trap.</div></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00021">Particle.hpp:21</a></div></div>
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00023">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassParticle_html_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0112525d9e79a472e761f8ef402a339f"><div class="ttname"><a href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap::particles</a></div><div class="ttdeci">std::vector&lt; Particle &gt; particles</div><div class="ttdoc">The particles in the Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00036">PenningTrap.hpp:36</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0194be61c956a9259c747c23e4163c5b"><div class="ttname"><a href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00266">PenningTrap.cpp:266</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0cac3509aa96e71a26d3b2c902e27716"><div class="ttname"><a href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">PenningTrap::B_0</a></div><div class="ttdeci">double B_0</div><div class="ttdoc">Magnetic field strength.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00032">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a1d58feaa2c9e34cbf26b1c5ed75ca9d9"><div class="ttname"><a href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap::external_E_field</a></div><div class="ttdeci">vec_3d external_E_field(vec_3d r)</div><div class="ttdoc">Calculate E at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00087">PenningTrap.cpp:87</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a1f668c4433421136ad51741741aa1bc8"><div class="ttname"><a href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a></div><div class="ttdeci">vec_3d total_force(unsigned int i)</div><div class="ttdoc">calculate the total force on a particle p_i.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00146">PenningTrap.cpp:146</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2f168622587709b9e3c49077f0b9a640"><div class="ttname"><a href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap::k_r</a></div><div class="ttdeci">sim_arr k_r</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00039">PenningTrap.hpp:39</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a36946152fd951b1f7c346c51ff900d8e"><div class="ttname"><a href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a></div><div class="ttdeci">void evolve_RK4(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the RK4 method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00151">PenningTrap.cpp:151</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a43e74792ab4b3f9299f35cb64bdb2648"><div class="ttname"><a href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap::r_func</a></div><div class="ttdeci">vec_3d r_func(unsigned int i, unsigned int j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00064">PenningTrap.cpp:64</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a46a954a0946def199e30fb300ba1c47b"><div class="ttname"><a href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap::total_force_particles</a></div><div class="ttdeci">vec_3d total_force_particles(unsigned int i)</div><div class="ttdoc">Calculate the total force on a particle p_i from other particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00129">PenningTrap.cpp:129</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a5331837e6dd7bce807a99edd2ba7e854"><div class="ttname"><a href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap::simulate</a></div><div class="ttdeci">sim_arr simulate(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate the particle system inside the Penning trap over a certain amount of time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00211">PenningTrap.cpp:211</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a66dfe89c68716b9502927b97f59c27d2"><div class="ttname"><a href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">PenningTrap::d</a></div><div class="ttdeci">double d</div><div class="ttdoc">Characteristic dimension.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00034">PenningTrap.hpp:34</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a6e9776ff5b149f01080800716455d7c8"><div class="ttname"><a href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a></div><div class="ttdeci">void add_particle(Particle particle)</div><div class="ttdoc">Add a particle to the system.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00082">PenningTrap.cpp:82</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00035">PenningTrap.hpp:35</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a9ae34ad740a230e667e96bc6ee8730ce"><div class="ttname"><a href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec_3d force_on_particle(unsigned int i, unsigned int j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00100">PenningTrap.cpp:100</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_aaf105828121c4a33cc2b217453c20317"><div class="ttname"><a href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap::V_0</a></div><div class="ttdeci">std::function&lt; double(double)&gt; V_0</div><div class="ttdoc">Applied potential.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00033">PenningTrap.hpp:33</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00186">PenningTrap.cpp:186</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_abbb832a85139b1a56ebde57d7b8f9a57"><div class="ttname"><a href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_acbf065c9c125682329ad82a8d166554c"><div class="ttname"><a href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap::external_B_field</a></div><div class="ttdeci">vec_3d external_B_field(vec_3d r)</div><div class="ttdoc">Calculate B at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00095">PenningTrap.cpp:95</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae670d7de621acdb343b01af098086f63"><div class="ttname"><a href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a></div><div class="ttdeci">PenningTrap(double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</div><div class="ttdoc">Constructor for the PenningTrap class.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00018">PenningTrap.cpp:18</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae72d203b0bfa1b9e72bea28cb2863c56"><div class="ttname"><a href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a></div><div class="ttdeci">vec_3d total_force_external(unsigned int i)</div><div class="ttdoc">Calculate the total external force on a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00114">PenningTrap.cpp:114</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae9b5afdaa5cd366e94bd294452a1eed4"><div class="ttname"><a href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap::k_v</a></div><div class="ttdeci">sim_arr k_v</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00037">PenningTrap.hpp:37</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_af98a720da60b0e1a62aefa5f5cb37c1e"><div class="ttname"><a href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap::v_func</a></div><div class="ttdeci">vec_3d v_func(unsigned int i, unsigned int j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00046">PenningTrap.cpp:46</a></div></div>
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
<div class="ttc" id="aconstants_8hpp_html_a4e451456ad7e9276ed0afa42826e7ccb"><div class="ttname"><a href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a></div><div class="ttdeci">#define K_E</div><div class="ttdoc">Coulomb constant. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00015">constants.hpp:15</a></div></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00022">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassParticle_html_a1c59101411db43624828b766f87ad460"><div class="ttname"><a href="classParticle.html#a1c59101411db43624828b766f87ad460">Particle::r_vec</a></div><div class="ttdeci">vec3 r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
<div class="ttc" id="aclassParticle_html_a3a10400add8dd22b8031330c2aafb6fe"><div class="ttname"><a href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">Particle::v_vec</a></div><div class="ttdeci">vec3 v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00027">Particle.hpp:27</a></div></div>
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00028">Particle.hpp:28</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00031">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0112525d9e79a472e761f8ef402a339f"><div class="ttname"><a href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap::particles</a></div><div class="ttdeci">std::vector&lt; Particle &gt; particles</div><div class="ttdoc">The particles in the Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00042">PenningTrap.hpp:42</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0cac3509aa96e71a26d3b2c902e27716"><div class="ttname"><a href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">PenningTrap::B_0</a></div><div class="ttdeci">double B_0</div><div class="ttdoc">Magnetic field strength.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00037">PenningTrap.hpp:37</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2c01108b52c8e2a003cf9170da9e7682"><div class="ttname"><a href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap::total_force_external</a></div><div class="ttdeci">vec3 total_force_external(uint i)</div><div class="ttdoc">Calculate the total external force on a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00083">PenningTrap.cpp:83</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2f168622587709b9e3c49077f0b9a640"><div class="ttname"><a href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap::k_r</a></div><div class="ttdeci">sim_arr k_r</div><div class="ttdoc">A 2D vector containing all where is the index of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00052">PenningTrap.hpp:52</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2fe1cefbae18fa5808155ee0d2df713c"><div class="ttname"><a href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">PenningTrap::total_force_particles</a></div><div class="ttdeci">vec3 total_force_particles(uint i)</div><div class="ttdoc">Calculate the total force on a particle p_i from other particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00092">PenningTrap.cpp:92</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a361f2c4862c90b5e8e2a2f50c6a95655"><div class="ttname"><a href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">PenningTrap::external_B_field</a></div><div class="ttdeci">vec3 external_B_field(vec3 r)</div><div class="ttdoc">Calculate B at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00067">PenningTrap.cpp:67</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a36946152fd951b1f7c346c51ff900d8e"><div class="ttname"><a href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a></div><div class="ttdeci">void evolve_RK4(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the RK4 method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00171">PenningTrap.cpp:171</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a3c0a44e4e0a94366ff609e81fe463fa2"><div class="ttname"><a href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">PenningTrap::v_func</a></div><div class="ttdeci">vec3 v_func(uint i, uint j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00021">PenningTrap.cpp:21</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a5846c8f75cdc543fd9cf0b2185a3ef22"><div class="ttname"><a href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">PenningTrap::external_E_field</a></div><div class="ttdeci">vec3 external_E_field(vec3 r)</div><div class="ttdoc">Calculate E at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00059">PenningTrap.cpp:59</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a5b6c6d4636f3a6e279ccde59d4a345e8"><div class="ttname"><a href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap::PenningTrap</a></div><div class="ttdeci">PenningTrap(double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)</div><div class="ttdoc">Constructor for the PenningTrap class.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00120">PenningTrap.cpp:120</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a6069f82d8dbc7cadaebd228dbcd95018"><div class="ttname"><a href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap::total_force_no_interaction</a></div><div class="ttdeci">vec3 total_force_no_interaction(uint i)</div><div class="ttdoc">calculate the total force on a particle p_i without interaction</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00112">PenningTrap.cpp:112</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a66dfe89c68716b9502927b97f59c27d2"><div class="ttname"><a href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">PenningTrap::d</a></div><div class="ttdeci">double d</div><div class="ttdoc">Characteristic dimension.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00040">PenningTrap.hpp:40</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a6e9776ff5b149f01080800716455d7c8"><div class="ttname"><a href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a></div><div class="ttdeci">void add_particle(Particle particle)</div><div class="ttdoc">Add a particle to the system.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00166">PenningTrap.cpp:166</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a715329844d75ec4c04f8391421fb4e89"><div class="ttname"><a href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">PenningTrap::V_0</a></div><div class="ttdeci">double V_0</div><div class="ttdoc">Applied potential.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00038">PenningTrap.hpp:38</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a7a1d9f0528a12308de25bc30718da20a"><div class="ttname"><a href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap::simulate</a></div><div class="ttdeci">simulation_t simulate(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate the particle system inside the Penning trap over a certain amount of time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a7f210bb2768a5d79ced4b0df0df97598"><div class="ttname"><a href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec3 force_on_particle(uint i, uint j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00072">PenningTrap.cpp:72</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a826b7fa8e709d481eb1dee7d0c2cdc08"><div class="ttname"><a href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">PenningTrap::r_func</a></div><div class="ttdeci">vec3 r_func(uint i, uint j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00040">PenningTrap.cpp:40</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00041">PenningTrap.hpp:41</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a9a301b0540078c36697880ef204afdf3"><div class="ttname"><a href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a></div><div class="ttdeci">vec3 total_force(uint i)</div><div class="ttdoc">calculate the total force on a particle p_i.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00104">PenningTrap.cpp:104</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a9d1d8e90ca839b928aee1ad0cd4aff43"><div class="ttname"><a href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">PenningTrap::set_pertubation</a></div><div class="ttdeci">void set_pertubation(double f, double omega_V)</div><div class="ttdoc">Time dependent perturbation to V_0.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00146">PenningTrap.cpp:146</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_aaee129f177657455348d0c8ae1441dea"><div class="ttname"><a href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap::reinitialize</a></div><div class="ttdeci">void reinitialize(double f, double omega_V, double t=0.)</div><div class="ttdoc">Give all particles new positions and velocities, and change t and V_0.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00153">PenningTrap.cpp:153</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00211">PenningTrap.cpp:211</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ac529aa26c288f34eae184a67e6bac41f"><div class="ttname"><a href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00311">PenningTrap.cpp:311</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ad8bc4df7ab3eed53b16cfdff38e7760b"><div class="ttname"><a href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00273">PenningTrap.cpp:273</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae915f6ad0eef1fb46530e836b6e071e5"><div class="ttname"><a href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">PenningTrap::perturbation</a></div><div class="ttdeci">std::function&lt; double(double)&gt; perturbation</div><div class="ttdoc">Time-dependent perturbation.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00039">PenningTrap.hpp:39</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae9b5afdaa5cd366e94bd294452a1eed4"><div class="ttname"><a href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap::k_v</a></div><div class="ttdeci">sim_arr k_v</div><div class="ttdoc">A 2D vector containing all where is the index of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00047">PenningTrap.hpp:47</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_a4e451456ad7e9276ed0afa42826e7ccb"><div class="ttname"><a href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a></div><div class="ttdeci">#define K_E</div><div class="ttdoc">Coulomb constant. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00017">constants.hpp:17</a></div></div>
<div class="ttc" id="astructsimulation_html"><div class="ttname"><a href="structsimulation.html">simulation</a></div><div class="ttdoc">Typedef for PenningTrap::simulation return value.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00040">typedefs.hpp:40</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html"><div class="ttname"><a href="typedefs_8hpp.html">typedefs.hpp</a></div><div class="ttdoc">Useful typedefs for cleaner code.</div></div>
<div class="ttc" id="atypedefs_8hpp_html_a7c2dfa854274262c4e00e4ef0ab2ce23"><div class="ttname"><a href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></div><div class="ttdeci">std::vector&lt; arma::vec::fixed&lt; 3 &gt; &gt; sim_cols</div><div class="ttdoc">Typedef for the column of the result vector from simulating particles.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00024">typedefs.hpp:24</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec_3d</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_aec69d34220fff45de238b9e01f2686af"><div class="ttname"><a href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></div><div class="ttdeci">std::vector&lt; sim_cols &gt; sim_arr</div><div class="ttdoc">Typedef for the result of the simulate method.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00032">typedefs.hpp:32</a></div></div>
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
<div class="ttc" id="autils_8hpp_html_a6fdd7217b750aff5b6295ece7cbdeffa"><div class="ttname"><a href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00076">utils.cpp:76</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a3bdfb73a02f88ae32b6128ef747c4aea"><div class="ttname"><a href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec3</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00023">typedefs.hpp:23</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a46482a2697556c00556c9d73f461784f"><div class="ttname"><a href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a></div><div class="ttdeci">std::vector&lt; vec3 &gt; sim_cols</div><div class="ttdoc">Typedef for the column of the result vector from simulating particles.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00028">typedefs.hpp:28</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_aec69d34220fff45de238b9e01f2686af"><div class="ttname"><a href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></div><div class="ttdeci">std::vector&lt; sim_cols &gt; sim_arr</div><div class="ttdoc">Typedef for the result of the simulate method.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
<div class="ttc" id="autils_8hpp_html_a6fdd7217b750aff5b6295ece7cbdeffa"><div class="ttname"><a href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00072">utils.cpp:72</a></div></div>
<div class="ttc" id="autils_8hpp_html_adfb618b2fdff47ef30a4a2b62c04f384"><div class="ttname"><a href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a></div><div class="ttdeci">std::string scientific_format(double d, int width=20, int prec=10)</div><div class="ttdoc">Turns a double into a string written in scientific format.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00015">utils.cpp:15</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -111,6 +111,7 @@ $(document).ready(function(){initNavTree('PenningTrap_8hpp.html',''); initResiza
<code>#include &quot;<a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="constants_8hpp_source.html">constants.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
</div>
<p><a href="PenningTrap_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
@@ -125,7 +126,7 @@ Classes</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000003">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>

View File

@@ -111,105 +111,115 @@ $(document).ready(function(){initNavTree('PenningTrap_8hpp_source.html',''); ini
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &quot;<a class="code" href="Particle_8hpp.html">Particle.hpp</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &quot;<a class="code" href="constants_8hpp.html">constants.hpp</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &quot;<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor"> initializer(omp_priv = omp_orig)</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="classPenningTrap.html"> 30</a></span><span class="keyword">class </span><a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716"> 32</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>; </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317"> 33</a></span> std::function&lt;double(<span class="keywordtype">double</span>)&gt; <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>; </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2"> 34</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>; </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e"> 35</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>; </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f"> 36</a></span> std::vector&lt;Particle&gt; <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>; </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4"> 37</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> <a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>; </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640"> 39</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> <a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>; </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">v_func</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j, <span class="keywordtype">double</span> dt);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8hpp.html">utils.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#pragma omp declare reduction(+ : vec3 : omp_out += omp_in) \</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor"> initializer(omp_priv = omp_orig)</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classPenningTrap.html"> 31</a></span><span class="keyword">class </span><a class="code hl_class" href="classPenningTrap.html">PenningTrap</a></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>{</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae"> 35</a></span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classPenningTrapTest.html">PenningTrapTest</a>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716"> 37</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>; </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89"> 38</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a>; </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5"> 39</a></span> std::function&lt;double(<span class="keywordtype">double</span>)&gt; <a class="code hl_variable" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">perturbation</a>; </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2"> 40</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>; </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e"> 41</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>; </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f"> 42</a></span> std::vector&lt;Particle&gt; <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>; </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4"> 47</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> <a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640"> 52</a></span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> <a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j, <span class="keywordtype">double</span> dt);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">v_func</a>(uint i, uint j, <span class="keywordtype">double</span> dt);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a> = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> std::function&lt;<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)&gt; <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> [](<span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { <span class="keywordflow">return</span> 25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.; },</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> = 500., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a> = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> std::function&lt;<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)&gt; <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> [](<span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { <span class="keywordflow">return</span> 25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.; },</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> = 500., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">r_func</a>(uint i, uint j, <span class="keywordtype">double</span> dt);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">external_E_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">external_B_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::vector&lt;Particle&gt; <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a> = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> std::function&lt;<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)&gt; <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> [](<span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { <span class="keywordflow">return</span> 25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.; },</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> = 500., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a> particle);</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">external_B_field</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">force_on_particle</a>(uint i, uint j);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">total_force_external</a>(uint i);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">total_force_particles</a>(uint i);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">total_force</a>(uint i);</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">total_force_no_interaction</a>(uint i);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(<span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a> = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a> = (25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>) / 1000., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> = 500.,</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">total_force</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i);</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">evolve_RK4</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">evolve_forward_euler</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> <a class="code hl_function" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a>(<span class="keywordtype">double</span> time, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps,</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(std::string path, <span class="keywordtype">double</span> time,</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps, std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordtype">double</span> <a class="code hl_function" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a>(<span class="keywordtype">double</span> time, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps,</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span>};</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(uint i, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a> = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a> = (25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>) / 1000.,</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> = 500., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(std::vector&lt;Particle&gt; <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a> = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a> = (25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>) / 1000., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> = 500., <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">set_pertubation</a>(<span class="keywordtype">double</span> f, <span class="keywordtype">double</span> omega_V);</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(<span class="keywordtype">double</span> f, <span class="keywordtype">double</span> omega_V, <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a> particle);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">evolve_RK4</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">evolve_forward_euler</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> <a class="code hl_function" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">simulate</a>(<span class="keywordtype">double</span> time, uint steps, std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a>(std::string path, <span class="keywordtype">double</span> time, uint steps,</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> </div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keywordtype">double</span> <a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(<span class="keywordtype">double</span> time, uint steps,</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> </div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span>};</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> </div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aParticle_8hpp_html"><div class="ttname"><a href="Particle_8hpp.html">Particle.hpp</a></div><div class="ttdoc">A class that holds the properties of a particle.</div></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00021">Particle.hpp:21</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0112525d9e79a472e761f8ef402a339f"><div class="ttname"><a href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap::particles</a></div><div class="ttdeci">std::vector&lt; Particle &gt; particles</div><div class="ttdoc">The particles in the Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00036">PenningTrap.hpp:36</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0194be61c956a9259c747c23e4163c5b"><div class="ttname"><a href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00266">PenningTrap.cpp:266</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0cac3509aa96e71a26d3b2c902e27716"><div class="ttname"><a href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">PenningTrap::B_0</a></div><div class="ttdeci">double B_0</div><div class="ttdoc">Magnetic field strength.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00032">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a1d58feaa2c9e34cbf26b1c5ed75ca9d9"><div class="ttname"><a href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap::external_E_field</a></div><div class="ttdeci">vec_3d external_E_field(vec_3d r)</div><div class="ttdoc">Calculate E at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00087">PenningTrap.cpp:87</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a1f668c4433421136ad51741741aa1bc8"><div class="ttname"><a href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a></div><div class="ttdeci">vec_3d total_force(unsigned int i)</div><div class="ttdoc">calculate the total force on a particle p_i.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00146">PenningTrap.cpp:146</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2f168622587709b9e3c49077f0b9a640"><div class="ttname"><a href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap::k_r</a></div><div class="ttdeci">sim_arr k_r</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00039">PenningTrap.hpp:39</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a36946152fd951b1f7c346c51ff900d8e"><div class="ttname"><a href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a></div><div class="ttdeci">void evolve_RK4(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the RK4 method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00151">PenningTrap.cpp:151</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a43e74792ab4b3f9299f35cb64bdb2648"><div class="ttname"><a href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap::r_func</a></div><div class="ttdeci">vec_3d r_func(unsigned int i, unsigned int j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00064">PenningTrap.cpp:64</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a46a954a0946def199e30fb300ba1c47b"><div class="ttname"><a href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap::total_force_particles</a></div><div class="ttdeci">vec_3d total_force_particles(unsigned int i)</div><div class="ttdoc">Calculate the total force on a particle p_i from other particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00129">PenningTrap.cpp:129</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a5331837e6dd7bce807a99edd2ba7e854"><div class="ttname"><a href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap::simulate</a></div><div class="ttdeci">sim_arr simulate(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate the particle system inside the Penning trap over a certain amount of time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00211">PenningTrap.cpp:211</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a66dfe89c68716b9502927b97f59c27d2"><div class="ttname"><a href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">PenningTrap::d</a></div><div class="ttdeci">double d</div><div class="ttdoc">Characteristic dimension.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00034">PenningTrap.hpp:34</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a6e9776ff5b149f01080800716455d7c8"><div class="ttname"><a href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a></div><div class="ttdeci">void add_particle(Particle particle)</div><div class="ttdoc">Add a particle to the system.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00082">PenningTrap.cpp:82</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00035">PenningTrap.hpp:35</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a9ae34ad740a230e667e96bc6ee8730ce"><div class="ttname"><a href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec_3d force_on_particle(unsigned int i, unsigned int j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00100">PenningTrap.cpp:100</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_aaf105828121c4a33cc2b217453c20317"><div class="ttname"><a href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap::V_0</a></div><div class="ttdeci">std::function&lt; double(double)&gt; V_0</div><div class="ttdoc">Applied potential.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00033">PenningTrap.hpp:33</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00186">PenningTrap.cpp:186</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_abbb832a85139b1a56ebde57d7b8f9a57"><div class="ttname"><a href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_acbf065c9c125682329ad82a8d166554c"><div class="ttname"><a href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap::external_B_field</a></div><div class="ttdeci">vec_3d external_B_field(vec_3d r)</div><div class="ttdoc">Calculate B at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00095">PenningTrap.cpp:95</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae72d203b0bfa1b9e72bea28cb2863c56"><div class="ttname"><a href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a></div><div class="ttdeci">vec_3d total_force_external(unsigned int i)</div><div class="ttdoc">Calculate the total external force on a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00114">PenningTrap.cpp:114</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae9b5afdaa5cd366e94bd294452a1eed4"><div class="ttname"><a href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap::k_v</a></div><div class="ttdeci">sim_arr k_v</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00037">PenningTrap.hpp:37</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_af98a720da60b0e1a62aefa5f5cb37c1e"><div class="ttname"><a href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap::v_func</a></div><div class="ttdeci">vec_3d v_func(unsigned int i, unsigned int j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00046">PenningTrap.cpp:46</a></div></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00022">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassPenningTrapTest_html"><div class="ttname"><a href="classPenningTrapTest.html">PenningTrapTest</a></div><div class="ttdoc">Test class for the Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00023">test_suite.cpp:24</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00031">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0112525d9e79a472e761f8ef402a339f"><div class="ttname"><a href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap::particles</a></div><div class="ttdeci">std::vector&lt; Particle &gt; particles</div><div class="ttdoc">The particles in the Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00042">PenningTrap.hpp:42</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0cac3509aa96e71a26d3b2c902e27716"><div class="ttname"><a href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">PenningTrap::B_0</a></div><div class="ttdeci">double B_0</div><div class="ttdoc">Magnetic field strength.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00037">PenningTrap.hpp:37</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2c01108b52c8e2a003cf9170da9e7682"><div class="ttname"><a href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap::total_force_external</a></div><div class="ttdeci">vec3 total_force_external(uint i)</div><div class="ttdoc">Calculate the total external force on a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00083">PenningTrap.cpp:83</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2f168622587709b9e3c49077f0b9a640"><div class="ttname"><a href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap::k_r</a></div><div class="ttdeci">sim_arr k_r</div><div class="ttdoc">A 2D vector containing all where is the index of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00052">PenningTrap.hpp:52</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a2fe1cefbae18fa5808155ee0d2df713c"><div class="ttname"><a href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">PenningTrap::total_force_particles</a></div><div class="ttdeci">vec3 total_force_particles(uint i)</div><div class="ttdoc">Calculate the total force on a particle p_i from other particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00092">PenningTrap.cpp:92</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a361f2c4862c90b5e8e2a2f50c6a95655"><div class="ttname"><a href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">PenningTrap::external_B_field</a></div><div class="ttdeci">vec3 external_B_field(vec3 r)</div><div class="ttdoc">Calculate B at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00067">PenningTrap.cpp:67</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a36946152fd951b1f7c346c51ff900d8e"><div class="ttname"><a href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a></div><div class="ttdeci">void evolve_RK4(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the RK4 method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00171">PenningTrap.cpp:171</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a3c0a44e4e0a94366ff609e81fe463fa2"><div class="ttname"><a href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">PenningTrap::v_func</a></div><div class="ttdeci">vec3 v_func(uint i, uint j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00021">PenningTrap.cpp:21</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a5846c8f75cdc543fd9cf0b2185a3ef22"><div class="ttname"><a href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">PenningTrap::external_E_field</a></div><div class="ttdeci">vec3 external_E_field(vec3 r)</div><div class="ttdoc">Calculate E at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00059">PenningTrap.cpp:59</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a6069f82d8dbc7cadaebd228dbcd95018"><div class="ttname"><a href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap::total_force_no_interaction</a></div><div class="ttdeci">vec3 total_force_no_interaction(uint i)</div><div class="ttdoc">calculate the total force on a particle p_i without interaction</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00112">PenningTrap.cpp:112</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a66dfe89c68716b9502927b97f59c27d2"><div class="ttname"><a href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">PenningTrap::d</a></div><div class="ttdeci">double d</div><div class="ttdoc">Characteristic dimension.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00040">PenningTrap.hpp:40</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a6e9776ff5b149f01080800716455d7c8"><div class="ttname"><a href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a></div><div class="ttdeci">void add_particle(Particle particle)</div><div class="ttdoc">Add a particle to the system.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00166">PenningTrap.cpp:166</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a715329844d75ec4c04f8391421fb4e89"><div class="ttname"><a href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">PenningTrap::V_0</a></div><div class="ttdeci">double V_0</div><div class="ttdoc">Applied potential.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00038">PenningTrap.hpp:38</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a7a1d9f0528a12308de25bc30718da20a"><div class="ttname"><a href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap::simulate</a></div><div class="ttdeci">simulation_t simulate(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate the particle system inside the Penning trap over a certain amount of time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a7f210bb2768a5d79ced4b0df0df97598"><div class="ttname"><a href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec3 force_on_particle(uint i, uint j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00072">PenningTrap.cpp:72</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a826b7fa8e709d481eb1dee7d0c2cdc08"><div class="ttname"><a href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">PenningTrap::r_func</a></div><div class="ttdeci">vec3 r_func(uint i, uint j, double dt)</div><div class="ttdoc">Helper for evolve_RK4 when calculating values.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00040">PenningTrap.cpp:40</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00041">PenningTrap.hpp:41</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a9a301b0540078c36697880ef204afdf3"><div class="ttname"><a href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a></div><div class="ttdeci">vec3 total_force(uint i)</div><div class="ttdoc">calculate the total force on a particle p_i.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00104">PenningTrap.cpp:104</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a9d1d8e90ca839b928aee1ad0cd4aff43"><div class="ttname"><a href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">PenningTrap::set_pertubation</a></div><div class="ttdeci">void set_pertubation(double f, double omega_V)</div><div class="ttdoc">Time dependent perturbation to V_0.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00146">PenningTrap.cpp:146</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_aaee129f177657455348d0c8ae1441dea"><div class="ttname"><a href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap::reinitialize</a></div><div class="ttdeci">void reinitialize(double f, double omega_V, double t=0.)</div><div class="ttdoc">Give all particles new positions and velocities, and change t and V_0.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00153">PenningTrap.cpp:153</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00211">PenningTrap.cpp:211</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ac529aa26c288f34eae184a67e6bac41f"><div class="ttname"><a href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00311">PenningTrap.cpp:311</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ad8bc4df7ab3eed53b16cfdff38e7760b"><div class="ttname"><a href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00273">PenningTrap.cpp:273</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae915f6ad0eef1fb46530e836b6e071e5"><div class="ttname"><a href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">PenningTrap::perturbation</a></div><div class="ttdeci">std::function&lt; double(double)&gt; perturbation</div><div class="ttdoc">Time-dependent perturbation.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00039">PenningTrap.hpp:39</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ae9b5afdaa5cd366e94bd294452a1eed4"><div class="ttname"><a href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap::k_v</a></div><div class="ttdeci">sim_arr k_v</div><div class="ttdoc">A 2D vector containing all where is the index of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00047">PenningTrap.hpp:47</a></div></div>
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00017">constants.hpp:17</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_af40a326b23c68a27cebe60f16634a2cb"><div class="ttname"><a href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a></div><div class="ttdeci">#define V</div><div class="ttdoc">1 Volt. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00019">constants.hpp:19</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00021">constants.hpp:21</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_af40a326b23c68a27cebe60f16634a2cb"><div class="ttname"><a href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a></div><div class="ttdeci">#define V</div><div class="ttdoc">1 Volt. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00025">constants.hpp:25</a></div></div>
<div class="ttc" id="astructsimulation_html"><div class="ttname"><a href="structsimulation.html">simulation</a></div><div class="ttdoc">Typedef for PenningTrap::simulation return value.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00040">typedefs.hpp:40</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html"><div class="ttname"><a href="typedefs_8hpp.html">typedefs.hpp</a></div><div class="ttdoc">Useful typedefs for cleaner code.</div></div>
<div class="ttc" id="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec_3d</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_aec69d34220fff45de238b9e01f2686af"><div class="ttname"><a href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></div><div class="ttdeci">std::vector&lt; sim_cols &gt; sim_arr</div><div class="ttdoc">Typedef for the result of the simulate method.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00032">typedefs.hpp:32</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a3bdfb73a02f88ae32b6128ef747c4aea"><div class="ttname"><a href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec3</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00023">typedefs.hpp:23</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_aec69d34220fff45de238b9e01f2686af"><div class="ttname"><a href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></div><div class="ttdeci">std::vector&lt; sim_cols &gt; sim_arr</div><div class="ttdoc">Typedef for the result of the simulate method.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -0,0 +1,216 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/animate_100_particles.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('animate__100__particles_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">animate_100_particles.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Animate 100 particles.
<a href="#details">More...</a></p>
<p><a href="animate__100__particles_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a88563d050144188c2c625a1063f9b4f8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html#a88563d050144188c2c625a1063f9b4f8">animate_100_particles.get_data</a> (files)</td></tr>
<tr class="separator:a88563d050144188c2c625a1063f9b4f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b3fbca78794cb9cd04d6059d8b63624"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html#a8b3fbca78794cb9cd04d6059d8b63624">animate_100_particles.update</a> (num, lines, arr)</td></tr>
<tr class="separator:a8b3fbca78794cb9cd04d6059d8b63624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5a461adc32af6d9bc9475cd6be309ca"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html#ab5a461adc32af6d9bc9475cd6be309ca">animate_100_particles.animate</a> ()</td></tr>
<tr class="separator:ab5a461adc32af6d9bc9475cd6be309ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Animate 100 particles. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000012">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ab5a461adc32af6d9bc9475cd6be309ca" name="ab5a461adc32af6d9bc9475cd6be309ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5a461adc32af6d9bc9475cd6be309ca">&#9670;&#160;</a></span>animate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def animate_100_particles.animate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="animate__100__particles_8py_source.html#l00041">41</a> of file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div>
</div>
<a id="a88563d050144188c2c625a1063f9b4f8" name="a88563d050144188c2c625a1063f9b4f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88563d050144188c2c625a1063f9b4f8">&#9670;&#160;</a></span>get_data()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def animate_100_particles.get_data </td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>files</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="animate__100__particles_8py_source.html#l00018">18</a> of file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div>
</div>
<a id="a8b3fbca78794cb9cd04d6059d8b63624" name="a8b3fbca78794cb9cd04d6059d8b63624"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b3fbca78794cb9cd04d6059d8b63624">&#9670;&#160;</a></span>update()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def animate_100_particles.update </td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>num</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>lines</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>arr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="animate__100__particles_8py_source.html#l00035">35</a> of file <a class="el" href="animate__100__particles_8py_source.html">animate_100_particles.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/animate_100_particles.py Source File</title>
<title>Penning Trap Simulation: src/scripts/animate_100_particles.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
@@ -101,83 +101,84 @@ $(document).ready(function(){initNavTree('animate__100__particles_8py_source.htm
<div class="headertitle"><div class="title">animate_100_particles.py</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">from</span> matplotlib <span class="keyword">import</span> animation</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">from</span> mpl_toolkits.mplot3d <span class="keyword">import</span> Axes3D</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">def </span>get_data(files):</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> res = []</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keywordflow">for</span> file <span class="keywordflow">in</span> files:</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> arr = [[], [], []]</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">with</span> open(file, encoding=<span class="stringliteral">&quot;utf8&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> lines = f.readlines()</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> xi, yi, zi = map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> arr[0].append(xi)</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> arr[1].append(yi)</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> arr[2].append(zi)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> res.append(arr)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordflow">return</span> np.array(res)</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">def </span>update(num, lines, arr):</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">for</span> line, a <span class="keywordflow">in</span> zip(lines, arr):</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> line.set_data(a[:2, num - 1 : num])</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> line.set_3d_properties(a[2, num])</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>animate():</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> plt.style.use(<span class="stringliteral">&quot;dark_background&quot;</span>)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> fig = plt.figure()</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ax = fig.add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<a href="animate__100__particles_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">from</span> matplotlib <span class="keyword">import</span> animation</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">from</span> mpl_toolkits.mplot3d <span class="keyword">import</span> Axes3D</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">def </span>get_data(files):</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> res = []</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">for</span> file <span class="keywordflow">in</span> files:</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> arr = [[], [], []]</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">with</span> open(file, encoding=<span class="stringliteral">&quot;utf8&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> lines = f.readlines()</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> xi, yi, zi = map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> arr[0].append(xi)</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> arr[1].append(yi)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> arr[2].append(zi)</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> res.append(arr)</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">return</span> np.array(res)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> arr = get_data([f<span class="stringliteral">&quot;output/simulate_100_particles/particle_{i}.txt&quot;</span> <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(100)])</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> arr = arr[:, :, ::10]</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> N = len(arr[0][0])</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">def </span>update(num, lines, arr):</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">for</span> line, a <span class="keywordflow">in</span> zip(lines, arr):</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> line.set_data(a[:2, num - 1 : num])</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> line.set_3d_properties(a[2, num])</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> lines = [ax.plot(*a[:, 1], <span class="stringliteral">&quot;o&quot;</span>)[0] <span class="keywordflow">for</span> a <span class="keywordflow">in</span> arr]</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> ax.set_title(<span class="stringliteral">&quot;100 particles inside a Penning trap&quot;</span>)</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> plt.figtext(</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> 0.5,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> 0.01,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;100 randomly generated particles &quot;</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="stringliteral">&quot;evolving over a time of 50 microseconds.&quot;</span>,</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> fontsize=12,</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> horizontalalignment=<span class="stringliteral">&quot;center&quot;</span>,</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> )</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ax.set_xlim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> ax.set_xlabel(<span class="stringliteral">&quot;X (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> ax.set_ylim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> ax.set_ylabel(<span class="stringliteral">&quot;Y (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> ax.set_zlim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> ax.set_zlabel(<span class="stringliteral">&quot;Z (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> ani = animation.FuncAnimation(</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> fig, update, N, fargs=(lines, arr), interval=1, blit=<span class="keyword">False</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> )</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="comment"># ani.save(&quot;../images/100_particles.gif&quot;, writer=animation.FFMpegFileWriter(fps=50))</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> plt.show()</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keyword">def </span>animate():</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> plt.style.use(<span class="stringliteral">&quot;dark_background&quot;</span>)</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> fig = plt.figure()</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> ax = fig.add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> arr = get_data([f<span class="stringliteral">&quot;output/simulate_100_particles/particle_{i}_r.txt&quot;</span> <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(100)])</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> arr = arr[:, :, ::40]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> N = len(arr[0][0])</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> lines = [ax.plot(*a[:, 1], <span class="stringliteral">&quot;o&quot;</span>)[0] <span class="keywordflow">for</span> a <span class="keywordflow">in</span> arr]</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> ax.set_title(<span class="stringliteral">&quot;100 particles inside a Penning trap&quot;</span>)</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> plt.figtext(</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> 0.5,</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> 0.01,</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="stringliteral">&quot;100 randomly generated particles &quot;</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="stringliteral">&quot;evolving over a time of 50 microseconds.&quot;</span>,</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> fontsize=12,</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> horizontalalignment=<span class="stringliteral">&quot;center&quot;</span>,</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> )</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> ax.set_xlim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ax.set_xlabel(<span class="stringliteral">&quot;X (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> ax.set_ylim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> ax.set_ylabel(<span class="stringliteral">&quot;Y (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> animate()</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ax.set_zlim3d([-500.0, 500.0])</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> ax.set_zlabel(<span class="stringliteral">&quot;Z (micrometers)&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> ani = animation.FuncAnimation(</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> fig, update, N, fargs=(lines, arr), interval=1, blit=<span class="keyword">False</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> )</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> ani.save(<span class="stringliteral">&quot;../images/100_particles.gif&quot;</span>, writer=animation.FFMpegFileWriter(fps=50))</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> animate()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>animate_100_particles.py</b></li>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>

View File

@@ -105,7 +105,8 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classParticle.html" target="_self">Particle</a></td><td class="desc">A class that holds attributes of a particle </td></tr>
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classPenningTrap.html" target="_self">PenningTrap</a></td><td class="desc">A class that simulates a Penning trap </td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classPenningTrapTest.html" target="_self">PenningTrapTest</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classPenningTrapTest.html" target="_self">PenningTrapTest</a></td><td class="desc">Test class for the Penning trap </td></tr>
<tr id="row_3_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimulation.html" target="_self">simulation</a></td><td class="desc">Typedef for PenningTrap::simulation return value </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->

View File

@@ -2,5 +2,6 @@ var annotated_dup =
[
[ "Particle", "classParticle.html", "classParticle" ],
[ "PenningTrap", "classPenningTrap.html", "classPenningTrap" ],
[ "PenningTrapTest", "classPenningTrapTest.html", null ]
[ "PenningTrapTest", "classPenningTrapTest.html", "classPenningTrapTest" ],
[ "simulation", "structsimulation.html", null ]
];

View File

@@ -102,24 +102,40 @@ $(document).ready(function(){initNavTree('bug.html',''); initResizable(); });
</div><!--header-->
<div class="contents">
<div class="textblock"><dl class="reflist">
<dt>File <a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a> </dt>
<dd><a class="anchor" id="_bug000012"></a>No known bugs </dd>
<dt>File <a class="el" href="constants_8hpp.html">constants.hpp</a> </dt>
<dd><a class="anchor" id="_bug000001"></a>No known bugs </dd>
<dt>File <a class="el" href="main_8cpp.html">main.cpp</a> </dt>
<dt>File <a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a> </dt>
<dd><a class="anchor" id="_bug000006"></a>No known bugs </dd>
<dt>File <a class="el" href="Particle_8cpp.html">Particle.cpp</a> </dt>
<dt>File <a class="el" href="main_8cpp.html">main.cpp</a> </dt>
<dd><a class="anchor" id="_bug000007"></a>No known bugs </dd>
<dt>File <a class="el" href="Particle_8cpp.html">Particle.cpp</a> </dt>
<dd><a class="anchor" id="_bug000008"></a>No known bugs </dd>
<dt>File <a class="el" href="Particle_8hpp.html">Particle.hpp</a> </dt>
<dd><a class="anchor" id="_bug000002"></a>No known bugs </dd>
<dt>File <a class="el" href="PenningTrap_8cpp.html">PenningTrap.cpp</a> </dt>
<dd><a class="anchor" id="_bug000008"></a>No known bugs </dd>
<dd><a class="anchor" id="_bug000009"></a>No known bugs </dd>
<dt>File <a class="el" href="PenningTrap_8hpp.html">PenningTrap.hpp</a> </dt>
<dd><a class="anchor" id="_bug000003"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a> </dt>
<dd><a class="anchor" id="_bug000013"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__3d_8py.html">plot_3d.py</a> </dt>
<dd><a class="anchor" id="_bug000014"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a> </dt>
<dd><a class="anchor" id="_bug000015"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a> </dt>
<dd><a class="anchor" id="_bug000016"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a> </dt>
<dd><a class="anchor" id="_bug000017"></a>No known bugs </dd>
<dt>File <a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a> </dt>
<dd><a class="anchor" id="_bug000018"></a>No known bugs </dd>
<dt>File <a class="el" href="test__suite_8cpp.html">test_suite.cpp</a> </dt>
<dd><a class="anchor" id="_bug000009"></a>No known bugs </dd>
<dd><a class="anchor" id="_bug000010"></a>No known bugs </dd>
<dt>File <a class="el" href="typedefs_8hpp.html">typedefs.hpp</a> </dt>
<dd><a class="anchor" id="_bug000004"></a>No known bugs </dd>
<dt>File <a class="el" href="utils_8cpp.html">utils.cpp</a> </dt>
<dd><a class="anchor" id="_bug000010"></a>No known bugs </dd>
<dd><a class="anchor" id="_bug000011"></a>No known bugs </dd>
<dt>File <a class="el" href="utils_8hpp.html">utils.hpp</a> </dt>
<dd><a class="anchor" id="_bug000005"></a>No known bugs </dd>
</dl>

View File

@@ -105,11 +105,11 @@ $(document).ready(function(){initNavTree('classParticle.html',''); initResizable
<p>This is the complete list of members for <a class="el" href="classParticle.html">Particle</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a>(double q, double m, vec_3d r_vec, vec_3d v_vec)</td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4">Particle</a>(vec3 r_vec, vec3 v_vec, double q=CA_CHARGE, double m=CA_MASS)</td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232">PenningTrap</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a></td><td class="entry"><a class="el" href="classParticle.html">Particle</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -114,24 +114,24 @@ $(document).ready(function(){initNavTree('classParticle.html',''); initResizable
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7af9f8d1fef63dd7643b06629ac7bef4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a> (double <a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>, double <a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>)</td></tr>
<tr class="memdesc:a7af9f8d1fef63dd7643b06629ac7bef4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the particle. <br /></td></tr>
<tr class="separator:a7af9f8d1fef63dd7643b06629ac7bef4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1d7535fb8311eaa77d2b7b345882ec4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4">Particle</a> (<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="el" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>, <a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="el" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a>, double <a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>=<a class="el" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">CA_CHARGE</a>, double <a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>=<a class="el" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a>)</td></tr>
<tr class="memdesc:af1d7535fb8311eaa77d2b7b345882ec4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the particle. <br /></td></tr>
<tr class="separator:af1d7535fb8311eaa77d2b7b345882ec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a1c59101411db43624828b766f87ad460"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a></td></tr>
<tr class="memdesc:a1c59101411db43624828b766f87ad460"><td class="mdescLeft">&#160;</td><td class="mdescRight">position <br /></td></tr>
<tr class="separator:a1c59101411db43624828b766f87ad460"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a10400add8dd22b8031330c2aafb6fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">v_vec</a></td></tr>
<tr class="memdesc:a3a10400add8dd22b8031330c2aafb6fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">velocity <br /></td></tr>
<tr class="separator:a3a10400add8dd22b8031330c2aafb6fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a566dcc1de4bdc01251776948798ea8e1"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a></td></tr>
<tr class="memdesc:a566dcc1de4bdc01251776948798ea8e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Charge. <br /></td></tr>
<tr class="separator:a566dcc1de4bdc01251776948798ea8e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedcc7e1bc53b0e2b1a4a07c9a1b47563"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a></td></tr>
<tr class="memdesc:aedcc7e1bc53b0e2b1a4a07c9a1b47563"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mass. <br /></td></tr>
<tr class="separator:aedcc7e1bc53b0e2b1a4a07c9a1b47563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9497cd8f2dcad0fad54f571ddb383e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a></td></tr>
<tr class="memdesc:af9497cd8f2dcad0fad54f571ddb383e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">position <br /></td></tr>
<tr class="separator:af9497cd8f2dcad0fad54f571ddb383e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a879692772803d6ab65fa4993b54aea6e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a></td></tr>
<tr class="memdesc:a879692772803d6ab65fa4993b54aea6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">velocity <br /></td></tr>
<tr class="separator:a879692772803d6ab65fa4993b54aea6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
@@ -142,10 +142,10 @@ Friends</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class that holds attributes of a particle. </p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00021">21</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00022">22</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a7af9f8d1fef63dd7643b06629ac7bef4" name="a7af9f8d1fef63dd7643b06629ac7bef4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7af9f8d1fef63dd7643b06629ac7bef4">&#9670;&#160;</a></span>Particle()</h2>
<a id="af1d7535fb8311eaa77d2b7b345882ec4" name="af1d7535fb8311eaa77d2b7b345882ec4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1d7535fb8311eaa77d2b7b345882ec4">&#9670;&#160;</a></span>Particle()</h2>
<div class="memitem">
<div class="memproto">
@@ -153,26 +153,26 @@ Friends</h2></td></tr>
<tr>
<td class="memname">Particle::Particle </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>q</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>m</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td>
<td class="paramname"><em>r_vec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td>
<td class="paramname"><em>v_vec</em>&#160;</td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td>
<td class="paramname"><em>v_vec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>q</em> = <code><a class="el" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">CA_CHARGE</a></code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>m</em> = <code><a class="el" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a></code>&#160;</td>
</tr>
<tr>
<td></td>
@@ -221,7 +221,7 @@ Friends</h2></td></tr>
<p>Make private attributes available for <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a>. </p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00043">43</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00045">45</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
</div>
</div>
@@ -248,7 +248,7 @@ Friends</h2></td></tr>
<p>Mass. </p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00024">24</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00028">28</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
</div>
</div>
@@ -274,12 +274,12 @@ Friends</h2></td></tr>
<p>Charge. </p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00023">23</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="Particle_8hpp_source.html#l00027">27</a> of file <a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>.</p>
</div>
</div>
<a id="af9497cd8f2dcad0fad54f571ddb383e6" name="af9497cd8f2dcad0fad54f571ddb383e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9497cd8f2dcad0fad54f571ddb383e6">&#9670;&#160;</a></span>r_vec</h2>
<a id="a1c59101411db43624828b766f87ad460" name="a1c59101411db43624828b766f87ad460"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c59101411db43624828b766f87ad460">&#9670;&#160;</a></span>r_vec</h2>
<div class="memitem">
<div class="memproto">
@@ -288,7 +288,7 @@ Friends</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> Particle::r_vec</td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> Particle::r_vec</td>
</tr>
</table>
</td>
@@ -304,8 +304,8 @@ Friends</h2></td></tr>
</div>
</div>
<a id="a879692772803d6ab65fa4993b54aea6e" name="a879692772803d6ab65fa4993b54aea6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a879692772803d6ab65fa4993b54aea6e">&#9670;&#160;</a></span>v_vec</h2>
<a id="a3a10400add8dd22b8031330c2aafb6fe" name="a3a10400add8dd22b8031330c2aafb6fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a10400add8dd22b8031330c2aafb6fe">&#9670;&#160;</a></span>v_vec</h2>
<div class="memitem">
<div class="memproto">
@@ -314,7 +314,7 @@ Friends</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> Particle::v_vec</td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> Particle::v_vec</td>
</tr>
</table>
</td>

View File

@@ -1,9 +1,9 @@
var classParticle =
[
[ "Particle", "classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4", null ],
[ "Particle", "classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4", null ],
[ "PenningTrap", "classParticle.html#aa797d319549dc2a0beb06cdbfd430232", null ],
[ "m", "classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563", null ],
[ "q", "classParticle.html#a566dcc1de4bdc01251776948798ea8e1", null ],
[ "r_vec", "classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6", null ],
[ "v_vec", "classParticle.html#a879692772803d6ab65fa4993b54aea6e", null ]
[ "r_vec", "classParticle.html#a1c59101411db43624828b766f87ad460", null ],
[ "v_vec", "classParticle.html#a3a10400add8dd22b8031330c2aafb6fe", null ]
];

View File

@@ -109,25 +109,30 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">evolve_forward_euler</a>(double dt, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">evolve_RK4</a>(double dt, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">external_B_field</a>(vec_3d r)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a>(vec_3d r)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(unsigned int i, unsigned int j)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a>(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">external_B_field</a>(vec3 r)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">external_E_field</a>(vec3 r)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">force_on_particle</a>(uint i, uint j)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a>(double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1">PenningTrap</a>(unsigned int i, double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73">PenningTrap</a>(std::vector&lt; Particle &gt; particles, double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a>(unsigned int i, unsigned int j, double dt)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a>(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap</a>(double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f">PenningTrap</a>(uint i, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f">PenningTrap</a>(std::vector&lt; Particle &gt; particles, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae">PenningTrapTest</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">perturbation</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">r_func</a>(uint i, uint j, double dt)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(double f, double omega_V, double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">set_pertubation</a>(double f, double omega_V)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">simulate</a>(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">total_force</a>(unsigned int i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(unsigned int i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(unsigned int i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">v_func</a>(unsigned int i, unsigned int j, double dt)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(std::string path, double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">total_force</a>(uint i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">total_force_external</a>(uint i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">total_force_no_interaction</a>(uint i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">total_force_particles</a>(uint i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a></td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">v_func</a>(uint i, uint j, double dt)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a>(std::string path, double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -102,6 +102,7 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classPenningTrap-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">PenningTrap Class Reference</div></div>
</div><!--header-->
@@ -114,69 +115,81 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae670d7de621acdb343b01af098086f63"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a> (double <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>=<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, std::function&lt; double(double)&gt; <a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>=[](double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { return 25. *<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>/1000.;}, double <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>=500., double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:ae670d7de621acdb343b01af098086f63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:ae670d7de621acdb343b01af098086f63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a763700316b502d5900e587c1f61e6bf1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1">PenningTrap</a> (unsigned int i, double <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>=<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, std::function&lt; double(double)&gt; <a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>=[](double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { return 25. *<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>/1000.;}, double <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>=500., double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:a763700316b502d5900e587c1f61e6bf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:a763700316b502d5900e587c1f61e6bf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67139e04ef69c0bcffde8f30f67cbf73"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73">PenningTrap</a> (std::vector&lt; <a class="el" href="classParticle.html">Particle</a> &gt; <a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>, double <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>=<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, std::function&lt; double(double)&gt; <a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>=[](double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) { return 25. *<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>/1000.;}, double <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>=500., double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:a67139e04ef69c0bcffde8f30f67cbf73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:a67139e04ef69c0bcffde8f30f67cbf73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b6c6d4636f3a6e279ccde59d4a345e8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap</a> (double <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>=<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, double <a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a>=(25. *<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>)/1000., double <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>=500., double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:a5b6c6d4636f3a6e279ccde59d4a345e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:a5b6c6d4636f3a6e279ccde59d4a345e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a830be1b8cbf59664e060b6edbeaa302f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f">PenningTrap</a> (uint i, double <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>=<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, double <a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a>=(25. *<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>)/1000., double <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>=500., double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:a830be1b8cbf59664e060b6edbeaa302f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:a830be1b8cbf59664e060b6edbeaa302f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addc96789dcfec07b75156e19fee82f4f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f">PenningTrap</a> (std::vector&lt; <a class="el" href="classParticle.html">Particle</a> &gt; <a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>, double <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>=<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>, double <a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a>=(25. *<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>)/1000., double <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>=500., double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:addc96789dcfec07b75156e19fee82f4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:addc96789dcfec07b75156e19fee82f4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d1d8e90ca839b928aee1ad0cd4aff43"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">set_pertubation</a> (double f, double omega_V)</td></tr>
<tr class="memdesc:a9d1d8e90ca839b928aee1ad0cd4aff43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time dependent perturbation to V_0. <br /></td></tr>
<tr class="separator:a9d1d8e90ca839b928aee1ad0cd4aff43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaee129f177657455348d0c8ae1441dea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a> (double f, double omega_V, double <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>=0.)</td></tr>
<tr class="memdesc:aaee129f177657455348d0c8ae1441dea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Give all particles new positions and velocities, and change t and V_0. <br /></td></tr>
<tr class="separator:aaee129f177657455348d0c8ae1441dea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e9776ff5b149f01080800716455d7c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a> (<a class="el" href="classParticle.html">Particle</a> particle)</td></tr>
<tr class="memdesc:a6e9776ff5b149f01080800716455d7c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a particle to the system. <br /></td></tr>
<tr class="separator:a6e9776ff5b149f01080800716455d7c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d58feaa2c9e34cbf26b1c5ed75ca9d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a> (<a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r)</td></tr>
<tr class="memdesc:a1d58feaa2c9e34cbf26b1c5ed75ca9d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate E at point r. <br /></td></tr>
<tr class="separator:a1d58feaa2c9e34cbf26b1c5ed75ca9d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbf065c9c125682329ad82a8d166554c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">external_B_field</a> (<a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r)</td></tr>
<tr class="memdesc:acbf065c9c125682329ad82a8d166554c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate B at point r. <br /></td></tr>
<tr class="separator:acbf065c9c125682329ad82a8d166554c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ae34ad740a230e667e96bc6ee8730ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a> (unsigned int i, unsigned int j)</td></tr>
<tr class="memdesc:a9ae34ad740a230e667e96bc6ee8730ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the force between 2 particles. <br /></td></tr>
<tr class="separator:a9ae34ad740a230e667e96bc6ee8730ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae72d203b0bfa1b9e72bea28cb2863c56"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a> (unsigned int i)</td></tr>
<tr class="memdesc:ae72d203b0bfa1b9e72bea28cb2863c56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the total external force on a particle. <br /></td></tr>
<tr class="separator:ae72d203b0bfa1b9e72bea28cb2863c56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46a954a0946def199e30fb300ba1c47b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a> (unsigned int i)</td></tr>
<tr class="memdesc:a46a954a0946def199e30fb300ba1c47b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the total force on a particle p_i from other particles. <br /></td></tr>
<tr class="separator:a46a954a0946def199e30fb300ba1c47b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f668c4433421136ad51741741aa1bc8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">total_force</a> (unsigned int i)</td></tr>
<tr class="memdesc:a1f668c4433421136ad51741741aa1bc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculate the total force on a particle p_i. <br /></td></tr>
<tr class="separator:a1f668c4433421136ad51741741aa1bc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36946152fd951b1f7c346c51ff900d8e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">evolve_RK4</a> (double dt, bool particle_interaction=true)</td></tr>
<tr class="memdesc:a36946152fd951b1f7c346c51ff900d8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Go forward one timestep using the RK4 method. <br /></td></tr>
<tr class="separator:a36946152fd951b1f7c346c51ff900d8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9ea97a406534bbe621a95215144875e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">evolve_forward_euler</a> (double dt, bool particle_interaction=true)</td></tr>
<tr class="memdesc:ab9ea97a406534bbe621a95215144875e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Go forward one timestep using the forward Euler method. <br /></td></tr>
<tr class="separator:ab9ea97a406534bbe621a95215144875e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5331837e6dd7bce807a99edd2ba7e854"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a> (double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td></tr>
<tr class="memdesc:a5331837e6dd7bce807a99edd2ba7e854"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate the particle system inside the Penning trap over a certain amount of time. <br /></td></tr>
<tr class="separator:a5331837e6dd7bce807a99edd2ba7e854"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbb832a85139b1a56ebde57d7b8f9a57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a> (std::string path, double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td></tr>
<tr class="memdesc:abbb832a85139b1a56ebde57d7b8f9a57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate and write the displacement of all particles to files. <br /></td></tr>
<tr class="separator:abbb832a85139b1a56ebde57d7b8f9a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0194be61c956a9259c747c23e4163c5b"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a> (double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td></tr>
<tr class="memdesc:a0194be61c956a9259c747c23e4163c5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate and calculate what fraction of particles are still left inside the Penning trap after the simulation. <br /></td></tr>
<tr class="separator:a0194be61c956a9259c747c23e4163c5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a1d9f0528a12308de25bc30718da20a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">simulation_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">simulate</a> (double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td></tr>
<tr class="memdesc:a7a1d9f0528a12308de25bc30718da20a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate the particle system inside the Penning trap over a certain amount of time. <br /></td></tr>
<tr class="separator:a7a1d9f0528a12308de25bc30718da20a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8bc4df7ab3eed53b16cfdff38e7760b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a> (std::string path, double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td></tr>
<tr class="memdesc:ad8bc4df7ab3eed53b16cfdff38e7760b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate and write the displacement of all particles to files. <br /></td></tr>
<tr class="separator:ad8bc4df7ab3eed53b16cfdff38e7760b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac529aa26c288f34eae184a67e6bac41f"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a> (double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</td></tr>
<tr class="memdesc:ac529aa26c288f34eae184a67e6bac41f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate and calculate what fraction of particles are still left inside the Penning trap after the simulation. <br /></td></tr>
<tr class="separator:ac529aa26c288f34eae184a67e6bac41f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:af98a720da60b0e1a62aefa5f5cb37c1e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">v_func</a> (unsigned int i, unsigned int j, double dt)</td></tr>
<tr class="memdesc:af98a720da60b0e1a62aefa5f5cb37c1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper for evolve_RK4 when calculating \(k_{v,i,j}\) values. <br /></td></tr>
<tr class="separator:af98a720da60b0e1a62aefa5f5cb37c1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43e74792ab4b3f9299f35cb64bdb2648"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a> (unsigned int i, unsigned int j, double dt)</td></tr>
<tr class="memdesc:a43e74792ab4b3f9299f35cb64bdb2648"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper for evolve_RK4 when calculating \(k_{r,i,j}\) values. <br /></td></tr>
<tr class="separator:a43e74792ab4b3f9299f35cb64bdb2648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c0a44e4e0a94366ff609e81fe463fa2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">v_func</a> (uint i, uint j, double dt)</td></tr>
<tr class="memdesc:a3c0a44e4e0a94366ff609e81fe463fa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper for evolve_RK4 when calculating \(k_{v,i,j}\) values. <br /></td></tr>
<tr class="separator:a3c0a44e4e0a94366ff609e81fe463fa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a826b7fa8e709d481eb1dee7d0c2cdc08"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">r_func</a> (uint i, uint j, double dt)</td></tr>
<tr class="memdesc:a826b7fa8e709d481eb1dee7d0c2cdc08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper for evolve_RK4 when calculating \(k_{r,i,j}\) values. <br /></td></tr>
<tr class="separator:a826b7fa8e709d481eb1dee7d0c2cdc08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5846c8f75cdc543fd9cf0b2185a3ef22"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">external_E_field</a> (<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r)</td></tr>
<tr class="memdesc:a5846c8f75cdc543fd9cf0b2185a3ef22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate E at point r. <br /></td></tr>
<tr class="separator:a5846c8f75cdc543fd9cf0b2185a3ef22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a361f2c4862c90b5e8e2a2f50c6a95655"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">external_B_field</a> (<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> r)</td></tr>
<tr class="memdesc:a361f2c4862c90b5e8e2a2f50c6a95655"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate B at point r. <br /></td></tr>
<tr class="separator:a361f2c4862c90b5e8e2a2f50c6a95655"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f210bb2768a5d79ced4b0df0df97598"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">force_on_particle</a> (uint i, uint j)</td></tr>
<tr class="memdesc:a7f210bb2768a5d79ced4b0df0df97598"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the force between 2 particles. <br /></td></tr>
<tr class="separator:a7f210bb2768a5d79ced4b0df0df97598"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c01108b52c8e2a003cf9170da9e7682"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">total_force_external</a> (uint i)</td></tr>
<tr class="memdesc:a2c01108b52c8e2a003cf9170da9e7682"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the total external force on a particle. <br /></td></tr>
<tr class="separator:a2c01108b52c8e2a003cf9170da9e7682"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fe1cefbae18fa5808155ee0d2df713c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">total_force_particles</a> (uint i)</td></tr>
<tr class="memdesc:a2fe1cefbae18fa5808155ee0d2df713c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the total force on a particle p_i from other particles. <br /></td></tr>
<tr class="separator:a2fe1cefbae18fa5808155ee0d2df713c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a301b0540078c36697880ef204afdf3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">total_force</a> (uint i)</td></tr>
<tr class="memdesc:a9a301b0540078c36697880ef204afdf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculate the total force on a particle p_i. <br /></td></tr>
<tr class="separator:a9a301b0540078c36697880ef204afdf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6069f82d8dbc7cadaebd228dbcd95018"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">total_force_no_interaction</a> (uint i)</td></tr>
<tr class="memdesc:a6069f82d8dbc7cadaebd228dbcd95018"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculate the total force on a particle p_i without interaction <br /></td></tr>
<tr class="separator:a6069f82d8dbc7cadaebd228dbcd95018"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a0cac3509aa96e71a26d3b2c902e27716"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a></td></tr>
<tr class="memdesc:a0cac3509aa96e71a26d3b2c902e27716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Magnetic field strength. <br /></td></tr>
<tr class="separator:a0cac3509aa96e71a26d3b2c902e27716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf105828121c4a33cc2b217453c20317"><td class="memItemLeft" align="right" valign="top">std::function&lt; double(double)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a></td></tr>
<tr class="memdesc:aaf105828121c4a33cc2b217453c20317"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applied potential. <br /></td></tr>
<tr class="separator:aaf105828121c4a33cc2b217453c20317"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a715329844d75ec4c04f8391421fb4e89"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a></td></tr>
<tr class="memdesc:a715329844d75ec4c04f8391421fb4e89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applied potential. <br /></td></tr>
<tr class="separator:a715329844d75ec4c04f8391421fb4e89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae915f6ad0eef1fb46530e836b6e071e5"><td class="memItemLeft" align="right" valign="top">std::function&lt; double(double)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">perturbation</a></td></tr>
<tr class="memdesc:ae915f6ad0eef1fb46530e836b6e071e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time-dependent perturbation. <br /></td></tr>
<tr class="separator:ae915f6ad0eef1fb46530e836b6e071e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66dfe89c68716b9502927b97f59c27d2"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a></td></tr>
<tr class="memdesc:a66dfe89c68716b9502927b97f59c27d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Characteristic dimension. <br /></td></tr>
<tr class="separator:a66dfe89c68716b9502927b97f59c27d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -187,18 +200,26 @@ Private Attributes</h2></td></tr>
<tr class="memdesc:a0112525d9e79a472e761f8ef402a339f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The particles in the Penning trap. <br /></td></tr>
<tr class="separator:a0112525d9e79a472e761f8ef402a339f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9b5afdaa5cd366e94bd294452a1eed4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a></td></tr>
<tr class="memdesc:ae9b5afdaa5cd366e94bd294452a1eed4"><td class="mdescLeft">&#160;</td><td class="mdescRight">A 2D vector containing all \(k_{v,i,j}\) where \(j\) is the index of a particle. <br /></td></tr>
<tr class="separator:ae9b5afdaa5cd366e94bd294452a1eed4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f168622587709b9e3c49077f0b9a640"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a></td></tr>
<tr class="memdesc:a2f168622587709b9e3c49077f0b9a640"><td class="mdescLeft">&#160;</td><td class="mdescRight">A 2D vector containing all \(k_{r,i,j}\) where \(j\) is the index of a particle. <br /></td></tr>
<tr class="separator:a2f168622587709b9e3c49077f0b9a640"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a869f032f37d0569ed16f224b4c4356ae"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae">PenningTrapTest</a></td></tr>
<tr class="memdesc:a869f032f37d0569ed16f224b4c4356ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make <a class="el" href="classPenningTrapTest.html" title="Test class for the Penning trap.">PenningTrapTest</a> a friend of <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a>. <br /></td></tr>
<tr class="separator:a869f032f37d0569ed16f224b4c4356ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class that simulates a Penning trap. </p>
<p>This class simulates a Penning trap. It can take in a number of particles and simulate how they would behave inside a Penning trap. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00030">30</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00031">31</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae670d7de621acdb343b01af098086f63" name="ae670d7de621acdb343b01af098086f63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae670d7de621acdb343b01af098086f63">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[1/3]</span></h2>
<a id="a5b6c6d4636f3a6e279ccde59d4a345e8" name="a5b6c6d4636f3a6e279ccde59d4a345e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b6c6d4636f3a6e279ccde59d4a345e8">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -212,8 +233,8 @@ Private Attributes</h2></td></tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::function&lt; double(double)&gt;&#160;</td>
<td class="paramname"><em>V_0</em> = <code>[](double&#160;<a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>)&#160;{&#160;return&#160;25.&#160;*&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>&#160;/&#160;1000.;&#160;}</code>, </td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>V_0</em> = <code>(25.&#160;*&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>)&#160;/&#160;1000.</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -246,12 +267,12 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00018">18</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00120">120</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a763700316b502d5900e587c1f61e6bf1" name="a763700316b502d5900e587c1f61e6bf1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a763700316b502d5900e587c1f61e6bf1">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[2/3]</span></h2>
<a id="a830be1b8cbf59664e060b6edbeaa302f" name="a830be1b8cbf59664e060b6edbeaa302f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a830be1b8cbf59664e060b6edbeaa302f">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -259,7 +280,7 @@ Private Attributes</h2></td></tr>
<tr>
<td class="memname">PenningTrap::PenningTrap </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
@@ -271,8 +292,8 @@ Private Attributes</h2></td></tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::function&lt; double(double)&gt;&#160;</td>
<td class="paramname"><em>V_0</em> = <code>[](double&#160;<a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>)&#160;{&#160;return&#160;25.&#160;*&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>&#160;/&#160;1000.;&#160;}</code>, </td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>V_0</em> = <code>(25.&#160;*&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>)&#160;/&#160;1000.</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -306,12 +327,12 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00027">27</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00129">129</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a67139e04ef69c0bcffde8f30f67cbf73" name="a67139e04ef69c0bcffde8f30f67cbf73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67139e04ef69c0bcffde8f30f67cbf73">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[3/3]</span></h2>
<a id="addc96789dcfec07b75156e19fee82f4f" name="addc96789dcfec07b75156e19fee82f4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addc96789dcfec07b75156e19fee82f4f">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
@@ -331,8 +352,8 @@ Private Attributes</h2></td></tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::function&lt; double(double)&gt;&#160;</td>
<td class="paramname"><em>V_0</em> = <code>[](double&#160;<a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>)&#160;{&#160;return&#160;25.&#160;*&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>&#160;/&#160;1000.;&#160;}</code>, </td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>V_0</em> = <code>(25.&#160;*&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>)&#160;/&#160;1000.</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -366,7 +387,7 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00039">39</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00139">139</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
@@ -395,7 +416,7 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00082">82</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00166">166</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
@@ -434,7 +455,7 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00186">186</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00211">211</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
@@ -473,24 +494,32 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00151">151</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00171">171</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="acbf065c9c125682329ad82a8d166554c" name="acbf065c9c125682329ad82a8d166554c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbf065c9c125682329ad82a8d166554c">&#9670;&#160;</a></span>external_B_field()</h2>
<a id="a361f2c4862c90b5e8e2a2f50c6a95655" name="a361f2c4862c90b5e8e2a2f50c6a95655"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a361f2c4862c90b5e8e2a2f50c6a95655">&#9670;&#160;</a></span>external_B_field()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::external_B_field </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::external_B_field </td>
<td>(</td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td>
<td class="paramname"><em>r</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate B at point r. </p>
@@ -500,26 +529,34 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00095">95</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00067">67</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a1d58feaa2c9e34cbf26b1c5ed75ca9d9" name="a1d58feaa2c9e34cbf26b1c5ed75ca9d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">&#9670;&#160;</a></span>external_E_field()</h2>
<a id="a5846c8f75cdc543fd9cf0b2185a3ef22" name="a5846c8f75cdc543fd9cf0b2185a3ef22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5846c8f75cdc543fd9cf0b2185a3ef22">&#9670;&#160;</a></span>external_E_field()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::external_E_field </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::external_E_field </td>
<td>(</td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>&#160;</td>
<td class="paramtype"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td>
<td class="paramname"><em>r</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate E at point r. </p>
@@ -529,28 +566,31 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00087">87</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00059">59</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a9ae34ad740a230e667e96bc6ee8730ce" name="a9ae34ad740a230e667e96bc6ee8730ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ae34ad740a230e667e96bc6ee8730ce">&#9670;&#160;</a></span>force_on_particle()</h2>
<a id="a7f210bb2768a5d79ced4b0df0df97598" name="a7f210bb2768a5d79ced4b0df0df97598"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f210bb2768a5d79ced4b0df0df97598">&#9670;&#160;</a></span>force_on_particle()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::force_on_particle </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::force_on_particle </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>j</em>&#160;</td>
</tr>
<tr>
@@ -559,6 +599,11 @@ Private Attributes</h2></td></tr>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the force between 2 particles. </p>
@@ -570,14 +615,14 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00100">100</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00072">72</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a0194be61c956a9259c747c23e4163c5b" name="a0194be61c956a9259c747c23e4163c5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0194be61c956a9259c747c23e4163c5b">&#9670;&#160;</a></span>fraction_of_particles_left()</h2>
<a id="ac529aa26c288f34eae184a67e6bac41f" name="ac529aa26c288f34eae184a67e6bac41f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac529aa26c288f34eae184a67e6bac41f">&#9670;&#160;</a></span>fraction_of_particles_left()</h2>
<div class="memitem">
<div class="memproto">
@@ -591,7 +636,7 @@ Private Attributes</h2></td></tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>steps</em>, </td>
</tr>
<tr>
@@ -626,12 +671,12 @@ Private Attributes</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>double </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00266">266</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00311">311</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a43e74792ab4b3f9299f35cb64bdb2648" name="a43e74792ab4b3f9299f35cb64bdb2648"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43e74792ab4b3f9299f35cb64bdb2648">&#9670;&#160;</a></span>r_func()</h2>
<a id="a826b7fa8e709d481eb1dee7d0c2cdc08" name="a826b7fa8e709d481eb1dee7d0c2cdc08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a826b7fa8e709d481eb1dee7d0c2cdc08">&#9670;&#160;</a></span>r_func()</h2>
<div class="memitem">
<div class="memproto">
@@ -640,15 +685,15 @@ Private Attributes</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::r_func </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::r_func </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
@@ -676,24 +721,107 @@ Private Attributes</h2></td></tr>
<table class="params">
<tr><td class="paramname">i</td><td>Index i for \(k_{r,i,j}\) </td></tr>
<tr><td class="paramname">j</td><td>Index j for \(k_{r,i,j}\) </td></tr>
<tr><td class="paramname">dt</td><td>the step length (delta time)</td></tr>
<tr><td class="paramname">dt</td><td>The step length (delta time)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00064">64</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00040">40</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a5331837e6dd7bce807a99edd2ba7e854" name="a5331837e6dd7bce807a99edd2ba7e854"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5331837e6dd7bce807a99edd2ba7e854">&#9670;&#160;</a></span>simulate()</h2>
<a id="aaee129f177657455348d0c8ae1441dea" name="aaee129f177657455348d0c8ae1441dea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaee129f177657455348d0c8ae1441dea">&#9670;&#160;</a></span>reinitialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> PenningTrap::simulate </td>
<td class="memname">void PenningTrap::reinitialize </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>f</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>omega_V</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>t</em> = <code>0.</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Give all particles new positions and velocities, and change t and V_0. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">V_0</td><td>The tiome dependent applied potential </td></tr>
<tr><td class="paramname">t</td><td>The starting time </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00153">153</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a9d1d8e90ca839b928aee1ad0cd4aff43" name="a9d1d8e90ca839b928aee1ad0cd4aff43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d1d8e90ca839b928aee1ad0cd4aff43">&#9670;&#160;</a></span>set_pertubation()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void PenningTrap::set_pertubation </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>f</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>omega_V</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Time dependent perturbation to V_0. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">f</td><td>The amplitude of the perturbation @parma omega_V the angular frequency of the perturbation </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00146">146</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a7a1d9f0528a12308de25bc30718da20a" name="a7a1d9f0528a12308de25bc30718da20a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a1d9f0528a12308de25bc30718da20a">&#9670;&#160;</a></span>simulate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">simulation_t</a> PenningTrap::simulate </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>time</em>, </td>
@@ -701,7 +829,7 @@ Private Attributes</h2></td></tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>steps</em>, </td>
</tr>
<tr>
@@ -730,29 +858,38 @@ Private Attributes</h2></td></tr>
<tr><td class="paramname">time</td><td>The time to simulate in microseconds </td></tr>
<tr><td class="paramname">steps</td><td>The amount of steps for the whole simulation </td></tr>
<tr><td class="paramname">method</td><td>The method to use when moving forward a timestep </td></tr>
<tr><td class="paramname">particle_interaction</td><td>Turn particle interactions on/off </td></tr>
<tr><td class="paramname">particle_interaction</td><td>Turn particle interactions on/off</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>simulation_t </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00211">211</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00240">240</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a1f668c4433421136ad51741741aa1bc8" name="a1f668c4433421136ad51741741aa1bc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f668c4433421136ad51741741aa1bc8">&#9670;&#160;</a></span>total_force()</h2>
<a id="a9a301b0540078c36697880ef204afdf3" name="a9a301b0540078c36697880ef204afdf3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a301b0540078c36697880ef204afdf3">&#9670;&#160;</a></span>total_force()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::total_force </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::total_force </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>calculate the total force on a particle p_i. </p>
@@ -762,26 +899,34 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00146">146</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00104">104</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="ae72d203b0bfa1b9e72bea28cb2863c56" name="ae72d203b0bfa1b9e72bea28cb2863c56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae72d203b0bfa1b9e72bea28cb2863c56">&#9670;&#160;</a></span>total_force_external()</h2>
<a id="a2c01108b52c8e2a003cf9170da9e7682" name="a2c01108b52c8e2a003cf9170da9e7682"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c01108b52c8e2a003cf9170da9e7682">&#9670;&#160;</a></span>total_force_external()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::total_force_external </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::total_force_external </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the total external force on a particle. </p>
@@ -792,26 +937,71 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00114">114</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00083">83</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a46a954a0946def199e30fb300ba1c47b" name="a46a954a0946def199e30fb300ba1c47b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46a954a0946def199e30fb300ba1c47b">&#9670;&#160;</a></span>total_force_particles()</h2>
<a id="a6069f82d8dbc7cadaebd228dbcd95018" name="a6069f82d8dbc7cadaebd228dbcd95018"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6069f82d8dbc7cadaebd228dbcd95018">&#9670;&#160;</a></span>total_force_no_interaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::total_force_particles </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::total_force_no_interaction </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>calculate the total force on a particle p_i without interaction </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">i</td><td>The index of particle p_i</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00112">112</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="a2fe1cefbae18fa5808155ee0d2df713c" name="a2fe1cefbae18fa5808155ee0d2df713c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fe1cefbae18fa5808155ee0d2df713c">&#9670;&#160;</a></span>total_force_particles()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::total_force_particles </td>
<td>(</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the total force on a particle p_i from other particles. </p>
@@ -821,14 +1011,14 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00129">129</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00092">92</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="af98a720da60b0e1a62aefa5f5cb37c1e" name="af98a720da60b0e1a62aefa5f5cb37c1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af98a720da60b0e1a62aefa5f5cb37c1e">&#9670;&#160;</a></span>v_func()</h2>
<a id="a3c0a44e4e0a94366ff609e81fe463fa2" name="a3c0a44e4e0a94366ff609e81fe463fa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c0a44e4e0a94366ff609e81fe463fa2">&#9670;&#160;</a></span>v_func()</h2>
<div class="memitem">
<div class="memproto">
@@ -837,15 +1027,15 @@ Private Attributes</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::v_func </td>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> PenningTrap::v_func </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
@@ -877,14 +1067,14 @@ Private Attributes</h2></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00046">46</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00021">21</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<a id="abbb832a85139b1a56ebde57d7b8f9a57" name="abbb832a85139b1a56ebde57d7b8f9a57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbb832a85139b1a56ebde57d7b8f9a57">&#9670;&#160;</a></span>write_simulation_to_dir()</h2>
<a id="ad8bc4df7ab3eed53b16cfdff38e7760b" name="ad8bc4df7ab3eed53b16cfdff38e7760b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8bc4df7ab3eed53b16cfdff38e7760b">&#9670;&#160;</a></span>write_simulation_to_dir()</h2>
<div class="memitem">
<div class="memproto">
@@ -904,7 +1094,7 @@ Private Attributes</h2></td></tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>steps</em>, </td>
</tr>
<tr>
@@ -939,7 +1129,34 @@ Private Attributes</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00240">240</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00273">273</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a869f032f37d0569ed16f224b4c4356ae" name="a869f032f37d0569ed16f224b4c4356ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a869f032f37d0569ed16f224b4c4356ae">&#9670;&#160;</a></span>PenningTrapTest</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">friend class <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Make <a class="el" href="classPenningTrapTest.html" title="Test class for the Penning trap.">PenningTrapTest</a> a friend of <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a>. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00035">35</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
@@ -966,7 +1183,7 @@ Private Attributes</h2></td></tr>
<p>Magnetic field strength. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00032">32</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00037">37</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
@@ -992,7 +1209,7 @@ Private Attributes</h2></td></tr>
<p>Characteristic dimension. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00034">34</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00040">40</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
@@ -1015,9 +1232,10 @@ Private Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>A 2D vector containing all \(k_{i,j}\) where \(j\) is the index of a particle </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00039">39</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p>A 2D vector containing all \(k_{r,i,j}\) where \(j\) is the index of a particle. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00052">52</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
@@ -1040,9 +1258,10 @@ Private Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>A 2D vector containing all \(k_{i,j}\) where \(j\) is the index of a particle </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00037">37</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p>A 2D vector containing all \(k_{v,i,j}\) where \(j\) is the index of a particle. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00047">47</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
@@ -1068,7 +1287,33 @@ Private Attributes</h2></td></tr>
<p>The particles in the Penning trap. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00036">36</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00042">42</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
<a id="ae915f6ad0eef1fb46530e836b6e071e5" name="ae915f6ad0eef1fb46530e836b6e071e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae915f6ad0eef1fb46530e836b6e071e5">&#9670;&#160;</a></span>perturbation</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::function&lt;double(double)&gt; PenningTrap::perturbation</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Time-dependent perturbation. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00039">39</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
@@ -1094,12 +1339,12 @@ Private Attributes</h2></td></tr>
<p>Current time. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00035">35</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00041">41</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>
<a id="aaf105828121c4a33cc2b217453c20317" name="aaf105828121c4a33cc2b217453c20317"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf105828121c4a33cc2b217453c20317">&#9670;&#160;</a></span>V_0</h2>
<a id="a715329844d75ec4c04f8391421fb4e89" name="a715329844d75ec4c04f8391421fb4e89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a715329844d75ec4c04f8391421fb4e89">&#9670;&#160;</a></span>V_0</h2>
<div class="memitem">
<div class="memproto">
@@ -1108,7 +1353,7 @@ Private Attributes</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::function&lt;double(double)&gt; PenningTrap::V_0</td>
<td class="memname">double PenningTrap::V_0</td>
</tr>
</table>
</td>
@@ -1120,7 +1365,7 @@ Private Attributes</h2></td></tr>
<p>Applied potential. </p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00033">33</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="PenningTrap_8hpp_source.html#l00038">38</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
</div>
</div>

View File

@@ -1,27 +1,32 @@
var classPenningTrap =
[
[ "PenningTrap", "classPenningTrap.html#ae670d7de621acdb343b01af098086f63", null ],
[ "PenningTrap", "classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1", null ],
[ "PenningTrap", "classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73", null ],
[ "PenningTrap", "classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8", null ],
[ "PenningTrap", "classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f", null ],
[ "PenningTrap", "classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f", null ],
[ "add_particle", "classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8", null ],
[ "evolve_forward_euler", "classPenningTrap.html#ab9ea97a406534bbe621a95215144875e", null ],
[ "evolve_RK4", "classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e", null ],
[ "external_B_field", "classPenningTrap.html#acbf065c9c125682329ad82a8d166554c", null ],
[ "external_E_field", "classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9", null ],
[ "force_on_particle", "classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce", null ],
[ "fraction_of_particles_left", "classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b", null ],
[ "r_func", "classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648", null ],
[ "simulate", "classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854", null ],
[ "total_force", "classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8", null ],
[ "total_force_external", "classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56", null ],
[ "total_force_particles", "classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b", null ],
[ "v_func", "classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e", null ],
[ "write_simulation_to_dir", "classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57", null ],
[ "external_B_field", "classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655", null ],
[ "external_E_field", "classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22", null ],
[ "force_on_particle", "classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598", null ],
[ "fraction_of_particles_left", "classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f", null ],
[ "r_func", "classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08", null ],
[ "reinitialize", "classPenningTrap.html#aaee129f177657455348d0c8ae1441dea", null ],
[ "set_pertubation", "classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43", null ],
[ "simulate", "classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a", null ],
[ "total_force", "classPenningTrap.html#a9a301b0540078c36697880ef204afdf3", null ],
[ "total_force_external", "classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682", null ],
[ "total_force_no_interaction", "classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018", null ],
[ "total_force_particles", "classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c", null ],
[ "v_func", "classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2", null ],
[ "write_simulation_to_dir", "classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b", null ],
[ "PenningTrapTest", "classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae", null ],
[ "B_0", "classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716", null ],
[ "d", "classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2", null ],
[ "k_r", "classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640", null ],
[ "k_v", "classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4", null ],
[ "particles", "classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f", null ],
[ "perturbation", "classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5", null ],
[ "t", "classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e", null ],
[ "V_0", "classPenningTrap.html#aaf105828121c4a33cc2b217453c20317", null ]
[ "V_0", "classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89", null ]
];

View File

@@ -104,11 +104,11 @@ $(document).ready(function(){initNavTree('classPenningTrapTest.html',''); initRe
<p>This is the complete list of members for <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>test_external_B_field</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>test_external_E_field</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>test_force_on_particle</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>test_total_force_external</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>test_total_force_particles</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">test_external_B_field</a>()</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">test_external_E_field</a>()</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">test_force_on_particle</a>()</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">test_total_force_external</a>()</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">test_total_force_particles</a>()</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -99,31 +99,40 @@ $(document).ready(function(){initNavTree('classPenningTrapTest.html',''); initRe
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classPenningTrapTest-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">PenningTrapTest Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Test class for the Penning trap.
<a href="classPenningTrapTest.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a542996d72c713636b95e0aa9118f7901"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">test_external_E_field</a> ()</td></tr>
<tr class="separator:a542996d72c713636b95e0aa9118f7901"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb806e49a688424588e0c501bc57a230"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">test_external_B_field</a> ()</td></tr>
<tr class="separator:acb806e49a688424588e0c501bc57a230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addf81fa5692d8146cce5571ccdc5999b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">test_force_on_particle</a> ()</td></tr>
<tr class="separator:addf81fa5692d8146cce5571ccdc5999b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae104e04dcd21ac63281c908132fdf255"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">test_total_force_external</a> ()</td></tr>
<tr class="separator:ae104e04dcd21ac63281c908132fdf255"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">test_total_force_particles</a> ()</td></tr>
<tr class="separator:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6a303be62039ca2ecccd8252744d4dc8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">test_external_E_field</a> ()</td></tr>
<tr class="memdesc:a6a303be62039ca2ecccd8252744d4dc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test that the external E field gives correct values. <br /></td></tr>
<tr class="separator:a6a303be62039ca2ecccd8252744d4dc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad668d7d875bdc1909a42426bf9dead9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">test_external_B_field</a> ()</td></tr>
<tr class="memdesc:ad668d7d875bdc1909a42426bf9dead9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test that the external B field gives correct values. <br /></td></tr>
<tr class="separator:ad668d7d875bdc1909a42426bf9dead9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f4f0b150e54ce463bb29f76d49883f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">test_force_on_particle</a> ()</td></tr>
<tr class="memdesc:a5f4f0b150e54ce463bb29f76d49883f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test that the force between particles gives expected results. <br /></td></tr>
<tr class="separator:a5f4f0b150e54ce463bb29f76d49883f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6d0c8e0d80338fb7c7edefc97331046"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">test_total_force_external</a> ()</td></tr>
<tr class="memdesc:ae6d0c8e0d80338fb7c7edefc97331046"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test that the total external force returns expected results. <br /></td></tr>
<tr class="separator:ae6d0c8e0d80338fb7c7edefc97331046"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68449d508e66205bc8b27fa5f60db508"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">test_total_force_particles</a> ()</td></tr>
<tr class="memdesc:a68449d508e66205bc8b27fa5f60db508"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test that the total force of all particles on a single particle returns expected results. <br /></td></tr>
<tr class="separator:a68449d508e66205bc8b27fa5f60db508"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00020">20</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
<div class="textblock"><p>Test class for the Penning trap. </p>
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00023">23</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="acb806e49a688424588e0c501bc57a230" name="acb806e49a688424588e0c501bc57a230"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb806e49a688424588e0c501bc57a230">&#9670;&#160;</a></span>test_external_B_field()</h2>
<a id="ad668d7d875bdc1909a42426bf9dead9e" name="ad668d7d875bdc1909a42426bf9dead9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad668d7d875bdc1909a42426bf9dead9e">&#9670;&#160;</a></span>test_external_B_field()</h2>
<div class="memitem">
<div class="memproto">
@@ -132,7 +141,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void PenningTrapTest::test_external_B_field </td>
<td class="memname">void PenningTrapTest::test_external_B_field </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
@@ -140,17 +149,19 @@ Static Public Member Functions</h2></td></tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00059">59</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
<p>Test that the external B field gives correct values. </p>
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00066">66</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div>
</div>
<a id="a542996d72c713636b95e0aa9118f7901" name="a542996d72c713636b95e0aa9118f7901"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a542996d72c713636b95e0aa9118f7901">&#9670;&#160;</a></span>test_external_E_field()</h2>
<a id="a6a303be62039ca2ecccd8252744d4dc8" name="a6a303be62039ca2ecccd8252744d4dc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a303be62039ca2ecccd8252744d4dc8">&#9670;&#160;</a></span>test_external_E_field()</h2>
<div class="memitem">
<div class="memproto">
@@ -159,7 +170,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void PenningTrapTest::test_external_E_field </td>
<td class="memname">void PenningTrapTest::test_external_E_field </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
@@ -167,17 +178,19 @@ Static Public Member Functions</h2></td></tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00022">22</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
<p>Test that the external E field gives correct values. </p>
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00028">28</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div>
</div>
<a id="addf81fa5692d8146cce5571ccdc5999b" name="addf81fa5692d8146cce5571ccdc5999b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addf81fa5692d8146cce5571ccdc5999b">&#9670;&#160;</a></span>test_force_on_particle()</h2>
<a id="a5f4f0b150e54ce463bb29f76d49883f9" name="a5f4f0b150e54ce463bb29f76d49883f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f4f0b150e54ce463bb29f76d49883f9">&#9670;&#160;</a></span>test_force_on_particle()</h2>
<div class="memitem">
<div class="memproto">
@@ -186,7 +199,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void PenningTrapTest::test_force_on_particle </td>
<td class="memname">void PenningTrapTest::test_force_on_particle </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
@@ -194,17 +207,19 @@ Static Public Member Functions</h2></td></tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00070">70</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
<p>Test that the force between particles gives expected results. </p>
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00080">80</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div>
</div>
<a id="ae104e04dcd21ac63281c908132fdf255" name="ae104e04dcd21ac63281c908132fdf255"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae104e04dcd21ac63281c908132fdf255">&#9670;&#160;</a></span>test_total_force_external()</h2>
<a id="ae6d0c8e0d80338fb7c7edefc97331046" name="ae6d0c8e0d80338fb7c7edefc97331046"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6d0c8e0d80338fb7c7edefc97331046">&#9670;&#160;</a></span>test_total_force_external()</h2>
<div class="memitem">
<div class="memproto">
@@ -213,7 +228,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void PenningTrapTest::test_total_force_external </td>
<td class="memname">void PenningTrapTest::test_total_force_external </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
@@ -221,17 +236,19 @@ Static Public Member Functions</h2></td></tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00095">95</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
<p>Test that the total external force returns expected results. </p>
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00107">107</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div>
</div>
<a id="a0ee2bbf5e26c115164208b89c5a29e3d" name="a0ee2bbf5e26c115164208b89c5a29e3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ee2bbf5e26c115164208b89c5a29e3d">&#9670;&#160;</a></span>test_total_force_particles()</h2>
<a id="a68449d508e66205bc8b27fa5f60db508" name="a68449d508e66205bc8b27fa5f60db508"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68449d508e66205bc8b27fa5f60db508">&#9670;&#160;</a></span>test_total_force_particles()</h2>
<div class="memitem">
<div class="memproto">
@@ -240,7 +257,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void PenningTrapTest::test_total_force_particles </td>
<td class="memname">void PenningTrapTest::test_total_force_particles </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
@@ -248,12 +265,14 @@ Static Public Member Functions</h2></td></tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00108">108</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
<p>Test that the total force of all particles on a single particle returns expected results. </p>
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00122">122</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div>
</div>

View File

@@ -0,0 +1,8 @@
var classPenningTrapTest =
[
[ "test_external_B_field", "classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e", null ],
[ "test_external_E_field", "classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8", null ],
[ "test_force_on_particle", "classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9", null ],
[ "test_total_force_external", "classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046", null ],
[ "test_total_force_particles", "classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508", null ]
];

View File

@@ -101,11 +101,14 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
<div class="headertitle"><div class="title">Class Index</div></div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_P">P</a></div>
<div class="qindex"><a class="qindex" href="#letter_P">P</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a></div>
<div class="classindex">
<dl class="classindex even">
<dt class="alphachar"><a id="letter_P" name="letter_P">P</a></dt>
<dd><a class="el" href="classParticle.html">Particle</a></dd><dd><a class="el" href="classPenningTrap.html">PenningTrap</a></dd><dd><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_S" name="letter_S">S</a></dt>
<dd><a class="el" href="structsimulation.html">simulation</a></dd></dl>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -111,26 +111,68 @@ $(document).ready(function(){initNavTree('constants_8hpp.html',''); initResizabl
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a4e451456ad7e9276ed0afa42826e7ccb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a>&#160;&#160;&#160;138935.333</td></tr>
<tr class="memitem:a4e451456ad7e9276ed0afa42826e7ccb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a>&#160;&#160;&#160;1.38935333 * 1e5</td></tr>
<tr class="memdesc:a4e451456ad7e9276ed0afa42826e7ccb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Coulomb constant. unit: \(\frac{u(\mu m)^3}{(\mu s)^2 e^2}\). <br /></td></tr>
<tr class="separator:a4e451456ad7e9276ed0afa42826e7ccb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;96.4852558</td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;9.64852558 * 1e1</td></tr>
<tr class="memdesc:a0acb682b8260ab1c60b918599864e2e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">1 Tesla. unit: \( \frac{u}{(\mu s) e} \) <br /></td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af40a326b23c68a27cebe60f16634a2cb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>&#160;&#160;&#160;96485255.8</td></tr>
<tr class="memitem:af40a326b23c68a27cebe60f16634a2cb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a>&#160;&#160;&#160;9.64852558 * 1e7</td></tr>
<tr class="memdesc:af40a326b23c68a27cebe60f16634a2cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">1 Volt. unit: \( \frac{u (\mu m)^2}{(\mu s)^2 e} \) <br /></td></tr>
<tr class="separator:af40a326b23c68a27cebe60f16634a2cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ff491cc7958ffd5e749c518a4a60ec8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a>&#160;&#160;&#160;40.078</td></tr>
<tr class="memdesc:a2ff491cc7958ffd5e749c518a4a60ec8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mass of a single calcium ion. unit: amu. <br /></td></tr>
<tr class="separator:a2ff491cc7958ffd5e749c518a4a60ec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7602a3a314957137ad1cd719aa23789"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">CA_CHARGE</a>&#160;&#160;&#160;1.</td></tr>
<tr class="memdesc:af7602a3a314957137ad1cd719aa23789"><td class="mdescLeft">&#160;</td><td class="mdescRight">Charge of a singly charged calcium ion. unit: e. <br /></td></tr>
<tr class="separator:af7602a3a314957137ad1cd719aa23789"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Library of constants. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="af7602a3a314957137ad1cd719aa23789" name="af7602a3a314957137ad1cd719aa23789"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7602a3a314957137ad1cd719aa23789">&#9670;&#160;</a></span>CA_CHARGE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CA_CHARGE&#160;&#160;&#160;1.</td>
</tr>
</table>
</div><div class="memdoc">
<p>Charge of a singly charged calcium ion. unit: e. </p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00033">33</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
</div>
</div>
<a id="a2ff491cc7958ffd5e749c518a4a60ec8" name="a2ff491cc7958ffd5e749c518a4a60ec8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ff491cc7958ffd5e749c518a4a60ec8">&#9670;&#160;</a></span>CA_MASS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CA_MASS&#160;&#160;&#160;40.078</td>
</tr>
</table>
</div><div class="memdoc">
<p>Mass of a single calcium ion. unit: amu. </p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00029">29</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
</div>
</div>
<a id="a4e451456ad7e9276ed0afa42826e7ccb" name="a4e451456ad7e9276ed0afa42826e7ccb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e451456ad7e9276ed0afa42826e7ccb">&#9670;&#160;</a></span>K_E</h2>
@@ -138,14 +180,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define K_E&#160;&#160;&#160;138935.333</td>
<td class="memname">#define K_E&#160;&#160;&#160;1.38935333 * 1e5</td>
</tr>
</table>
</div><div class="memdoc">
<p>Coulomb constant. unit: \(\frac{u(\mu m)^3}{(\mu s)^2 e^2}\). </p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00015">15</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00017">17</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
</div>
</div>
@@ -156,14 +198,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define T&#160;&#160;&#160;96.4852558</td>
<td class="memname">#define T&#160;&#160;&#160;9.64852558 * 1e1</td>
</tr>
</table>
</div><div class="memdoc">
<p>1 Tesla. unit: \( \frac{u}{(\mu s) e} \) </p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00017">17</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00021">21</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
</div>
</div>
@@ -174,14 +216,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define V&#160;&#160;&#160;96485255.8</td>
<td class="memname">#define V&#160;&#160;&#160;9.64852558 * 1e7</td>
</tr>
</table>
</div><div class="memdoc">
<p>1 Volt. unit: \( \frac{u (\mu m)^2}{(\mu s)^2 e} \) </p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00019">19</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="constants_8hpp_source.html#l00025">25</a> of file <a class="el" href="constants_8hpp_source.html">constants.hpp</a>.</p>
</div>
</div>

View File

@@ -1,5 +1,7 @@
var constants_8hpp =
[
[ "CA_CHARGE", "constants_8hpp.html#af7602a3a314957137ad1cd719aa23789", null ],
[ "CA_MASS", "constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8", null ],
[ "K_E", "constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb", null ],
[ "T", "constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5", null ],
[ "V", "constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb", null ]

View File

@@ -105,13 +105,17 @@ $(document).ready(function(){initNavTree('constants_8hpp_source.html',''); initR
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#ifndef __CONST__</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#define __CONST__</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb"> 15</a></span><span class="preprocessor">#define K_E 138935.333 </span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5"> 17</a></span><span class="preprocessor">#define T 96.4852558 </span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb"> 17</a></span><span class="preprocessor">#define K_E 1.38935333 * 1e5</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb"> 19</a></span><span class="preprocessor">#define V 96485255.8 </span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5"> 21</a></span><span class="preprocessor">#define T 9.64852558 * 1e1</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb"> 25</a></span><span class="preprocessor">#define V 9.64852558 * 1e7</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8"> 29</a></span><span class="preprocessor">#define CA_MASS 40.078</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789"> 33</a></span><span class="preprocessor">#define CA_CHARGE 1.</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -0,0 +1,139 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('dir_634e799a3947388232110823971192a8.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">scripts Directory Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="animate__100__particles_8py.html">animate_100_particles.py</a> <a href="animate__100__particles_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:animate__100__particles_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Animate 100 particles. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a> <a href="plot__2__particles_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__2__particles_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot 2 particles with and without particle interactions in the xy-plane. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__3d_8py.html">plot_3d.py</a> <a href="plot__3d_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__3d_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot 2 particles with and without particle interactions in 3D. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a> <a href="plot__particles__left_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__particles__left_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot how many particles are left after 500 microseconds using different angular frequencies. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a> <a href="plot__phase__space_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__phase__space_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot the phase space for 2 particles in the x and z direction, with and without particle interactions. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a> <a href="plot__relative__error_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__relative__error_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot the relative error for forward Euler and RK4 method. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a> <a href="plot__single__particle_8py_source.html">[code]</a></td></tr>
<tr class="memdesc:plot__single__particle_8py"><td class="mdescLeft">&#160;</td><td class="mdescRight">Plot the approximation and analytical solution for one particle in the z axis. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,10 @@
var dir_634e799a3947388232110823971192a8 =
[
[ "animate_100_particles.py", "animate__100__particles_8py.html", null ],
[ "plot_2_particles.py", "plot__2__particles_8py.html", null ],
[ "plot_3d.py", "plot__3d_8py.html", null ],
[ "plot_particles_left.py", "plot__particles__left_8py.html", null ],
[ "plot_phase_space.py", "plot__phase__space_8py.html", null ],
[ "plot_relative_error.py", "plot__relative__error_8py.html", null ],
[ "plot_single_particle.py", "plot__single__particle_8py.html", null ]
];

View File

@@ -102,9 +102,15 @@ $(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.h
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>animate_100_particles.py</b> <a href="animate__100__particles_8py_source.html">[code]</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a> <a href="frequency__narrow__sweeps__long_8cpp_source.html">[code]</a></td></tr>
<tr class="memdesc:frequency__narrow__sweeps__long_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sweep of the frequencies from 1.1 to 1.7 using a small time step. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html">main.cpp</a> <a href="main_8cpp_source.html">[code]</a></td></tr>
<tr class="memdesc:main_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">The main program for this project. <br /></td></tr>
@@ -115,8 +121,6 @@ Files</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PenningTrap_8cpp.html">PenningTrap.cpp</a> <a href="PenningTrap_8cpp_source.html">[code]</a></td></tr>
<tr class="memdesc:PenningTrap_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">The implementation of the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>plot_particles_left.py</b> <a href="plot__particles__left_8py_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="test__suite_8cpp.html">test_suite.cpp</a> <a href="test__suite_8cpp_source.html">[code]</a></td></tr>
<tr class="memdesc:test__suite_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">The test suite for the project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>

View File

@@ -1,10 +1,10 @@
var dir_68267d1309a1af8e8297ef4c3efbcdba =
[
[ "animate_100_particles.py", "animate__100__particles_8py_source.html", null ],
[ "main.cpp", "main_8cpp.html", null ],
[ "scripts", "dir_634e799a3947388232110823971192a8.html", "dir_634e799a3947388232110823971192a8" ],
[ "frequency_narrow_sweeps_long.cpp", "frequency__narrow__sweeps__long_8cpp.html", "frequency__narrow__sweeps__long_8cpp" ],
[ "main.cpp", "main_8cpp.html", "main_8cpp" ],
[ "Particle.cpp", "Particle_8cpp.html", null ],
[ "PenningTrap.cpp", "PenningTrap_8cpp.html", null ],
[ "plot_particles_left.py", "plot__particles__left_8py_source.html", null ],
[ "test_suite.cpp", "test__suite_8cpp.html", "test__suite_8cpp" ],
[ "utils.cpp", "utils_8cpp.html", "utils_8cpp" ]
];

View File

@@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr>
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="constants_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="constants_8hpp.html" target="_self">constants.hpp</a></td><td class="desc">Library of constants </td></tr>
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8hpp.html" target="_self">Particle.hpp</a></td><td class="desc">A class that holds the properties of a particle </td></tr>
@@ -110,13 +110,20 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="typedefs_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="typedefs_8hpp.html" target="_self">typedefs.hpp</a></td><td class="desc">Useful typedefs for cleaner code </td></tr>
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8hpp.html" target="_self">utils.hpp</a></td><td class="desc">Function prototypes and macros that are useful </td></tr>
<tr id="row_1_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">&#9660;</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')">&#160;</span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr>
<tr id="row_1_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="animate__100__particles_8py_source.html"><span class="icondoc"></span></a><b>animate_100_particles.py</b></td><td class="desc"></td></tr>
<tr id="row_1_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="main_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">The main program for this project </td></tr>
<tr id="row_1_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8cpp.html" target="_self">Particle.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> class </td></tr>
<tr id="row_1_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="PenningTrap_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="PenningTrap_8cpp.html" target="_self">PenningTrap.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class </td></tr>
<tr id="row_1_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="plot__particles__left_8py_source.html"><span class="icondoc"></span></a><b>plot_particles_left.py</b></td><td class="desc"></td></tr>
<tr id="row_1_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="test__suite_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">The test suite for the project </td></tr>
<tr id="row_1_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr>
<tr id="row_1_0_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_1_0_" class="arrow" onclick="toggleFolder('1_0_')">&#9660;</span><span id="img_1_0_" class="iconfopen" onclick="toggleFolder('1_0_')">&#160;</span><a class="el" href="dir_634e799a3947388232110823971192a8.html" target="_self">scripts</a></td><td class="desc"></td></tr>
<tr id="row_1_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="animate__100__particles_8py_source.html"><span class="icondoc"></span></a><a class="el" href="animate__100__particles_8py.html" target="_self">animate_100_particles.py</a></td><td class="desc">Animate 100 particles </td></tr>
<tr id="row_1_0_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__2__particles_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__2__particles_8py.html" target="_self">plot_2_particles.py</a></td><td class="desc">Plot 2 particles with and without particle interactions in the xy-plane </td></tr>
<tr id="row_1_0_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__3d_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__3d_8py.html" target="_self">plot_3d.py</a></td><td class="desc">Plot 2 particles with and without particle interactions in 3D </td></tr>
<tr id="row_1_0_3_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__particles__left_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__particles__left_8py.html" target="_self">plot_particles_left.py</a></td><td class="desc">Plot how many particles are left after 500 microseconds using different angular frequencies </td></tr>
<tr id="row_1_0_4_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__phase__space_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__phase__space_8py.html" target="_self">plot_phase_space.py</a></td><td class="desc">Plot the phase space for 2 particles in the x and z direction, with and without particle interactions </td></tr>
<tr id="row_1_0_5_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__relative__error_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__relative__error_8py.html" target="_self">plot_relative_error.py</a></td><td class="desc">Plot the relative error for forward Euler and RK4 method </td></tr>
<tr id="row_1_0_6_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="plot__single__particle_8py_source.html"><span class="icondoc"></span></a><a class="el" href="plot__single__particle_8py.html" target="_self">plot_single_particle.py</a></td><td class="desc">Plot the approximation and analytical solution for one particle in the z axis </td></tr>
<tr id="row_1_1_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="frequency__narrow__sweeps__long_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="frequency__narrow__sweeps__long_8cpp.html" target="_self">frequency_narrow_sweeps_long.cpp</a></td><td class="desc">Sweep of the frequencies from 1.1 to 1.7 using a small time step </td></tr>
<tr id="row_1_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="main_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">The main program for this project </td></tr>
<tr id="row_1_3_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="Particle_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="Particle_8cpp.html" target="_self">Particle.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> class </td></tr>
<tr id="row_1_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="PenningTrap_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="PenningTrap_8cpp.html" target="_self">PenningTrap.cpp</a></td><td class="desc">The implementation of the <a class="el" href="classPenningTrap.html" title="A class that simulates a Penning trap.">PenningTrap</a> class </td></tr>
<tr id="row_1_5_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="test__suite_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">The test suite for the project </td></tr>
<tr id="row_1_6_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="utils_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->

View File

@@ -0,0 +1,256 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/frequency_narrow_sweeps_long.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('frequency__narrow__sweeps__long_8cpp.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">frequency_narrow_sweeps_long.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Sweep of the frequencies from 1.1 to 1.7 using a small time step.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cmath&gt;</code><br />
<code>#include &lt;complex&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &lt;omp.h&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &quot;<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="constants_8hpp_source.html">constants.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
</div>
<p><a href="frequency__narrow__sweeps__long_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html#a7b24a37e8ce9d243351bfc9b24945e63">PARTICLES</a>&#160;&#160;&#160;100</td></tr>
<tr class="separator:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0240ac851181b84ac374872dc5434ee4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html#a0240ac851181b84ac374872dc5434ee4">N</a>&#160;&#160;&#160;40000</td></tr>
<tr class="separator:a0240ac851181b84ac374872dc5434ee4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a33d9b1c76c3c80902f89a58b1a6d96ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a> ()</td></tr>
<tr class="memdesc:a33d9b1c76c3c80902f89a58b1a6d96ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. <br /></td></tr>
<tr class="separator:a33d9b1c76c3c80902f89a58b1a6d96ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1816f70ec612edc27848ef7f0875fdb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a> ()</td></tr>
<tr class="memdesc:ac1816f70ec612edc27848ef7f0875fdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. <br /></td></tr>
<tr class="separator:ac1816f70ec612edc27848ef7f0875fdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Sweep of the frequencies from 1.1 to 1.7 using a small time step. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000006">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html">frequency_narrow_sweeps_long.cpp</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a0240ac851181b84ac374872dc5434ee4" name="a0240ac851181b84ac374872dc5434ee4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0240ac851181b84ac374872dc5434ee4">&#9670;&#160;</a></span>N</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define N&#160;&#160;&#160;40000</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html#l00025">25</a> of file <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html">frequency_narrow_sweeps_long.cpp</a>.</p>
</div>
</div>
<a id="a7b24a37e8ce9d243351bfc9b24945e63" name="a7b24a37e8ce9d243351bfc9b24945e63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b24a37e8ce9d243351bfc9b24945e63">&#9670;&#160;</a></span>PARTICLES</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PARTICLES&#160;&#160;&#160;100</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html#l00024">24</a> of file <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html">frequency_narrow_sweeps_long.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html#l00139">139</a> of file <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html">frequency_narrow_sweeps_long.cpp</a>.</p>
</div>
</div>
<a id="a33d9b1c76c3c80902f89a58b1a6d96ea" name="a33d9b1c76c3c80902f89a58b1a6d96ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33d9b1c76c3c80902f89a58b1a6d96ea">&#9670;&#160;</a></span>potential_resonance_narrow_sweep()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void potential_resonance_narrow_sweep </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. </p>
<p>The simulation sweeps over different frequencies in [1., 1.7] MHz. </p>
<p class="definition">Definition at line <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html#l00034">34</a> of file <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html">frequency_narrow_sweeps_long.cpp</a>.</p>
</div>
</div>
<a id="ac1816f70ec612edc27848ef7f0875fdb" name="ac1816f70ec612edc27848ef7f0875fdb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1816f70ec612edc27848ef7f0875fdb">&#9670;&#160;</a></span>potential_resonance_narrow_sweep_interaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void potential_resonance_narrow_sweep_interaction </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. </p>
<p>The simulation sweeps over different frequencies in [1., 1.7] MHz. </p>
<p class="definition">Definition at line <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html#l00091">91</a> of file <a class="el" href="frequency__narrow__sweeps__long_8cpp_source.html">frequency_narrow_sweeps_long.cpp</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,5 @@
var frequency__narrow__sweeps__long_8cpp =
[
[ "potential_resonance_narrow_sweep", "frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea", null ],
[ "potential_resonance_narrow_sweep_interaction", "frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb", null ]
];

View File

@@ -0,0 +1,252 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/frequency_narrow_sweeps_long.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('frequency__narrow__sweeps__long_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">frequency_narrow_sweeps_long.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="frequency__narrow__sweeps__long_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;complex&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;omp.h&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &quot;<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;<a class="code" href="constants_8hpp.html">constants.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8hpp.html">utils.hpp</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define PARTICLES 100</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#define N 40000</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea"> 34</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a>()</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>{</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordtype">double</span> time = 500.;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">double</span> freq_start = 1.1;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordtype">double</span> freq_end = 1.7;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordtype">double</span> freq_increment = .0005;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordtype">size_t</span> freq_iterations =</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> (size_t)((freq_end - freq_start) / freq_increment) + 1;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> std::ofstream ofile;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// Insert frequencies</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> res[0][i] = freq_start + freq_increment * i;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> {</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)PARTICLES);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; freq_iterations; j++) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> res[i + 1][j] =</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> trap.<a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(time, N, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> ofile.open(path + <span class="stringliteral">&quot;narrow_sweep_fine.txt&quot;</span>);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> ofile &lt;&lt; res[0][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[1][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[2][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> ofile.close();</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span>}</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb"> 91</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a>()</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span>{</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">double</span> time = 500.;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">double</span> freq_start = 1.1;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">double</span> freq_end = 1.7;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">double</span> freq_increment = .0005;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordtype">size_t</span> freq_iterations =</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> (size_t)((freq_end - freq_start) / freq_increment) + 1;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::ofstream ofile;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> res[0][i] = freq_start + freq_increment * i;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> {</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)PARTICLES);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; freq_iterations; j++) {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> res[i + 1][j] = trap.<a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(time, N);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> }</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> }</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> ofile.open(path + <span class="stringliteral">&quot;narrow_sweep_interactions_fine.txt&quot;</span>);</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> ofile &lt;&lt; res[0][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[1][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[2][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> ofile.close();</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span>}</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="keywordtype">int</span> main()</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span>{</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordtype">double</span> start, end;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> start = omp_get_wtime();</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <a class="code hl_function" href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a>();</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_function" href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a>();</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> end = omp_get_wtime();</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Time: &quot;</span> &lt;&lt; end - start &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span>}</div>
<div class="ttc" id="aPenningTrap_8hpp_html"><div class="ttname"><a href="PenningTrap_8hpp.html">PenningTrap.hpp</a></div><div class="ttdoc">A class for simulating a Penning trap.</div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00031">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_aaee129f177657455348d0c8ae1441dea"><div class="ttname"><a href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap::reinitialize</a></div><div class="ttdeci">void reinitialize(double f, double omega_V, double t=0.)</div><div class="ttdoc">Give all particles new positions and velocities, and change t and V_0.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00153">PenningTrap.cpp:153</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ac529aa26c288f34eae184a67e6bac41f"><div class="ttname"><a href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00311">PenningTrap.cpp:311</a></div></div>
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
<div class="ttc" id="afrequency__narrow__sweeps__long_8cpp_html_a33d9b1c76c3c80902f89a58b1a6d96ea"><div class="ttname"><a href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a></div><div class="ttdeci">void potential_resonance_narrow_sweep()</div><div class="ttdoc">Simulate 100 particles over 500 using a time dependent potential.</div><div class="ttdef"><b>Definition:</b> <a href="frequency__narrow__sweeps__long_8cpp_source.html#l00034">frequency_narrow_sweeps_long.cpp:34</a></div></div>
<div class="ttc" id="afrequency__narrow__sweeps__long_8cpp_html_ac1816f70ec612edc27848ef7f0875fdb"><div class="ttname"><a href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a></div><div class="ttdeci">void potential_resonance_narrow_sweep_interaction()</div><div class="ttdoc">Simulate 100 particles over 500 using a time dependent potential.</div><div class="ttdef"><b>Definition:</b> <a href="frequency__narrow__sweeps__long_8cpp_source.html#l00091">frequency_narrow_sweeps_long.cpp:91</a></div></div>
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
<div class="ttc" id="autils_8hpp_html_a6fdd7217b750aff5b6295ece7cbdeffa"><div class="ttname"><a href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00072">utils.cpp:72</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="frequency__narrow__sweeps__long_8cpp.html">frequency_narrow_sweeps_long.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -98,34 +98,98 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
</div>
<div class="contents">
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div><ul>
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div>
<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
<li>add_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap</a></li>
</ul>
<h3><a id="index_b" name="index_b"></a>- b -</h3><ul>
<li>B_0&#160;:&#160;<a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">PenningTrap</a></li>
</ul>
<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
<li>d&#160;:&#160;<a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">PenningTrap</a></li>
</ul>
<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
<li>evolve_forward_euler()&#160;:&#160;<a class="el" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap</a></li>
<li>evolve_RK4()&#160;:&#160;<a class="el" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap</a></li>
<li>external_B_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap</a></li>
<li>external_E_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap</a></li>
<li>force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap</a></li>
<li>fraction_of_particles_left()&#160;:&#160;<a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap</a></li>
<li>external_B_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">PenningTrap</a></li>
<li>external_E_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">PenningTrap</a></li>
</ul>
<h3><a id="index_f" name="index_f"></a>- f -</h3><ul>
<li>force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">PenningTrap</a></li>
<li>fraction_of_particles_left()&#160;:&#160;<a class="el" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap</a></li>
</ul>
<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
<li>k_r&#160;:&#160;<a class="el" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap</a></li>
<li>k_v&#160;:&#160;<a class="el" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap</a></li>
</ul>
<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
<li>m&#160;:&#160;<a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle</a></li>
<li>Particle()&#160;:&#160;<a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a></li>
</ul>
<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
<li>Particle()&#160;:&#160;<a class="el" href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4">Particle</a></li>
<li>particles&#160;:&#160;<a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap</a></li>
<li>PenningTrap&#160;:&#160;<a class="el" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232">Particle</a>, <a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a></li>
<li>PenningTrap&#160;:&#160;<a class="el" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232">Particle</a>, <a class="el" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap</a></li>
<li>PenningTrapTest&#160;:&#160;<a class="el" href="classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae">PenningTrap</a></li>
<li>perturbation&#160;:&#160;<a class="el" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">PenningTrap</a></li>
</ul>
<h3><a id="index_q" name="index_q"></a>- q -</h3><ul>
<li>q&#160;:&#160;<a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle</a></li>
<li>r_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li>
<li>r_vec&#160;:&#160;<a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle</a></li>
<li>simulate()&#160;:&#160;<a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap</a></li>
</ul>
<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
<li>r_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">PenningTrap</a></li>
<li>r_vec&#160;:&#160;<a class="el" href="classParticle.html#a1c59101411db43624828b766f87ad460">Particle</a></li>
<li>reinitialize()&#160;:&#160;<a class="el" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap</a></li>
</ul>
<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
<li>set_pertubation()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">PenningTrap</a></li>
<li>simulate()&#160;:&#160;<a class="el" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap</a></li>
</ul>
<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
<li>t&#160;:&#160;<a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap</a></li>
<li>total_force()&#160;:&#160;<a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li>
<li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li>
<li>total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li>
<li>V_0&#160;:&#160;<a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap</a></li>
<li>v_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap</a></li>
<li>v_vec&#160;:&#160;<a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle</a></li>
<li>write_simulation_to_dir()&#160;:&#160;<a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap</a></li>
<li>test_external_B_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">PenningTrapTest</a></li>
<li>test_external_E_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">PenningTrapTest</a></li>
<li>test_force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">PenningTrapTest</a></li>
<li>test_total_force_external()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">PenningTrapTest</a></li>
<li>test_total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">PenningTrapTest</a></li>
<li>total_force()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap</a></li>
<li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap</a></li>
<li>total_force_no_interaction()&#160;:&#160;<a class="el" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap</a></li>
<li>total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">PenningTrap</a></li>
</ul>
<h3><a id="index_v" name="index_v"></a>- v -</h3><ul>
<li>V_0&#160;:&#160;<a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">PenningTrap</a></li>
<li>v_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">PenningTrap</a></li>
<li>v_vec&#160;:&#160;<a class="el" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">Particle</a></li>
</ul>
<h3><a id="index_w" name="index_w"></a>- w -</h3><ul>
<li>write_simulation_to_dir()&#160;:&#160;<a class="el" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">PenningTrap</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -102,19 +102,27 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
<li>add_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap</a></li>
<li>evolve_forward_euler()&#160;:&#160;<a class="el" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap</a></li>
<li>evolve_RK4()&#160;:&#160;<a class="el" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap</a></li>
<li>external_B_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap</a></li>
<li>external_E_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap</a></li>
<li>force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap</a></li>
<li>fraction_of_particles_left()&#160;:&#160;<a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap</a></li>
<li>Particle()&#160;:&#160;<a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a></li>
<li>PenningTrap()&#160;:&#160;<a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a></li>
<li>r_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li>
<li>simulate()&#160;:&#160;<a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap</a></li>
<li>total_force()&#160;:&#160;<a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li>
<li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li>
<li>total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li>
<li>v_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap</a></li>
<li>write_simulation_to_dir()&#160;:&#160;<a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap</a></li>
<li>external_B_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655">PenningTrap</a></li>
<li>external_E_field()&#160;:&#160;<a class="el" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">PenningTrap</a></li>
<li>force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">PenningTrap</a></li>
<li>fraction_of_particles_left()&#160;:&#160;<a class="el" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap</a></li>
<li>Particle()&#160;:&#160;<a class="el" href="classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4">Particle</a></li>
<li>PenningTrap()&#160;:&#160;<a class="el" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8">PenningTrap</a></li>
<li>r_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">PenningTrap</a></li>
<li>reinitialize()&#160;:&#160;<a class="el" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap</a></li>
<li>set_pertubation()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">PenningTrap</a></li>
<li>simulate()&#160;:&#160;<a class="el" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap</a></li>
<li>test_external_B_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">PenningTrapTest</a></li>
<li>test_external_E_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">PenningTrapTest</a></li>
<li>test_force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">PenningTrapTest</a></li>
<li>test_total_force_external()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">PenningTrapTest</a></li>
<li>test_total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">PenningTrapTest</a></li>
<li>total_force()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap</a></li>
<li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap</a></li>
<li>total_force_no_interaction()&#160;:&#160;<a class="el" href="classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018">PenningTrap</a></li>
<li>total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">PenningTrap</a></li>
<li>v_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2">PenningTrap</a></li>
<li>write_simulation_to_dir()&#160;:&#160;<a class="el" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">PenningTrap</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -100,6 +100,7 @@ $(document).ready(function(){initNavTree('functions_rela.html',''); initResizabl
<div class="contents">
&#160;<ul>
<li>PenningTrap&#160;:&#160;<a class="el" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232">Particle</a></li>
<li>PenningTrapTest&#160;:&#160;<a class="el" href="classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae">PenningTrap</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -105,11 +105,12 @@ $(document).ready(function(){initNavTree('functions_vars.html',''); initResizabl
<li>k_v&#160;:&#160;<a class="el" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap</a></li>
<li>m&#160;:&#160;<a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle</a></li>
<li>particles&#160;:&#160;<a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap</a></li>
<li>perturbation&#160;:&#160;<a class="el" href="classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5">PenningTrap</a></li>
<li>q&#160;:&#160;<a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle</a></li>
<li>r_vec&#160;:&#160;<a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle</a></li>
<li>r_vec&#160;:&#160;<a class="el" href="classParticle.html#a1c59101411db43624828b766f87ad460">Particle</a></li>
<li>t&#160;:&#160;<a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap</a></li>
<li>V_0&#160;:&#160;<a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap</a></li>
<li>v_vec&#160;:&#160;<a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle</a></li>
<li>V_0&#160;:&#160;<a class="el" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">PenningTrap</a></li>
<li>v_vec&#160;:&#160;<a class="el" href="classParticle.html#a3a10400add8dd22b8031330c2aafb6fe">Particle</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -98,21 +98,72 @@ $(document).ready(function(){initNavTree('globals.html',''); initResizable(); })
</div>
<div class="contents">
<div class="textblock">Here is a list of all documented file members with links to the documentation:</div><ul>
<div class="textblock">Here is a list of all documented file members with links to the documentation:</div>
<h3><a id="index__5F" name="index__5F"></a>- _ -</h3><ul>
<li>__METHOD_NAME__&#160;:&#160;<a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li>
<li>arma_vector_close_to()&#160;:&#160;<a class="el" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">utils.hpp</a>, <a class="el" href="utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a">utils.cpp</a></li>
</ul>
<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
<li>analytical_solution_particle_1()&#160;:&#160;<a class="el" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">main.cpp</a></li>
<li>ASSERT&#160;:&#160;<a class="el" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">utils.hpp</a></li>
</ul>
<h3><a id="index_c" name="index_c"></a>- c -</h3><ul>
<li>CA_CHARGE&#160;:&#160;<a class="el" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">constants.hpp</a></li>
<li>CA_MASS&#160;:&#160;<a class="el" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">constants.hpp</a></li>
<li>close_to()&#160;:&#160;<a class="el" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">utils.hpp</a>, <a class="el" href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">utils.cpp</a></li>
</ul>
<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
<li>DEBUG&#160;:&#160;<a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
</ul>
<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
<li>K_E&#160;:&#160;<a class="el" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">constants.hpp</a></li>
</ul>
<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
<li>m_assert()&#160;:&#160;<a class="el" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">utils.hpp</a>, <a class="el" href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">utils.cpp</a></li>
<li>mkpath()&#160;:&#160;<a class="el" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">utils.hpp</a>, <a class="el" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">utils.cpp</a></li>
</ul>
<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
<li>p1&#160;:&#160;<a class="el" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">main.cpp</a></li>
<li>p2&#160;:&#160;<a class="el" href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7">main.cpp</a></li>
<li>potential_resonance_narrow_sweep()&#160;:&#160;<a class="el" href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">frequency_narrow_sweeps_long.cpp</a>, <a class="el" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">main.cpp</a></li>
<li>potential_resonance_narrow_sweep_interaction()&#160;:&#160;<a class="el" href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">frequency_narrow_sweeps_long.cpp</a>, <a class="el" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">main.cpp</a></li>
<li>potential_resonance_wide_sweep()&#160;:&#160;<a class="el" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">main.cpp</a></li>
</ul>
<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
<li>scientific_format()&#160;:&#160;<a class="el" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">utils.hpp</a>, <a class="el" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">utils.cpp</a></li>
<li>sim_arr&#160;:&#160;<a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</a></li>
<li>sim_cols&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">typedefs.hpp</a></li>
<li>sim_rows&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li>
<li>sim_cols&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">typedefs.hpp</a></li>
<li>sim_rows&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">typedefs.hpp</a></li>
<li>simulate_100_particles()&#160;:&#160;<a class="el" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">main.cpp</a></li>
<li>simulate_single_particle()&#160;:&#160;<a class="el" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">main.cpp</a></li>
<li>simulate_single_particle_with_different_steps()&#160;:&#160;<a class="el" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">main.cpp</a></li>
<li>simulate_two_particles()&#160;:&#160;<a class="el" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">main.cpp</a></li>
<li>simulation_t&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">typedefs.hpp</a></li>
</ul>
<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
<li>T&#160;:&#160;<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">constants.hpp</a></li>
</ul>
<h3><a id="index_v" name="index_v"></a>- v -</h3><ul>
<li>V&#160;:&#160;<a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">constants.hpp</a></li>
<li>vec_3d&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">typedefs.hpp</a></li>
<li>vec3&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">typedefs.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -101,6 +101,8 @@ $(document).ready(function(){initNavTree('globals_defs.html',''); initResizable(
&#160;<ul>
<li>__METHOD_NAME__&#160;:&#160;<a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li>
<li>ASSERT&#160;:&#160;<a class="el" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">utils.hpp</a></li>
<li>CA_CHARGE&#160;:&#160;<a class="el" href="constants_8hpp.html#af7602a3a314957137ad1cd719aa23789">constants.hpp</a></li>
<li>CA_MASS&#160;:&#160;<a class="el" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">constants.hpp</a></li>
<li>DEBUG&#160;:&#160;<a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
<li>K_E&#160;:&#160;<a class="el" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">constants.hpp</a></li>
<li>T&#160;:&#160;<a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">constants.hpp</a></li>

View File

@@ -99,10 +99,18 @@ $(document).ready(function(){initNavTree('globals_func.html',''); initResizable(
<div class="contents">
&#160;<ul>
<li>arma_vector_close_to()&#160;:&#160;<a class="el" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">utils.hpp</a>, <a class="el" href="utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a">utils.cpp</a></li>
<li>analytical_solution_particle_1()&#160;:&#160;<a class="el" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">main.cpp</a></li>
<li>close_to()&#160;:&#160;<a class="el" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">utils.hpp</a>, <a class="el" href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">utils.cpp</a></li>
<li>m_assert()&#160;:&#160;<a class="el" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">utils.hpp</a>, <a class="el" href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">utils.cpp</a></li>
<li>mkpath()&#160;:&#160;<a class="el" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">utils.hpp</a>, <a class="el" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">utils.cpp</a></li>
<li>potential_resonance_narrow_sweep()&#160;:&#160;<a class="el" href="frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">frequency_narrow_sweeps_long.cpp</a>, <a class="el" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">main.cpp</a></li>
<li>potential_resonance_narrow_sweep_interaction()&#160;:&#160;<a class="el" href="frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">frequency_narrow_sweeps_long.cpp</a>, <a class="el" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">main.cpp</a></li>
<li>potential_resonance_wide_sweep()&#160;:&#160;<a class="el" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">main.cpp</a></li>
<li>scientific_format()&#160;:&#160;<a class="el" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">utils.hpp</a>, <a class="el" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">utils.cpp</a></li>
<li>simulate_100_particles()&#160;:&#160;<a class="el" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">main.cpp</a></li>
<li>simulate_single_particle()&#160;:&#160;<a class="el" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">main.cpp</a></li>
<li>simulate_single_particle_with_different_steps()&#160;:&#160;<a class="el" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">main.cpp</a></li>
<li>simulate_two_particles()&#160;:&#160;<a class="el" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">main.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -100,9 +100,10 @@ $(document).ready(function(){initNavTree('globals_type.html',''); initResizable(
<div class="contents">
&#160;<ul>
<li>sim_arr&#160;:&#160;<a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</a></li>
<li>sim_cols&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">typedefs.hpp</a></li>
<li>sim_rows&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li>
<li>vec_3d&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">typedefs.hpp</a></li>
<li>sim_cols&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">typedefs.hpp</a></li>
<li>sim_rows&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">typedefs.hpp</a></li>
<li>simulation_t&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">typedefs.hpp</a></li>
<li>vec3&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">typedefs.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

114
docs/globals_vars.html Normal file
View File

@@ -0,0 +1,114 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: File Members</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('globals_vars.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="contents">
&#160;<ul>
<li>p1&#160;:&#160;<a class="el" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">main.cpp</a></li>
<li>p2&#160;:&#160;<a class="el" href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7">main.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -104,7 +104,110 @@ $(document).ready(function(){initNavTree('index.html',''); initResizable(); });
<div class="textblock"><p><a class="anchor" id="md_README"></a> </p><div class="image">
<img src="100_particles.gif" alt=""/>
</div>
<h1><a class="anchor" id="autotoc_md1"></a>
<p><a href="https://github.uio.no/FYS3150-G2-2023/Project-3">Repo</a></p>
<p><a href="https://pages.github.uio.no/FYS3150-G2-2023/Project-3/">Documentation</a></p>
<h1><a class="anchor" id="autotoc_md1"></a>
Requirements</h1>
<h2><a class="anchor" id="autotoc_md2"></a>
Operating systems</h2>
<ul>
<li>Linux<ul>
<li>Has been tested on <a href="https://fedoraproject.org/">Fedora 38</a></li>
<li>Will most likely work on other Linux distributions</li>
</ul>
</li>
<li>MacOS<ul>
<li>Might work, but hasn't been tested</li>
</ul>
</li>
<li>Windows<ul>
<li>Will most likely not work</li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md3"></a>
Tools</h2>
<ul>
<li>Profiling<ul>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_mono/gprof.html">gprof</a></li>
<li><a href="https://www.scalasca.org/">scalasca</a></li>
<li><a href="https://www.vi-hps.org/projects/score-p">score-p</a></li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md4"></a>
Libraries</h2>
<ul>
<li>Python<ul>
<li><a href="https://matplotlib.org/">matplotlib</a></li>
<li><a href="https://numpy.org/">numpy</a></li>
</ul>
</li>
<li>C++<ul>
<li><a href="https://www.openmp.org/">openmp</a></li>
<li><a href="https://arma.sourceforge.net/">armadillo</a></li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="autotoc_md5"></a>
Compiling</h1>
<p>Compiling is as easy as running this command while being inside the src directory:</p>
<div class="fragment"><div class="line">make</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md6"></a>
Running programs</h1>
<h2><a class="anchor" id="autotoc_md7"></a>
C++ binaries</h2>
<p>To run <b>main</b> or <b>test_suite</b>, just run this command while being inside src:</p>
<div class="fragment"><div class="line">./&lt;program-name&gt;</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md8"></a>
Python scripts</h2>
<h3><a class="anchor" id="autotoc_md9"></a>
Install libraries</h3>
<p>Before running the scripts, make sure that all libraries are installed. Using pip, you can install all requirements like this:</p>
<div class="fragment"><div class="line">pip install -r requirements.txt</div>
</div><!-- fragment --><p>This recursively install all the packages that are listed in <b>requirements.txt</b>.</p>
<h3><a class="anchor" id="autotoc_md10"></a>
Running scripts</h3>
<p>For the Python scripts, run them from the src directory like this:</p>
<div class="fragment"><div class="line">python scripts/&lt;script-name&gt;</div>
</div><!-- fragment --><p>If you have any problems running the scripts, you might have to run this instead:</p>
<div class="fragment"><div class="line">python3 scripts/&lt;script-name&gt;</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md11"></a>
Batch system</h2>
<p>For the <b>frequency_narrow_sweeps_long</b> program, the is a script called <b>job.script</b> that comes along with it. This is to be able to run it on a batch system using Slurm if you have access to one. This is the recommended way to use this program as it takes approximately 90 minutes to complete when using 16 cores.</p>
<p>If you happen to have such a system available to you, then you should clone this repo on that system, then compile it by running:</p>
<div class="fragment"><div class="line">make frequency_narrow_sweeps_long</div>
</div><!-- fragment --><p>You might have to load the Armadillo library before compiling.</p>
<p>After compiling, you can schedule it by running:</p>
<div class="fragment"><div class="line">sbatch job.script</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md12"></a>
Performance</h1>
<p>This section aims to give an idea to the time it takes for the program to run so that you know a bit what to expect if you decide to run it for yourself.</p>
<h2><a class="anchor" id="autotoc_md13"></a>
CPU</h2>
<p>The times mentioned here are times achieved on a computer with these specifications:</p>
<ul>
<li>CPU model<ul>
<li>Intel i7-9850H</li>
</ul>
</li>
<li>Threads<ul>
<li>12</li>
</ul>
</li>
<li>Clock speed<ul>
<li>4.6GHz</li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md14"></a>
Times</h2>
<p>All times mentioned use the <b>evolve_RK4</b> method.</p>
<p>Running a simulation with 100 particles without particle interactions over 40000 steps takes around 1.8 seconds. With particle interactions, it takes around 4.8 seconds.</p>
<p><b>potential_resonance_wide_sweep</b> takes around 56 seconds to complete.</p>
<p><b>potential_resonance_narrow_sweep</b> takes around 172 seconds to complete.</p>
<p><b>potential_resonance_narrow_sweep_interaction</b> takes around 936 seconds to complete.</p>
<h1><a class="anchor" id="autotoc_md15"></a>
Credits</h1>
<p>The Doxygen theme used here is <a href="https://github.com/jothepro/doxygen-awesome-css">doxygen-awesome-css</a>. </p>
</div></div><!-- PageDoc -->

View File

@@ -109,12 +109,13 @@ $(document).ready(function(){initNavTree('main_8cpp.html',''); initResizable();
<p>The main program for this project.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cmath&gt;</code><br />
<code>#include &lt;complex&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &lt;omp.h&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;sys/stat.h&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &quot;<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="constants_8hpp_source.html">constants.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
</div>
<p><a href="main_8cpp_source.html">Go to the source code of this file.</a></p>
@@ -123,79 +124,59 @@ $(document).ready(function(){initNavTree('main_8cpp.html',''); initResizable();
Macros</h2></td></tr>
<tr class="memitem:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a7b24a37e8ce9d243351bfc9b24945e63">PARTICLES</a>&#160;&#160;&#160;100</td></tr>
<tr class="separator:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0240ac851181b84ac374872dc5434ee4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a0240ac851181b84ac374872dc5434ee4">N</a>&#160;&#160;&#160;10000</td></tr>
<tr class="memitem:a0240ac851181b84ac374872dc5434ee4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a0240ac851181b84ac374872dc5434ee4">N</a>&#160;&#160;&#160;40000</td></tr>
<tr class="separator:a0240ac851181b84ac374872dc5434ee4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16cdf08eafbd529171c64d69a0ec02b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a16cdf08eafbd529171c64d69a0ec02b3">CHARGE</a>&#160;&#160;&#160;1.</td></tr>
<tr class="separator:a16cdf08eafbd529171c64d69a0ec02b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad96793de0cc60529a6b01040c0cd8033"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#ad96793de0cc60529a6b01040c0cd8033">MASS</a>&#160;&#160;&#160;40.</td></tr>
<tr class="separator:ad96793de0cc60529a6b01040c0cd8033"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8d92fb2ad085065fbd14718647551657"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a> (double t)</td></tr>
<tr class="memdesc:a8d92fb2ad085065fbd14718647551657"><td class="mdescLeft">&#160;</td><td class="mdescRight">The analytical solution for particle p1. <br /></td></tr>
<tr class="separator:a8d92fb2ad085065fbd14718647551657"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fdbe2d5a872e50ef5ec1263243589d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a> ()</td></tr>
<tr class="memdesc:a8fdbe2d5a872e50ef5ec1263243589d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate a single particle over the period of 50 \( \mu s \). <br /></td></tr>
<tr class="separator:a8fdbe2d5a872e50ef5ec1263243589d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a783789519f97c6430081171cacb0ffb1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a> ()</td></tr>
<tr class="memdesc:a783789519f97c6430081171cacb0ffb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 2 particles over the period of 50 \( \mu s \) with and without particle interactions. <br /></td></tr>
<tr class="separator:a783789519f97c6430081171cacb0ffb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac67e0d59227856c4d42e7d01c75e0ad2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a> ()</td></tr>
<tr class="memdesc:ac67e0d59227856c4d42e7d01c75e0ad2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate a single particle over 50 \( \mu s \) using different amount of steps and different methods. <br /></td></tr>
<tr class="separator:ac67e0d59227856c4d42e7d01c75e0ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a213713d6ecc02a32b588ffd179dc7513"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</a> ()</td></tr>
<tr class="memdesc:a213713d6ecc02a32b588ffd179dc7513"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 100 particles over 50 \( \mu s \). <br /></td></tr>
<tr class="separator:a213713d6ecc02a32b588ffd179dc7513"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a330668384dc073980ba11116309bacc5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a330668384dc073980ba11116309bacc5">simulate_100_particles_with_time_potential</a> ()</td></tr>
<tr class="separator:a330668384dc073980ba11116309bacc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b38b477c18e2f4268779751a88edab1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">potential_resonance_wide_sweep</a> ()</td></tr>
<tr class="memdesc:a6b38b477c18e2f4268779751a88edab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. <br /></td></tr>
<tr class="separator:a6b38b477c18e2f4268779751a88edab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33d9b1c76c3c80902f89a58b1a6d96ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a> ()</td></tr>
<tr class="memdesc:a33d9b1c76c3c80902f89a58b1a6d96ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. <br /></td></tr>
<tr class="separator:a33d9b1c76c3c80902f89a58b1a6d96ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1816f70ec612edc27848ef7f0875fdb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a> ()</td></tr>
<tr class="memdesc:ac1816f70ec612edc27848ef7f0875fdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. <br /></td></tr>
<tr class="separator:ac1816f70ec612edc27848ef7f0875fdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a87da4ef9f2cd753579484824310467b8"><td class="memItemLeft" align="right" valign="top"><a id="a87da4ef9f2cd753579484824310467b8" name="a87da4ef9f2cd753579484824310467b8"></a>
<a class="el" href="classParticle.html">Particle</a>&#160;</td><td class="memItemRight" valign="bottom"><b>p1</b> (CHARGE, MASS, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{20., 0., 20.}, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 25., 0.})</td></tr>
<tr class="separator:a87da4ef9f2cd753579484824310467b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memItemLeft" align="right" valign="top"><a id="a90f661586eb3c318fdca6f95ebc4fc46" name="a90f661586eb3c318fdca6f95ebc4fc46"></a>
<a class="el" href="classParticle.html">Particle</a>&#160;</td><td class="memItemRight" valign="bottom"><b>p2</b> (CHARGE, MASS, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{25., 25., 0.}, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 40., 5.})</td></tr>
<tr class="separator:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2efa69bb9d93049429ce4637075f1d30"><td class="memItemLeft" align="right" valign="top"><a id="a2efa69bb9d93049429ce4637075f1d30" name="a2efa69bb9d93049429ce4637075f1d30"></a>
<a class="el" href="classParticle.html">Particle</a>&#160;</td><td class="memItemRight" valign="bottom"><b>p1</b> (<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{20., 0., 20.}, <a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 25., 0.})</td></tr>
<tr class="memdesc:a2efa69bb9d93049429ce4637075f1d30"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> 1. <br /></td></tr>
<tr class="separator:a2efa69bb9d93049429ce4637075f1d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac70b61df65f4336f57ea9b4c35250df7"><td class="memItemLeft" align="right" valign="top"><a id="ac70b61df65f4336f57ea9b4c35250df7" name="ac70b61df65f4336f57ea9b4c35250df7"></a>
<a class="el" href="classParticle.html">Particle</a>&#160;</td><td class="memItemRight" valign="bottom"><b>p2</b> (<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{25., 25., 0.}, <a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 40., 5.})</td></tr>
<tr class="memdesc:ac70b61df65f4336f57ea9b4c35250df7"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> 2. <br /></td></tr>
<tr class="separator:ac70b61df65f4336f57ea9b4c35250df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The main program for this project. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000006">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000007">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a16cdf08eafbd529171c64d69a0ec02b3" name="a16cdf08eafbd529171c64d69a0ec02b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16cdf08eafbd529171c64d69a0ec02b3">&#9670;&#160;</a></span>CHARGE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CHARGE&#160;&#160;&#160;1.</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00025">25</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<a id="ad96793de0cc60529a6b01040c0cd8033" name="ad96793de0cc60529a6b01040c0cd8033"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad96793de0cc60529a6b01040c0cd8033">&#9670;&#160;</a></span>MASS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MASS&#160;&#160;&#160;40.</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00026">26</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<a id="a0240ac851181b84ac374872dc5434ee4" name="a0240ac851181b84ac374872dc5434ee4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0240ac851181b84ac374872dc5434ee4">&#9670;&#160;</a></span>N</h2>
@@ -203,12 +184,12 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define N&#160;&#160;&#160;10000</td>
<td class="memname">#define N&#160;&#160;&#160;40000</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00024">24</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00025">25</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
@@ -224,11 +205,40 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00023">23</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00024">24</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a8d92fb2ad085065fbd14718647551657" name="a8d92fb2ad085065fbd14718647551657"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d92fb2ad085065fbd14718647551657">&#9670;&#160;</a></span>analytical_solution_particle_1()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> analytical_solution_particle_1 </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>t</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The analytical solution for particle p1. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">t</td><td>Time</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>vec3 </dd></dl>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00037">37</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
@@ -244,7 +254,73 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00124">124</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00314">314</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<a id="a33d9b1c76c3c80902f89a58b1a6d96ea" name="a33d9b1c76c3c80902f89a58b1a6d96ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33d9b1c76c3c80902f89a58b1a6d96ea">&#9670;&#160;</a></span>potential_resonance_narrow_sweep()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void potential_resonance_narrow_sweep </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. </p>
<p>The simulation sweeps over different frequencies in [1., 1.7] MHz. </p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00209">209</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<a id="ac1816f70ec612edc27848ef7f0875fdb" name="ac1816f70ec612edc27848ef7f0875fdb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1816f70ec612edc27848ef7f0875fdb">&#9670;&#160;</a></span>potential_resonance_narrow_sweep_interaction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void potential_resonance_narrow_sweep_interaction </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. </p>
<p>The simulation sweeps over different frequencies in [1., 1.7] MHz. </p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00266">266</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
<a id="a6b38b477c18e2f4268779751a88edab1" name="a6b38b477c18e2f4268779751a88edab1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b38b477c18e2f4268779751a88edab1">&#9670;&#160;</a></span>potential_resonance_wide_sweep()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void potential_resonance_wide_sweep </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. </p>
<p>The simulation sweeps over different frequencies in [0.2, 2.5] MHz. </p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00152">152</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
@@ -263,26 +339,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00077">77</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p>Simulate 100 particles over 50 \( \mu s \). </p>
</div>
</div>
<a id="a330668384dc073980ba11116309bacc5" name="a330668384dc073980ba11116309bacc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a330668384dc073980ba11116309bacc5">&#9670;&#160;</a></span>simulate_100_particles_with_time_potential()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void simulate_100_particles_with_time_potential </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00091">91</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00134">134</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
@@ -301,7 +360,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00031">31</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p>Simulate a single particle over the period of 50 \( \mu s \). </p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00055">55</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
@@ -320,7 +381,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00055">55</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p>Simulate a single particle over 50 \( \mu s \) using different amount of steps and different methods. </p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00088">88</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>
@@ -339,7 +402,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00042">42</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<p>Simulate 2 particles over the period of 50 \( \mu s \) with and without particle interactions. </p>
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00070">70</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div>
</div>

13
docs/main_8cpp.js Normal file
View File

@@ -0,0 +1,13 @@
var main_8cpp =
[
[ "analytical_solution_particle_1", "main_8cpp.html#a8d92fb2ad085065fbd14718647551657", null ],
[ "potential_resonance_narrow_sweep", "main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea", null ],
[ "potential_resonance_narrow_sweep_interaction", "main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb", null ],
[ "potential_resonance_wide_sweep", "main_8cpp.html#a6b38b477c18e2f4268779751a88edab1", null ],
[ "simulate_100_particles", "main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513", null ],
[ "simulate_single_particle", "main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6", null ],
[ "simulate_single_particle_with_different_steps", "main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2", null ],
[ "simulate_two_particles", "main_8cpp.html#a783789519f97c6430081171cacb0ffb1", null ],
[ "p1", "main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30", null ],
[ "p2", "main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7", null ]
];

View File

@@ -103,148 +103,397 @@ $(document).ready(function(){initNavTree('main_8cpp_source.html',''); initResiza
<div class="contents">
<a href="main_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;omp.h&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;sys/stat.h&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;complex&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;omp.h&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &quot;<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8hpp.html">utils.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#define PARTICLES 100</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define N 10000</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#define CHARGE 1.</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#define MASS 40. </span><span class="comment">// unit: amu</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><a class="code hl_class" href="classParticle.html">Particle</a> p1(CHARGE, MASS, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{20., 0., 20.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 25., 0.});</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><a class="code hl_class" href="classParticle.html">Particle</a> p2(CHARGE, MASS, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{25., 25., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 40., 5.});</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &quot;<a class="code" href="constants_8hpp.html">constants.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8hpp.html">utils.hpp</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define PARTICLES 100</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#define N 40000</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// Particles used for testing</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30"> 28</a></span><a class="code hl_class" href="classParticle.html">Particle</a> <a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{20., 0., 20.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 25., 0.}); </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7"> 29</a></span><a class="code hl_class" href="classParticle.html">Particle</a> <a class="code hl_variable" href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7">p2</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{25., 25., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 40., 5.}); </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keywordtype">void</span> simulate_single_particle()</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>{</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_define" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">DEBUG</a>(<span class="stringliteral">&quot;Inside single particle sim&quot;</span>);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector&lt;Particle&gt;{p1});</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_define" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">DEBUG</a>(<span class="stringliteral">&quot;Write to dir&quot;</span>);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> trap.write_simulation_to_dir(<span class="stringliteral">&quot;output/simulate_single_particle&quot;</span>, time, N);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>}</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keywordtype">void</span> simulate_two_particles()</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>{</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap_no_interaction(std::vector&lt;Particle&gt;{p1, p2});</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap_with_interaction(std::vector&lt;Particle&gt;{p1, p2});</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> trap_no_interaction.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction&quot;</span>, time, N, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> trap_with_interaction.write_simulation_to_dir(</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction&quot;</span>, time, N);</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>}</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="keywordtype">void</span> simulate_single_particle_with_different_steps()</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657"> 37</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> <a class="code hl_function" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a>(<span class="keywordtype">double</span> t)</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span>{</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordtype">double</span> w_0 = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a> / <a class="code hl_define" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a>;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">double</span> w_z2 = (50. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.) / (<a class="code hl_define" href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a> * 500. * 500.);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordtype">double</span> w_p = (w_0 + std::sqrt(w_0 * w_0 - 2. * w_z2)) / 2.;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordtype">double</span> w_n = (w_0 - std::sqrt(w_0 * w_0 - 2. * w_z2)) / 2.;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordtype">double</span> A_p = (25. + w_n * 20.) / (w_n - w_p);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordtype">double</span> A_n = -(25. + w_p * 20.) / (w_n - w_p);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> std::cout &lt;&lt; A_p &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; A_n &lt;&lt; std::endl;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> std::complex&lt;double&gt; f =</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> A_p * std::exp(std::complex&lt;double&gt;(0., -w_p * t))</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> + A_n * std::exp(std::complex&lt;double&gt;(0., -w_n * t));</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> res{std::real(f), std::imag(f), 20. * std::cos(std::sqrt(w_z2) * t)};</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> res;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>}</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6"> 55</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a>()</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>{</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">double</span> time = 50; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Initialize trap with particle 1</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector&lt;Particle&gt;{<a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>});</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">int</span> steps = 4000 * (i + 1);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector&lt;Particle&gt;{p1});</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> trap.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(<span class="stringliteral">&quot;output/N_steps/RK4/&quot;</span> +</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> std::to_string(steps) + <span class="stringliteral">&quot;_steps&quot;</span>,</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> time, steps, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">int</span> steps = 4000 * (i + 1);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector&lt;Particle&gt;{p1});</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> trap.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(<span class="stringliteral">&quot;output/N_steps/euler/&quot;</span> +</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> std::to_string(steps) + <span class="stringliteral">&quot;_steps&quot;</span>,</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> time, steps, <span class="stringliteral">&quot;euler&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>}</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="keywordtype">void</span> simulate_100_particles()</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>{</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((<span class="keywordtype">unsigned</span>)100, <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> [](<span class="keywordtype">double</span> t) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">return</span> 25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000. *</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> (1. + .4 * std::cos(1.5 * t));</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> },</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> 500., 0);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">double</span> time = 500.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> trap.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(<span class="stringliteral">&quot;output/simulate_100_particles&quot;</span>, time, N*5);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>}</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="keywordtype">void</span> simulate_100_particles_with_time_potential()</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span>{</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">double</span> freq_start = .2;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">double</span> freq_end = 2.5;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">double</span> freq_increment = .02;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">size_t</span> freq_iterations = (size_t) ((freq_end - freq_start) / freq_increment);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::ofstream ofile;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">for</span> (<span class="keywordtype">double</span> f : amplitudes) {</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> ofile.open(path + <span class="stringliteral">&quot;f_&quot;</span> + std::to_string(f) + <span class="stringliteral">&quot;.txt&quot;</span>);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="preprocessor"> #pragma omp parallel for ordered schedule(static, 1)</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordtype">double</span> freq = freq_start + i*freq_increment;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((<span class="keywordtype">unsigned</span>)100, <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> [f, freq](<span class="keywordtype">double</span> t) {</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">return</span> (25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.) *</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> (1. + f * std::cos(freq * t));</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> },</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> 500., 0.);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordtype">double</span> res = trap.<a class="code hl_function" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a>(500., 40000, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">true</span>);</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="preprocessor"> #pragma omp ordered</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> ofile &lt;&lt; freq &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; res &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ofile.close();</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="keywordtype">int</span> main()</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>{</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> simulate_single_particle();</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> simulate_two_particles();</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> simulate_single_particle_with_different_steps();</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordtype">double</span> start = omp_get_wtime();</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="comment">//simulate_100_particles();</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> simulate_100_particles_with_time_potential();</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordtype">double</span> end = omp_get_wtime();</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Time: &quot;</span> &lt;&lt; end - start &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// Simulate and write results to file</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> trap.<a class="code hl_function" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a>(<span class="stringliteral">&quot;output/simulate_single_particle&quot;</span>, time, N,</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>}</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1"> 70</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a>()</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>{</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment">// Initialize traps with particles</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap_no_interaction(std::vector&lt;Particle&gt;{<a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>, <a class="code hl_variable" href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7">p2</a>});</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap_with_interaction(std::vector&lt;Particle&gt;{<a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>, <a class="code hl_variable" href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7">p2</a>});</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="comment">// Simulate and write results to files</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> trap_no_interaction.<a class="code hl_function" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a>(</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction&quot;</span>, time, N, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> trap_with_interaction.write_simulation_to_dir(</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction&quot;</span>, time, N);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2"> 88</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a>()</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>{</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> std::ofstream ofile;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// Calculate relative error for RK4</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> std::string path = <span class="stringliteral">&quot;output/relative_error/RK4/&quot;</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="preprocessor">#pragma omp parallel for private(ofile)</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">int</span> steps = 4000 * std::pow(2, i);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::cout &lt;&lt; steps &lt;&lt; std::endl;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordtype">double</span> dt = time / (double)steps;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> ofile.open(path + std::to_string(steps) + <span class="stringliteral">&quot;_steps.txt&quot;</span>);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector&lt;Particle&gt;{<a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>});</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res = trap.simulate(time, steps, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; steps; i++) {</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> ofile &lt;&lt; arma::norm(res.r_vecs[0][i]</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> - <a class="code hl_function" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a>(dt * i))</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> ofile.close();</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="comment">// Calculate relative error for forward Euler</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> path = <span class="stringliteral">&quot;output/relative_error/euler/&quot;</span>;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="preprocessor">#pragma omp parallel for private(ofile)</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordtype">int</span> steps = 4000 * std::pow(2, i);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordtype">double</span> dt = time / (double)steps;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ofile.open(path + std::to_string(steps) + <span class="stringliteral">&quot;_steps.txt&quot;</span>);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector&lt;Particle&gt;{<a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>});</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res = trap.simulate(time, steps, <span class="stringliteral">&quot;euler&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; steps; i++) {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> ofile &lt;&lt; arma::norm(res.r_vecs[0][i]</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> - <a class="code hl_function" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a>(dt * i))</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> }</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> ofile.close();</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>}</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"><a class="line" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513"> 134</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</a>()</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>{</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((<span class="keywordtype">unsigned</span>)100);</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="comment">// trap.write_simulation_to_dir(&quot;output/simulate_100_particles&quot;, time, N,</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="comment">//&quot;rk4&quot;, false);</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> trap.<a class="code hl_function" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">simulate</a>(time, N, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">true</span>);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span>}</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1"> 152</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">potential_resonance_wide_sweep</a>()</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span>{</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordtype">double</span> time = 500.;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordtype">double</span> freq_start = .2;</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordtype">double</span> freq_end = 2.5;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordtype">double</span> freq_increment = .02;</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordtype">size_t</span> freq_iterations =</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> (size_t)((freq_end - freq_start) / freq_increment) + 1;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> std::ofstream ofile;</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="comment">// Insert frequencies</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> res[0][i] = freq_start + freq_increment * i;</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> }</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> {</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)100);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; freq_iterations; j++) {</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> res[i + 1][j] =</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> trap.<a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(time, N, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> }</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> }</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> ofile.open(path + <span class="stringliteral">&quot;wide_sweep.txt&quot;</span>);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> ofile &lt;&lt; res[0][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[1][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[2][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> }</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> ofile.close();</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span>}</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea"> 209</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a>()</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>{</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordtype">double</span> time = 500.;</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> </div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <span class="keywordtype">double</span> freq_start = 1.1;</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keywordtype">double</span> freq_end = 1.7;</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordtype">double</span> freq_increment = .002;</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordtype">size_t</span> freq_iterations =</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> (size_t)((freq_end - freq_start) / freq_increment) + 1;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> </div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> </div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> std::ofstream ofile;</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// Insert frequencies</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> res[0][i] = freq_start + freq_increment * i;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> }</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> </div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span><span class="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> {</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)100);</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; freq_iterations; j++) {</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> res[i + 1][j] =</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> trap.<a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(time, N, <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> }</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> }</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> }</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> </div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> ofile.open(path + <span class="stringliteral">&quot;narrow_sweep.txt&quot;</span>);</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> ofile &lt;&lt; res[0][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[1][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[2][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> }</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> ofile.close();</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span>}</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb"> 266</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a>()</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span>{</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="keywordtype">double</span> time = 500.;</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> </div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordtype">double</span> freq_start = 1.1;</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordtype">double</span> freq_end = 1.7;</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordtype">double</span> freq_increment = .002;</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="keywordtype">size_t</span> freq_iterations =</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> (size_t)((freq_end - freq_start) / freq_increment) + 1;</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> </div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> </div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> std::ofstream ofile;</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> </div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> res[0][i] = freq_start + freq_increment * i;</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> }</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span><span class="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> {</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)100);</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; freq_iterations; j++) {</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> res[i + 1][j] = trap.<a class="code hl_function" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">fraction_of_particles_left</a>(time, N);</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> }</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> }</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> }</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> </div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> ofile.open(path + <span class="stringliteral">&quot;narrow_sweep_interactions.txt&quot;</span>);</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; freq_iterations; i++) {</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> ofile &lt;&lt; res[0][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[1][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span> &lt;&lt; res[2][i] &lt;&lt; <span class="charliteral">&#39;,&#39;</span></div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> }</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> ofile.close();</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span>}</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span><span class="keywordtype">int</span> main()</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span>{</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="keywordtype">int</span> option = 1;</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordtype">bool</span> chosen = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> </div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> system(<span class="stringliteral">&quot;clear&quot;</span>);</div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> std::cout &lt;&lt; <span class="stringliteral">&quot;(1) All (default)\n&quot;</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> &lt;&lt; <span class="stringliteral">&quot;(2) Simulate single particle\n&quot;</span></div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> &lt;&lt; <span class="stringliteral">&quot;(3) simulate 2 particles\n&quot;</span></div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> &lt;&lt; <span class="stringliteral">&quot;(4) Simulate single particle with different time steps\n&quot;</span></div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> &lt;&lt; <span class="stringliteral">&quot;(5) Simulate 100 particles\n&quot;</span></div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> &lt;&lt; <span class="stringliteral">&quot;(6) Potential resonance wide sweep\n&quot;</span></div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> &lt;&lt; <span class="stringliteral">&quot;(7) Potential resonance narrow sweep without particle &quot;</span></div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <span class="stringliteral">&quot;interactions\n&quot;</span></div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> &lt;&lt; <span class="stringliteral">&quot;(8) Potential resonance narrow sweep with particle &quot;</span></div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <span class="stringliteral">&quot;interaction\n&quot;</span></div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> &lt;&lt; <span class="stringliteral">&quot;Select what to run: &quot;</span>;</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> std::cin &gt;&gt; std::noskipws;</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> <span class="keywordflow">do</span> {</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> <span class="keywordflow">if</span> (!(std::cin &gt;&gt; option) || option &lt; 1 || option &gt; 8) {</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> std::cin.clear();</div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> std::cin.ignore(std::numeric_limits&lt;std::streamsize&gt;::max(), <span class="charliteral">&#39;\n&#39;</span>);</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> system(<span class="stringliteral">&quot;clear&quot;</span>);</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> std::cout</div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> &lt;&lt; <span class="stringliteral">&quot;(1) All (default)\n&quot;</span></div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> &lt;&lt; <span class="stringliteral">&quot;(2) Simulate single particle\n&quot;</span></div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> &lt;&lt; <span class="stringliteral">&quot;(3) simulate 2 particles\n&quot;</span></div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> &lt;&lt; <span class="stringliteral">&quot;(4) Simulate single particle with different time steps\n&quot;</span></div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> &lt;&lt; <span class="stringliteral">&quot;(5) Simulate 100 particles\n&quot;</span></div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> &lt;&lt; <span class="stringliteral">&quot;(6) Potential resonance wide sweep\n&quot;</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> &lt;&lt; <span class="stringliteral">&quot;(7) Potential resonance narrow sweep without particle &quot;</span></div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="stringliteral">&quot;interactions\n&quot;</span></div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> &lt;&lt; <span class="stringliteral">&quot;(8) Potential resonance narrow sweep with particle &quot;</span></div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <span class="stringliteral">&quot;interaction\n&quot;</span></div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> &lt;&lt; <span class="stringliteral">&quot;Not a valid option, please enter a valid number: &quot;</span>;</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> chosen = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> }</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> } <span class="keywordflow">while</span> (!chosen);</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> </div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> <span class="keywordtype">double</span> start, end;</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> </div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> system(<span class="stringliteral">&quot;clear&quot;</span>);</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> </div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> start = omp_get_wtime();</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <span class="keywordflow">switch</span> (option) {</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_single_particle\n&quot;</span>;</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> <a class="code hl_function" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a>();</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> </div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_two_particles\n&quot;</span>;</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> <a class="code hl_function" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a>();</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> </div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_single_particle_with_different_steps\n&quot;</span>;</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <a class="code hl_function" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a>();</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> </div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_100_particles\n&quot;</span>;</div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <a class="code hl_function" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</a>();</div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> </div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running potential_resonance_wide_sweep\n&quot;</span>;</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> <a class="code hl_function" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">potential_resonance_wide_sweep</a>();</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> </div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running potential_resonance_narrow_sweep\n&quot;</span>;</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> <a class="code hl_function" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a>();</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> </div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running potential_resonance_narrow_sweep_interaction\n&quot;</span>;</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> <a class="code hl_function" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a>();</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_single_particle\n&quot;</span>;</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> <a class="code hl_function" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a>();</div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_two_particles\n&quot;</span>;</div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> <a class="code hl_function" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a>();</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> <span class="keywordflow">case</span> 4:</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_single_particle_with_different_steps\n&quot;</span>;</div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <a class="code hl_function" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a>();</div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> <span class="keywordflow">case</span> 5:</div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running simulate_100_particles\n&quot;</span>;</div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> <a class="code hl_function" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</a>();</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> <span class="keywordflow">case</span> 6:</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running potential_resonance_wide_sweep\n&quot;</span>;</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> <a class="code hl_function" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">potential_resonance_wide_sweep</a>();</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> <span class="keywordflow">case</span> 7:</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running potential_resonance_narrow_sweep\n&quot;</span>;</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <a class="code hl_function" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a>();</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> <span class="keywordflow">case</span> 8:</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running potential_resonance_narrow_sweep_interaction\n&quot;</span>;</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <a class="code hl_function" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a>();</div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> }</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> end = omp_get_wtime();</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> </div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Time: &quot;</span> &lt;&lt; end - start &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> </div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span>}</div>
<div class="ttc" id="aPenningTrap_8hpp_html"><div class="ttname"><a href="PenningTrap_8hpp.html">PenningTrap.hpp</a></div><div class="ttdoc">A class for simulating a Penning trap.</div></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00021">Particle.hpp:21</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a0194be61c956a9259c747c23e4163c5b"><div class="ttname"><a href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00266">PenningTrap.cpp:266</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_abbb832a85139b1a56ebde57d7b8f9a57"><div class="ttname"><a href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, unsigned int steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00017">constants.hpp:17</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_af40a326b23c68a27cebe60f16634a2cb"><div class="ttname"><a href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a></div><div class="ttdeci">#define V</div><div class="ttdoc">1 Volt. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00019">constants.hpp:19</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec_3d</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
<div class="ttc" id="aclassParticle_html"><div class="ttname"><a href="classParticle.html">Particle</a></div><div class="ttdoc">A class that holds attributes of a particle.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00022">Particle.hpp:23</a></div></div>
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00031">PenningTrap.hpp:32</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_a7a1d9f0528a12308de25bc30718da20a"><div class="ttname"><a href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap::simulate</a></div><div class="ttdeci">simulation_t simulate(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate the particle system inside the Penning trap over a certain amount of time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_aaee129f177657455348d0c8ae1441dea"><div class="ttname"><a href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap::reinitialize</a></div><div class="ttdeci">void reinitialize(double f, double omega_V, double t=0.)</div><div class="ttdoc">Give all particles new positions and velocities, and change t and V_0.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00153">PenningTrap.cpp:153</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ac529aa26c288f34eae184a67e6bac41f"><div class="ttname"><a href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f">PenningTrap::fraction_of_particles_left</a></div><div class="ttdeci">double fraction_of_particles_left(double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and calculate what fraction of particles are still left inside the Penning trap after the si...</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00311">PenningTrap.cpp:311</a></div></div>
<div class="ttc" id="aclassPenningTrap_html_ad8bc4df7ab3eed53b16cfdff38e7760b"><div class="ttname"><a href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, uint steps, std::string method=&quot;rk4&quot;, bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00273">PenningTrap.cpp:273</a></div></div>
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00021">constants.hpp:21</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_a2ff491cc7958ffd5e749c518a4a60ec8"><div class="ttname"><a href="constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8">CA_MASS</a></div><div class="ttdeci">#define CA_MASS</div><div class="ttdoc">Mass of a single calcium ion. unit: amu.</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00029">constants.hpp:29</a></div></div>
<div class="ttc" id="aconstants_8hpp_html_af40a326b23c68a27cebe60f16634a2cb"><div class="ttname"><a href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a></div><div class="ttdeci">#define V</div><div class="ttdoc">1 Volt. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00025">constants.hpp:25</a></div></div>
<div class="ttc" id="amain_8cpp_html_a213713d6ecc02a32b588ffd179dc7513"><div class="ttname"><a href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</a></div><div class="ttdeci">void simulate_100_particles()</div><div class="ttdoc">Simulate 100 particles over 50 .</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00134">main.cpp:134</a></div></div>
<div class="ttc" id="amain_8cpp_html_a2efa69bb9d93049429ce4637075f1d30"><div class="ttname"><a href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a></div><div class="ttdeci">Particle p1(vec3{20., 0., 20.}, vec3{0., 25., 0.})</div><div class="ttdoc">Particle 1.</div></div>
<div class="ttc" id="amain_8cpp_html_a33d9b1c76c3c80902f89a58b1a6d96ea"><div class="ttname"><a href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a></div><div class="ttdeci">void potential_resonance_narrow_sweep()</div><div class="ttdoc">Simulate 100 particles over 500 using a time dependent potential.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00209">main.cpp:209</a></div></div>
<div class="ttc" id="amain_8cpp_html_a6b38b477c18e2f4268779751a88edab1"><div class="ttname"><a href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">potential_resonance_wide_sweep</a></div><div class="ttdeci">void potential_resonance_wide_sweep()</div><div class="ttdoc">Simulate 100 particles over 500 using a time dependent potential.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00152">main.cpp:152</a></div></div>
<div class="ttc" id="amain_8cpp_html_a783789519f97c6430081171cacb0ffb1"><div class="ttname"><a href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a></div><div class="ttdeci">void simulate_two_particles()</div><div class="ttdoc">Simulate 2 particles over the period of 50 with and without particle interactions.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00070">main.cpp:70</a></div></div>
<div class="ttc" id="amain_8cpp_html_a8d92fb2ad085065fbd14718647551657"><div class="ttname"><a href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a></div><div class="ttdeci">vec3 analytical_solution_particle_1(double t)</div><div class="ttdoc">The analytical solution for particle p1.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00037">main.cpp:37</a></div></div>
<div class="ttc" id="amain_8cpp_html_a8fdbe2d5a872e50ef5ec1263243589d6"><div class="ttname"><a href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a></div><div class="ttdeci">void simulate_single_particle()</div><div class="ttdoc">Simulate a single particle over the period of 50 .</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00055">main.cpp:55</a></div></div>
<div class="ttc" id="amain_8cpp_html_ac1816f70ec612edc27848ef7f0875fdb"><div class="ttname"><a href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a></div><div class="ttdeci">void potential_resonance_narrow_sweep_interaction()</div><div class="ttdoc">Simulate 100 particles over 500 using a time dependent potential.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00266">main.cpp:266</a></div></div>
<div class="ttc" id="amain_8cpp_html_ac67e0d59227856c4d42e7d01c75e0ad2"><div class="ttname"><a href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a></div><div class="ttdeci">void simulate_single_particle_with_different_steps()</div><div class="ttdoc">Simulate a single particle over 50 using different amount of steps and different methods.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00088">main.cpp:88</a></div></div>
<div class="ttc" id="amain_8cpp_html_ac70b61df65f4336f57ea9b4c35250df7"><div class="ttname"><a href="main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7">p2</a></div><div class="ttdeci">Particle p2(vec3{25., 25., 0.}, vec3{0., 40., 5.})</div><div class="ttdoc">Particle 2.</div></div>
<div class="ttc" id="astructsimulation_html"><div class="ttname"><a href="structsimulation.html">simulation</a></div><div class="ttdoc">Typedef for PenningTrap::simulation return value.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00040">typedefs.hpp:40</a></div></div>
<div class="ttc" id="atypedefs_8hpp_html_a3bdfb73a02f88ae32b6128ef747c4aea"><div class="ttname"><a href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></div><div class="ttdeci">arma::vec::fixed&lt; 3 &gt; vec3</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00023">typedefs.hpp:23</a></div></div>
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
<div class="ttc" id="autils_8hpp_html_a6fdd7217b750aff5b6295ece7cbdeffa"><div class="ttname"><a href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00076">utils.cpp:76</a></div></div>
<div class="ttc" id="autils_8hpp_html_aecc1f7a8a2493b9e021e5bff76a00a5b"><div class="ttname"><a href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">DEBUG</a></div><div class="ttdeci">#define DEBUG(msg)</div><div class="ttdoc">Writes a debug message.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8hpp_source.html#l00036">utils.hpp:36</a></div></div>
<div class="ttc" id="autils_8hpp_html_a6fdd7217b750aff5b6295ece7cbdeffa"><div class="ttname"><a href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00072">utils.cpp:72</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->

View File

@@ -29,14 +29,39 @@ var menudata={children:[
{text:"Class List",url:"annotated.html"},
{text:"Class Index",url:"classes.html"},
{text:"Class Members",url:"functions.html",children:[
{text:"All",url:"functions.html"},
{text:"All",url:"functions.html",children:[
{text:"a",url:"functions.html#index_a"},
{text:"b",url:"functions.html#index_b"},
{text:"d",url:"functions.html#index_d"},
{text:"e",url:"functions.html#index_e"},
{text:"f",url:"functions.html#index_f"},
{text:"k",url:"functions.html#index_k"},
{text:"m",url:"functions.html#index_m"},
{text:"p",url:"functions.html#index_p"},
{text:"q",url:"functions.html#index_q"},
{text:"r",url:"functions.html#index_r"},
{text:"s",url:"functions.html#index_s"},
{text:"t",url:"functions.html#index_t"},
{text:"v",url:"functions.html#index_v"},
{text:"w",url:"functions.html#index_w"}]},
{text:"Functions",url:"functions_func.html"},
{text:"Variables",url:"functions_vars.html"},
{text:"Related Functions",url:"functions_rela.html"}]}]},
{text:"Files",url:"files.html",children:[
{text:"File List",url:"files.html"},
{text:"File Members",url:"globals.html",children:[
{text:"All",url:"globals.html"},
{text:"All",url:"globals.html",children:[
{text:"_",url:"globals.html#index__5F"},
{text:"a",url:"globals.html#index_a"},
{text:"c",url:"globals.html#index_c"},
{text:"d",url:"globals.html#index_d"},
{text:"k",url:"globals.html#index_k"},
{text:"m",url:"globals.html#index_m"},
{text:"p",url:"globals.html#index_p"},
{text:"s",url:"globals.html#index_s"},
{text:"t",url:"globals.html#index_t"},
{text:"v",url:"globals.html#index_v"}]},
{text:"Functions",url:"globals_func.html"},
{text:"Variables",url:"globals_vars.html"},
{text:"Typedefs",url:"globals_type.html"},
{text:"Macros",url:"globals_defs.html"}]}]}]}

177
docs/namespaceplot__3d.html Normal file
View File

@@ -0,0 +1,177 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: plot_3d Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('namespaceplot__3d.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_3d Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot__3d.html#adb8902df55180f4ad62fb3799bc5c5a8">main</a> ()</td></tr>
<tr class="separator:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a7026cb07859df7ff6b3fb60453573467"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot__3d.html#a7026cb07859df7ff6b3fb60453573467">params</a></td></tr>
<tr class="separator:a7026cb07859df7ff6b3fb60453573467"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><pre class="fragment"> @package plot_3d</pre> </div><h2 class="groupheader">Function Documentation</h2>
<a id="adb8902df55180f4ad62fb3799bc5c5a8" name="adb8902df55180f4ad62fb3799bc5c5a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb8902df55180f4ad62fb3799bc5c5a8">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_3d.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00022">22</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a7026cb07859df7ff6b3fb60453573467" name="a7026cb07859df7ff6b3fb60453573467"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7026cb07859df7ff6b3fb60453573467">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_3d.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><span class="lineno"> 10</span> <span class="stringliteral">&quot;figure.autolayout&quot;</span>: <span class="keyword">True</span></div>
<div class="line"><span class="lineno"> 11</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00009">9</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespaceplot__3d.html">plot_3d</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

118
docs/namespaces.html Normal file
View File

@@ -0,0 +1,118 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: Namespace List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('namespaces.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Namespace List</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all documented namespaces with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceplot__3d.html" target="_self">plot_3d</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

4
docs/namespaces_dup.js Normal file
View File

@@ -0,0 +1,4 @@
var namespaces_dup =
[
[ "plot_3d", "namespaceplot__3d.html", null ]
];

View File

@@ -25,7 +25,25 @@
var NAVTREE =
[
[ "Penning Trap Simulation", "index.html", [
[ "Credits", "index.html#autotoc_md1", null ],
[ "Requirements", "index.html#autotoc_md1", [
[ "Operating systems", "index.html#autotoc_md2", null ],
[ "Tools", "index.html#autotoc_md3", null ],
[ "Libraries", "index.html#autotoc_md4", null ]
] ],
[ "Compiling", "index.html#autotoc_md5", null ],
[ "Running programs", "index.html#autotoc_md6", [
[ "C++ binaries", "index.html#autotoc_md7", null ],
[ "Python scripts", "index.html#autotoc_md8", [
[ "Install libraries", "index.html#autotoc_md9", null ],
[ "Running scripts", "index.html#autotoc_md10", null ]
] ],
[ "Batch system", "index.html#autotoc_md11", null ]
] ],
[ "Performance", "index.html#autotoc_md12", [
[ "CPU", "index.html#autotoc_md13", null ],
[ "Times", "index.html#autotoc_md14", null ]
] ],
[ "Credits", "index.html#autotoc_md15", null ],
[ "Bug List", "bug.html", null ],
[ "Classes", "annotated.html", [
[ "Class List", "annotated.html", "annotated_dup" ],
@@ -42,6 +60,7 @@ var NAVTREE =
[ "File Members", "globals.html", [
[ "All", "globals.html", null ],
[ "Functions", "globals_func.html", null ],
[ "Variables", "globals_vars.html", null ],
[ "Typedefs", "globals_type.html", null ],
[ "Macros", "globals_defs.html", null ]
] ]

View File

@@ -1,95 +1,151 @@
var NAVTREEINDEX0 =
{
"Particle_8cpp.html":[3,0,1,2],
"Particle_8cpp_source.html":[3,0,1,2],
"Particle_8hpp.html":[3,0,0,1],
"Particle_8hpp_source.html":[3,0,0,1],
"PenningTrap_8cpp.html":[3,0,1,3],
"PenningTrap_8cpp_source.html":[3,0,1,3],
"PenningTrap_8hpp.html":[3,0,0,2],
"PenningTrap_8hpp_source.html":[3,0,0,2],
"animate__100__particles_8py_source.html":[3,0,1,0],
"annotated.html":[2,0],
"bug.html":[1],
"classParticle.html":[2,0,0],
"classParticle.html#a566dcc1de4bdc01251776948798ea8e1":[2,0,0,3],
"classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4":[2,0,0,0],
"classParticle.html#a879692772803d6ab65fa4993b54aea6e":[2,0,0,5],
"classParticle.html#aa797d319549dc2a0beb06cdbfd430232":[2,0,0,1],
"classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563":[2,0,0,2],
"classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6":[2,0,0,4],
"classPenningTrap.html":[2,0,1],
"classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f":[2,0,1,21],
"classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b":[2,0,1,9],
"classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716":[2,0,1,17],
"classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9":[2,0,1,7],
"classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8":[2,0,1,12],
"classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640":[2,0,1,19],
"classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e":[2,0,1,5],
"classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648":[2,0,1,10],
"classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b":[2,0,1,14],
"classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854":[2,0,1,11],
"classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2":[2,0,1,18],
"classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73":[2,0,1,2],
"classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8":[2,0,1,3],
"classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1":[2,0,1,1],
"classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e":[2,0,1,22],
"classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce":[2,0,1,8],
"classPenningTrap.html#aaf105828121c4a33cc2b217453c20317":[2,0,1,23],
"classPenningTrap.html#ab9ea97a406534bbe621a95215144875e":[2,0,1,4],
"classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57":[2,0,1,16],
"classPenningTrap.html#acbf065c9c125682329ad82a8d166554c":[2,0,1,6],
"classPenningTrap.html#ae670d7de621acdb343b01af098086f63":[2,0,1,0],
"classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56":[2,0,1,13],
"classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4":[2,0,1,20],
"classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e":[2,0,1,15],
"classPenningTrapTest.html":[2,0,2],
"classes.html":[2,1],
"constants_8hpp.html":[3,0,0,0],
"constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5":[3,0,0,0,1],
"constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb":[3,0,0,0,0],
"constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb":[3,0,0,0,2],
"constants_8hpp_source.html":[3,0,0,0],
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[3,0,1],
"dir_d44c64559bbebec7f509842c48db8b23.html":[3,0,0],
"files.html":[3,0],
"functions.html":[2,2,0],
"functions_func.html":[2,2,1],
"functions_rela.html":[2,2,3],
"functions_vars.html":[2,2,2],
"globals.html":[3,1,0],
"globals_defs.html":[3,1,3],
"globals_func.html":[3,1,1],
"globals_type.html":[3,1,2],
"Particle_8cpp.html":[7,0,1,3],
"Particle_8cpp_source.html":[7,0,1,3],
"Particle_8hpp.html":[7,0,0,1],
"Particle_8hpp_source.html":[7,0,0,1],
"PenningTrap_8cpp.html":[7,0,1,4],
"PenningTrap_8cpp_source.html":[7,0,1,4],
"PenningTrap_8hpp.html":[7,0,0,2],
"PenningTrap_8hpp_source.html":[7,0,0,2],
"animate__100__particles_8py.html":[7,0,1,0,0],
"animate__100__particles_8py_source.html":[7,0,1,0,0],
"annotated.html":[6,0],
"bug.html":[5],
"classParticle.html":[6,0,0],
"classParticle.html#a1c59101411db43624828b766f87ad460":[6,0,0,4],
"classParticle.html#a3a10400add8dd22b8031330c2aafb6fe":[6,0,0,5],
"classParticle.html#a566dcc1de4bdc01251776948798ea8e1":[6,0,0,3],
"classParticle.html#aa797d319549dc2a0beb06cdbfd430232":[6,0,0,1],
"classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563":[6,0,0,2],
"classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4":[6,0,0,0],
"classPenningTrap.html":[6,0,1],
"classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f":[6,0,1,25],
"classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716":[6,0,1,21],
"classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682":[6,0,1,15],
"classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640":[6,0,1,23],
"classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c":[6,0,1,17],
"classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655":[6,0,1,6],
"classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e":[6,0,1,5],
"classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2":[6,0,1,18],
"classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22":[6,0,1,7],
"classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8":[6,0,1,0],
"classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018":[6,0,1,16],
"classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2":[6,0,1,22],
"classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8":[6,0,1,3],
"classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89":[6,0,1,28],
"classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a":[6,0,1,13],
"classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598":[6,0,1,8],
"classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08":[6,0,1,10],
"classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f":[6,0,1,1],
"classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae":[6,0,1,20],
"classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e":[6,0,1,27],
"classPenningTrap.html#a9a301b0540078c36697880ef204afdf3":[6,0,1,14],
"classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43":[6,0,1,12],
"classPenningTrap.html#aaee129f177657455348d0c8ae1441dea":[6,0,1,11],
"classPenningTrap.html#ab9ea97a406534bbe621a95215144875e":[6,0,1,4],
"classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f":[6,0,1,9],
"classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b":[6,0,1,19],
"classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f":[6,0,1,2],
"classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5":[6,0,1,26],
"classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4":[6,0,1,24],
"classPenningTrapTest.html":[6,0,2],
"classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9":[6,0,2,2],
"classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508":[6,0,2,4],
"classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8":[6,0,2,1],
"classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e":[6,0,2,0],
"classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046":[6,0,2,3],
"classes.html":[6,1],
"constants_8hpp.html":[7,0,0,0],
"constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5":[7,0,0,0,3],
"constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8":[7,0,0,0,1],
"constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb":[7,0,0,0,2],
"constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb":[7,0,0,0,4],
"constants_8hpp.html#af7602a3a314957137ad1cd719aa23789":[7,0,0,0,0],
"constants_8hpp_source.html":[7,0,0,0],
"dir_634e799a3947388232110823971192a8.html":[7,0,1,0],
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[7,0,1],
"dir_d44c64559bbebec7f509842c48db8b23.html":[7,0,0],
"files.html":[7,0],
"frequency__narrow__sweeps__long_8cpp.html":[7,0,1,1],
"frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea":[7,0,1,1,0],
"frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb":[7,0,1,1,1],
"frequency__narrow__sweeps__long_8cpp_source.html":[7,0,1,1],
"functions.html":[6,2,0],
"functions_func.html":[6,2,1],
"functions_rela.html":[6,2,3],
"functions_vars.html":[6,2,2],
"globals.html":[7,1,0],
"globals_defs.html":[7,1,4],
"globals_func.html":[7,1,1],
"globals_type.html":[7,1,3],
"globals_vars.html":[7,1,2],
"index.html":[],
"index.html#autotoc_md1":[0],
"main_8cpp.html":[3,0,1,1],
"main_8cpp_source.html":[3,0,1,1],
"index.html#autotoc_md10":[2,1,1],
"index.html#autotoc_md11":[2,2],
"index.html#autotoc_md12":[3],
"index.html#autotoc_md13":[3,0],
"index.html#autotoc_md14":[3,1],
"index.html#autotoc_md15":[4],
"index.html#autotoc_md2":[0,0],
"index.html#autotoc_md3":[0,1],
"index.html#autotoc_md4":[0,2],
"index.html#autotoc_md5":[1],
"index.html#autotoc_md6":[2],
"index.html#autotoc_md7":[2,0],
"index.html#autotoc_md8":[2,1],
"index.html#autotoc_md9":[2,1,0],
"main_8cpp.html":[7,0,1,2],
"main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513":[7,0,1,2,4],
"main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30":[7,0,1,2,8],
"main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea":[7,0,1,2,1],
"main_8cpp.html#a6b38b477c18e2f4268779751a88edab1":[7,0,1,2,3],
"main_8cpp.html#a783789519f97c6430081171cacb0ffb1":[7,0,1,2,7],
"main_8cpp.html#a8d92fb2ad085065fbd14718647551657":[7,0,1,2,0],
"main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6":[7,0,1,2,5],
"main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb":[7,0,1,2,2],
"main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2":[7,0,1,2,6],
"main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7":[7,0,1,2,9],
"main_8cpp_source.html":[7,0,1,2],
"pages.html":[],
"plot__particles__left_8py_source.html":[3,0,1,4],
"test__suite_8cpp.html":[3,0,1,5],
"test__suite_8cpp_source.html":[3,0,1,5],
"typedefs_8hpp.html":[3,0,0,3],
"typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23":[3,0,0,3,1],
"typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66":[3,0,0,3,2],
"typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df":[3,0,0,3,3],
"typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af":[3,0,0,3,0],
"typedefs_8hpp_source.html":[3,0,0,3],
"utils_8cpp.html":[3,0,1,6],
"utils_8cpp.html#a58565270b643b24e3132f38c653e0199":[3,0,1,6,3],
"utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a":[3,0,1,6,0],
"utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[3,0,1,6,4],
"utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de":[3,0,1,6,2],
"utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b":[3,0,1,6,1],
"utils_8cpp_source.html":[3,0,1,6],
"utils_8hpp.html":[3,0,0,4],
"utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772":[3,0,0,4,3],
"utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38":[3,0,0,4,4],
"utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168":[3,0,0,4,0],
"utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa":[3,0,0,4,5],
"utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9":[3,0,0,4,1],
"utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d":[3,0,0,4,6],
"utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384":[3,0,0,4,7],
"utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b":[3,0,0,4,2],
"utils_8hpp_source.html":[3,0,0,4]
"plot__2__particles_8py.html":[7,0,1,0,1],
"plot__2__particles_8py_source.html":[7,0,1,0,1],
"plot__3d_8py.html":[7,0,1,0,2],
"plot__3d_8py_source.html":[7,0,1,0,2],
"plot__particles__left_8py.html":[7,0,1,0,3],
"plot__particles__left_8py_source.html":[7,0,1,0,3],
"plot__phase__space_8py.html":[7,0,1,0,4],
"plot__phase__space_8py_source.html":[7,0,1,0,4],
"plot__relative__error_8py.html":[7,0,1,0,5],
"plot__relative__error_8py_source.html":[7,0,1,0,5],
"plot__single__particle_8py.html":[7,0,1,0,6],
"plot__single__particle_8py_source.html":[7,0,1,0,6],
"structsimulation.html":[6,0,3],
"test__suite_8cpp.html":[7,0,1,5],
"test__suite_8cpp_source.html":[7,0,1,5],
"typedefs_8hpp.html":[7,0,0,3],
"typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22":[7,0,0,3,3],
"typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea":[7,0,0,3,5],
"typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f":[7,0,0,3,2],
"typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6":[7,0,0,3,4],
"typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af":[7,0,0,3,1],
"typedefs_8hpp_source.html":[7,0,0,3],
"utils_8cpp.html":[7,0,1,6],
"utils_8cpp.html#a58565270b643b24e3132f38c653e0199":[7,0,1,6,3],
"utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2":[7,0,1,6,0],
"utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[7,0,1,6,4],
"utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de":[7,0,1,6,2],
"utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b":[7,0,1,6,1],
"utils_8cpp_source.html":[7,0,1,6],
"utils_8hpp.html":[7,0,0,4],
"utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38":[7,0,0,4,4],
"utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168":[7,0,0,4,0],
"utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa":[7,0,0,4,5],
"utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9":[7,0,0,4,1],
"utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9":[7,0,0,4,3],
"utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d":[7,0,0,4,6],
"utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384":[7,0,0,4,7],
"utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b":[7,0,0,4,2],
"utils_8hpp_source.html":[7,0,0,4]
};

View File

@@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_2_particles.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__2__particles_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_2_particles.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot 2 particles with and without particle interactions in the xy-plane.
<a href="#details">More...</a></p>
<p><a href="plot__2__particles_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8863a67cb3a33d1a522efae56b05d37d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__2__particles_8py.html#a8863a67cb3a33d1a522efae56b05d37d">plot_2_particles.main</a> ()</td></tr>
<tr class="separator:a8863a67cb3a33d1a522efae56b05d37d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a65096b5c625338aed999b0be51846e3a"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__2__particles_8py.html#a65096b5c625338aed999b0be51846e3a">plot_2_particles.params</a></td></tr>
<tr class="separator:a65096b5c625338aed999b0be51846e3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot 2 particles with and without particle interactions in the xy-plane. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000013">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__2__particles_8py_source.html">plot_2_particles.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a8863a67cb3a33d1a522efae56b05d37d" name="a8863a67cb3a33d1a522efae56b05d37d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8863a67cb3a33d1a522efae56b05d37d">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_2_particles.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__2__particles_8py_source.html#l00030">30</a> of file <a class="el" href="plot__2__particles_8py_source.html">plot_2_particles.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a65096b5c625338aed999b0be51846e3a" name="a65096b5c625338aed999b0be51846e3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65096b5c625338aed999b0be51846e3a">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_2_particles.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__2__particles_8py_source.html#l00018">18</a> of file <a class="el" href="plot__2__particles_8py_source.html">plot_2_particles.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,179 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_2_particles.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__2__particles_8py_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">plot_2_particles.py</div></div>
</div><!--header-->
<div class="contents">
<a href="plot__2__particles_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>sns.set_theme()</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>params = {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> directories = {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> }</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> files = [</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="stringliteral">&quot;particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> ]</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> outputs = [</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="stringliteral">&quot;../latex/images/simulate_2_particles_no_interaction_xy.pdf&quot;</span>,</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">&quot;../latex/images/simulate_2_particles_interaction_xy.pdf&quot;</span>,</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> ]</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> labels = [</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">r&quot;$p_1$&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">r&quot;$p_2$&quot;</span>,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">r&quot;$\hat{p}_1$&quot;</span>,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">r&quot;$\hat{p}_2$&quot;</span>,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> colors = [</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="stringliteral">&quot;darkred&quot;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> ]</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> start_pos = set()</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">for</span> dir, output <span class="keywordflow">in</span> zip(directories, outputs):</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> lines = f.readlines()</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> ax.plot(r[:,0], r[:,1], label=label, color=color)</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> start_pos.add((r[0,0],r[0,1]))</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">for</span> pos <span class="keywordflow">in</span> start_pos:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ax.plot(*pos, <span class="stringliteral">&quot;o&quot;</span>, color=<span class="stringliteral">&quot;black&quot;</span>)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> ax.set_xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> ax.set_ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ax.axis(<span class="stringliteral">&quot;equal&quot;</span>)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> fig.savefig(output, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> main()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__2__particles_8py.html">plot_2_particles.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

190
docs/plot__3d_8py.html Normal file
View File

@@ -0,0 +1,190 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_3d.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__3d_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_3d.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot 2 particles with and without particle interactions in 3D.
<a href="#details">More...</a></p>
<p><a href="plot__3d_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__3d_8py.html#adb8902df55180f4ad62fb3799bc5c5a8">plot_3d.main</a> ()</td></tr>
<tr class="separator:adb8902df55180f4ad62fb3799bc5c5a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a7026cb07859df7ff6b3fb60453573467"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__3d_8py.html#a7026cb07859df7ff6b3fb60453573467">plot_3d.params</a></td></tr>
<tr class="separator:a7026cb07859df7ff6b3fb60453573467"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot 2 particles with and without particle interactions in 3D. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000014">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="adb8902df55180f4ad62fb3799bc5c5a8" name="adb8902df55180f4ad62fb3799bc5c5a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb8902df55180f4ad62fb3799bc5c5a8">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_3d.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00030">30</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a7026cb07859df7ff6b3fb60453573467" name="a7026cb07859df7ff6b3fb60453573467"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7026cb07859df7ff6b3fb60453573467">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_3d.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><span class="lineno"> 10</span> <span class="stringliteral">&quot;figure.autolayout&quot;</span>: <span class="keyword">True</span></div>
<div class="line"><span class="lineno"> 11</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__3d_8py_source.html#l00017">17</a> of file <a class="el" href="plot__3d_8py_source.html">plot_3d.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__3d_8py.html">plot_3d.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,172 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_3d.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__3d_8py_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">plot_3d.py</div></div>
</div><!--header-->
<div class="contents">
<a href="plot__3d_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>sns.set_theme()</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>params = {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;figure.autolayout&quot;</span>: <span class="keyword">True</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> files = [</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_1_r.txt&quot;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> ]</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> labels = [</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">r&quot;$p_1$&quot;</span>,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="stringliteral">r&quot;$p_2$&quot;</span>,</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="stringliteral">r&quot;$\hat{p}_1$&quot;</span>,</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">r&quot;$\hat{p}_2$&quot;</span>,</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> ]</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> colors = [</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">&quot;mediumaquamarine&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;darkred&quot;</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> ax = plt.figure().add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> lines = f.readlines()</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> ax.plot(r[:,0], r[:,1], r[:,2], label=label, color=color)</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> ax.set_xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> ax.set_ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> ax.set_zlabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> ax.view_init(10,-35)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> plt.legend()</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> plt.savefig(<span class="stringliteral">&quot;../latex/images/3d_plot.pdf&quot;</span>)</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> main()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__3d_8py.html">plot_3d.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_particles_left.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__particles__left_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_particles_left.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot how many particles are left after 500 microseconds using different angular frequencies.
<a href="#details">More...</a></p>
<p><a href="plot__particles__left_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abec6efa92c9e476e2e3a403dac12ea1c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__particles__left_8py.html#abec6efa92c9e476e2e3a403dac12ea1c">plot_particles_left.main</a> ()</td></tr>
<tr class="separator:abec6efa92c9e476e2e3a403dac12ea1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:aad2ff4255461cc187b87065843d0b391"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__particles__left_8py.html#aad2ff4255461cc187b87065843d0b391">plot_particles_left.params</a></td></tr>
<tr class="separator:aad2ff4255461cc187b87065843d0b391"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot how many particles are left after 500 microseconds using different angular frequencies. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000015">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__particles__left_8py_source.html">plot_particles_left.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="abec6efa92c9e476e2e3a403dac12ea1c" name="abec6efa92c9e476e2e3a403dac12ea1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abec6efa92c9e476e2e3a403dac12ea1c">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_particles_left.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__particles__left_8py_source.html#l00029">29</a> of file <a class="el" href="plot__particles__left_8py_source.html">plot_particles_left.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="aad2ff4255461cc187b87065843d0b391" name="aad2ff4255461cc187b87065843d0b391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad2ff4255461cc187b87065843d0b391">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_particles_left.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__particles__left_8py_source.html#l00017">17</a> of file <a class="el" href="plot__particles__left_8py_source.html">plot_particles_left.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/plot_particles_left.py Source File</title>
<title>Penning Trap Simulation: src/scripts/plot_particles_left.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
@@ -101,45 +101,83 @@ $(document).ready(function(){initNavTree('plot__particles__left_8py_source.html'
<div class="headertitle"><div class="title">plot_particles_left.py</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> files = [</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> <span class="stringliteral">&quot;output/time_dependent_potential/f_0.100000.txt&quot;</span>,</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/time_dependent_potential/f_0.400000.txt&quot;</span>,</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/time_dependent_potential/f_0.700000.txt&quot;</span>,</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> ]</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> vals = [</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> .1,</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> .4,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> .7</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> ]</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(3):</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">with</span> open(files[i]) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> lines = f.readlines()</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> x = []</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> y = []</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> a,b = line.strip().split(<span class="stringliteral">&quot;,&quot;</span>)</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> x.append(float(a))</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> y.append(float(b))</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> plt.plot(x,y,label=f<span class="stringliteral">&quot;amplitude: {vals[i]}&quot;</span>)</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> plt.xlabel(<span class="stringliteral">r&quot;$\omega_V$&quot;</span>)</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> plt.ylabel(<span class="stringliteral">r&quot;Fraction of particles left&quot;</span>)</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> plt.title(<span class="stringliteral">r&quot;The fraction of particles left in the Penning trap &quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">&quot;after 500 microseconds for different amplitudes and frequencies&quot;</span>)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> plt.legend()</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> plt.show()</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> main()</div>
<a href="plot__particles__left_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>sns.set_theme()</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>params = {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> colors = [</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="stringliteral">&quot;mediumseagreen&quot;</span>,</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;darkred&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;darkgoldenrod&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> ]</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> files = [</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="stringliteral">&quot;output/time_dependent_potential/wide_sweep.txt&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep.txt&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_fine.txt&quot;</span>,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_interactions.txt&quot;</span>,</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_interactions_fine.txt&quot;</span>,</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> ]</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> outputs = [</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">&quot;../latex/images/particles_left_wide_sweep.pdf&quot;</span>,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep.pdf&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep_fine.pdf&quot;</span>,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep_interactions.pdf&quot;</span>,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;../latex/images/particles_left_narrow_sweep_interactions_fine.pdf&quot;</span>,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">for</span> file, output <span class="keywordflow">in</span> zip(files, outputs):</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> lines = f.readlines()</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> x = []</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> y1 = []</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> y2 = []</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> y3 = []</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> l = line.strip().split(<span class="stringliteral">&quot;,&quot;</span>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> x.append(float(l[0]))</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> y1.append(float(l[1]))</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> y2.append(float(l[2]))</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> y3.append(float(l[3]))</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> ax.plot(x, y1, label=<span class="stringliteral">r&quot;$f_{1} = 0.1$&quot;</span>, color=colors[0])</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ax.plot(x, y2, label=<span class="stringliteral">r&quot;$f_{2} = 0.4$&quot;</span>, color=colors[1])</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> ax.plot(x, y3, label=<span class="stringliteral">r&quot;$f_{3} = 0.7$&quot;</span>, color=colors[2])</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> ax.set_xlabel(<span class="stringliteral">r&quot;Angular frequency $\omega_V$ (MHz)&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment"># ax.set_xlim((0, 2.8))</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ax.set_ylabel(<span class="stringliteral">r&quot;Fraction of particles left&quot;</span>)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment"># ax.set_ylim((-0.1, 1.1))</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment"># plt.title(r&quot;The fraction of particles left in the Penning trap &quot;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment"># &quot;after 500 microseconds for different amplitudes and frequencies&quot;)</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> fig.savefig(output, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> main()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>plot_particles_left.py</b></li>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__particles__left_8py.html">plot_particles_left.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>

View File

@@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_phase_space.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__phase__space_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_phase_space.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot the phase space for 2 particles in the x and z direction, with and without particle interactions.
<a href="#details">More...</a></p>
<p><a href="plot__phase__space_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa92530b83695dcb6ca6adff74e5088dd"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__phase__space_8py.html#aa92530b83695dcb6ca6adff74e5088dd">plot_phase_space.main</a> ()</td></tr>
<tr class="separator:aa92530b83695dcb6ca6adff74e5088dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ac5425fde52c92b301d6815f3492b713e"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__phase__space_8py.html#ac5425fde52c92b301d6815f3492b713e">plot_phase_space.params</a></td></tr>
<tr class="separator:ac5425fde52c92b301d6815f3492b713e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot the phase space for 2 particles in the x and z direction, with and without particle interactions. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000016">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__phase__space_8py_source.html">plot_phase_space.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="aa92530b83695dcb6ca6adff74e5088dd" name="aa92530b83695dcb6ca6adff74e5088dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa92530b83695dcb6ca6adff74e5088dd">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_phase_space.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__phase__space_8py_source.html#l00031">31</a> of file <a class="el" href="plot__phase__space_8py_source.html">plot_phase_space.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ac5425fde52c92b301d6815f3492b713e" name="ac5425fde52c92b301d6815f3492b713e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5425fde52c92b301d6815f3492b713e">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_phase_space.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>,</div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__phase__space_8py_source.html#l00018">18</a> of file <a class="el" href="plot__phase__space_8py_source.html">plot_phase_space.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,190 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_phase_space.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__phase__space_8py_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">plot_phase_space.py</div></div>
</div><!--header-->
<div class="contents">
<a href="plot__phase__space_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>sns.set_theme()</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>params = {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span>,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> directories = [</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/&quot;</span>,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> ]</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> files = [</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;particle_0&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;particle_1&quot;</span>,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> ]</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> labels = [<span class="stringliteral">r&quot;$p_1$&quot;</span>, <span class="stringliteral">r&quot;$p_2$&quot;</span>]</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> output = [</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="stringliteral">&quot;../latex/images/phase_space_no_interaction&quot;</span>,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">&quot;../latex/images/phase_space_interaction&quot;</span>,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> ]</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> colors = [</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;darkred&quot;</span>,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ]</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">for</span> i, dir <span class="keywordflow">in</span> enumerate(directories):</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> fig1, axs1 = plt.subplots(sharex=<span class="keyword">True</span>)</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> fig2, axs2 = plt.subplots(sharex=<span class="keyword">True</span>)</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">for</span> j, (file, label, color) <span class="keywordflow">in</span> enumerate(zip(files, labels, colors)):</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> r = []</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> v = []</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">with</span> open(dir + file + <span class="stringliteral">&quot;_r.txt&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> lines = f.readlines()</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> r = np.array(</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> [list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines]</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> )</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">with</span> open(dir + file + <span class="stringliteral">&quot;_v.txt&quot;</span>) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> lines = f.readlines()</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> v = np.array(</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> [list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines]</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> )</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> axs1.plot(r[:, 0], v[:, 0], label=label, color=color)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> axs1.plot(r[0,0], v[0,0], <span class="stringliteral">&quot;ko&quot;</span>)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> axs2.plot(r[:, 2], v[:, 2], label=label, color=color)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> axs2.plot(r[0,2], v[0,2], <span class="stringliteral">&quot;ko&quot;</span>)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> axs1.axis(<span class="stringliteral">&quot;equal&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> axs2.axis(<span class="stringliteral">&quot;equal&quot;</span>)</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> axs1.set(xlabel=<span class="stringliteral">r&quot;$x (\mu m)$&quot;</span>, ylabel=<span class="stringliteral">r&quot;$v_x (\mu m / \mu s)$&quot;</span>)</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> axs2.set(xlabel=<span class="stringliteral">r&quot;$z (\mu m)$&quot;</span>, ylabel=<span class="stringliteral">r&quot;$v_z (\mu m / \mu s)$&quot;</span>)</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> axs1.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> axs2.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> fig1.savefig(f<span class="stringliteral">&quot;{output[i]}_x.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> fig2.savefig(f<span class="stringliteral">&quot;{output[i]}_z.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> main()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__phase__space_8py.html">plot_phase_space.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_relative_error.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__relative__error_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_relative_error.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot the relative error for forward Euler and RK4 method.
<a href="#details">More...</a></p>
<p><a href="plot__relative__error_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a615fd09c73966d40320e768bed20683c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__relative__error_8py.html#a615fd09c73966d40320e768bed20683c">plot_relative_error.main</a> ()</td></tr>
<tr class="separator:a615fd09c73966d40320e768bed20683c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a5cc494411e5ca543673367a938f5f160"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__relative__error_8py.html#a5cc494411e5ca543673367a938f5f160">plot_relative_error.params</a></td></tr>
<tr class="separator:a5cc494411e5ca543673367a938f5f160"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot the relative error for forward Euler and RK4 method. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000017">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__relative__error_8py_source.html">plot_relative_error.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a615fd09c73966d40320e768bed20683c" name="a615fd09c73966d40320e768bed20683c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a615fd09c73966d40320e768bed20683c">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_relative_error.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__relative__error_8py_source.html#l00029">29</a> of file <a class="el" href="plot__relative__error_8py_source.html">plot_relative_error.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a5cc494411e5ca543673367a938f5f160" name="a5cc494411e5ca543673367a938f5f160"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cc494411e5ca543673367a938f5f160">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_relative_error.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__relative__error_8py_source.html#l00017">17</a> of file <a class="el" href="plot__relative__error_8py_source.html">plot_relative_error.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,188 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_relative_error.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__relative__error_8py_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">plot_relative_error.py</div></div>
</div><!--header-->
<div class="contents">
<a href="plot__relative__error_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>sns.set_theme()</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>params = {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> directories = [</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="stringliteral">&quot;output/relative_error/RK4/&quot;</span>,</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;output/relative_error/euler/&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ]</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> files = [</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="stringliteral">&quot;4000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="stringliteral">&quot;8000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="stringliteral">&quot;16000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;32000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> ]</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> labels = [</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">r&quot;$n_1$&quot;</span>,</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="stringliteral">r&quot;$n_2$&quot;</span>,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">r&quot;$n_3$&quot;</span>,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">r&quot;$n_4$&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> ]</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> titles = [</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">&quot;(a)&quot;</span>,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="stringliteral">&quot;(b)&quot;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> ]</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> methods = [</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="stringliteral">&quot;euler&quot;</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ]</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> colors = [</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="stringliteral">&quot;seagreen&quot;</span>,</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="stringliteral">&quot;darkred&quot;</span>,</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="stringliteral">&quot;darkgoldenrod&quot;</span>,</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="stringliteral">&quot;steelblue&quot;</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> ]</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> fig1, axs1 = plt.subplots(2,1)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">for</span> i, (dir, title) <span class="keywordflow">in</span> enumerate(list(zip(directories, titles))):</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> max_err = []</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">for</span> label, file, color <span class="keywordflow">in</span> zip(labels, files, colors):</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> lines = f.readlines()</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> r = np.array([float(line.strip()) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> max_err.append(max(r))</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> axs1[i].plot(t, r, label=label, color=color)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> axs1[i].set(xlabel=<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>, ylabel = <span class="stringliteral">r&quot;relative error $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> axs1[i].legend()</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> axs1[i].set_title(title)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> conv_rate = 1/3 * sum([np.log2(max_err[i+1]/max_err[i])/np.log2(.5) <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(3)])</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> print(f<span class="stringliteral">&quot;{methods[i]}: {conv_rate}&quot;</span>)</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> plt.tight_layout()</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> fig1.savefig(<span class="stringliteral">&quot;../latex/images/relative_error.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> main()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__relative__error_8py.html">plot_relative_error.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,211 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_single_particle.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__single__particle_8py.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">plot_single_particle.py File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Plot the approximation and analytical solution for one particle in the z axis.
<a href="#details">More...</a></p>
<p><a href="plot__single__particle_8py_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a502c69553dc8b55651b3f0d6d06686ee"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html#a502c69553dc8b55651b3f0d6d06686ee">plot_single_particle.z</a> (t)</td></tr>
<tr class="separator:a502c69553dc8b55651b3f0d6d06686ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0261bc484d15ef01c27420592fadc00"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html#ab0261bc484d15ef01c27420592fadc00">plot_single_particle.main</a> ()</td></tr>
<tr class="separator:ab0261bc484d15ef01c27420592fadc00"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a631948da2ca2a1f0df71e9ce6b328d71"><td class="memItemLeft" align="right" valign="top">dict&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="plot__single__particle_8py.html#a631948da2ca2a1f0df71e9ce6b328d71">plot_single_particle.params</a></td></tr>
<tr class="separator:a631948da2ca2a1f0df71e9ce6b328d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Plot the approximation and analytical solution for one particle in the z axis. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000018">Bug:</a></b></dt><dd>No known bugs </dd></dl>
<p class="definition">Definition in file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ab0261bc484d15ef01c27420592fadc00" name="ab0261bc484d15ef01c27420592fadc00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0261bc484d15ef01c27420592fadc00">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_single_particle.main </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__single__particle_8py_source.html#l00037">37</a> of file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div>
</div>
<a id="a502c69553dc8b55651b3f0d6d06686ee" name="a502c69553dc8b55651b3f0d6d06686ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a502c69553dc8b55651b3f0d6d06686ee">&#9670;&#160;</a></span>z()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">def plot_single_particle.z </td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>t</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="plot__single__particle_8py_source.html#l00030">30</a> of file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a631948da2ca2a1f0df71e9ce6b328d71" name="a631948da2ca2a1f0df71e9ce6b328d71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a631948da2ca2a1f0df71e9ce6b328d71">&#9670;&#160;</a></span>params</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dict plot_single_particle.params</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line"><span class="lineno"> 1</span>= {</div>
<div class="line"><span class="lineno"> 2</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><span class="lineno"> 3</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><span class="lineno"> 4</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><span class="lineno"> 5</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 6</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 7</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 8</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><span class="lineno"> 9</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><span class="lineno"> 10</span>}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="plot__single__particle_8py_source.html#l00018">18</a> of file <a class="el" href="plot__single__particle_8py_source.html">plot_single_particle.py</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,163 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Penning Trap Simulation: src/scripts/plot_single_particle.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('plot__single__particle_8py_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">plot_single_particle.py</div></div>
</div><!--header-->
<div class="contents">
<a href="plot__single__particle_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">import</span> numpy <span class="keyword">as</span> np</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>sns.set_theme()</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>params = {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&quot;</span>,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">def </span>z(t):</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> V_0 = 25.*9.64852558 * 10**4</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> m = 40.</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> d = 500.</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> w_z = np.sqrt((2.*V_0)/(m*d*d))</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">return</span> 20.*np.cos(w_z*t)</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> filename = <span class="stringliteral">&quot;output/simulate_single_particle/particle_0_r.txt&quot;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> r = t = []</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">with</span> open(filename) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> lines = f.readlines()</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> r = np.array([list(map(float, line.strip().split(<span class="stringliteral">&quot;,&quot;</span>))) <span class="keywordflow">for</span> line <span class="keywordflow">in</span> lines])</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> ax.plot(t, r[:, 2], label=<span class="stringliteral">&quot;approximation&quot;</span>, color=<span class="stringliteral">&quot;mediumseagreen&quot;</span>)</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> ax.plot(t, z(t), label=<span class="stringliteral">&quot;analytical&quot;</span>, color=<span class="stringliteral">&quot;black&quot;</span>, linestyle=<span class="stringliteral">&quot;dotted&quot;</span>)</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ax.set_xlabel(<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>)</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> ax.set_xlim((-5, 55))</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> ax.set_ylabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> ax.set_ylim((-25, 25))</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment"># plt.title(r&quot;Movement of a single particle in the x direction&quot;)</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</span>)</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> fig.savefig(<span class="stringliteral">&quot;../latex/images/single_particle.pdf&quot;</span>, bbox_inches=<span class="stringliteral">&quot;tight&quot;</span>)</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> main()</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></li><li class="navelem"><a class="el" href="plot__single__particle_8py.html">plot_single_particle.py</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>

View File

@@ -1,6 +1,7 @@
var searchData=
[
['add_5fparticle_0',['add_particle',['../classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8',1,'PenningTrap']]],
['arma_5fvector_5fclose_5fto_1',['arma_vector_close_to',['../utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772',1,'arma_vector_close_to(arma::vec &amp;a, arma::vec &amp;b, double tol=1e-8):&#160;utils.cpp'],['../utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a',1,'arma_vector_close_to(arma::vec &amp;a, arma::vec &amp;b, double tol):&#160;utils.cpp']]],
['assert_2',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]]
['analytical_5fsolution_5fparticle_5f1_1',['analytical_solution_particle_1',['../main_8cpp.html#a8d92fb2ad085065fbd14718647551657',1,'main.cpp']]],
['animate_5f100_5fparticles_2epy_2',['animate_100_particles.py',['../animate__100__particles_8py.html',1,'']]],
['assert_3',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]]
];

View File

@@ -1,4 +1,4 @@
var searchData=
[
['write_5fsimulation_5fto_5fdir_0',['write_simulation_to_dir',['../classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57',1,'PenningTrap']]]
['write_5fsimulation_5fto_5fdir_0',['write_simulation_to_dir',['../classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b',1,'PenningTrap']]]
];

View File

@@ -1,4 +1,7 @@
var searchData=
[
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
['ca_5fcharge_0',['CA_CHARGE',['../constants_8hpp.html#af7602a3a314957137ad1cd719aa23789',1,'constants.hpp']]],
['ca_5fmass_1',['CA_MASS',['../constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8',1,'constants.hpp']]],
['close_5fto_2',['close_to',['../utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9',1,'close_to(arma::vec &amp;a, arma::vec &amp;b, double tol=1e-8):&#160;utils.cpp'],['../utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2',1,'close_to(arma::vec &amp;a, arma::vec &amp;b, double tol):&#160;utils.cpp']]],
['constants_2ehpp_3',['constants.hpp',['../constants_8hpp.html',1,'']]]
];

View File

@@ -2,6 +2,6 @@ var searchData=
[
['evolve_5fforward_5feuler_0',['evolve_forward_euler',['../classPenningTrap.html#ab9ea97a406534bbe621a95215144875e',1,'PenningTrap']]],
['evolve_5frk4_1',['evolve_RK4',['../classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e',1,'PenningTrap']]],
['external_5fb_5ffield_2',['external_B_field',['../classPenningTrap.html#acbf065c9c125682329ad82a8d166554c',1,'PenningTrap']]],
['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9',1,'PenningTrap']]]
['external_5fb_5ffield_2',['external_B_field',['../classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655',1,'PenningTrap']]],
['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22',1,'PenningTrap']]]
];

View File

@@ -1,5 +1,6 @@
var searchData=
[
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce',1,'PenningTrap']]],
['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b',1,'PenningTrap']]]
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598',1,'PenningTrap']]],
['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f',1,'PenningTrap']]],
['frequency_5fnarrow_5fsweeps_5flong_2ecpp_2',['frequency_narrow_sweeps_long.cpp',['../frequency__narrow__sweeps__long_8cpp.html',1,'']]]
];

View File

@@ -1,12 +1,24 @@
var searchData=
[
['particle_0',['Particle',['../classParticle.html',1,'Particle'],['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle::Particle()']]],
['particle_2ecpp_1',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['particle_2ehpp_2',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['particles_3',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]],
['penning_20trap_20simulation_4',['Penning trap simulation',['../index.html',1,'']]],
['penningtrap_5',['PenningTrap',['../classPenningTrap.html',1,'PenningTrap'],['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle::PenningTrap()'],['../classPenningTrap.html#ae670d7de621acdb343b01af098086f63',1,'PenningTrap::PenningTrap(double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1',1,'PenningTrap::PenningTrap(unsigned int i, double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73',1,'PenningTrap::PenningTrap(std::vector&lt; Particle &gt; particles, double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)']]],
['penningtrap_2ecpp_6',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_7',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]],
['penningtraptest_8',['PenningTrapTest',['../classPenningTrapTest.html',1,'']]]
['p1_0',['p1',['../main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30',1,'main.cpp']]],
['p2_1',['p2',['../main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7',1,'main.cpp']]],
['particle_2',['Particle',['../classParticle.html',1,'Particle'],['../classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4',1,'Particle::Particle()']]],
['particle_2ecpp_3',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['particle_2ehpp_4',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['particles_5',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]],
['penning_20trap_20simulation_6',['Penning trap simulation',['../index.html',1,'']]],
['penningtrap_7',['PenningTrap',['../classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f',1,'PenningTrap::PenningTrap()'],['../classPenningTrap.html',1,'PenningTrap'],['../classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f',1,'PenningTrap::PenningTrap(uint i, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8',1,'PenningTrap::PenningTrap(double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle::PenningTrap()']]],
['penningtrap_2ecpp_8',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_9',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]],
['penningtraptest_10',['PenningTrapTest',['../classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae',1,'PenningTrap::PenningTrapTest()'],['../classPenningTrapTest.html',1,'PenningTrapTest']]],
['perturbation_11',['perturbation',['../classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5',1,'PenningTrap']]],
['plot_5f2_5fparticles_2epy_12',['plot_2_particles.py',['../plot__2__particles_8py.html',1,'']]],
['plot_5f3d_2epy_13',['plot_3d.py',['../plot__3d_8py.html',1,'']]],
['plot_5fparticles_5fleft_2epy_14',['plot_particles_left.py',['../plot__particles__left_8py.html',1,'']]],
['plot_5fphase_5fspace_2epy_15',['plot_phase_space.py',['../plot__phase__space_8py.html',1,'']]],
['plot_5frelative_5ferror_2epy_16',['plot_relative_error.py',['../plot__relative__error_8py.html',1,'']]],
['plot_5fsingle_5fparticle_2epy_17',['plot_single_particle.py',['../plot__single__particle_8py.html',1,'']]],
['potential_5fresonance_5fnarrow_5fsweep_18',['potential_resonance_narrow_sweep',['../frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;main.cpp']]],
['potential_5fresonance_5fnarrow_5fsweep_5finteraction_19',['potential_resonance_narrow_sweep_interaction',['../frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;main.cpp']]],
['potential_5fresonance_5fwide_5fsweep_20',['potential_resonance_wide_sweep',['../main_8cpp.html#a6b38b477c18e2f4268779751a88edab1',1,'main.cpp']]]
];

View File

@@ -1,5 +1,6 @@
var searchData=
[
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648',1,'PenningTrap']]],
['r_5fvec_1',['r_vec',['../classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6',1,'Particle']]]
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08',1,'PenningTrap']]],
['r_5fvec_1',['r_vec',['../classParticle.html#a1c59101411db43624828b766f87ad460',1,'Particle']]],
['reinitialize_2',['reinitialize',['../classPenningTrap.html#aaee129f177657455348d0c8ae1441dea',1,'PenningTrap']]]
];

View File

@@ -1,8 +1,15 @@
var searchData=
[
['scientific_5fformat_0',['scientific_format',['../utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384',1,'scientific_format(double d, int width=20, int prec=10):&#160;utils.cpp'],['../utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d',1,'scientific_format(const std::vector&lt; double &gt; &amp;v, int width=20, int prec=10):&#160;utils.cpp'],['../utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746',1,'scientific_format(double d, int width, int prec):&#160;utils.cpp'],['../utils_8cpp.html#a58565270b643b24e3132f38c653e0199',1,'scientific_format(const std::vector&lt; double &gt; &amp;v, int width, int prec):&#160;utils.cpp']]],
['sim_5farr_1',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]],
['sim_5fcols_2',['sim_cols',['../typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23',1,'typedefs.hpp']]],
['sim_5frows_3',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]],
['simulate_4',['simulate',['../classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854',1,'PenningTrap']]]
['set_5fpertubation_1',['set_pertubation',['../classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43',1,'PenningTrap']]],
['sim_5farr_2',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]],
['sim_5fcols_3',['sim_cols',['../typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f',1,'typedefs.hpp']]],
['sim_5frows_4',['sim_rows',['../typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22',1,'typedefs.hpp']]],
['simulate_5',['simulate',['../classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a',1,'PenningTrap']]],
['simulate_5f100_5fparticles_6',['simulate_100_particles',['../main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513',1,'main.cpp']]],
['simulate_5fsingle_5fparticle_7',['simulate_single_particle',['../main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6',1,'main.cpp']]],
['simulate_5fsingle_5fparticle_5fwith_5fdifferent_5fsteps_8',['simulate_single_particle_with_different_steps',['../main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2',1,'main.cpp']]],
['simulate_5ftwo_5fparticles_9',['simulate_two_particles',['../main_8cpp.html#a783789519f97c6430081171cacb0ffb1',1,'main.cpp']]],
['simulation_10',['simulation',['../structsimulation.html',1,'']]],
['simulation_5ft_11',['simulation_t',['../typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6',1,'typedefs.hpp']]]
];

View File

@@ -2,9 +2,15 @@ var searchData=
[
['t_0',['t',['../classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e',1,'PenningTrap']]],
['t_1',['T',['../constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5',1,'constants.hpp']]],
['test_5fsuite_2ecpp_2',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
['total_5fforce_3',['total_force',['../classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8',1,'PenningTrap']]],
['total_5fforce_5fexternal_4',['total_force_external',['../classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56',1,'PenningTrap']]],
['total_5fforce_5fparticles_5',['total_force_particles',['../classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b',1,'PenningTrap']]],
['typedefs_2ehpp_6',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
['test_5fexternal_5fb_5ffield_2',['test_external_B_field',['../classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e',1,'PenningTrapTest']]],
['test_5fexternal_5fe_5ffield_3',['test_external_E_field',['../classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8',1,'PenningTrapTest']]],
['test_5fforce_5fon_5fparticle_4',['test_force_on_particle',['../classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9',1,'PenningTrapTest']]],
['test_5fsuite_2ecpp_5',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
['test_5ftotal_5fforce_5fexternal_6',['test_total_force_external',['../classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046',1,'PenningTrapTest']]],
['test_5ftotal_5fforce_5fparticles_7',['test_total_force_particles',['../classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508',1,'PenningTrapTest']]],
['total_5fforce_8',['total_force',['../classPenningTrap.html#a9a301b0540078c36697880ef204afdf3',1,'PenningTrap']]],
['total_5fforce_5fexternal_9',['total_force_external',['../classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682',1,'PenningTrap']]],
['total_5fforce_5fno_5finteraction_10',['total_force_no_interaction',['../classPenningTrap.html#a6069f82d8dbc7cadaebd228dbcd95018',1,'PenningTrap']]],
['total_5fforce_5fparticles_11',['total_force_particles',['../classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c',1,'PenningTrap']]],
['typedefs_2ehpp_12',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
];

View File

@@ -1,8 +1,8 @@
var searchData=
[
['v_0',['V',['../constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb',1,'constants.hpp']]],
['v_5f0_1',['V_0',['../classPenningTrap.html#aaf105828121c4a33cc2b217453c20317',1,'PenningTrap']]],
['v_5ffunc_2',['v_func',['../classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e',1,'PenningTrap']]],
['v_5fvec_3',['v_vec',['../classParticle.html#a879692772803d6ab65fa4993b54aea6e',1,'Particle']]],
['vec_5f3d_4',['vec_3d',['../typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df',1,'typedefs.hpp']]]
['v_5f0_1',['V_0',['../classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89',1,'PenningTrap']]],
['v_5ffunc_2',['v_func',['../classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2',1,'PenningTrap']]],
['v_5fvec_3',['v_vec',['../classParticle.html#a3a10400add8dd22b8031330c2aafb6fe',1,'Particle']]],
['vec3_4',['vec3',['../typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea',1,'typedefs.hpp']]]
];

4
docs/search/classes_1.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['simulation_0',['simulation',['../structsimulation.html',1,'']]]
];

View File

@@ -1,4 +1,5 @@
var searchData=
[
['debug_0',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]]
['ca_5fcharge_0',['CA_CHARGE',['../constants_8hpp.html#af7602a3a314957137ad1cd719aa23789',1,'constants.hpp']]],
['ca_5fmass_1',['CA_MASS',['../constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8',1,'constants.hpp']]]
];

View File

@@ -1,4 +1,4 @@
var searchData=
[
['k_5fe_0',['K_E',['../constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb',1,'constants.hpp']]]
['debug_0',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]]
];

View File

@@ -1,4 +1,4 @@
var searchData=
[
['t_0',['T',['../constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5',1,'constants.hpp']]]
['k_5fe_0',['K_E',['../constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb',1,'constants.hpp']]]
];

View File

@@ -1,4 +1,4 @@
var searchData=
[
['v_0',['V',['../constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb',1,'constants.hpp']]]
['t_0',['T',['../constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5',1,'constants.hpp']]]
];

4
docs/search/defines_6.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['v_0',['V',['../constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb',1,'constants.hpp']]]
];

View File

@@ -1,4 +1,4 @@
var searchData=
[
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
['animate_5f100_5fparticles_2epy_0',['animate_100_particles.py',['../animate__100__particles_8py.html',1,'']]]
];

View File

@@ -1,4 +1,4 @@
var searchData=
[
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]]
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
];

View File

@@ -1,7 +1,4 @@
var searchData=
[
['particle_2ecpp_0',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['particle_2ehpp_1',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['penningtrap_2ecpp_2',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_3',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]]
['frequency_5fnarrow_5fsweeps_5flong_2ecpp_0',['frequency_narrow_sweeps_long.cpp',['../frequency__narrow__sweeps__long_8cpp.html',1,'']]]
];

View File

@@ -1,5 +1,4 @@
var searchData=
[
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
['typedefs_2ehpp_1',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]]
];

View File

@@ -1,5 +1,13 @@
var searchData=
[
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
['particle_2ecpp_0',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['particle_2ehpp_1',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
['penningtrap_2ecpp_2',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]],
['penningtrap_2ehpp_3',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]],
['plot_5f2_5fparticles_2epy_4',['plot_2_particles.py',['../plot__2__particles_8py.html',1,'']]],
['plot_5f3d_2epy_5',['plot_3d.py',['../plot__3d_8py.html',1,'']]],
['plot_5fparticles_5fleft_2epy_6',['plot_particles_left.py',['../plot__particles__left_8py.html',1,'']]],
['plot_5fphase_5fspace_2epy_7',['plot_phase_space.py',['../plot__phase__space_8py.html',1,'']]],
['plot_5frelative_5ferror_2epy_8',['plot_relative_error.py',['../plot__relative__error_8py.html',1,'']]],
['plot_5fsingle_5fparticle_2epy_9',['plot_single_particle.py',['../plot__single__particle_8py.html',1,'']]]
];

5
docs/search/files_5.js Normal file
View File

@@ -0,0 +1,5 @@
var searchData=
[
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
['typedefs_2ehpp_1',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
];

5
docs/search/files_6.js Normal file
View File

@@ -0,0 +1,5 @@
var searchData=
[
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
];

View File

@@ -1,5 +1,5 @@
var searchData=
[
['add_5fparticle_0',['add_particle',['../classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8',1,'PenningTrap']]],
['arma_5fvector_5fclose_5fto_1',['arma_vector_close_to',['../utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772',1,'arma_vector_close_to(arma::vec &amp;a, arma::vec &amp;b, double tol=1e-8):&#160;utils.cpp'],['../utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a',1,'arma_vector_close_to(arma::vec &amp;a, arma::vec &amp;b, double tol):&#160;utils.cpp']]]
['analytical_5fsolution_5fparticle_5f1_1',['analytical_solution_particle_1',['../main_8cpp.html#a8d92fb2ad085065fbd14718647551657',1,'main.cpp']]]
];

View File

@@ -1,7 +1,4 @@
var searchData=
[
['evolve_5fforward_5feuler_0',['evolve_forward_euler',['../classPenningTrap.html#ab9ea97a406534bbe621a95215144875e',1,'PenningTrap']]],
['evolve_5frk4_1',['evolve_RK4',['../classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e',1,'PenningTrap']]],
['external_5fb_5ffield_2',['external_B_field',['../classPenningTrap.html#acbf065c9c125682329ad82a8d166554c',1,'PenningTrap']]],
['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9',1,'PenningTrap']]]
['close_5fto_0',['close_to',['../utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9',1,'close_to(arma::vec &amp;a, arma::vec &amp;b, double tol=1e-8):&#160;utils.cpp'],['../utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2',1,'close_to(arma::vec &amp;a, arma::vec &amp;b, double tol):&#160;utils.cpp']]]
];

View File

@@ -1,5 +1,7 @@
var searchData=
[
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce',1,'PenningTrap']]],
['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b',1,'PenningTrap']]]
['evolve_5fforward_5feuler_0',['evolve_forward_euler',['../classPenningTrap.html#ab9ea97a406534bbe621a95215144875e',1,'PenningTrap']]],
['evolve_5frk4_1',['evolve_RK4',['../classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e',1,'PenningTrap']]],
['external_5fb_5ffield_2',['external_B_field',['../classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655',1,'PenningTrap']]],
['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22',1,'PenningTrap']]]
];

View File

@@ -1,5 +1,5 @@
var searchData=
[
['m_5fassert_0',['m_assert',['../utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38',1,'m_assert(bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg):&#160;utils.cpp'],['../utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b',1,'m_assert(bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg):&#160;utils.cpp']]],
['mkpath_1',['mkpath',['../utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa',1,'mkpath(std::string path, int mode=0777):&#160;utils.cpp'],['../utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de',1,'mkpath(std::string path, int mode):&#160;utils.cpp']]]
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598',1,'PenningTrap']]],
['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f',1,'PenningTrap']]]
];

View File

@@ -1,5 +1,5 @@
var searchData=
[
['particle_0',['Particle',['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle']]],
['penningtrap_1',['PenningTrap',['../classPenningTrap.html#ae670d7de621acdb343b01af098086f63',1,'PenningTrap::PenningTrap(double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1',1,'PenningTrap::PenningTrap(unsigned int i, double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73',1,'PenningTrap::PenningTrap(std::vector&lt; Particle &gt; particles, double B_0=T, std::function&lt; double(double)&gt; V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)']]]
['m_5fassert_0',['m_assert',['../utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38',1,'m_assert(bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg):&#160;utils.cpp'],['../utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b',1,'m_assert(bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg):&#160;utils.cpp']]],
['mkpath_1',['mkpath',['../utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa',1,'mkpath(std::string path, int mode=0777):&#160;utils.cpp'],['../utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de',1,'mkpath(std::string path, int mode):&#160;utils.cpp']]]
];

View File

@@ -1,4 +1,8 @@
var searchData=
[
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648',1,'PenningTrap']]]
['particle_0',['Particle',['../classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4',1,'Particle']]],
['penningtrap_1',['PenningTrap',['../classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8',1,'PenningTrap::PenningTrap(double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f',1,'PenningTrap::PenningTrap(uint i, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f',1,'PenningTrap::PenningTrap(std::vector&lt; Particle &gt; particles, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)']]],
['potential_5fresonance_5fnarrow_5fsweep_2',['potential_resonance_narrow_sweep',['../frequency__narrow__sweeps__long_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'potential_resonance_narrow_sweep():&#160;main.cpp']]],
['potential_5fresonance_5fnarrow_5fsweep_5finteraction_3',['potential_resonance_narrow_sweep_interaction',['../frequency__narrow__sweeps__long_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;frequency_narrow_sweeps_long.cpp'],['../main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'potential_resonance_narrow_sweep_interaction():&#160;main.cpp']]],
['potential_5fresonance_5fwide_5fsweep_4',['potential_resonance_wide_sweep',['../main_8cpp.html#a6b38b477c18e2f4268779751a88edab1',1,'main.cpp']]]
];

View File

@@ -1,5 +1,5 @@
var searchData=
[
['scientific_5fformat_0',['scientific_format',['../utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384',1,'scientific_format(double d, int width=20, int prec=10):&#160;utils.cpp'],['../utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d',1,'scientific_format(const std::vector&lt; double &gt; &amp;v, int width=20, int prec=10):&#160;utils.cpp'],['../utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746',1,'scientific_format(double d, int width, int prec):&#160;utils.cpp'],['../utils_8cpp.html#a58565270b643b24e3132f38c653e0199',1,'scientific_format(const std::vector&lt; double &gt; &amp;v, int width, int prec):&#160;utils.cpp']]],
['simulate_1',['simulate',['../classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854',1,'PenningTrap']]]
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08',1,'PenningTrap']]],
['reinitialize_1',['reinitialize',['../classPenningTrap.html#aaee129f177657455348d0c8ae1441dea',1,'PenningTrap']]]
];

Some files were not shown because too many files have changed in this diff Show More