117 Commits

Author SHA1 Message Date
09d81d5917 Final edition of the report 2023-10-24 22:42:13 +02:00
Janita Willumsen
ccf492d726 Final, for real, changes 2023-10-24 22:36:04 +02:00
Janita Willumsen
82cdbaced5 Final, hopefully, changes 2023-10-24 22:32:53 +02:00
61d9ca8a25 Fix mistake 2023-10-24 22:23:50 +02:00
91f079fc71 Some changes 2023-10-24 22:21:47 +02:00
Janita Willumsen
30f2cda100 Update pdf again 2023-10-24 22:09:19 +02:00
Janita Willumsen
a9365ec35e Changed some stuff 2023-10-24 22:08:08 +02:00
7df2e46f89 Changes 2023-10-24 22:00:40 +02:00
Janita Willumsen
ecf9aae916 Update pdf 2023-10-24 21:49:38 +02:00
Janita Willumsen
d887601c7c Fix note on references 2023-10-24 21:49:08 +02:00
Janita Willumsen
baf780dfbb Finish report 2023-10-24 21:44:56 +02:00
978616f7d9 Add resonance part for the abstract 2023-10-24 21:12:45 +02:00
f06bfc0f59 Add part about resonance 2023-10-24 21:09:50 +02:00
4e09128483 Add updated figures 2023-10-24 21:03:50 +02:00
b08d6babf0 Update gitignore 2023-10-24 21:03:34 +02:00
2b83889039 Made some changes 2023-10-24 21:03:15 +02:00
6f34b25e5c Fixed bug 2023-10-24 21:02:42 +02:00
bdda8a12fc Merge branch 'develop' into janitaws/latex-setup 2023-10-24 20:36:51 +02:00
4ee5d397e6 Merge pull request #11 from FYS3150-G2-2023/coryab/code
Coryab/code
2023-10-24 20:35:52 +02:00
9bc6038af0 Plots 2023-10-24 20:22:37 +02:00
Janita Willumsen
9e01ad8351 Add from overleaf draft 2023-10-24 17:26:02 +02:00
Janita Willumsen
bd7f911ec5 Move appendix 2023-10-24 17:22:18 +02:00
Janita Willumsen
87d13194f3 Update references 2023-10-24 17:21:53 +02:00
Janita Willumsen
8a9152a1c1 Update sections 2023-10-24 17:21:27 +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
Janita Willumsen
4bfc98791c Merge branch 'develop' into janitaws/latex-setup 2023-10-24 13:47:56 +02:00
Janita Willumsen
914261cf55 Add illustration of Penning trap 2023-10-24 13:47:16 +02:00
c93e442d99 Merge pull request #10 from FYS3150-G2-2023/coryab/code
Coryab/code
2023-10-24 12:45:32 +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
f29424f96e Fix some small things 2023-10-16 20:58: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
03344c3298 Update methods 2023-10-16 12:58:34 +02:00
56080de561 Implemented pseudocode for forward Euler and RK4 2023-10-15 23:01:03 +02:00
655bf6aceb Merge pull request #8 from FYS3150-G2-2023/janitaws/latex-setup
Janitaws/latex setup
2023-10-14 03:16:22 +02:00
58e5ed5c69 Merge branch 'develop' into janitaws/latex-setup 2023-10-14 03:15:30 +02:00
7c76c2f08c Merge pull request #6 from FYS3150-G2-2023/coryab/implement-PenningTrap-simulate
Coryab/implement penning trap simulate
2023-10-14 03:13:37 +02:00
Janita Willumsen
1841de0693 Fix link to repo 2023-10-03 13:55:13 +02:00
Janita Willumsen
1e12f8d0f1 Ignore build bib 2023-10-03 13:54:26 +02:00
Janita Willumsen
b699ca4dee Add bib for references 2023-10-03 12:26:31 +02:00
Janita Willumsen
89e50a32a4 Include bib files for references 2023-10-03 12:25:17 +02:00
Janita Willumsen
ef3af22876 Set up document structure, content placed in separate directories 2023-10-03 12:23:46 +02:00
171 changed files with 6547 additions and 3677 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 UseTab: Never
# Set the indent width to be 4 columns
IndentWidth: 4 IndentWidth: 4
# Set tab width to be 4 columns
TabWidth: 4 TabWidth: 4
# Set access modifier (public, private, protected) offset to indent left
AccessModifierOffset: -4 AccessModifierOffset: -4
# Stop indentation of access modifiers
IndentAccessModifiers: false IndentAccessModifiers: false
# Don't allow a function to be defined on a single line
AllowShortFunctionsOnASingleLine: false AllowShortFunctionsOnASingleLine: false
BreakBeforeBraces: Custom
BraceWrapping: # Set the column limit to 80 characters
AfterFunction: true ColumnLimit: 80
BeforeElse: true
# 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

8
.gitignore vendored
View File

@@ -35,9 +35,11 @@
*.aux *.aux
*.log *.log
*.out *.out
*.bib
*.synctex.gz *.synctex.gz
*.bbl *.bbl
*.blg
latex/mainNotes.bib
# C++ specifics # C++ specifics
src/* src/*
@@ -46,3 +48,7 @@ src/*
!src/*.hpp !src/*.hpp
!src/*.py !src/*.py
!src/Doxyfile !src/Doxyfile
!src/scripts
# Job
!src/job.script

View File

@@ -917,7 +917,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched. # 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 # 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 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2174,7 +2174,7 @@ RTF_EXTENSIONS_FILE =
# classes and files. # classes and files.
# The default value is: NO. # 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 # 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 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

111
README.md
View File

@@ -2,6 +2,117 @@
![](./images/100_particles.gif) ![](./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>
```
## 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 ## Credits

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

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

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> <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="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="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="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> arma::vec::fixed&lt;3&gt; r_vec,</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> arma::vec::fixed&lt;3&gt; v_vec)</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>{</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> <span class="comment">// Giving the particle its properties</span></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="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="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="l00022" name="l00022"></a><span class="lineno"> 22</span>}</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="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="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_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_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_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_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_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#l00024">Particle.hpp:24</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_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_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><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- 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. <p>A class that holds the properties of a particle.
<a href="#details">More...</a></p> <a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;armadillo&gt;</code><br /> <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 /> <code>#include &quot;<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>&quot;</code><br />
</div> </div>
<p><a href="Particle_8hpp_source.html">Go to the source code of this file.</a></p> <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> <dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd> <dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl> 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> <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> <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="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="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="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="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> </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="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="l00019" name="l00019"></a><span class="lineno"> 19</span> </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="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"><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="l00023" name="l00023"></a><span class="lineno"> 23</span>{</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="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#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="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#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="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"> 27</span> </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"> 28</span><span class="keyword">public</span>:</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="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="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</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="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="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="l00044" name="l00044"></a><span class="lineno"> 44</span>};</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"> 45</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><span class="preprocessor">#endif</span></div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</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="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </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="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#endif</span></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"><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_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_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_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_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="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="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"><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><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -105,9 +105,11 @@ $(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. <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> <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 /> <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 />
<code>#include &quot;<a class="el" href="typedefs_8hpp_source.html">typedefs.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 /> <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 />
</div> </div>
<p><a href="PenningTrap_8cpp_source.html">Go to the source code of this file.</a></p> <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> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
@@ -115,7 +117,7 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp.html',''); initResiza
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd> <dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd> <dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl> 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#_bug000008">Bug:</a></b></dt><dd>No known bugs </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="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p> <p class="definition">Definition in file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>

View File

@@ -103,310 +103,360 @@ $(document).ready(function(){initNavTree('PenningTrap_8cpp_source.html',''); ini
<div class="contents"> <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> <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="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="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &quot;<a class="code" href="typedefs_8hpp.html">typedefs.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="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;algorithm&gt;</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="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;sys/types.h&gt;</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="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> <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</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>{</div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2"> 20</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="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="l00021" name="l00021"></a><span class="lineno"> 21</span>{</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="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordflow">switch</span> (i) {</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="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">case</span> 0:</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="l00024" name="l00024"></a><span class="lineno"> 24</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="l00025" name="l00025"></a><span class="lineno"> 25</span>}</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div> <div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;k_v[1][j];</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="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">case</span> 2:</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="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">return</span> dt * this-&gt;k_v[2][j];</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="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>{</div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</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="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="l00031" name="l00031"></a><span class="lineno"> 31</span> * (this-&gt;k_v[0][j] + 2. * this-&gt;k_v[1][j]</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="l00032" name="l00032"></a><span class="lineno"> 32</span> + 2. * this-&gt;k_v[2][j] + this-&gt;k_v[3][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="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">default</span>:</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="l00034" name="l00034"></a><span class="lineno"> 34</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not valid!&quot;</span> &lt;&lt; std::endl;</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="l00035" name="l00035"></a><span class="lineno"> 35</span> abort();</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</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>}</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="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="l00039" name="l00039"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08"> 39</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="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="l00040" name="l00040"></a><span class="lineno"> 40</span>{</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="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>{</div> <div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">case</span> 0:</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="l00043" name="l00043"></a><span class="lineno"> 43</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="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div> <div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> .5 * dt * this-&gt;k_r[1][j];</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="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>{</div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> dt * this-&gt;k_r[2][j];</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="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">case</span> 3:</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="l00049" name="l00049"></a><span class="lineno"> 49</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="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="l00050" name="l00050"></a><span class="lineno"> 50</span> * (this-&gt;k_r[0][j] + 2. * this-&gt;k_r[1][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="l00051" name="l00051"></a><span class="lineno"> 51</span> + 2. * this-&gt;k_r[2][j] + this-&gt;k_r[3][j]));</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="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">default</span>:</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="l00053" name="l00053"></a><span class="lineno"> 53</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Not valid!&quot;</span> &lt;&lt; std::endl;</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="l00054" name="l00054"></a><span class="lineno"> 54</span> abort();</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="l00055" name="l00055"></a><span class="lineno"> 55</span> }</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="l00056" name="l00056"></a><span class="lineno"> 56</span>}</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="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">default</span>:</div> <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22"> 58</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="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="l00059" name="l00059"></a><span class="lineno"> 59</span>{</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> abort();</div> <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> r(2) *= -2.;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</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>}</div> <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</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#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>))</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div> <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> * r);</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="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="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="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655"> 66</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="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">case</span> 0:</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">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="l00068" name="l00068"></a><span class="lineno"> 68</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="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">case</span> 1:</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">return</span> .5 * dt * this-&gt;k_r[1][j];</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> <span class="keywordflow">case</span> 2:</div> <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598"> 71</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="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="l00072" name="l00072"></a><span class="lineno"> 72</span>{</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="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// Calculate the difference between the particles&#39; position</span></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="l00074" name="l00074"></a><span class="lineno"> 74</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="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="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="keywordflow">default</span>:</div> <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">// Get the distance between the particles</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="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordtype">double</span> norm = arma::norm(res, 2);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> abort();</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="l00079" name="l00079"></a><span class="lineno"> 79</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="l00080" name="l00080"></a><span class="lineno"> 80</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="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="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682"> 82</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="l00083" name="l00083"></a><span class="lineno"> 83</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> this-&gt;particles.push_back(particle);</div> <div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</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="l00085" name="l00085"></a><span class="lineno"> 85</span>}</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> </div> <div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">if</span> (arma::norm(p-&gt;<a class="code hl_variable" href="classParticle.html#a1c59101411db43624828b766f87ad460">r_vec</a>) &gt; this-&gt;d) {</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="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>{0., 0., 0.};</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>{</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="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> 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="l00090" name="l00090"></a><span class="lineno"> 90</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="l00091" name="l00091"></a><span class="lineno"> 91</span> </div> <div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</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="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">return</span> f * r;</div> <div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</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="l00093" name="l00093"></a><span class="lineno"> 93</span>}</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="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="l00095" name="l00095"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c"> 95</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="l00096" name="l00096"></a><span class="lineno"> 96</span>{</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="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> res;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</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="l00099" name="l00099"></a><span class="lineno"> 99</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="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="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">if</span> (i != j)</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>{</div> <div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</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="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="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="comment">// Calculate the difference between the particles&#39; position</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"> 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="l00104" name="l00104"></a><span class="lineno"> 104</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="l00105" name="l00105"></a><span class="lineno"> 105</span> </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="l00106" name="l00106"></a><span class="lineno"> 106</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="l00107" name="l00107"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3"> 107</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="l00108" name="l00108"></a><span class="lineno"> 108</span> </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="l00109" name="l00109"></a><span class="lineno"> 109</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="l00110" name="l00110"></a><span class="lineno"> 110</span> </div> <div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</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="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="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="l00112" name="l00112"></a><span class="lineno"> 112</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="l00113" name="l00113"></a><span class="lineno"> 113</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="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span>{</div> <div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8"> 115</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="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="l00116" name="l00116"></a><span class="lineno"> 116</span>{</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div> <div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> this-&gt;B_0 = <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>;</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="l00118" name="l00118"></a><span class="lineno"> 118</span> this-&gt;V_0 = <a class="code hl_variable" href="classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89">V_0</a>;</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="l00119" name="l00119"></a><span class="lineno"> 119</span> this-&gt;d = <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div> <div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> this-&gt;t = <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div> <div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</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="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="l00122" name="l00122"></a><span class="lineno"> 122</span>}</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="l00123" name="l00123"></a><span class="lineno"> 123</span> </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="l00124" name="l00124"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f"> 124</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="l00125" name="l00125"></a><span class="lineno"> 125</span> </div> <div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</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="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">return</span> force;</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="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; i; j++) {</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div> <div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.push_back(</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="l00129" name="l00129"></a><span class="lineno"> 129</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="l00130" name="l00130"></a><span class="lineno"> 130</span>{</div> <div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</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="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="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </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="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div> <div class="line"><a id="l00134" name="l00134"></a><span class="lineno"><a class="line" href="classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f"> 134</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="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="l00135" name="l00135"></a><span class="lineno"> 135</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="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (i == j) {</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>::<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(B_0, V_0, d)</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="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="l00138" name="l00138"></a><span class="lineno"> 138</span> this-&gt;particles = <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</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="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div> <div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43"> 141</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="l00142" name="l00142"></a><span class="lineno"> 142</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="l00143" name="l00143"></a><span class="lineno"> 143</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="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div> <div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</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="l00145" name="l00145"></a><span class="lineno"> 145</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"> 146</span>}</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>{</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="l00148" name="l00148"></a><span class="lineno"><a class="line" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea"> 148</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="l00149" name="l00149"></a><span class="lineno"> 149</span>}</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="l00150" name="l00150"></a><span class="lineno"> 150</span> this-&gt;t = <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</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="l00151" name="l00151"></a><span class="lineno"> 151</span> this-&gt;<a class="code hl_function" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">set_pertubation</a>(f, omega_V);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</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"> 153</span> </div> <div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</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="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="l00154" name="l00154"></a><span class="lineno"> 154</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec = <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="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="l00155" name="l00155"></a><span class="lineno"> 155</span> }</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </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="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="keywordflow">if</span> (particle_interaction) {</div> <div class="line"><a id="l00158" name="l00158"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8"> 158</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="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="l00159" name="l00159"></a><span class="lineno"> 159</span>{</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div> <div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.push_back(particle);</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="l00161" name="l00161"></a><span class="lineno"> 161</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="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div> <div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e"> 163</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="l00164" name="l00164"></a><span class="lineno"> 164</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="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div> <div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</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="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="l00167" name="l00167"></a><span class="lineno"> 167</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="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="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div> <div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</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) = particle_interaction</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="l00170" name="l00170"></a><span class="lineno"> 170</span> ? &amp;<a class="code hl_function" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a></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="l00171" name="l00171"></a><span class="lineno"> 171</span> : &amp;<a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap::total_force_external</a>;</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="l00172" name="l00172"></a><span class="lineno"> 172</span> </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="l00173" name="l00173"></a><span class="lineno"> 173</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="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="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div> <div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="comment">// Allocating takes a long time, so reuse sim_arr if possible</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="l00176" name="l00176"></a><span class="lineno"> 176</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="l00177" name="l00177"></a><span class="lineno"> 177</span> </div> <div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</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="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="l00178" name="l00178"></a><span class="lineno"> 178</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="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="l00179" name="l00179"></a><span class="lineno"> 179</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="l00180" name="l00180"></a><span class="lineno"> 180</span> }</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="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> }</div> <div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</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="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="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 4; i++) {</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>}</div> <div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="comment">// Inner loop is able to be parallelized</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div> <div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="preprocessor">#pragma omp parallel for</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="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; size; j++) {</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span>{</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>[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="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="l00188" name="l00188"></a><span class="lineno"> 188</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="l00189" name="l00189"></a><span class="lineno"> 189</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> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div> <div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> tmp_particles[j].v_vec =</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div> <div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> 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="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="l00192" name="l00192"></a><span class="lineno"> 192</span> tmp_particles[j].r_vec =</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="l00193" name="l00193"></a><span class="lineno"> 193</span> 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="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="l00194" name="l00194"></a><span class="lineno"> 194</span> }</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> }</div> <div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a> = tmp_particles;</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="l00196" name="l00196"></a><span class="lineno"> 196</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="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> }</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#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </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="l00200" name="l00200"></a><span class="lineno"> 200</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="l00201" name="l00201"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e"> 201</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="l00202" name="l00202"></a><span class="lineno"> 202</span> p = &amp;new_state[i];</div> <div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span>{</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="l00203" name="l00203"></a><span class="lineno"> 203</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="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="l00204" name="l00204"></a><span class="lineno"> 204</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> force_res[size];</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> }</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="l00206" name="l00206"></a><span class="lineno"> 206</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) = particle_interaction</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="l00207" name="l00207"></a><span class="lineno"> 207</span> ? &amp;<a class="code hl_function" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap::total_force</a></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="l00208" name="l00208"></a><span class="lineno"> 208</span> : &amp;<a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">PenningTrap::total_force_external</a>;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span>}</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="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="comment">// Calculating the force for each particle is independent and therefore</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="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="comment">// a good candidate for parallel execution</span></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="l00212" name="l00212"></a><span class="lineno"> 212</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>{</div> <div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; size; i++) {</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="l00214" name="l00214"></a><span class="lineno"> 214</span> force_res[i] = (this-&gt;*force)(i);</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </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="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> </div> <div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="comment">// Updating the particles is also independent, so we can parallelize</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="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="comment">// this as well</span></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="l00219" name="l00219"></a><span class="lineno"> 219</span><span class="preprocessor">#pragma omp parallel for</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="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> }</div> <div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec += dt * this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].v_vec;</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="l00222" name="l00222"></a><span class="lineno"> 222</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].v_vec += dt * force_res[i] / this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].m;</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="l00223" name="l00223"></a><span class="lineno"> 223</span> }</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> }</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="l00225" name="l00225"></a><span class="lineno"> 225</span> this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</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="l00226" name="l00226"></a><span class="lineno"> 226</span>}</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> abort();</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> }</div> <div class="line"><a id="l00228" name="l00228"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a"> 228</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="l00229" name="l00229"></a><span class="lineno"> 229</span> </div> <div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordtype">bool</span> particle_interaction)</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="l00230" name="l00230"></a><span class="lineno"> 230</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; this-&gt;particles.size(); i++) {</div> <div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordtype">double</span> dt = time / (double)steps;</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="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="l00233" name="l00233"></a><span class="lineno"> 233</span> uint size = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>.size();</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="l00234" name="l00234"></a><span class="lineno"> 234</span> </div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> }</div> <div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</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="l00236" name="l00236"></a><span class="lineno"> 236</span> </div> <div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</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="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> </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span>}</div> <div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> void (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*func)(double, bool);</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> </div> <div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;rk4&quot;</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="l00240" name="l00240"></a><span class="lineno"> 240</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>;</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="l00241" name="l00241"></a><span class="lineno"> 241</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="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="keywordtype">bool</span> particle_interaction)</div> <div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>;</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span>{</div> <div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> } <span class="keywordflow">else</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="l00244" name="l00244"></a><span class="lineno"> 244</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="l00245" name="l00245"></a><span class="lineno"> 245</span> path += <span class="charliteral">&#39;/&#39;</span>;</div> <div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> abort();</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</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="l00247" name="l00247"></a><span class="lineno"> 247</span> </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="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; steps; j++) {</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="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> }</div> <div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> res.r_vecs[i][j] = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].r_vec;</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> </div> <div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> res.v_vecs[i][j] = this-&gt;<a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>[i].v_vec;</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="l00252" name="l00252"></a><span class="lineno"> 252</span> }</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> </div> <div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> (this-&gt;*func)(dt, particle_interaction);</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> std::ofstream ofile;</div> <div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> }</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</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><span class="preprocessor">#pragma omp parallel for private(ofile)</span></div> <div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <span class="keywordflow">return</span> res;</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="l00257" name="l00257"></a><span class="lineno"> 257</span>}</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="l00258" name="l00258"></a><span class="lineno"> 258</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="l00259" name="l00259"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b"> 259</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="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="l00260" name="l00260"></a><span class="lineno"> 260</span> uint steps, std::string method,</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> }</div> <div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> ofile.close();</div> <div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span>{</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> }</div> <div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> <span class="keywordflow">if</span> (path.back() != <span class="charliteral">&#39;/&#39;</span>) {</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span>}</div> <div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> path += <span class="charliteral">&#39;/&#39;</span>;</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</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="l00266" name="l00266"></a><span class="lineno"> 266</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="l00267" name="l00267"></a><span class="lineno"> 267</span>{</div> <div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</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="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="l00268" name="l00268"></a><span class="lineno"> 268</span> abort();</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</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="l00270" name="l00270"></a><span class="lineno"> 270</span> </div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> </div> <div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res =</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="l00272" name="l00272"></a><span class="lineno"> 272</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="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="l00273" name="l00273"></a><span class="lineno"> 273</span> </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> particles_left++;</div> <div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> std::ofstream ofile;</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> }</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="l00276" name="l00276"></a><span class="lineno"> 276</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="l00277" name="l00277"></a><span class="lineno"> 277</span> </div> <div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="comment">// parallel.</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="l00278" name="l00278"></a><span class="lineno"> 278</span><span class="preprocessor">#pragma omp parallel for private(ofile)</span></div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span>}</div> <div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</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="l00280" name="l00280"></a><span class="lineno"> 280</span> </div> <div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</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="l00281" name="l00281"></a><span class="lineno"> 281</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="l00282" name="l00282"></a><span class="lineno"> 282</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="l00283" name="l00283"></a><span class="lineno"> 283</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="l00284" name="l00284"></a><span class="lineno"> 284</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="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> ofile.close();</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</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="l00288" name="l00288"></a><span class="lineno"> 288</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="l00289" name="l00289"></a><span class="lineno"> 289</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="l00290" name="l00290"></a><span class="lineno"> 290</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="l00291" name="l00291"></a><span class="lineno"> 291</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="l00292" name="l00292"></a><span class="lineno"> 292</span> }</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> ofile.close();</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> }</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span>}</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> </div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f"> 297</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="l00298" name="l00298"></a><span class="lineno"> 298</span> std::string method,</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="keywordtype">bool</span> particle_interaction)</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span>{</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keywordtype">double</span> dt = time / (double)steps;</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> void (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*func)(double, bool);</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">&quot;rk4&quot;</span>) {</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>;</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</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="l00307" name="l00307"></a><span class="lineno"> 307</span> func = &amp;<a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>;</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</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="l00310" name="l00310"></a><span class="lineno"> 310</span> abort();</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> }</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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; steps; j++) {</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> (this-&gt;*func)(dt, particle_interaction);</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> </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordtype">int</span> particles_left = 0;</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> <span class="comment">// A reduction is perfect here</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span><span class="preprocessor">#pragma omp parallel for reduction(+ : particles_left)</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</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="l00322" name="l00322"></a><span class="lineno"> 322</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="l00323" name="l00323"></a><span class="lineno"> 323</span> particles_left++;</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> }</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">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="l00328" name="l00328"></a><span class="lineno"> 328</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="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"><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_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_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_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_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_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_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_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#l00031">PenningTrap.hpp:32</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#l00042">PenningTrap.hpp:42</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_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_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_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#l00082">PenningTrap.cpp:82</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_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_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_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#l00095">PenningTrap.cpp:95</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_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#l00066">PenningTrap.cpp:66</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#l00163">PenningTrap.cpp:163</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_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#l00020">PenningTrap.cpp:20</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_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#l00058">PenningTrap.cpp:58</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_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#l00115">PenningTrap.cpp:115</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#l00040">PenningTrap.hpp:40</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#l00158">PenningTrap.cpp:158</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_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_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_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#l00228">PenningTrap.cpp:228</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_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#l00071">PenningTrap.cpp:71</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_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#l00039">PenningTrap.cpp:39</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_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_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_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#l00107">PenningTrap.cpp:107</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_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#l00141">PenningTrap.cpp:141</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_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#l00148">PenningTrap.cpp:148</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_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#l00201">PenningTrap.cpp:201</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_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#l00297">PenningTrap.cpp:297</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="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#l00259">PenningTrap.cpp:259</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="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="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="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"><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_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_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_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#l00032">typedefs.hpp:32</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 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_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_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><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- 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="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="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="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> </div>
<p><a href="PenningTrap_8hpp_source.html">Go to the source code of this file.</a></p> <p><a href="PenningTrap_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls"> <table class="memberdecls">
@@ -125,7 +126,7 @@ Classes</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd> <dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd> <dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl> 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> <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> <p class="definition">Definition in file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>

View File

@@ -111,105 +111,112 @@ $(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="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="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="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="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><span class="preprocessor">#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \</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"> initializer(omp_priv = omp_orig)</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> </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="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="l00025" name="l00025"></a><span class="lineno"> 25</span> </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="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"><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="l00032" name="l00032"></a><span class="lineno"> 32</span>{</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="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="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="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">private</span>:</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="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="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="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="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#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="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="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"> 41</span> </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="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="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="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="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="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="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="l00077" name="l00077"></a><span class="lineno"> 77</span> </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="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="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="l00085" name="l00085"></a><span class="lineno"> 85</span> </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="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="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="l00093" name="l00093"></a><span class="lineno"> 93</span> </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="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="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="l00105" name="l00105"></a><span class="lineno"> 105</span> </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="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="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="l00116" name="l00116"></a><span class="lineno"> 116</span> </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="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="l00107" name="l00107"></a><span class="lineno"> 107</span> </div> <div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</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="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="l00113" name="l00113"></a><span class="lineno"> 113</span> </div> <div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</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="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div> <div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</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="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="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> = 0.);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div> <div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</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="l00153" name="l00153"></a><span class="lineno"> 153</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="l00141" name="l00141"></a><span class="lineno"> 141</span> </div> <div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</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="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="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div> <div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</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="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="l00165" name="l00165"></a><span class="lineno"> 165</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="l00160" name="l00160"></a><span class="lineno"> 160</span> </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> <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="l00172" name="l00172"></a><span class="lineno"> 172</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="l00168" name="l00168"></a><span class="lineno"> 168</span> </div> <div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</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="l00180" name="l00180"></a><span class="lineno"> 180</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="l00175" name="l00175"></a><span class="lineno"> 175</span> </div> <div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</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="l00186" name="l00186"></a><span class="lineno"> 186</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="l00182" name="l00182"></a><span class="lineno"> 182</span> </div> <div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</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="l00193" name="l00193"></a><span class="lineno"> 193</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="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="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="l00200" name="l00200"></a><span class="lineno"> 200</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="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="l00201" name="l00201"></a><span class="lineno"> 201</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="l00212" name="l00212"></a><span class="lineno"> 212</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="l00206" name="l00206"></a><span class="lineno"> 206</span> </div> <div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</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="l00214" name="l00214"></a><span class="lineno"> 214</span> </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="l00223" name="l00223"></a><span class="lineno"> 223</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="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="l00224" name="l00224"></a><span class="lineno"> 224</span> std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span>};</div> <div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div> <div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</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="l00237" name="l00237"></a><span class="lineno"> 237</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="l00238" name="l00238"></a><span class="lineno"> 238</span> std::string method = <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> </div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span>};</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><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="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="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#l00030">PenningTrap.hpp:30</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_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"><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_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_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#l00032">PenningTrap.hpp:32</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_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_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#l00082">PenningTrap.cpp:82</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="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_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_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#l00095">PenningTrap.cpp:95</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_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#l00066">PenningTrap.cpp:66</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_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#l00163">PenningTrap.cpp:163</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_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#l00020">PenningTrap.cpp:20</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_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#l00058">PenningTrap.cpp:58</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_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#l00082">PenningTrap.cpp:82</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#l00158">PenningTrap.cpp:158</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_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_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_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#l00228">PenningTrap.cpp:228</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_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#l00071">PenningTrap.cpp:71</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_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#l00039">PenningTrap.cpp:39</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_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_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_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#l00107">PenningTrap.cpp:107</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_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#l00141">PenningTrap.cpp:141</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_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#l00148">PenningTrap.cpp:148</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="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#l00201">PenningTrap.cpp:201</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#l00297">PenningTrap.cpp:297</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#l00259">PenningTrap.cpp:259</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"><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_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#l00019">constants.hpp:19</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"><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 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_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><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/> <meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/> <meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <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"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -135,7 +135,7 @@ $(document).ready(function(){initNavTree('animate__100__particles_8py_source.htm
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> fig = plt.figure()</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> <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>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</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="l00035" name="l00035"></a><span class="lineno"> 35</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="l00036" name="l00036"></a><span class="lineno"> 36</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> arr = arr[:, :, ::10]</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="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
@@ -177,7 +177,7 @@ $(document).ready(function(){initNavTree('animate__100__particles_8py_source.htm
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <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"><b>animate_100_particles.py</b></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> <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> </ul>
</div> </div>

View File

@@ -105,7 +105,8 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
<table 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">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_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_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> </table>
</div><!-- directory --> </div><!-- directory -->
</div><!-- contents --> </div><!-- contents -->

View File

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

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> <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"> <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="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="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="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="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#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="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 --> </table></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -114,24 +114,24 @@ $(document).ready(function(){initNavTree('classParticle.html',''); initResizable
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr> 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="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:a7af9f8d1fef63dd7643b06629ac7bef4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the particle. <br /></td></tr> <tr class="memdesc:af1d7535fb8311eaa77d2b7b345882ec4"><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="separator:af1d7535fb8311eaa77d2b7b345882ec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr> 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="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="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="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="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="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="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"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr> Friends</h2></td></tr>
@@ -142,10 +142,10 @@ Friends</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <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> <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> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a7af9f8d1fef63dd7643b06629ac7bef4" name="a7af9f8d1fef63dd7643b06629ac7bef4"></a> <a id="af1d7535fb8311eaa77d2b7b345882ec4" name="af1d7535fb8311eaa77d2b7b345882ec4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7af9f8d1fef63dd7643b06629ac7bef4">&#9670;&#160;</a></span>Particle()</h2> <h2 class="memtitle"><span class="permalink"><a href="#af1d7535fb8311eaa77d2b7b345882ec4">&#9670;&#160;</a></span>Particle()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -153,26 +153,26 @@ Friends</h2></td></tr>
<tr> <tr>
<td class="memname">Particle::Particle </td> <td class="memname">Particle::Particle </td>
<td>(</td> <td>(</td>
<td class="paramtype">double&#160;</td> <td class="paramtype"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&#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="paramname"><em>r_vec</em>, </td> <td class="paramname"><em>r_vec</em>, </td>
</tr> </tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></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>v_vec</em>&#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>
<tr> <tr>
<td></td> <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>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>
</div> </div>
@@ -248,7 +248,7 @@ Friends</h2></td></tr>
<p>Mass. </p> <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>
</div> </div>
@@ -274,12 +274,12 @@ Friends</h2></td></tr>
<p>Charge. </p> <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>
</div> </div>
<a id="af9497cd8f2dcad0fad54f571ddb383e6" name="af9497cd8f2dcad0fad54f571ddb383e6"></a> <a id="a1c59101411db43624828b766f87ad460" name="a1c59101411db43624828b766f87ad460"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9497cd8f2dcad0fad54f571ddb383e6">&#9670;&#160;</a></span>r_vec</h2> <h2 class="memtitle"><span class="permalink"><a href="#a1c59101411db43624828b766f87ad460">&#9670;&#160;</a></span>r_vec</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -288,7 +288,7 @@ Friends</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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> </tr>
</table> </table>
</td> </td>
@@ -304,8 +304,8 @@ Friends</h2></td></tr>
</div> </div>
</div> </div>
<a id="a879692772803d6ab65fa4993b54aea6e" name="a879692772803d6ab65fa4993b54aea6e"></a> <a id="a3a10400add8dd22b8031330c2aafb6fe" name="a3a10400add8dd22b8031330c2aafb6fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a879692772803d6ab65fa4993b54aea6e">&#9670;&#160;</a></span>v_vec</h2> <h2 class="memtitle"><span class="permalink"><a href="#a3a10400add8dd22b8031330c2aafb6fe">&#9670;&#160;</a></span>v_vec</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -314,7 +314,7 @@ Friends</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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> </tr>
</table> </table>
</td> </td>

View File

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

View File

@@ -109,25 +109,29 @@ $(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="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="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="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="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#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="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#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="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#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="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="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="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="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="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#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="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#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="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#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="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#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#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="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="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#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="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#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="even"><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="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="odd"><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="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="even"><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="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="odd"><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 --> </table></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- 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="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124; <a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</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> <a href="classPenningTrap-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">PenningTrap Class Reference</div></div> <div class="headertitle"><div class="title">PenningTrap Class Reference</div></div>
</div><!--header--> </div><!--header-->
@@ -114,69 +115,78 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr> 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="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: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="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:ae670d7de621acdb343b01af098086f63"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a5b6c6d4636f3a6e279ccde59d4a345e8"><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="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: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="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:a763700316b502d5900e587c1f61e6bf1"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a830be1b8cbf59664e060b6edbeaa302f"><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="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: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="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:a67139e04ef69c0bcffde8f30f67cbf73"><td class="memSeparator" colspan="2">&#160;</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="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="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="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="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="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="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="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="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="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="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: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="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:a5331837e6dd7bce807a99edd2ba7e854"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a7a1d9f0528a12308de25bc30718da20a"><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="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:abbb832a85139b1a56ebde57d7b8f9a57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulate and write the displacement of all particles to files. <br /></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:abbb832a85139b1a56ebde57d7b8f9a57"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ad8bc4df7ab3eed53b16cfdff38e7760b"><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="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: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="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:a0194be61c956a9259c747c23e4163c5b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ac529aa26c288f34eae184a67e6bac41f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr> 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="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: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="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:af98a720da60b0e1a62aefa5f5cb37c1e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a3c0a44e4e0a94366ff609e81fe463fa2"><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="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: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="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:a43e74792ab4b3f9299f35cb64bdb2648"><td class="memSeparator" colspan="2">&#160;</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>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr> 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="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="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="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="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:aaf105828121c4a33cc2b217453c20317"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applied potential. <br /></td></tr> <tr class="memdesc:a715329844d75ec4c04f8391421fb4e89"><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="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="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="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> <tr class="separator:a66dfe89c68716b9502927b97f59c27d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -187,18 +197,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="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="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="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="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="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> <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> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class that simulates a Penning trap. </p> <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>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> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae670d7de621acdb343b01af098086f63" name="ae670d7de621acdb343b01af098086f63"></a> <a id="a5b6c6d4636f3a6e279ccde59d4a345e8" name="a5b6c6d4636f3a6e279ccde59d4a345e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae670d7de621acdb343b01af098086f63">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[1/3]</span></h2> <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="memitem">
<div class="memproto"> <div class="memproto">
@@ -212,8 +230,8 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">std::function&lt; double(double)&gt;&#160;</td> <td class="paramtype">double&#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="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>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
@@ -246,12 +264,12 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00115">115</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a763700316b502d5900e587c1f61e6bf1" name="a763700316b502d5900e587c1f61e6bf1"></a> <a id="a830be1b8cbf59664e060b6edbeaa302f" name="a830be1b8cbf59664e060b6edbeaa302f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a763700316b502d5900e587c1f61e6bf1">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[2/3]</span></h2> <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="memitem">
<div class="memproto"> <div class="memproto">
@@ -259,7 +277,7 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="memname">PenningTrap::PenningTrap </td> <td class="memname">PenningTrap::PenningTrap </td>
<td>(</td> <td>(</td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td> <td class="paramname"><em>i</em>, </td>
</tr> </tr>
<tr> <tr>
@@ -271,8 +289,8 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">std::function&lt; double(double)&gt;&#160;</td> <td class="paramtype">double&#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="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>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
@@ -306,12 +324,12 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00124">124</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a67139e04ef69c0bcffde8f30f67cbf73" name="a67139e04ef69c0bcffde8f30f67cbf73"></a> <a id="addc96789dcfec07b75156e19fee82f4f" name="addc96789dcfec07b75156e19fee82f4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67139e04ef69c0bcffde8f30f67cbf73">&#9670;&#160;</a></span>PenningTrap() <span class="overload">[3/3]</span></h2> <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="memitem">
<div class="memproto"> <div class="memproto">
@@ -331,8 +349,8 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">std::function&lt; double(double)&gt;&#160;</td> <td class="paramtype">double&#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="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>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
@@ -366,7 +384,7 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00134">134</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -395,7 +413,7 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00158">158</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -434,7 +452,7 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00201">201</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -473,24 +491,32 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00163">163</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="acbf065c9c125682329ad82a8d166554c" name="acbf065c9c125682329ad82a8d166554c"></a> <a id="a361f2c4862c90b5e8e2a2f50c6a95655" name="a361f2c4862c90b5e8e2a2f50c6a95655"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbf065c9c125682329ad82a8d166554c">&#9670;&#160;</a></span>external_B_field()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a361f2c4862c90b5e8e2a2f50c6a95655">&#9670;&#160;</a></span>external_B_field()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</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 class="paramname"><em>r</em></td><td>)</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Calculate B at point r. </p> <p>Calculate B at point r. </p>
@@ -500,26 +526,34 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00066">66</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a1d58feaa2c9e34cbf26b1c5ed75ca9d9" name="a1d58feaa2c9e34cbf26b1c5ed75ca9d9"></a> <a id="a5846c8f75cdc543fd9cf0b2185a3ef22" name="a5846c8f75cdc543fd9cf0b2185a3ef22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">&#9670;&#160;</a></span>external_E_field()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a5846c8f75cdc543fd9cf0b2185a3ef22">&#9670;&#160;</a></span>external_E_field()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</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 class="paramname"><em>r</em></td><td>)</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Calculate E at point r. </p> <p>Calculate E at point r. </p>
@@ -529,28 +563,31 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00058">58</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a9ae34ad740a230e667e96bc6ee8730ce" name="a9ae34ad740a230e667e96bc6ee8730ce"></a> <a id="a7f210bb2768a5d79ced4b0df0df97598" name="a7f210bb2768a5d79ced4b0df0df97598"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ae34ad740a230e667e96bc6ee8730ce">&#9670;&#160;</a></span>force_on_particle()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a7f210bb2768a5d79ced4b0df0df97598">&#9670;&#160;</a></span>force_on_particle()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td> <td class="paramname"><em>i</em>, </td>
</tr> </tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>j</em>&#160;</td> <td class="paramname"><em>j</em>&#160;</td>
</tr> </tr>
<tr> <tr>
@@ -559,6 +596,11 @@ Private Attributes</h2></td></tr>
<td></td><td></td> <td></td><td></td>
</tr> </tr>
</table> </table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Calculate the force between 2 particles. </p> <p>Calculate the force between 2 particles. </p>
@@ -570,14 +612,14 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00071">71</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a0194be61c956a9259c747c23e4163c5b" name="a0194be61c956a9259c747c23e4163c5b"></a> <a id="ac529aa26c288f34eae184a67e6bac41f" name="ac529aa26c288f34eae184a67e6bac41f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0194be61c956a9259c747c23e4163c5b">&#9670;&#160;</a></span>fraction_of_particles_left()</h2> <h2 class="memtitle"><span class="permalink"><a href="#ac529aa26c288f34eae184a67e6bac41f">&#9670;&#160;</a></span>fraction_of_particles_left()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -591,7 +633,7 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>steps</em>, </td> <td class="paramname"><em>steps</em>, </td>
</tr> </tr>
<tr> <tr>
@@ -626,12 +668,12 @@ Private Attributes</h2></td></tr>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>double </dd></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#l00297">297</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a43e74792ab4b3f9299f35cb64bdb2648" name="a43e74792ab4b3f9299f35cb64bdb2648"></a> <a id="a826b7fa8e709d481eb1dee7d0c2cdc08" name="a826b7fa8e709d481eb1dee7d0c2cdc08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43e74792ab4b3f9299f35cb64bdb2648">&#9670;&#160;</a></span>r_func()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a826b7fa8e709d481eb1dee7d0c2cdc08">&#9670;&#160;</a></span>r_func()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -640,15 +682,15 @@ Private Attributes</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td> <td class="paramname"><em>i</em>, </td>
</tr> </tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>j</em>, </td> <td class="paramname"><em>j</em>, </td>
</tr> </tr>
<tr> <tr>
@@ -676,24 +718,107 @@ Private Attributes</h2></td></tr>
<table class="params"> <table class="params">
<tr><td class="paramname">i</td><td>Index i for \(k_{r,i,j}\) </td></tr> <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">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> </table>
</dd> </dd>
</dl> </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#l00039">39</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a5331837e6dd7bce807a99edd2ba7e854" name="a5331837e6dd7bce807a99edd2ba7e854"></a> <a id="aaee129f177657455348d0c8ae1441dea" name="aaee129f177657455348d0c8ae1441dea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5331837e6dd7bce807a99edd2ba7e854">&#9670;&#160;</a></span>simulate()</h2> <h2 class="memtitle"><span class="permalink"><a href="#aaee129f177657455348d0c8ae1441dea">&#9670;&#160;</a></span>reinitialize()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <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#l00148">148</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#l00141">141</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>(</td>
<td class="paramtype">double&#160;</td> <td class="paramtype">double&#160;</td>
<td class="paramname"><em>time</em>, </td> <td class="paramname"><em>time</em>, </td>
@@ -701,7 +826,7 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>steps</em>, </td> <td class="paramname"><em>steps</em>, </td>
</tr> </tr>
<tr> <tr>
@@ -734,25 +859,34 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00228">228</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a1f668c4433421136ad51741741aa1bc8" name="a1f668c4433421136ad51741741aa1bc8"></a> <a id="a9a301b0540078c36697880ef204afdf3" name="a9a301b0540078c36697880ef204afdf3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f668c4433421136ad51741741aa1bc8">&#9670;&#160;</a></span>total_force()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a9a301b0540078c36697880ef204afdf3">&#9670;&#160;</a></span>total_force()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em></td><td>)</td> <td class="paramname"><em>i</em></td><td>)</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>calculate the total force on a particle p_i. </p> <p>calculate the total force on a particle p_i. </p>
@@ -762,26 +896,34 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00107">107</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="ae72d203b0bfa1b9e72bea28cb2863c56" name="ae72d203b0bfa1b9e72bea28cb2863c56"></a> <a id="a2c01108b52c8e2a003cf9170da9e7682" name="a2c01108b52c8e2a003cf9170da9e7682"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae72d203b0bfa1b9e72bea28cb2863c56">&#9670;&#160;</a></span>total_force_external()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a2c01108b52c8e2a003cf9170da9e7682">&#9670;&#160;</a></span>total_force_external()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em></td><td>)</td> <td class="paramname"><em>i</em></td><td>)</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Calculate the total external force on a particle. </p> <p>Calculate the total external force on a particle. </p>
@@ -792,26 +934,34 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00082">82</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="a46a954a0946def199e30fb300ba1c47b" name="a46a954a0946def199e30fb300ba1c47b"></a> <a id="a2fe1cefbae18fa5808155ee0d2df713c" name="a2fe1cefbae18fa5808155ee0d2df713c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46a954a0946def199e30fb300ba1c47b">&#9670;&#160;</a></span>total_force_particles()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a2fe1cefbae18fa5808155ee0d2df713c">&#9670;&#160;</a></span>total_force_particles()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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_particles </td>
<td>(</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 class="paramname"><em>i</em></td><td>)</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Calculate the total force on a particle p_i from other particles. </p> <p>Calculate the total force on a particle p_i from other particles. </p>
@@ -821,14 +971,14 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00095">95</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="af98a720da60b0e1a62aefa5f5cb37c1e" name="af98a720da60b0e1a62aefa5f5cb37c1e"></a> <a id="a3c0a44e4e0a94366ff609e81fe463fa2" name="a3c0a44e4e0a94366ff609e81fe463fa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af98a720da60b0e1a62aefa5f5cb37c1e">&#9670;&#160;</a></span>v_func()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a3c0a44e4e0a94366ff609e81fe463fa2">&#9670;&#160;</a></span>v_func()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -837,15 +987,15 @@ Private Attributes</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>i</em>, </td> <td class="paramname"><em>i</em>, </td>
</tr> </tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>j</em>, </td> <td class="paramname"><em>j</em>, </td>
</tr> </tr>
<tr> <tr>
@@ -877,14 +1027,14 @@ Private Attributes</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </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#l00020">20</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
</div> </div>
</div> </div>
<a id="abbb832a85139b1a56ebde57d7b8f9a57" name="abbb832a85139b1a56ebde57d7b8f9a57"></a> <a id="ad8bc4df7ab3eed53b16cfdff38e7760b" name="ad8bc4df7ab3eed53b16cfdff38e7760b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbb832a85139b1a56ebde57d7b8f9a57">&#9670;&#160;</a></span>write_simulation_to_dir()</h2> <h2 class="memtitle"><span class="permalink"><a href="#ad8bc4df7ab3eed53b16cfdff38e7760b">&#9670;&#160;</a></span>write_simulation_to_dir()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -904,7 +1054,7 @@ Private Attributes</h2></td></tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
<td class="paramtype">unsigned int&#160;</td> <td class="paramtype">uint&#160;</td>
<td class="paramname"><em>steps</em>, </td> <td class="paramname"><em>steps</em>, </td>
</tr> </tr>
<tr> <tr>
@@ -939,7 +1089,34 @@ Private Attributes</h2></td></tr>
</dd> </dd>
</dl> </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#l00259">259</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>
</div> </div>
@@ -966,7 +1143,7 @@ Private Attributes</h2></td></tr>
<p>Magnetic field strength. </p> <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>
</div> </div>
@@ -992,7 +1169,7 @@ Private Attributes</h2></td></tr>
<p>Characteristic dimension. </p> <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>
</div> </div>
@@ -1015,9 +1192,10 @@ Private Attributes</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
@@ -1040,9 +1218,10 @@ Private Attributes</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
@@ -1068,7 +1247,33 @@ Private Attributes</h2></td></tr>
<p>The particles in the Penning trap. </p> <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>
</div> </div>
@@ -1094,12 +1299,12 @@ Private Attributes</h2></td></tr>
<p>Current time. </p> <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>
</div> </div>
<a id="aaf105828121c4a33cc2b217453c20317" name="aaf105828121c4a33cc2b217453c20317"></a> <a id="a715329844d75ec4c04f8391421fb4e89" name="a715329844d75ec4c04f8391421fb4e89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf105828121c4a33cc2b217453c20317">&#9670;&#160;</a></span>V_0</h2> <h2 class="memtitle"><span class="permalink"><a href="#a715329844d75ec4c04f8391421fb4e89">&#9670;&#160;</a></span>V_0</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -1108,7 +1313,7 @@ Private Attributes</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">std::function&lt;double(double)&gt; PenningTrap::V_0</td> <td class="memname">double PenningTrap::V_0</td>
</tr> </tr>
</table> </table>
</td> </td>
@@ -1120,7 +1325,7 @@ Private Attributes</h2></td></tr>
<p>Applied potential. </p> <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>
</div> </div>

View File

@@ -1,27 +1,31 @@
var classPenningTrap = var classPenningTrap =
[ [
[ "PenningTrap", "classPenningTrap.html#ae670d7de621acdb343b01af098086f63", null ], [ "PenningTrap", "classPenningTrap.html#a5b6c6d4636f3a6e279ccde59d4a345e8", null ],
[ "PenningTrap", "classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1", null ], [ "PenningTrap", "classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f", null ],
[ "PenningTrap", "classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73", null ], [ "PenningTrap", "classPenningTrap.html#addc96789dcfec07b75156e19fee82f4f", null ],
[ "add_particle", "classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8", null ], [ "add_particle", "classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8", null ],
[ "evolve_forward_euler", "classPenningTrap.html#ab9ea97a406534bbe621a95215144875e", null ], [ "evolve_forward_euler", "classPenningTrap.html#ab9ea97a406534bbe621a95215144875e", null ],
[ "evolve_RK4", "classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e", null ], [ "evolve_RK4", "classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e", null ],
[ "external_B_field", "classPenningTrap.html#acbf065c9c125682329ad82a8d166554c", null ], [ "external_B_field", "classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655", null ],
[ "external_E_field", "classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9", null ], [ "external_E_field", "classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22", null ],
[ "force_on_particle", "classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce", null ], [ "force_on_particle", "classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598", null ],
[ "fraction_of_particles_left", "classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b", null ], [ "fraction_of_particles_left", "classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f", null ],
[ "r_func", "classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648", null ], [ "r_func", "classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08", null ],
[ "simulate", "classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854", null ], [ "reinitialize", "classPenningTrap.html#aaee129f177657455348d0c8ae1441dea", null ],
[ "total_force", "classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8", null ], [ "set_pertubation", "classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43", null ],
[ "total_force_external", "classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56", null ], [ "simulate", "classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a", null ],
[ "total_force_particles", "classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b", null ], [ "total_force", "classPenningTrap.html#a9a301b0540078c36697880ef204afdf3", null ],
[ "v_func", "classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e", null ], [ "total_force_external", "classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682", null ],
[ "write_simulation_to_dir", "classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57", 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 ], [ "B_0", "classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716", null ],
[ "d", "classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2", null ], [ "d", "classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2", null ],
[ "k_r", "classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640", null ], [ "k_r", "classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640", null ],
[ "k_v", "classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4", null ], [ "k_v", "classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4", null ],
[ "particles", "classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f", null ], [ "particles", "classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f", null ],
[ "perturbation", "classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5", null ],
[ "t", "classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e", 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> <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"> <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 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 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 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 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 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 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 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 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#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 --> </table></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -99,31 +99,40 @@ $(document).ready(function(){initNavTree('classPenningTrapTest.html',''); initRe
<div class="header"> <div class="header">
<div class="summary"> <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> <a href="classPenningTrapTest-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">PenningTrapTest Class Reference</div></div> <div class="headertitle"><div class="title">PenningTrapTest Class Reference</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<p>Test class for the Penning trap.
<a href="classPenningTrapTest.html#details">More...</a></p>
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Static Public Member Functions</h2></td></tr> 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="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="separator:a542996d72c713636b95e0aa9118f7901"><td class="memSeparator" colspan="2">&#160;</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="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:a6a303be62039ca2ecccd8252744d4dc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="separator:acb806e49a688424588e0c501bc57a230"><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="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="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:addf81fa5692d8146cce5571ccdc5999b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ad668d7d875bdc1909a42426bf9dead9e"><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="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="separator:ae104e04dcd21ac63281c908132fdf255"><td class="memSeparator" colspan="2">&#160;</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="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:a5f4f0b150e54ce463bb29f76d49883f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="separator:a0ee2bbf5e26c115164208b89c5a29e3d"><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> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"> <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#l00020">20</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</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> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="acb806e49a688424588e0c501bc57a230" name="acb806e49a688424588e0c501bc57a230"></a> <a id="ad668d7d875bdc1909a42426bf9dead9e" name="ad668d7d875bdc1909a42426bf9dead9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb806e49a688424588e0c501bc57a230">&#9670;&#160;</a></span>test_external_B_field()</h2> <h2 class="memtitle"><span class="permalink"><a href="#ad668d7d875bdc1909a42426bf9dead9e">&#9670;&#160;</a></span>test_external_B_field()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -132,7 +141,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramname"></td><td>)</td> <td class="paramname"></td><td>)</td>
<td></td> <td></td>
@@ -140,17 +149,19 @@ Static Public Member Functions</h2></td></tr>
</table> </table>
</td> </td>
<td class="mlabels-right"> <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> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
<a id="a542996d72c713636b95e0aa9118f7901" name="a542996d72c713636b95e0aa9118f7901"></a> <a id="a6a303be62039ca2ecccd8252744d4dc8" name="a6a303be62039ca2ecccd8252744d4dc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a542996d72c713636b95e0aa9118f7901">&#9670;&#160;</a></span>test_external_E_field()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a6a303be62039ca2ecccd8252744d4dc8">&#9670;&#160;</a></span>test_external_E_field()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -159,7 +170,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramname"></td><td>)</td> <td class="paramname"></td><td>)</td>
<td></td> <td></td>
@@ -167,17 +178,19 @@ Static Public Member Functions</h2></td></tr>
</table> </table>
</td> </td>
<td class="mlabels-right"> <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> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
<a id="addf81fa5692d8146cce5571ccdc5999b" name="addf81fa5692d8146cce5571ccdc5999b"></a> <a id="a5f4f0b150e54ce463bb29f76d49883f9" name="a5f4f0b150e54ce463bb29f76d49883f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addf81fa5692d8146cce5571ccdc5999b">&#9670;&#160;</a></span>test_force_on_particle()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a5f4f0b150e54ce463bb29f76d49883f9">&#9670;&#160;</a></span>test_force_on_particle()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -186,7 +199,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramname"></td><td>)</td> <td class="paramname"></td><td>)</td>
<td></td> <td></td>
@@ -194,17 +207,19 @@ Static Public Member Functions</h2></td></tr>
</table> </table>
</td> </td>
<td class="mlabels-right"> <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> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
<a id="ae104e04dcd21ac63281c908132fdf255" name="ae104e04dcd21ac63281c908132fdf255"></a> <a id="ae6d0c8e0d80338fb7c7edefc97331046" name="ae6d0c8e0d80338fb7c7edefc97331046"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae104e04dcd21ac63281c908132fdf255">&#9670;&#160;</a></span>test_total_force_external()</h2> <h2 class="memtitle"><span class="permalink"><a href="#ae6d0c8e0d80338fb7c7edefc97331046">&#9670;&#160;</a></span>test_total_force_external()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -213,7 +228,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramname"></td><td>)</td> <td class="paramname"></td><td>)</td>
<td></td> <td></td>
@@ -221,17 +236,19 @@ Static Public Member Functions</h2></td></tr>
</table> </table>
</td> </td>
<td class="mlabels-right"> <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> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
<a id="a0ee2bbf5e26c115164208b89c5a29e3d" name="a0ee2bbf5e26c115164208b89c5a29e3d"></a> <a id="a68449d508e66205bc8b27fa5f60db508" name="a68449d508e66205bc8b27fa5f60db508"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ee2bbf5e26c115164208b89c5a29e3d">&#9670;&#160;</a></span>test_total_force_particles()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a68449d508e66205bc8b27fa5f60db508">&#9670;&#160;</a></span>test_total_force_particles()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -240,7 +257,7 @@ Static Public Member Functions</h2></td></tr>
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <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>(</td>
<td class="paramname"></td><td>)</td> <td class="paramname"></td><td>)</td>
<td></td> <td></td>
@@ -248,12 +265,14 @@ Static Public Member Functions</h2></td></tr>
</table> </table>
</td> </td>
<td class="mlabels-right"> <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> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</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 class="headertitle"><div class="title">Class Index</div></div>
</div><!--header--> </div><!--header-->
<div class="contents"> <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"> <div class="classindex">
<dl class="classindex even"> <dl class="classindex even">
<dt class="alphachar"><a id="letter_P" name="letter_P">P</a></dt> <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> <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>
</div><!-- contents --> </div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->

View File

@@ -111,26 +111,68 @@ $(document).ready(function(){initNavTree('constants_8hpp.html',''); initResizabl
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr> 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="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="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="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="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="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="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> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Library of constants. </p> <div class="textblock"><p>Library of constants. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd> <dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd> <dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl> 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> <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> <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> </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> <a id="a4e451456ad7e9276ed0afa42826e7ccb" name="a4e451456ad7e9276ed0afa42826e7ccb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e451456ad7e9276ed0afa42826e7ccb">&#9670;&#160;</a></span>K_E</h2> <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"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <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> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Coulomb constant. unit: \(\frac{u(\mu m)^3}{(\mu s)^2 e^2}\). </p> <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>
</div> </div>
@@ -156,14 +198,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <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> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>1 Tesla. unit: \( \frac{u}{(\mu s) e} \) </p> <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>
</div> </div>
@@ -174,14 +216,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <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> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>1 Volt. unit: \( \frac{u (\mu m)^2}{(\mu s)^2 e} \) </p> <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>
</div> </div>

View File

@@ -1,5 +1,7 @@
var constants_8hpp = var constants_8hpp =
[ [
[ "CA_CHARGE", "constants_8hpp.html#af7602a3a314957137ad1cd719aa23789", null ],
[ "CA_MASS", "constants_8hpp.html#a2ff491cc7958ffd5e749c518a4a60ec8", null ],
[ "K_E", "constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb", null ], [ "K_E", "constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb", null ],
[ "T", "constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5", null ], [ "T", "constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5", null ],
[ "V", "constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb", 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="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="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="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="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="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="l00018" name="l00018"></a><span class="lineno"> 18</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="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="l00020" name="l00020"></a><span class="lineno"> 20</span> </div> <div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</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="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><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -0,0 +1,132 @@
<!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"><b>animate_100_particles.py</b> <a href="animate__100__particles_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"><b>plot_2_particles.py</b> <a href="plot__2__particles_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"><b>plot_3d.py</b> <a href="plot__3d_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"><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"><b>plot_phase_space.py</b> <a href="plot__phase__space_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"><b>plot_relative_error.py</b> <a href="plot__relative__error_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"><b>plot_single_particle.py</b> <a href="plot__single__particle_8py_source.html">[code]</a></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_source.html", null ],
[ "plot_2_particles.py", "plot__2__particles_8py_source.html", null ],
[ "plot_3d.py", "plot__3d_8py_source.html", null ],
[ "plot_particles_left.py", "plot__particles__left_8py_source.html", null ],
[ "plot_phase_space.py", "plot__phase__space_8py_source.html", null ],
[ "plot_relative_error.py", "plot__relative__error_8py_source.html", null ],
[ "plot_single_particle.py", "plot__single__particle_8py_source.html", null ]
];

View File

@@ -102,10 +102,13 @@ $(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.h
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<table class="memberdecls"> <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> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr> 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="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="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> <tr class="memdesc:main_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">The main program for this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -115,8 +118,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="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="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="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="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="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> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>

View File

@@ -1,10 +1,9 @@
var dir_68267d1309a1af8e8297ef4c3efbcdba = var dir_68267d1309a1af8e8297ef4c3efbcdba =
[ [
[ "animate_100_particles.py", "animate__100__particles_8py_source.html", null ], [ "scripts", "dir_634e799a3947388232110823971192a8.html", "dir_634e799a3947388232110823971192a8" ],
[ "main.cpp", "main_8cpp.html", null ], [ "main.cpp", "main_8cpp.html", "main_8cpp" ],
[ "Particle.cpp", "Particle_8cpp.html", null ], [ "Particle.cpp", "Particle_8cpp.html", null ],
[ "PenningTrap.cpp", "PenningTrap_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" ], [ "test_suite.cpp", "test__suite_8cpp.html", "test__suite_8cpp" ],
[ "utils.cpp", "utils_8cpp.html", "utils_8cpp" ] [ "utils.cpp", "utils_8cpp.html", "utils_8cpp" ]
]; ];

View File

@@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory"> <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_" 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_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> <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,19 @@ $(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_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_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_" 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_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_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_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><b>animate_100_particles.py</b></td><td class="desc"></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_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><b>plot_2_particles.py</b></td><td class="desc"></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_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><b>plot_3d.py</b></td><td class="desc"></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_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><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_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><b>plot_phase_space.py</b></td><td class="desc"></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_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><b>plot_relative_error.py</b></td><td class="desc"></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><b>plot_single_particle.py</b></td><td class="desc"></td></tr>
<tr id="row_1_1_" class="odd"><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="even"><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="odd"><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="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_5_" 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>
</table> </table>
</div><!-- directory --> </div><!-- directory -->
</div><!-- contents --> </div><!-- contents -->

View File

@@ -98,34 +98,97 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
</div> </div>
<div class="contents"> <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> <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> <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> <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_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>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_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#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">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#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap</a></li> </ul>
<li>fraction_of_particles_left()&#160;:&#160;<a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap</a></li>
<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_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> <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>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>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>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> </ul>
<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>
<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>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>test_external_B_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">PenningTrapTest</a></li>
<li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li> <li>test_external_E_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">PenningTrapTest</a></li>
<li>total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li> <li>test_force_on_particle()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">PenningTrapTest</a></li>
<li>V_0&#160;:&#160;<a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap</a></li> <li>test_total_force_external()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">PenningTrapTest</a></li>
<li>v_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap</a></li> <li>test_total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">PenningTrapTest</a></li>
<li>v_vec&#160;:&#160;<a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle</a></li> <li>total_force()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9a301b0540078c36697880ef204afdf3">PenningTrap</a></li>
<li>write_simulation_to_dir()&#160;:&#160;<a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap</a></li> <li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">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> </ul>
</div><!-- contents --> </div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->

View File

@@ -102,19 +102,26 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
<li>add_particle()&#160;:&#160;<a class="el" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap</a></li> <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_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>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_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#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">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#a9ae34ad740a230e667e96bc6ee8730ce">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#a0194be61c956a9259c747c23e4163c5b">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#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</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#ae670d7de621acdb343b01af098086f63">PenningTrap</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#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li> <li>r_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08">PenningTrap</a></li>
<li>simulate()&#160;:&#160;<a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap</a></li> <li>reinitialize()&#160;:&#160;<a class="el" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">PenningTrap</a></li>
<li>total_force()&#160;:&#160;<a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li> <li>set_pertubation()&#160;:&#160;<a class="el" href="classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43">PenningTrap</a></li>
<li>total_force_external()&#160;:&#160;<a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li> <li>simulate()&#160;:&#160;<a class="el" href="classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a">PenningTrap</a></li>
<li>total_force_particles()&#160;:&#160;<a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li> <li>test_external_B_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">PenningTrapTest</a></li>
<li>v_func()&#160;:&#160;<a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap</a></li> <li>test_external_E_field()&#160;:&#160;<a class="el" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">PenningTrapTest</a></li>
<li>write_simulation_to_dir()&#160;:&#160;<a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap</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_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> </ul>
</div><!-- contents --> </div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->

View File

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

View File

@@ -98,21 +98,72 @@ $(document).ready(function(){initNavTree('globals.html',''); initResizable(); })
</div> </div>
<div class="contents"> <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>__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> <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> <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> <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>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>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="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">main.cpp</a></li>
<li>potential_resonance_narrow_sweep_interaction()&#160;:&#160;<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>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_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_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#a8502989b1b361725834fc185bd575f66">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> <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>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> </ul>
</div><!-- contents --> </div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->

View File

@@ -101,6 +101,8 @@ $(document).ready(function(){initNavTree('globals_defs.html',''); initResizable(
&#160;<ul> &#160;<ul>
<li>__METHOD_NAME__&#160;:&#160;<a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li> <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>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>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>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> <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"> <div class="contents">
&#160;<ul> &#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>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>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="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">main.cpp</a></li>
<li>potential_resonance_narrow_sweep_interaction()&#160;:&#160;<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>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> </ul>
</div><!-- contents --> </div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->

View File

@@ -100,9 +100,10 @@ $(document).ready(function(){initNavTree('globals_type.html',''); initResizable(
<div class="contents"> <div class="contents">
&#160;<ul> &#160;<ul>
<li>sim_arr&#160;:&#160;<a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</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_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#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li> <li>sim_rows&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">typedefs.hpp</a></li>
<li>vec_3d&#160;:&#160;<a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">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> </ul>
</div><!-- contents --> </div><!-- contents -->
</div><!-- doc-content --> </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,65 @@ $(document).ready(function(){initNavTree('index.html',''); initResizable(); });
<div class="textblock"><p><a class="anchor" id="md_README"></a> </p><div class="image"> <div class="textblock"><p><a class="anchor" id="md_README"></a> </p><div class="image">
<img src="100_particles.gif" alt=""/> <img src="100_particles.gif" alt=""/>
</div> </div>
<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> <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>
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_md4"></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_md5"></a>
Running programs</h1>
<h2><a class="anchor" id="autotoc_md6"></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_md7"></a>
Python scripts</h2>
<h3><a class="anchor" id="autotoc_md8"></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_md9"></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 --><h1><a class="anchor" id="autotoc_md10"></a>
Credits</h1> Credits</h1>
<p>The Doxygen theme used here is <a href="https://github.com/jothepro/doxygen-awesome-css">doxygen-awesome-css</a>. </p> <p>The Doxygen theme used here is <a href="https://github.com/jothepro/doxygen-awesome-css">doxygen-awesome-css</a>. </p>
</div></div><!-- PageDoc --> </div></div><!-- PageDoc -->

View File

@@ -109,12 +109,13 @@ $(document).ready(function(){initNavTree('main_8cpp.html',''); initResizable();
<p>The main program for this project. <p>The main program for this project.
<a href="#details">More...</a></p> <a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cmath&gt;</code><br /> <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;fstream&gt;</code><br />
<code>#include &lt;omp.h&gt;</code><br /> <code>#include &lt;omp.h&gt;</code><br />
<code>#include &lt;string&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 &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="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 /> <code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
</div> </div>
<p><a href="main_8cpp_source.html">Go to the source code of this file.</a></p> <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> 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="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="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="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"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr> 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="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="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="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="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="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="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="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="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="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="separator:a330668384dc073980ba11116309bacc5"><td class="memSeparator" colspan="2">&#160;</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="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> <tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr> Variables</h2></td></tr>
<tr class="memitem:a87da4ef9f2cd753579484824310467b8"><td class="memItemLeft" align="right" valign="top"><a id="a87da4ef9f2cd753579484824310467b8" name="a87da4ef9f2cd753579484824310467b8"></a> <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> (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> <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="separator:a87da4ef9f2cd753579484824310467b8"><td class="memSeparator" colspan="2">&#160;</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="memitem:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memItemLeft" align="right" valign="top"><a id="a90f661586eb3c318fdca6f95ebc4fc46" name="a90f661586eb3c318fdca6f95ebc4fc46"></a> <tr class="separator:a2efa69bb9d93049429ce4637075f1d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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="memitem:ac70b61df65f4336f57ea9b4c35250df7"><td class="memItemLeft" align="right" valign="top"><a id="ac70b61df65f4336f57ea9b4c35250df7" name="ac70b61df65f4336f57ea9b4c35250df7"></a>
<tr class="separator:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memSeparator" colspan="2">&#160;</td></tr> <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> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The main program for this project. </p> <div class="textblock"><p>The main program for this project. </p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd> <dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd> <dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl> 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#_bug000006">Bug:</a></b></dt><dd>No known bugs </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="main_8cpp_source.html">main.cpp</a>.</p> <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> </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> <a id="a0240ac851181b84ac374872dc5434ee4" name="a0240ac851181b84ac374872dc5434ee4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0240ac851181b84ac374872dc5434ee4">&#9670;&#160;</a></span>N</h2> <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"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">#define N&#160;&#160;&#160;10000</td> <td class="memname">#define N&#160;&#160;&#160;40000</td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
@@ -224,11 +205,40 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</div><div class="memdoc"> </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>
</div> </div>
<h2 class="groupheader">Function Documentation</h2> <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> <a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2> <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> </table>
</div><div class="memdoc"> </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#l00309">309</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#l00206">206</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#l00262">262</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#l00149">149</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -263,26 +339,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</div><div class="memdoc"> </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> <p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00132">132</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</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>
</div> </div>
</div> </div>
@@ -301,7 +360,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</div><div class="memdoc"> </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#l00054">54</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -320,7 +381,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</div><div class="memdoc"> </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#l00087">87</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -339,7 +402,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</div><div class="memdoc"> </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#l00069">69</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
</div> </div>
</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,347 @@ $(document).ready(function(){initNavTree('main_8cpp_source.html',''); initResiza
<div class="contents"> <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> <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="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="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;omp.h&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;string&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;sys/stat.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="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="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="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="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> </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><span class="preprocessor">#define PARTICLES 100</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 N 10000</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 CHARGE 1.</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><span class="preprocessor">#define MASS 40. </span><span class="comment">// unit: amu</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> </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"> 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="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"> 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="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="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="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="l00032" name="l00032"></a><span class="lineno"> 32</span>{</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</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="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="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="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="l00035" name="l00035"></a><span class="lineno"> 35</span> </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="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="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="l00037" name="l00037"></a><span class="lineno"> 37</span> </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="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="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="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="l00045" name="l00045"></a><span class="lineno"> 45</span> std::complex&lt;double&gt; f =</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>}</div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> A_p * std::exp(std::complex&lt;double&gt;(0., -w_p * t))</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> + A_n * std::exp(std::complex&lt;double&gt;(0., -w_n * t));</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="l00048" name="l00048"></a><span class="lineno"> 48</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="l00043" name="l00043"></a><span class="lineno"> 43</span>{</div> <div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> res;</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="l00050" name="l00050"></a><span class="lineno"> 50</span>}</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="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div> <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6"> 54</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="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="l00055" name="l00055"></a><span class="lineno"> 55</span>{</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div> <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment">// Initialize trap with particle 1</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="l00057" name="l00057"></a><span class="lineno"> 57</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="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="l00058" name="l00058"></a><span class="lineno"> 58</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="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></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="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>}</div> <div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// Simulate and write results to file</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div> <div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</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="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="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>{</div> <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>}</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div> <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</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="l00069" name="l00069"></a><span class="lineno"><a class="line" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1"> 69</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="l00059" name="l00059"></a><span class="lineno"> 59</span> </div> <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</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="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// Initialize traps with particles</span></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="l00072" name="l00072"></a><span class="lineno"> 72</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="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="l00073" name="l00073"></a><span class="lineno"> 73</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="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="l00074" name="l00074"></a><span class="lineno"> 74</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="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</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="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="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// Simulate and write results to files</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>{</div> <div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> trap_no_interaction.<a class="code hl_function" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a>(</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="l00079" name="l00079"></a><span class="lineno"> 79</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="l00080" name="l00080"></a><span class="lineno"> 80</span> [](<span class="keywordtype">double</span> t) {</div> <div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> trap_with_interaction.write_simulation_to_dir(</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="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction&quot;</span>, time, N);</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="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="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="l00087" name="l00087"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2"> 87</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="l00085" name="l00085"></a><span class="lineno"> 85</span> </div> <div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</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="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">double</span> time = 50.; <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="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="l00091" name="l00091"></a><span class="lineno"> 91</span> std::ofstream ofile;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span>{</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="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="comment">// Calculate relative error for RK4</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div> <div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> std::string path = <span class="stringliteral">&quot;output/relative_error/RK4/&quot;</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="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</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="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor">#pragma omp parallel for</span></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="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</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="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">int</span> steps = 4000 * std::pow(2, i);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div> <div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">double</span> dt = time / (double)steps;</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="l00100" name="l00100"></a><span class="lineno"> 100</span> ofile.open(path + std::to_string(steps) + <span class="stringliteral">&quot;_steps.txt&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="l00101" name="l00101"></a><span class="lineno"> 101</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="l00102" name="l00102"></a><span class="lineno"> 102</span> </div> <div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</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="l00103" name="l00103"></a><span class="lineno"> 103</span> std::ofstream ofile;</div> <div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; steps; i++) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div> <div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> ofile &lt;&lt; arma::norm(res.r_vecs[0][i]</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="l00105" name="l00105"></a><span class="lineno"> 105</span> - <a class="code hl_function" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a>(dt * i))</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="l00106" name="l00106"></a><span class="lineno"> 106</span> &lt;&lt; <span class="charliteral">&#39;\n&#39;</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="l00107" name="l00107"></a><span class="lineno"> 107</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="l00108" name="l00108"></a><span class="lineno"> 108</span> ofile.close();</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="l00109" name="l00109"></a><span class="lineno"> 109</span> }</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="l00110" name="l00110"></a><span class="lineno"> 110</span> </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="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="comment">// Calculate relative error for forward Euler</span></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="l00112" name="l00112"></a><span class="lineno"> 112</span> path = <span class="stringliteral">&quot;output/relative_error/euler/&quot;</span>;</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="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> },</div> <div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> 500., 0.);</div> <div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</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="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordtype">int</span> steps = 4000 * std::pow(2, i);</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="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordtype">double</span> dt = time / (double)steps;</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="l00118" name="l00118"></a><span class="lineno"> 118</span> ofile.open(path + std::to_string(steps) + <span class="stringliteral">&quot;_steps.txt&quot;</span>);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</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(std::vector&lt;Particle&gt;{<a class="code hl_variable" href="main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30">p1</a>});</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ofile.close();</div> <div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</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="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div> <div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; steps; i++) {</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}</div> <div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> ofile &lt;&lt; arma::norm(res.r_vecs[0][i]</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div> <div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> - <a class="code hl_function" href="main_8cpp.html#a8d92fb2ad085065fbd14718647551657">analytical_solution_particle_1</a>(dt * i))</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="l00124" name="l00124"></a><span class="lineno"> 124</span> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>{</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="l00126" name="l00126"></a><span class="lineno"> 126</span> ofile.close();</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> simulate_single_particle();</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="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="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="l00132" name="l00132"></a><span class="lineno"><a class="line" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513"> 132</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="l00131" name="l00131"></a><span class="lineno"> 131</span> simulate_single_particle_with_different_steps();</div> <div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>{</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div> <div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((<span class="keywordtype">unsigned</span>)100);</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="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div> <div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</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="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div> <div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> trap.<a class="code hl_function" href="classPenningTrap.html#ad8bc4df7ab3eed53b16cfdff38e7760b">write_simulation_to_dir</a>(<span class="stringliteral">&quot;output/simulate_100_particles&quot;</span>, time, N,</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="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="stringliteral">&quot;rk4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div> <div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</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="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div> <div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1"> 149</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="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="l00150" name="l00150"></a><span class="lineno"> 150</span>{</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div> <div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordtype">double</span> time = 500.;</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="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div> <div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</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> <span class="keywordtype">double</span> freq_start = .2;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordtype">double</span> freq_end = 2.5;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordtype">double</span> freq_increment = .02;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordtype">size_t</span> freq_iterations =</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> (size_t)((freq_end - freq_start) / freq_increment) + 1;</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="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</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::ofstream ofile;</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><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="comment">// Insert frequencies</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; freq_iterations; i++) {</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> res[0][i] = freq_start + freq_increment * i;</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> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="preprocessor">#pragma omp parallel</span></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> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)100);</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</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="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> res[i + 1][j] =</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</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="l00186" name="l00186"></a><span class="lineno"> 186</span> }</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> }</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> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> ofile.open(path + <span class="stringliteral">&quot;wide_sweep.txt&quot;</span>);</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</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="l00193" name="l00193"></a><span class="lineno"> 193</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="l00194" name="l00194"></a><span class="lineno"> 194</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</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> ofile.close();</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span>}</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea"> 206</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="l00207" name="l00207"></a><span class="lineno"> 207</span>{</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordtype">double</span> time = 500.;</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> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordtype">double</span> freq_start = 1.;</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">double</span> freq_end = 1.7;</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordtype">double</span> freq_increment = .002;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <span class="keywordtype">size_t</span> freq_iterations = (size_t)((freq_end - freq_start) / freq_increment);</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> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</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> std::ofstream ofile;</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> </div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span><span class="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="comment">// Insert frequencies</span></div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</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="l00227" name="l00227"></a><span class="lineno"> 227</span> res[0][i] = freq_start + freq_increment * i;</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="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> {</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)100);</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</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="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> res[i + 1][j] =</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</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="l00242" name="l00242"></a><span class="lineno"> 242</span> }</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> }</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> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> ofile.open(path + <span class="stringliteral">&quot;narrow_sweep.txt&quot;</span>);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</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="l00249" name="l00249"></a><span class="lineno"> 249</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="l00250" name="l00250"></a><span class="lineno"> 250</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</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> ofile.close();</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> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb"> 262</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="l00263" name="l00263"></a><span class="lineno"> 263</span>{</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <span class="keywordtype">double</span> time = 500.;</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"> 266</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</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> freq_start = 1.;</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="keywordtype">double</span> freq_end = 1.7;</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordtype">double</span> freq_increment = .002;</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keywordtype">size_t</span> freq_iterations = (size_t)((freq_end - freq_start) / freq_increment);</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"> 273</span> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> </div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> std::string path = <span class="stringliteral">&quot;output/time_dependent_potential/&quot;</span>;</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</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> std::ofstream ofile;</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="preprocessor">#pragma omp parallel for</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</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="l00282" name="l00282"></a><span class="lineno"> 282</span> res[0][i] = freq_start + freq_increment * i;</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><span class="preprocessor">#pragma omp parallel</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> {</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="comment">// Each thread creates a PenningTrap instance and reuses it throughout</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="comment">// the sweep.</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((uint)100);</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span><span class="preprocessor">#pragma omp for collapse(2)</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</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="l00293" name="l00293"></a><span class="lineno"> 293</span> <span class="comment">// Reset particles and give new time dependent potential.</span></div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> trap.<a class="code hl_function" href="classPenningTrap.html#aaee129f177657455348d0c8ae1441dea">reinitialize</a>(amplitudes[i], res[0][j]);</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</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="l00296" name="l00296"></a><span class="lineno"> 296</span> }</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> }</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</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> <span class="comment">// Write results to file</span></div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> ofile.open(path + <span class="stringliteral">&quot;narrow_sweep_interactions.txt&quot;</span>);</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</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="l00303" name="l00303"></a><span class="lineno"> 303</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="l00304" name="l00304"></a><span class="lineno"> 304</span> &lt;&lt; res[3][i] &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> }</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> ofile.close();</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span>}</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><span class="keywordtype">int</span> main()</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> <span class="keywordtype">double</span> start, end, t1, t2;</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> start = omp_get_wtime();</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> <a class="code hl_function" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a>();</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> <a class="code hl_function" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a>();</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> </div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <a class="code hl_function" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a>();</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> t2 = omp_get_wtime();</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> </div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Time single and double : &quot;</span> &lt;&lt; (t2 - start)</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> </div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> t1 = omp_get_wtime();</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> <a class="code hl_function" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</a>();</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> t2 = omp_get_wtime();</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> std::cout &lt;&lt; <span class="stringliteral">&quot;Time 100 particles : &quot;</span> &lt;&lt; (t2 - t1)</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> </div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> t1 = omp_get_wtime();</div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> </div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <a class="code hl_function" href="main_8cpp.html#a6b38b477c18e2f4268779751a88edab1">potential_resonance_wide_sweep</a>();</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> </div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> t2 = omp_get_wtime();</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> std::cout &lt;&lt; <span class="stringliteral">&quot;Time wide sweep : &quot;</span> &lt;&lt; (t2 - t1)</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> </div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> t1 = omp_get_wtime();</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> </div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <a class="code hl_function" href="main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea">potential_resonance_narrow_sweep</a>();</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> </div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> t2 = omp_get_wtime();</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> </div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Time narrow sweep no interaction : &quot;</span> &lt;&lt; (t2 - t1)</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</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> t1 = omp_get_wtime();</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> <a class="code hl_function" href="main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb">potential_resonance_narrow_sweep_interaction</a>();</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> t2 = omp_get_wtime();</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> std::cout &lt;&lt; <span class="stringliteral">&quot;Time narrow sweep with interaction: &quot;</span> &lt;&lt; (t2 - t1)</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> </div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> end = omp_get_wtime();</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> </div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Time : &quot;</span> &lt;&lt; (end - start)</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> &lt;&lt; <span class="stringliteral">&quot; seconds&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> </div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</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="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"><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#l00030">PenningTrap.hpp:30</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_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_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#l00148">PenningTrap.cpp:148</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_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#l00297">PenningTrap.cpp:297</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="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#l00259">PenningTrap.cpp:259</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"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</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="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#l00132">main.cpp:132</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#l00206">main.cpp:206</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#l00149">main.cpp:149</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#l00069">main.cpp:69</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#l00054">main.cpp:54</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#l00262">main.cpp:262</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#l00087">main.cpp:87</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"><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_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_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><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -29,14 +29,39 @@ var menudata={children:[
{text:"Class List",url:"annotated.html"}, {text:"Class List",url:"annotated.html"},
{text:"Class Index",url:"classes.html"}, {text:"Class Index",url:"classes.html"},
{text:"Class Members",url:"functions.html",children:[ {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:"Functions",url:"functions_func.html"},
{text:"Variables",url:"functions_vars.html"}, {text:"Variables",url:"functions_vars.html"},
{text:"Related Functions",url:"functions_rela.html"}]}]}, {text:"Related Functions",url:"functions_rela.html"}]}]},
{text:"Files",url:"files.html",children:[ {text:"Files",url:"files.html",children:[
{text:"File List",url:"files.html"}, {text:"File List",url:"files.html"},
{text:"File Members",url:"globals.html",children:[ {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:"Functions",url:"globals_func.html"},
{text:"Variables",url:"globals_vars.html"},
{text:"Typedefs",url:"globals_type.html"}, {text:"Typedefs",url:"globals_type.html"},
{text:"Macros",url:"globals_defs.html"}]}]}]} {text:"Macros",url:"globals_defs.html"}]}]}]}

View File

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

View File

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

View File

@@ -0,0 +1,153 @@
<!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">
<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> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> files = [</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_1_r.txt&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> ]</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> labels = [</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;particle 1 no interaction&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;particle 2 no interaction&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">&quot;particle 1 with interaction&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">&quot;particle 2 with interaction&quot;</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> colors = [</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;salmon&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="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> lines = f.readlines()</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</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="l00028" name="l00028"></a><span class="lineno"> 28</span> plt.plot(r[:,0], r[:,1], label=label, color=color)</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> plt.xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> plt.ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> plt.title(<span class="stringliteral">r&quot;2 particles with and without interactions.&quot;</span>)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="comment"># plt.legend()</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> plt.savefig(<span class="stringliteral">&quot;../latex/images/plot_2_particles_xy.pdf&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> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</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"><b>plot_2_particles.py</b></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,154 @@
<!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">
<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> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> files = [</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/particle_1_r.txt&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> ]</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> labels = [</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;particle 1 no interaction&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;particle 2 no interaction&quot;</span>,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">&quot;particle 1 with interaction&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">&quot;particle 2 with interaction&quot;</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> colors = [</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;deepskyblue&quot;</span>,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;darkred&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> ax = plt.figure().add_subplot(projection=<span class="stringliteral">&quot;3d&quot;</span>)</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> lines = f.readlines()</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</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="l00029" name="l00029"></a><span class="lineno"> 29</span> ax.plot(r[:,0], r[:,1], r[:,2], label=label, color=color)</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> ax.set_xlabel(<span class="stringliteral">r&quot;x $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> ax.set_ylabel(<span class="stringliteral">r&quot;y $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ax.set_zlabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> plt.title(<span class="stringliteral">r&quot;2 particles with and without interactions.&quot;</span>)</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> plt.legend()</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> plt.savefig(<span class="stringliteral">&quot;../latex/images/3d_plot.pdf&quot;</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"> 39</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</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"><b>plot_3d.py</b></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 http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/> <meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <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"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -102,44 +102,79 @@ $(document).ready(function(){initNavTree('plot__particles__left_8py_source.html'
</div><!--header--> </div><!--header-->
<div class="contents"> <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="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="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</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="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> files = [</div> <div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span>sns.set_theme()</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="l00005" name="l00005"></a><span class="lineno"> 5</span>params = {</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="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;font.family&quot;</span>: <span class="stringliteral">&quot;Serif&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="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;font.serif&quot;</span>: <span class="stringliteral">&quot;Roman&quot;</span>, </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> ]</div> <div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">&quot;text.usetex&quot;</span>: <span class="keyword">True</span>,</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> vals = [</div> <div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">&quot;axes.titlesize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> .1,</div> <div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="stringliteral">&quot;axes.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> .4,</div> <div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">&quot;xtick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> .7</div> <div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;ytick.labelsize&quot;</span>: <span class="stringliteral">&quot;large&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> ]</div> <div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;legend.fontsize&quot;</span>: <span class="stringliteral">&quot;medium&quot;</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="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="keyword">with</span> open(files[i]) <span class="keyword">as</span> f:</div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span>plt.rcParams.update(params)</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> lines = f.readlines()</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> x = []</div> <div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> y = []</div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> colors = [</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="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</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="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">&quot;deepskyblue&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="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">&quot;salmon&quot;</span>,</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="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;tomato&quot;</span>,</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="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;mediumaquamarine&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;mediumseagreen&quot;</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="l00025" name="l00025"></a><span class="lineno"> 25</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="l00026" name="l00026"></a><span class="lineno"> 26</span> files = [</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="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">&quot;output/time_dependent_potential/wide_sweep.txt&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="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep.txt&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="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">&quot;output/time_dependent_potential/narrow_sweep_interactions.txt&quot;</span>,</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> plt.show()</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> </div> <div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> outputs = [</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="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">&quot;../latex/images/wide_sweep.pdf&quot;</span>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> main()</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="stringliteral">&quot;../latex/images/narrow_sweep.pdf&quot;</span>,</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="stringliteral">&quot;../latex/images/narrow_sweep_interactions.pdf&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> <span class="keywordflow">for</span> file, output <span class="keywordflow">in</span> zip(files, outputs):</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">with</span> open(file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> lines = f.readlines()</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> x = []</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> y1 = []</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> y2 = []</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> y3 = []</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</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> l = line.strip().split(<span class="stringliteral">&quot;,&quot;</span>)</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> x.append(float(l[0]))</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> y1.append(float(l[1]))</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> y2.append(float(l[2]))</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> y3.append(float(l[3]))</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> fig, ax = plt.subplots()</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</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="l00052" name="l00052"></a><span class="lineno"> 52</span> ax.plot(x, y2, label=<span class="stringliteral">r&quot;$f_{2} = 0.4$&quot;</span>, color=colors[2])</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> ax.plot(x, y3, label=<span class="stringliteral">r&quot;$f_{3} = 0.7$&quot;</span>, color=colors[4])</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> ax.set_xlabel(<span class="stringliteral">r&quot;Frequency $\omega_V$ (MHz)&quot;</span>)</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment"># ax.set_xlim((0, 2.8))</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> ax.set_ylabel(<span class="stringliteral">r&quot;Fraction of particles left&quot;</span>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment"># ax.set_ylim((-0.1, 1.1))</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</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="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment"># &quot;after 500 microseconds for different amplitudes and frequencies&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> ax.legend(loc=<span class="stringliteral">&quot;upper right&quot;</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> <span class="comment"># plt.show()</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> fig.savefig(output, bbox_inches=<span class="stringliteral">&quot;tight&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><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> main()</div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul> <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"><b>plot_particles_left.py</b></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> <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> </ul>
</div> </div>

View File

@@ -0,0 +1,167 @@
<!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">
<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> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> directories = {</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/simulate_2_particles/no_interaction/&quot;</span>,</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/simulate_2_particles/with_interaction/&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> titles = {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="stringliteral">&quot;particles without interaction&quot;</span>,</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">&quot;particles with interaction&quot;</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> files = [</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">&quot;particle_0_r.txt&quot;</span>,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">&quot;particle_0_v.txt&quot;</span>,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="stringliteral">&quot;particle_1_r.txt&quot;</span>,</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="stringliteral">&quot;particle_1_v.txt&quot;</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"> 19</span> labels = [</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">r&quot;particle 1 r&quot;</span>,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">r&quot;particle 1 v&quot;</span>,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">r&quot;particle 2 r&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">r&quot;particle 2 v&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> colors = [</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;lightskyblue&quot;</span>,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">&quot;deepskyblue&quot;</span>,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">&quot;salmon&quot;</span>,</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">&quot;tomato&quot;</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> fig1, axs1 = plt.subplots(2,1)</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> fig2, axs2 = plt.subplots(2,1)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">for</span> i, (dir, title) <span class="keywordflow">in</span> enumerate(zip(directories, titles)):</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">for</span> label, color, file <span class="keywordflow">in</span> zip(labels, colors, files):</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> lines = f.readlines()</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</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="l00039" name="l00039"></a><span class="lineno"> 39</span> axs1[i].plot(t, r[:,0], label=label, color=color)</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> axs2[i].plot(t, r[:,2], label=label, color=color)</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> axs1[i].set(xlabel=<span class="stringliteral">r&quot;t $(\mu s)$&quot;</span>, ylabel = <span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</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> axs1[i].legend()</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> axs1[i].set_title(title)</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="comment"># plt.show()</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> fig1.savefig(<span class="stringliteral">&quot;../latex/images/phase_space_2_particles_x.pdf&quot;</span>)</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> fig2.savefig(<span class="stringliteral">&quot;../latex/images/phase_space_2_particles_z.pdf&quot;</span>)</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> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</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"><b>plot_phase_space.py</b></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,165 @@
<!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">
<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> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> directories = [</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">&quot;output/relative_error/RK4/&quot;</span>,</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">&quot;output/relative_error/euler/&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> files = [</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="stringliteral">&quot;4000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">&quot;8000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">&quot;16000_steps.txt&quot;</span>,</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">&quot;32000_steps.txt&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"> 15</span> labels = [</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="stringliteral">r&quot;4000 steps&quot;</span>,</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="stringliteral">r&quot;8000 steps&quot;</span>,</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">r&quot;16000 steps&quot;</span>,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">r&quot;32000 steps&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"> 21</span> titles = [</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">&quot;Relative error for the RK4 method&quot;</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;Relative error for the forward Euler method&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> methods = [</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">&quot;rk4&quot;</span>,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">&quot;euler&quot;</span></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> fig1, axs1 = plt.subplots(2,1)</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</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="l00031" name="l00031"></a><span class="lineno"> 31</span> max_err = []</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">for</span> label, file <span class="keywordflow">in</span> zip(labels, files):</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">with</span> open(dir+file) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> lines = f.readlines()</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</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="l00037" name="l00037"></a><span class="lineno"> 37</span> max_err.append(max(r))</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> axs1[i].plot(t, r, label=label)</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> 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="l00041" name="l00041"></a><span class="lineno"> 41</span> axs1[i].legend()</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> axs1[i].set_title(title)</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> 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="l00045" name="l00045"></a><span class="lineno"> 45</span> print(f<span class="stringliteral">&quot;{methods[i]}: {conv_rate}&quot;</span>)</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> fig1.savefig(<span class="stringliteral">&quot;../latex/images/phase_space_2_particles_x.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> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</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"><b>plot_relative_error.py</b></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,144 @@
<!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">
<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> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">def </span>z(t):</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> V_0 = 25.*9.64852558 * 10**4</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> m = 40.</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> d = 500.</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> w_z = np.sqrt((2.*V_0)/(m*d*d))</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keywordflow">return</span> 20.*np.cos(w_z*t)</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">def </span>main():</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> filename = <span class="stringliteral">&quot;output/simulate_single_particle/particle_0_r.txt&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> r = t = []</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">with</span> open(filename) <span class="keyword">as</span> f:</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> lines = f.readlines()</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> t = np.linspace(0, 50, len(lines))</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</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="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> plt.plot(t, r[:, 2], label=<span class="stringliteral">&quot;approximation&quot;</span>)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> plt.plot(t, z(t), label=<span class="stringliteral">&quot;analytical&quot;</span>)</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> plt.xlabel(<span class="stringliteral">r&quot;time $(\mu s)$&quot;</span>)</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> plt.ylabel(<span class="stringliteral">r&quot;z $(\mu m)$&quot;</span>)</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> plt.title(<span class="stringliteral">r&quot;Movement of a single particle in the x direction&quot;</span>)</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> plt.legend()</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="comment"># plt.savefig(&quot;../latex/images/single_particle.pdf&quot;)</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> plt.show()</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> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</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"><b>plot_single_particle.py</b></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,6 @@
var searchData= var searchData=
[ [
['add_5fparticle_0',['add_particle',['../classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8',1,'PenningTrap']]], ['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']]],
['assert_2',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]] ['assert_2',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= 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= 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_5fforward_5feuler_0',['evolve_forward_euler',['../classPenningTrap.html#ab9ea97a406534bbe621a95215144875e',1,'PenningTrap']]],
['evolve_5frk4_1',['evolve_RK4',['../classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e',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_5fb_5ffield_2',['external_B_field',['../classPenningTrap.html#a361f2c4862c90b5e8e2a2f50c6a95655',1,'PenningTrap']]],
['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9',1,'PenningTrap']]] ['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22',1,'PenningTrap']]]
]; ];

View File

@@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce',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#a0194be61c956a9259c747c23e4163c5b',1,'PenningTrap']]] ['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f',1,'PenningTrap']]]
]; ];

View File

@@ -1,12 +1,18 @@
var searchData= var searchData=
[ [
['particle_0',['Particle',['../classParticle.html',1,'Particle'],['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle::Particle()']]], ['p1_0',['p1',['../main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30',1,'main.cpp']]],
['particle_2ecpp_1',['Particle.cpp',['../Particle_8cpp.html',1,'']]], ['p2_1',['p2',['../main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7',1,'main.cpp']]],
['particle_2ehpp_2',['Particle.hpp',['../Particle_8hpp.html',1,'']]], ['particle_2',['Particle',['../classParticle.html#af1d7535fb8311eaa77d2b7b345882ec4',1,'Particle::Particle()'],['../classParticle.html',1,'Particle']]],
['particles_3',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]], ['particle_2ecpp_3',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
['penning_20trap_20simulation_4',['Penning trap simulation',['../index.html',1,'']]], ['particle_2ehpp_4',['Particle.hpp',['../Particle_8hpp.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.)']]], ['particles_5',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]],
['penningtrap_2ecpp_6',['PenningTrap.cpp',['../PenningTrap_8cpp.html',1,'']]], ['penning_20trap_20simulation_6',['Penning trap simulation',['../index.html',1,'']]],
['penningtrap_2ehpp_7',['PenningTrap.hpp',['../PenningTrap_8hpp.html',1,'']]], ['penningtrap_7',['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#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.)'],['../classPenningTrap.html#a830be1b8cbf59664e060b6edbeaa302f',1,'PenningTrap::PenningTrap(uint i, double B_0=T, double V_0=(25. *V)/1000., double d=500., double t=0.)'],['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle::PenningTrap()'],['../classPenningTrap.html',1,'PenningTrap']]],
['penningtraptest_8',['PenningTrapTest',['../classPenningTrapTest.html',1,'']]] ['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']]],
['potential_5fresonance_5fnarrow_5fsweep_12',['potential_resonance_narrow_sweep',['../main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'main.cpp']]],
['potential_5fresonance_5fnarrow_5fsweep_5finteraction_13',['potential_resonance_narrow_sweep_interaction',['../main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'main.cpp']]],
['potential_5fresonance_5fwide_5fsweep_14',['potential_resonance_wide_sweep',['../main_8cpp.html#a6b38b477c18e2f4268779751a88edab1',1,'main.cpp']]]
]; ];

View File

@@ -1,5 +1,6 @@
var searchData= var searchData=
[ [
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648',1,'PenningTrap']]], ['r_5ffunc_0',['r_func',['../classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08',1,'PenningTrap']]],
['r_5fvec_1',['r_vec',['../classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6',1,'Particle']]] ['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= 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']]], ['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']]], ['set_5fpertubation_1',['set_pertubation',['../classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43',1,'PenningTrap']]],
['sim_5fcols_2',['sim_cols',['../typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23',1,'typedefs.hpp']]], ['sim_5farr_2',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]],
['sim_5frows_3',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]], ['sim_5fcols_3',['sim_cols',['../typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f',1,'typedefs.hpp']]],
['simulate_4',['simulate',['../classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854',1,'PenningTrap']]] ['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,14 @@ var searchData=
[ [
['t_0',['t',['../classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e',1,'PenningTrap']]], ['t_0',['t',['../classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e',1,'PenningTrap']]],
['t_1',['T',['../constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5',1,'constants.hpp']]], ['t_1',['T',['../constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5',1,'constants.hpp']]],
['test_5fsuite_2ecpp_2',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]], ['test_5fexternal_5fb_5ffield_2',['test_external_B_field',['../classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e',1,'PenningTrapTest']]],
['total_5fforce_3',['total_force',['../classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8',1,'PenningTrap']]], ['test_5fexternal_5fe_5ffield_3',['test_external_E_field',['../classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8',1,'PenningTrapTest']]],
['total_5fforce_5fexternal_4',['total_force_external',['../classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56',1,'PenningTrap']]], ['test_5fforce_5fon_5fparticle_4',['test_force_on_particle',['../classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9',1,'PenningTrapTest']]],
['total_5fforce_5fparticles_5',['total_force_particles',['../classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b',1,'PenningTrap']]], ['test_5fsuite_2ecpp_5',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
['typedefs_2ehpp_6',['typedefs.hpp',['../typedefs_8hpp.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_5fparticles_10',['total_force_particles',['../classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c',1,'PenningTrap']]],
['typedefs_2ehpp_11',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
]; ];

View File

@@ -1,8 +1,8 @@
var searchData= var searchData=
[ [
['v_0',['V',['../constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb',1,'constants.hpp']]], ['v_0',['V',['../constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb',1,'constants.hpp']]],
['v_5f0_1',['V_0',['../classPenningTrap.html#aaf105828121c4a33cc2b217453c20317',1,'PenningTrap']]], ['v_5f0_1',['V_0',['../classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89',1,'PenningTrap']]],
['v_5ffunc_2',['v_func',['../classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e',1,'PenningTrap']]], ['v_5ffunc_2',['v_func',['../classPenningTrap.html#a3c0a44e4e0a94366ff609e81fe463fa2',1,'PenningTrap']]],
['v_5fvec_3',['v_vec',['../classParticle.html#a879692772803d6ab65fa4993b54aea6e',1,'Particle']]], ['v_5fvec_3',['v_vec',['../classParticle.html#a3a10400add8dd22b8031330c2aafb6fe',1,'Particle']]],
['vec_5f3d_4',['vec_3d',['../typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df',1,'typedefs.hpp']]] ['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= 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= 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= 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= 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,5 +1,5 @@
var searchData= var searchData=
[ [
['add_5fparticle_0',['add_particle',['../classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8',1,'PenningTrap']]], ['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= var searchData=
[ [
['evolve_5fforward_5feuler_0',['evolve_forward_euler',['../classPenningTrap.html#ab9ea97a406534bbe621a95215144875e',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']]]
['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']]]
]; ];

View File

@@ -1,5 +1,7 @@
var searchData= var searchData=
[ [
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce',1,'PenningTrap']]], ['evolve_5fforward_5feuler_0',['evolve_forward_euler',['../classPenningTrap.html#ab9ea97a406534bbe621a95215144875e',1,'PenningTrap']]],
['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b',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= 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']]], ['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598',1,'PenningTrap']]],
['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']]] ['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#ac529aa26c288f34eae184a67e6bac41f',1,'PenningTrap']]]
]; ];

View File

@@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['particle_0',['Particle',['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle']]], ['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']]],
['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.)']]] ['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= 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',['../main_8cpp.html#a33d9b1c76c3c80902f89a58b1a6d96ea',1,'main.cpp']]],
['potential_5fresonance_5fnarrow_5fsweep_5finteraction_3',['potential_resonance_narrow_sweep_interaction',['../main_8cpp.html#ac1816f70ec612edc27848ef7f0875fdb',1,'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= 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']]], ['r_5ffunc_0',['r_func',['../classPenningTrap.html#a826b7fa8e709d481eb1dee7d0c2cdc08',1,'PenningTrap']]],
['simulate_1',['simulate',['../classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854',1,'PenningTrap']]] ['reinitialize_1',['reinitialize',['../classPenningTrap.html#aaee129f177657455348d0c8ae1441dea',1,'PenningTrap']]]
]; ];

View File

@@ -1,6 +1,10 @@
var searchData= var searchData=
[ [
['total_5fforce_0',['total_force',['../classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8',1,'PenningTrap']]], ['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']]],
['total_5fforce_5fexternal_1',['total_force_external',['../classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56',1,'PenningTrap']]], ['set_5fpertubation_1',['set_pertubation',['../classPenningTrap.html#a9d1d8e90ca839b928aee1ad0cd4aff43',1,'PenningTrap']]],
['total_5fforce_5fparticles_2',['total_force_particles',['../classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b',1,'PenningTrap']]] ['simulate_2',['simulate',['../classPenningTrap.html#a7a1d9f0528a12308de25bc30718da20a',1,'PenningTrap']]],
['simulate_5f100_5fparticles_3',['simulate_100_particles',['../main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513',1,'main.cpp']]],
['simulate_5fsingle_5fparticle_4',['simulate_single_particle',['../main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6',1,'main.cpp']]],
['simulate_5fsingle_5fparticle_5fwith_5fdifferent_5fsteps_5',['simulate_single_particle_with_different_steps',['../main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2',1,'main.cpp']]],
['simulate_5ftwo_5fparticles_6',['simulate_two_particles',['../main_8cpp.html#a783789519f97c6430081171cacb0ffb1',1,'main.cpp']]]
]; ];

View File

@@ -1,4 +1,11 @@
var searchData= var searchData=
[ [
['v_5ffunc_0',['v_func',['../classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e',1,'PenningTrap']]] ['test_5fexternal_5fb_5ffield_0',['test_external_B_field',['../classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e',1,'PenningTrapTest']]],
['test_5fexternal_5fe_5ffield_1',['test_external_E_field',['../classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8',1,'PenningTrapTest']]],
['test_5fforce_5fon_5fparticle_2',['test_force_on_particle',['../classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9',1,'PenningTrapTest']]],
['test_5ftotal_5fforce_5fexternal_3',['test_total_force_external',['../classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046',1,'PenningTrapTest']]],
['test_5ftotal_5fforce_5fparticles_4',['test_total_force_particles',['../classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508',1,'PenningTrapTest']]],
['total_5fforce_5',['total_force',['../classPenningTrap.html#a9a301b0540078c36697880ef204afdf3',1,'PenningTrap']]],
['total_5fforce_5fexternal_6',['total_force_external',['../classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682',1,'PenningTrap']]],
['total_5fforce_5fparticles_7',['total_force_particles',['../classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c',1,'PenningTrap']]]
]; ];

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
var searchData= var searchData=
[ [
['penningtrap_0',['PenningTrap',['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle']]] ['penningtrap_0',['PenningTrap',['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle']]],
['penningtraptest_1',['PenningTrapTest',['../classPenningTrap.html#a869f032f37d0569ed16f224b4c4356ae',1,'PenningTrap']]]
]; ];

View File

@@ -1,13 +1,13 @@
var indexSectionsWithContent = var indexSectionsWithContent =
{ {
0: "_abcdefkmpqrstuvw", 0: "_abcdefkmpqrstuvw",
1: "p", 1: "ps",
2: "cmptu", 2: "cmptu",
3: "aefmprstvw", 3: "acefmprstvw",
4: "bdkmpqrtv", 4: "bdkmpqrtv",
5: "sv", 5: "sv",
6: "p", 6: "p",
7: "_adktv", 7: "_acdktv",
8: "bp" 8: "bp"
}; };

View File

@@ -1,6 +1,7 @@
var searchData= var searchData=
[ [
['sim_5farr_0',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]], ['sim_5farr_0',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]],
['sim_5fcols_1',['sim_cols',['../typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23',1,'typedefs.hpp']]], ['sim_5fcols_1',['sim_cols',['../typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f',1,'typedefs.hpp']]],
['sim_5frows_2',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]] ['sim_5frows_2',['sim_rows',['../typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22',1,'typedefs.hpp']]],
['simulation_5ft_3',['simulation_t',['../typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6',1,'typedefs.hpp']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['vec_5f3d_0',['vec_3d',['../typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df',1,'typedefs.hpp']]] ['vec3_0',['vec3',['../typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea',1,'typedefs.hpp']]]
]; ];

View File

@@ -1,4 +1,7 @@
var searchData= var searchData=
[ [
['particles_0',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]] ['p1_0',['p1',['../main_8cpp.html#a2efa69bb9d93049429ce4637075f1d30',1,'main.cpp']]],
['p2_1',['p2',['../main_8cpp.html#ac70b61df65f4336f57ea9b4c35250df7',1,'main.cpp']]],
['particles_2',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]],
['perturbation_3',['perturbation',['../classPenningTrap.html#ae915f6ad0eef1fb46530e836b6e071e5',1,'PenningTrap']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['r_5fvec_0',['r_vec',['../classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6',1,'Particle']]] ['r_5fvec_0',['r_vec',['../classParticle.html#a1c59101411db43624828b766f87ad460',1,'Particle']]]
]; ];

View File

@@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['v_5f0_0',['V_0',['../classPenningTrap.html#aaf105828121c4a33cc2b217453c20317',1,'PenningTrap']]], ['v_5f0_0',['V_0',['../classPenningTrap.html#a715329844d75ec4c04f8391421fb4e89',1,'PenningTrap']]],
['v_5fvec_1',['v_vec',['../classParticle.html#a879692772803d6ab65fa4993b54aea6e',1,'Particle']]] ['v_5fvec_1',['v_vec',['../classParticle.html#a3a10400add8dd22b8031330c2aafb6fe',1,'Particle']]]
]; ];

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: Member 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('structsimulation.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">simulation Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="structsimulation.html">simulation</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>r_vecs</b> (defined in <a class="el" href="structsimulation.html">simulation</a>)</td><td class="entry"><a class="el" href="structsimulation.html">simulation</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>v_vecs</b> (defined in <a class="el" href="structsimulation.html">simulation</a>)</td><td class="entry"><a class="el" href="structsimulation.html">simulation</a></td><td class="entry"></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="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>

170
docs/structsimulation.html Normal file
View File

@@ -0,0 +1,170 @@
<!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: simulation Struct 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('structsimulation.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="#pub-attribs">Public Attributes</a> &#124;
<a href="structsimulation-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">simulation Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Typedef for PenningTrap::simulation return value.
<a href="structsimulation.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a98786da608953ebfa91c0c45e210b0f2"><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="structsimulation.html#a98786da608953ebfa91c0c45e210b0f2">r_vecs</a></td></tr>
<tr class="separator:a98786da608953ebfa91c0c45e210b0f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80244043fe839f7ab50cf10da47b4129"><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="structsimulation.html#a80244043fe839f7ab50cf10da47b4129">v_vecs</a></td></tr>
<tr class="separator:a80244043fe839f7ab50cf10da47b4129"><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>Typedef for PenningTrap::simulation return value. </p>
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00040">40</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a98786da608953ebfa91c0c45e210b0f2" name="a98786da608953ebfa91c0c45e210b0f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98786da608953ebfa91c0c45e210b0f2">&#9670;&#160;</a></span>r_vecs</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> simulation::r_vecs</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00041">41</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div>
</div>
<a id="a80244043fe839f7ab50cf10da47b4129" name="a80244043fe839f7ab50cf10da47b4129"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80244043fe839f7ab50cf10da47b4129">&#9670;&#160;</a></span>v_vecs</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> simulation::v_vecs</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00042">42</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</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="navelem"><a class="el" href="structsimulation.html">simulation</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

@@ -107,17 +107,19 @@ $(document).ready(function(){initNavTree('test__suite_8cpp.html',''); initResiza
<p>The test suite for the project. <p>The test suite for the project.
<a href="#details">More...</a></p> <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 /> <div class="textblock"><code>#include &lt;iomanip&gt;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
<code>#include &lt;iomanip&gt;</code><br />
<code>#include &lt;sstream&gt;</code><br /> <code>#include &lt;sstream&gt;</code><br />
<code>#include &lt;string&gt;</code><br /> <code>#include &lt;string&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> </div>
<p><a href="test__suite_8cpp_source.html">Go to the source code of this file.</a></p> <p><a href="test__suite_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr> Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test class for the Penning trap. <a href="classPenningTrapTest.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
@@ -130,7 +132,7 @@ Functions</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd> <dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd> <dd>
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl> 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#_bug000009">Bug:</a></b></dt><dd>No known bugs </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="test__suite_8cpp_source.html">test_suite.cpp</a>.</p> <p class="definition">Definition in file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
@@ -150,7 +152,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00135">135</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p> <p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00145">145</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
</div> </div>
</div> </div>

View File

@@ -1,4 +1,4 @@
var test__suite_8cpp = var test__suite_8cpp =
[ [
[ "PenningTrapTest", "classPenningTrapTest.html", null ] [ "PenningTrapTest", "classPenningTrapTest.html", "classPenningTrapTest" ]
]; ];

View File

@@ -102,151 +102,155 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<a href="test__suite_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> <a href="test__suite_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="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;iomanip&gt;</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="utils_8hpp.html">utils.hpp</a>&quot;</span></div> <div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;sstream&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;iomanip&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 &lt;sstream&gt;</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="PenningTrap_8hpp.html">PenningTrap.hpp</a>&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</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 &quot;<a class="code" href="constants_8hpp.html">constants.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="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8hpp.html">utils.hpp</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html"> 20</a></span><span class="keyword">class </span><a class="code hl_class" href="classPenningTrapTest.html">PenningTrapTest</a> {</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="keyword">public</span>:</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html"> 23</a></span><span class="keyword">class </span><a class="code hl_class" href="classPenningTrapTest.html">PenningTrapTest</a></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">static</span> <span class="keywordtype">void</span> test_external_E_field()</div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>{</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> {</div> <div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8"> 28</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">test_external_E_field</a>()</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// Vector containing inputs and expected results</span></div> <div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::vector&lt;std::pair&lt;arma::vec, arma::vec&gt;&gt; tests;</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> tests.push_back(</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> std::make_pair(arma::vec{0., 0., 0.}, arma::vec{0., 0., 0.}));</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </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> tests.push_back(std::make_pair(arma::vec{10., 0., 0.},</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// Vector containing inputs and expected results</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> arma::vec{96.4852558, 0., 0.}));</div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> std::vector&lt;std::pair&lt;vec3, vec3&gt;&gt; tests;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</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> tests.push_back(std::make_pair(arma::vec{10., 0., 0.},</div> <div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> tests.push_back(std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}));</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> arma::vec{96.4852558, 0., 0.}));</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="l00037" name="l00037"></a><span class="lineno"> 37</span> tests.push_back(</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> tests.push_back(std::make_pair(arma::vec{0., 10., 0.},</div> <div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{10., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{96.4852558, 0., 0.}));</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> arma::vec{0., 96.4852558, 0.}));</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="l00040" name="l00040"></a><span class="lineno"> 40</span> tests.push_back(</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> tests.push_back(std::make_pair(arma::vec{0., 0., 10.},</div> <div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{10., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{96.4852558, 0., 0.}));</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> arma::vec{0., 0., -192.9705116}));</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> </div> <div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> tests.push_back(</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> arma::vec result;</div> <div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 10., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 96.4852558, 0.}));</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> arma::vec v;</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> std::stringstream msg;</div> <div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> tests.push_back(</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; tests.size(); i++) {</div> <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 10.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., -192.9705116}));</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> v = tests.at(i).first;</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> result = trap.<a class="code hl_function" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a>(v);</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> result;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div> <div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> v;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> msg.str(<span class="stringliteral">&quot;&quot;</span>);</div> <div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> std::stringstream msg;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> msg &lt;&lt; <span class="stringliteral">&quot;Testing the external E field at (&quot;</span> &lt;&lt; std::setprecision(2)</div> <div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; tests.size(); i++) {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> &lt;&lt; v(0) &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v(1) &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v(2) &lt;&lt; <span class="stringliteral">&quot;).&quot;</span>;</div> <div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> v = tests.at(i).first;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div> <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a5846c8f75cdc543fd9cf0b2185a3ef22">external_E_field</a>(v);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(result, tests.at(i).second), msg.str());</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> }</div> <div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> msg.str(<span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div> <div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> msg &lt;&lt; <span class="stringliteral">&quot;Testing the external E field at (&quot;</span> &lt;&lt; std::setprecision(2)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div> <div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> &lt;&lt; v(0) &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v(1) &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v(2) &lt;&lt; <span class="stringliteral">&quot;).&quot;</span>;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">static</span> <span class="keywordtype">void</span> test_external_B_field()</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> {</div> <div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(result, tests.at(i).second), msg.str());</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// No point in testing at different points since it&#39;s not dependent</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">// on position.</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> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</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> arma::vec expected{0., 0., <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>};</div> <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e"> 66</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">test_external_B_field</a>()</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> arma::vec result = trap.<a class="code hl_function" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">external_B_field</a>(arma::vec{0., 0., 0.});</div> <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(expected, result),</div> <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// No point in testing at different points since it&#39;s not dependent</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="stringliteral">&quot;Testing the external B field at (0,0,0)&quot;</span>);</div> <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment">// on position.</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</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;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div> <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> expected{0., 0., <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>};</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">static</span> <span class="keywordtype">void</span> test_force_on_particle()</div> <div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> result = trap.<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>{0., 0., 0.});</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> {</div> <div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(expected, result),</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div> <div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="stringliteral">&quot;Testing the external B field at (0,0,0)&quot;</span>);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> arma::vec v{0., 0., 0.};</div> <div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> }</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div> <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="comment">// Add particles to test</span></div> <div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9"> 80</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">test_force_on_particle</a>()</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{0., 0., 0.}, v));</div> <div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{1., 0., 0.}, v));</div> <div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{0., 3., 4.}, v));</div> <div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> v{0., 0., 0.};</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div> <div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="comment">// Test p0 and p1</span></div> <div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="comment">// Add particles to test</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> arma::vec expected{-1., 0., 0.};</div> <div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}, v));</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> arma::vec result = trap.<a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(0, 1);</div> <div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{1., 0., 0.}, v));</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(expected, result),</div> <div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 3., 4.}, v));</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="stringliteral">&quot;Testing the force on a particle at (0,0,0) from a &quot;</span></div> <div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="stringliteral">&quot;particle at (1,0,0).&quot;</span>);</div> <div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">// Test p0 and p1</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div> <div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> expected{-1., 0., 0.};</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="comment">// Test p0 and p2</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> result = trap.<a class="code hl_function" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">force_on_particle</a>(0, 1);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> expected = arma::vec{0, -.024, -.032};</div> <div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(expected, result),</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(0, 2);</div> <div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="stringliteral">&quot;Testing the force on a particle at (0,0,0) from a &quot;</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(expected, result),</div> <div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="stringliteral">&quot;particle at (1,0,0).&quot;</span>);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="stringliteral">&quot;Testing the force on a particle at (0,0,0) from a &quot;</span></div> <div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="stringliteral">&quot;particle at (0,3,4).&quot;</span>);</div> <div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">// Test p0 and p2</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> }</div> <div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> expected = <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0, -.024, -.032};</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div> <div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a7f210bb2768a5d79ced4b0df0df97598">force_on_particle</a>(0, 2);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keyword">static</span> <span class="keywordtype">void</span> test_total_force_external()</div> <div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(expected, result),</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div> <div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="stringliteral">&quot;Testing the force on a particle at (0,0,0) from a &quot;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div> <div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="stringliteral">&quot;particle at (0,3,4).&quot;</span>);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</div> <div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{1., 2., 3.}, arma::vec{3., 4., 5.}));</div> <div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div> <div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046"> 107</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">test_total_force_external</a>()</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> arma::vec expected{395.58954878, -270.15871624, -57.89115348};</div> <div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> arma::vec result = trap.<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(0);</div> <div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(expected, result),</div> <div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{1., 2., 3.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{3., 4., 5.}));</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="stringliteral">&quot;Testing the total external force on a particle at &quot;</span></div> <div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="stringliteral">&quot;(1,2,3) with velocity (3,4,5)&quot;</span>);</div> <div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> expected{395.58954878, -270.15871624, -57.89115348};</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div> <div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> result = trap.<a class="code hl_function" href="classPenningTrap.html#a2c01108b52c8e2a003cf9170da9e7682">total_force_external</a>(0);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div> <div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(expected, result),</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keyword">static</span> <span class="keywordtype">void</span> test_total_force_particles()</div> <div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="stringliteral">&quot;Testing the total external force on a particle at &quot;</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> {</div> <div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="stringliteral">&quot;(1,2,3) with velocity (3,4,5)&quot;</span>);</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;</div> <div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</div> <div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{0., 0., 0.}, arma::vec{0., 0., 0.}));</div> <div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508"> 122</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">test_total_force_particles</a>()</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div> <div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> {</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> arma::vec expected{0., 0., 0.};</div> <div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> arma::vec result = trap.<a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(0);</div> <div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}, <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> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(expected, result),</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="stringliteral">&quot;Testing the total force of all particles on particle 0 &quot;</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="stringliteral">&quot;with only a single particle&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> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{1., 0., 0.}, arma::vec{0., 0., 0.}));</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{0., 1., 0.}, arma::vec{0., 0., 0.}));</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., arma::vec{0., 0., 1.}, arma::vec{0., 0., 0.}));</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</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> expected = arma::vec(3, arma::fill::value(-3473.383325));</div> <div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> expected{0., 0., 0.};</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(0);</div> <div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> result = trap.<a class="code hl_function" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">total_force_particles</a>(0);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(expected, result),</div> <div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(expected, result),</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="stringliteral">&quot;Testing the total force of all particles on particle 0 &quot;</span></div> <div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="stringliteral">&quot;Testing the total force of all particles on particle 0 &quot;</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="stringliteral">&quot;with 3 other particles.&quot;</span>);</div> <div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="stringliteral">&quot;with only a single particle&quot;</span>);</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> }</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>};</div> <div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{1., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}));</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div> <div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 1., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}));</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="keywordtype">int</span> main()</div> <div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(<a class="code hl_class" href="classParticle.html">Particle</a>(<a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 1.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>{0., 0., 0.}));</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</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> PenningTrapTest::test_external_E_field();</div> <div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> expected = <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>().fill(-138935.333);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> PenningTrapTest::test_external_B_field();</div> <div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a2fe1cefbae18fa5808155ee0d2df713c">total_force_particles</a>(0);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> PenningTrapTest::test_force_on_particle();</div> <div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_define" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(<a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(expected, result),</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> PenningTrapTest::test_total_force_external();</div> <div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="stringliteral">&quot;Testing the total force of all particles on particle 0 &quot;</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> PenningTrapTest::test_total_force_particles();</div> <div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="stringliteral">&quot;with 3 other particles.&quot;</span>);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> 0;</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>}</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="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="keywordtype">int</span> main()</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_class" href="classPenningTrapTest.html">PenningTrapTest</a> test;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> test.<a class="code hl_function" href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">test_external_E_field</a>();</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> test.<a class="code hl_function" href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">test_external_B_field</a>();</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> test.<a class="code hl_function" href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">test_force_on_particle</a>();</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> test.<a class="code hl_function" href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">test_total_force_external</a>();</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> test.<a class="code hl_function" href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">test_total_force_particles</a>();</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="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"><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="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00020">test_suite.cpp:20</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#l00030">PenningTrap.hpp:30</a></div></div> <div class="ttc" id="aclassPenningTrapTest_html_a5f4f0b150e54ce463bb29f76d49883f9"><div class="ttname"><a href="classPenningTrapTest.html#a5f4f0b150e54ce463bb29f76d49883f9">PenningTrapTest::test_force_on_particle</a></div><div class="ttdeci">void test_force_on_particle()</div><div class="ttdoc">Test that the force between particles gives expected results.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00080">test_suite.cpp:80</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="aclassPenningTrapTest_html_a68449d508e66205bc8b27fa5f60db508"><div class="ttname"><a href="classPenningTrapTest.html#a68449d508e66205bc8b27fa5f60db508">PenningTrapTest::test_total_force_particles</a></div><div class="ttdeci">void test_total_force_particles()</div><div class="ttdoc">Test that the total force of all particles on a single particle returns expected results.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00122">test_suite.cpp:122</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="aclassPenningTrapTest_html_a6a303be62039ca2ecccd8252744d4dc8"><div class="ttname"><a href="classPenningTrapTest.html#a6a303be62039ca2ecccd8252744d4dc8">PenningTrapTest::test_external_E_field</a></div><div class="ttdeci">void test_external_E_field()</div><div class="ttdoc">Test that the external E field gives correct values.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00028">test_suite.cpp:28</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="aclassPenningTrapTest_html_ad668d7d875bdc1909a42426bf9dead9e"><div class="ttname"><a href="classPenningTrapTest.html#ad668d7d875bdc1909a42426bf9dead9e">PenningTrapTest::test_external_B_field</a></div><div class="ttdeci">void test_external_B_field()</div><div class="ttdoc">Test that the external B field gives correct values.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00066">test_suite.cpp:66</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="aclassPenningTrapTest_html_ae6d0c8e0d80338fb7c7edefc97331046"><div class="ttname"><a href="classPenningTrapTest.html#ae6d0c8e0d80338fb7c7edefc97331046">PenningTrapTest::test_total_force_external</a></div><div class="ttdeci">void test_total_force_external()</div><div class="ttdoc">Test that the total external force returns expected results.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00107">test_suite.cpp:107</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"><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_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_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#l00082">PenningTrap.cpp:82</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="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#l00095">PenningTrap.cpp:95</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#l00066">PenningTrap.cpp:66</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#l00058">PenningTrap.cpp:58</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#l00158">PenningTrap.cpp:158</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#l00071">PenningTrap.cpp:71</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="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"><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_a0c95c4791692b06f8811905a76dbd772"><div class="ttname"><a href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a></div><div class="ttdeci">bool arma_vector_close_to(arma::vec &amp;a, arma::vec &amp;b, double tol=1e-8)</div><div class="ttdoc">Test if two armadillo vectors are close to each other.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00062">utils.cpp:62</a></div></div> <div class="ttc" id="autils_8hpp_html_a73d4f21ad937dbc50a0c0538c78fd4f9"><div class="ttname"><a href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a></div><div class="ttdeci">#define ASSERT(expr, msg)</div><div class="ttdoc">A prettier assertion function.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8hpp_source.html#l00046">utils.hpp:46</a></div></div>
<div class="ttc" id="autils_8hpp_html_a73d4f21ad937dbc50a0c0538c78fd4f9"><div class="ttname"><a href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a></div><div class="ttdeci">#define ASSERT(expr, msg)</div><div class="ttdoc">A prettier assertion function.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8hpp_source.html#l00045">utils.hpp:45</a></div></div> <div class="ttc" id="autils_8hpp_html_ab3e0cf669bddc59bd53998490ffb68b9"><div class="ttname"><a href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a></div><div class="ttdeci">bool close_to(arma::vec &amp;a, arma::vec &amp;b, double tol=1e-8)</div><div class="ttdoc">Test if two armadillo vectors are close to each other.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00058">utils.cpp:58</a></div></div>
</div><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -99,6 +99,7 @@ $(document).ready(function(){initNavTree('typedefs_8hpp.html',''); initResizable
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> </div> <a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">typedefs.hpp File Reference</div></div> <div class="headertitle"><div class="title">typedefs.hpp File Reference</div></div>
</div><!--header--> </div><!--header-->
@@ -106,25 +107,35 @@ $(document).ready(function(){initNavTree('typedefs_8hpp.html',''); initResizable
<p>Useful typedefs for cleaner code. <p>Useful typedefs for cleaner code.
<a href="#details">More...</a></p> <a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;vector&gt;</code><br /> <div class="textblock"><code>#include &lt;armadillo&gt;</code><br />
<code>#include &lt;armadillo&gt;</code><br /> <code>#include &lt;vector&gt;</code><br />
</div> </div>
<p><a href="typedefs_8hpp_source.html">Go to the source code of this file.</a></p> <p><a href="typedefs_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsimulation.html">simulation</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for PenningTrap::simulation return value. <a href="structsimulation.html#details">More...</a><br /></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="typedef-members" name="typedef-members"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr> Typedefs</h2></td></tr>
<tr class="memitem:a7c2dfa854274262c4e00e4ef0ab2ce23"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; arma::vec::fixed&lt; 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></td></tr> <tr class="memitem:a3bdfb73a02f88ae32b6128ef747c4aea"><td class="memItemLeft" align="right" valign="top">typedef arma::vec::fixed&lt; 3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></td></tr>
<tr class="memdesc:a7c2dfa854274262c4e00e4ef0ab2ce23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for the column of the result vector from simulating particles. <br /></td></tr> <tr class="memdesc:a3bdfb73a02f88ae32b6128ef747c4aea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a fixed 3d arma vector. <br /></td></tr>
<tr class="separator:a7c2dfa854274262c4e00e4ef0ab2ce23"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a3bdfb73a02f88ae32b6128ef747c4aea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8502989b1b361725834fc185bd575f66"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; arma::vec::fixed&lt; 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">sim_rows</a></td></tr> <tr class="memitem:a46482a2697556c00556c9d73f461784f"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; <a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a></td></tr>
<tr class="memdesc:a8502989b1b361725834fc185bd575f66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for the row of the result vector from simulating particles. <br /></td></tr> <tr class="memdesc:a46482a2697556c00556c9d73f461784f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for the column of the result vector from simulating particles. <br /></td></tr>
<tr class="separator:a8502989b1b361725834fc185bd575f66"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a46482a2697556c00556c9d73f461784f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec69d34220fff45de238b9e01f2686af"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; <a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></td></tr> <tr class="memitem:a33418f31f28663b8414c8f7182998c22"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; <a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">sim_rows</a></td></tr>
<tr class="memdesc:a33418f31f28663b8414c8f7182998c22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for the row of the result vector from simulating particles. <br /></td></tr>
<tr class="separator:a33418f31f28663b8414c8f7182998c22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec69d34220fff45de238b9e01f2686af"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; <a class="el" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></td></tr>
<tr class="memdesc:aec69d34220fff45de238b9e01f2686af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for the result of the simulate method. <br /></td></tr> <tr class="memdesc:aec69d34220fff45de238b9e01f2686af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for the result of the simulate method. <br /></td></tr>
<tr class="separator:aec69d34220fff45de238b9e01f2686af"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:aec69d34220fff45de238b9e01f2686af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="memItemLeft" align="right" valign="top">typedef arma::vec::fixed&lt; 3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></td></tr> <tr class="memitem:a784799c37b5e4fb8bf4f6368e004dec6"><td class="memItemLeft" align="right" valign="top"><a id="a784799c37b5e4fb8bf4f6368e004dec6" name="a784799c37b5e4fb8bf4f6368e004dec6"></a>
<tr class="memdesc:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a fixed 3d arma vector. <br /></td></tr> typedef struct <a class="el" href="structsimulation.html">simulation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>simulation_t</b></td></tr>
<tr class="separator:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memdesc:a784799c37b5e4fb8bf4f6368e004dec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for PenningTrap::simulation return value. <br /></td></tr>
<tr class="separator:a784799c37b5e4fb8bf4f6368e004dec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Useful typedefs for cleaner code. </p> <div class="textblock"><p>Useful typedefs for cleaner code. </p>
@@ -144,68 +155,68 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">typedef std::vector&lt;<a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>&gt; <a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></td> <td class="memname">typedef std::vector&lt;<a class="el" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a>&gt; <a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Typedef for the result of the simulate method. </p> <p>Typedef for the result of the simulate method. </p>
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00032">32</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p> <p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00036">36</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div> </div>
</div> </div>
<a id="a7c2dfa854274262c4e00e4ef0ab2ce23" name="a7c2dfa854274262c4e00e4ef0ab2ce23"></a> <a id="a46482a2697556c00556c9d73f461784f" name="a46482a2697556c00556c9d73f461784f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c2dfa854274262c4e00e4ef0ab2ce23">&#9670;&#160;</a></span>sim_cols</h2> <h2 class="memtitle"><span class="permalink"><a href="#a46482a2697556c00556c9d73f461784f">&#9670;&#160;</a></span>sim_cols</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">typedef std::vector&lt;arma::vec::fixed&lt;3&gt; &gt; <a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></td> <td class="memname">typedef std::vector&lt;<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&gt; <a class="el" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a></td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Typedef for the column of the result vector from simulating particles. </p> <p>Typedef for the column of the result vector from simulating particles. </p>
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00024">24</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p> <p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00028">28</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div> </div>
</div> </div>
<a id="a8502989b1b361725834fc185bd575f66" name="a8502989b1b361725834fc185bd575f66"></a> <a id="a33418f31f28663b8414c8f7182998c22" name="a33418f31f28663b8414c8f7182998c22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8502989b1b361725834fc185bd575f66">&#9670;&#160;</a></span>sim_rows</h2> <h2 class="memtitle"><span class="permalink"><a href="#a33418f31f28663b8414c8f7182998c22">&#9670;&#160;</a></span>sim_rows</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">typedef std::vector&lt;arma::vec::fixed&lt;3&gt; &gt; <a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">sim_rows</a></td> <td class="memname">typedef std::vector&lt;<a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>&gt; <a class="el" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">sim_rows</a></td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Typedef for the row of the result vector from simulating particles. </p> <p>Typedef for the row of the result vector from simulating particles. </p>
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00028">28</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p> <p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00032">32</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div> </div>
</div> </div>
<a id="a9f33f4962c8fb62cc5ccd0e4e039a8df" name="a9f33f4962c8fb62cc5ccd0e4e039a8df"></a> <a id="a3bdfb73a02f88ae32b6128ef747c4aea" name="a3bdfb73a02f88ae32b6128ef747c4aea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f33f4962c8fb62cc5ccd0e4e039a8df">&#9670;&#160;</a></span>vec_3d</h2> <h2 class="memtitle"><span class="permalink"><a href="#a3bdfb73a02f88ae32b6128ef747c4aea">&#9670;&#160;</a></span>vec3</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">typedef arma::vec::fixed&lt;3&gt; <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></td> <td class="memname">typedef arma::vec::fixed&lt;3&gt; <a class="el" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a></td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Typedef for a fixed 3d arma vector. </p> <p>Typedef for a fixed 3d arma vector. </p>
<p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00036">36</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p> <p class="definition">Definition at line <a class="el" href="typedefs_8hpp_source.html#l00023">23</a> of file <a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>.</p>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,9 @@
var typedefs_8hpp = var typedefs_8hpp =
[ [
[ "simulation", "structsimulation.html", null ],
[ "sim_arr", "typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af", null ], [ "sim_arr", "typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af", null ],
[ "sim_cols", "typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23", null ], [ "sim_cols", "typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f", null ],
[ "sim_rows", "typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66", null ], [ "sim_rows", "typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22", null ],
[ "vec_3d", "typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df", null ] [ "simulation_t", "typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6", null ],
[ "vec3", "typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea", null ]
]; ];

View File

@@ -105,22 +105,29 @@ $(document).ready(function(){initNavTree('typedefs_8hpp_source.html',''); initRe
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#ifndef __TYPEDEFS__</span></div> <div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#ifndef __TYPEDEFS__</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#define __TYPEDEFS__</span></div> <div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#define __TYPEDEFS__</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</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="preprocessor">#include &lt;vector&gt;</span></div> <div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;armadillo&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &lt;armadillo&gt;</span></div> <div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div> <div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23"> 24</a></span><span class="keyword">typedef</span> std::vector&lt;arma::vec::fixed&lt;3&gt;&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>;</div> <div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea"> 23</a></span><span class="keyword">typedef</span> arma::vec::fixed&lt;3&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#a3bdfb73a02f88ae32b6128ef747c4aea">vec3</a>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div> <div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66"> 28</a></span><span class="keyword">typedef</span> std::vector&lt;arma::vec::fixed&lt;3&gt;&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">sim_rows</a>;</div> <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f"> 28</a></span><span class="keyword">typedef</span> std::vector&lt;vec3&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#a46482a2697556c00556c9d73f461784f">sim_cols</a>;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div> <div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af"> 32</a></span><span class="keyword">typedef</span> std::vector&lt;sim_cols&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>;</div> <div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22"> 32</a></span><span class="keyword">typedef</span> std::vector&lt;vec3&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">sim_rows</a>;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div> <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df"> 36</a></span><span class="keyword">typedef</span> arma::vec::fixed&lt;3&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>;</div> <div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af"> 36</a></span><span class="keyword">typedef</span> std::vector&lt;sim_cols&gt; <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</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><span class="preprocessor">#endif</span></div> <div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="structsimulation.html"> 40</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structsimulation.html">simulation</a> {</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="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> r_vecs;</div>
<div class="ttc" id="atypedefs_8hpp_html_a8502989b1b361725834fc185bd575f66"><div class="ttname"><a href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">sim_rows</a></div><div class="ttdeci">std::vector&lt; arma::vec::fixed&lt; 3 &gt; &gt; sim_rows</div><div class="ttdoc">Typedef for the row 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="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> v_vecs;</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="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6"> 43</a></span>} <a class="code hl_typedef" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">simulation_t</a>;</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="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><span class="preprocessor">#endif</span></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_a33418f31f28663b8414c8f7182998c22"><div class="ttname"><a href="typedefs_8hpp.html#a33418f31f28663b8414c8f7182998c22">sim_rows</a></div><div class="ttdeci">std::vector&lt; vec3 &gt; sim_rows</div><div class="ttdoc">Typedef for the row of the result vector from simulating particles.</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_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_a784799c37b5e4fb8bf4f6368e004dec6"><div class="ttname"><a href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">simulation_t</a></div><div class="ttdeci">struct simulation simulation_t</div><div class="ttdoc">Typedef for PenningTrap::simulation return value.</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><!-- fragment --></div><!-- contents --> </div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content --> </div><!-- doc-content -->
<!-- start footer part --> <!-- start footer part -->

View File

@@ -106,8 +106,7 @@ $(document).ready(function(){initNavTree('utils_8cpp.html',''); initResizable();
<p>Implementation of the utils. <p>Implementation of the utils.
<a href="#details">More...</a></p> <a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;sys/stat.h&gt;</code><br /> <div class="textblock"><code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
</div> </div>
<p><a href="utils_8cpp_source.html">Go to the source code of this file.</a></p> <p><a href="utils_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls"> <table class="memberdecls">
@@ -122,9 +121,9 @@ Functions</h2></td></tr>
<tr class="memitem:aff5e07c3c1d321709b0cc38e999f427b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">m_assert</a> (bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg)</td></tr> <tr class="memitem:aff5e07c3c1d321709b0cc38e999f427b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">m_assert</a> (bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg)</td></tr>
<tr class="memdesc:aff5e07c3c1d321709b0cc38e999f427b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test an expression, confirm that test is ok, or abort execution. <br /></td></tr> <tr class="memdesc:aff5e07c3c1d321709b0cc38e999f427b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test an expression, confirm that test is ok, or abort execution. <br /></td></tr>
<tr class="separator:aff5e07c3c1d321709b0cc38e999f427b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:aff5e07c3c1d321709b0cc38e999f427b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d2e1e032fd19614f2fbb58149a7b02a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a">arma_vector_close_to</a> (arma::vec &amp;a, arma::vec &amp;b, double tol)</td></tr> <tr class="memitem:a6be6f938bcbb235ebb6a2ed9d08411b2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">close_to</a> (arma::vec &amp;a, arma::vec &amp;b, double tol)</td></tr>
<tr class="memdesc:a5d2e1e032fd19614f2fbb58149a7b02a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if two armadillo vectors are close to each other. <br /></td></tr> <tr class="memdesc:a6be6f938bcbb235ebb6a2ed9d08411b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if two armadillo vectors are close to each other. <br /></td></tr>
<tr class="separator:a5d2e1e032fd19614f2fbb58149a7b02a"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a6be6f938bcbb235ebb6a2ed9d08411b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf13f4e492199cb7231bfa646dbd08de"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">mkpath</a> (std::string path, int mode)</td></tr> <tr class="memitem:acf13f4e492199cb7231bfa646dbd08de"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">mkpath</a> (std::string path, int mode)</td></tr>
<tr class="memdesc:acf13f4e492199cb7231bfa646dbd08de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make path given. <br /></td></tr> <tr class="memdesc:acf13f4e492199cb7231bfa646dbd08de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make path given. <br /></td></tr>
<tr class="separator:acf13f4e492199cb7231bfa646dbd08de"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:acf13f4e492199cb7231bfa646dbd08de"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -139,14 +138,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
<p class="definition">Definition in file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p> <p class="definition">Definition in file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2> </div><h2 class="groupheader">Function Documentation</h2>
<a id="a5d2e1e032fd19614f2fbb58149a7b02a" name="a5d2e1e032fd19614f2fbb58149a7b02a"></a> <a id="a6be6f938bcbb235ebb6a2ed9d08411b2" name="a6be6f938bcbb235ebb6a2ed9d08411b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d2e1e032fd19614f2fbb58149a7b02a">&#9670;&#160;</a></span>arma_vector_close_to()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a6be6f938bcbb235ebb6a2ed9d08411b2">&#9670;&#160;</a></span>close_to()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">bool arma_vector_close_to </td> <td class="memname">bool close_to </td>
<td>(</td> <td>(</td>
<td class="paramtype">arma::vec &amp;&#160;</td> <td class="paramtype">arma::vec &amp;&#160;</td>
<td class="paramname"><em>a</em>, </td> <td class="paramname"><em>a</em>, </td>
@@ -183,7 +182,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl> <dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00062">62</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p> <p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00058">58</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -251,7 +250,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</dd> </dd>
</dl> </dl>
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00043">43</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p> <p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00040">40</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -290,9 +289,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</table> </table>
</dd> </dd>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl> <dl class="section return"><dt>Returns</dt><dd>bool Success/Fail </dd></dl>
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00076">76</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p> <p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00072">72</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -340,7 +339,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl> <dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00024">24</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p> <p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00022">22</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
</div> </div>
</div> </div>
@@ -388,7 +387,7 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl> <dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00017">17</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p> <p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00015">15</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
</div> </div>
</div> </div>

View File

@@ -1,6 +1,6 @@
var utils_8cpp = var utils_8cpp =
[ [
[ "arma_vector_close_to", "utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a", null ], [ "close_to", "utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2", null ],
[ "m_assert", "utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b", null ], [ "m_assert", "utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b", null ],
[ "mkpath", "utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de", null ], [ "mkpath", "utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de", null ],
[ "scientific_format", "utils_8cpp.html#a58565270b643b24e3132f38c653e0199", null ], [ "scientific_format", "utils_8cpp.html#a58565270b643b24e3132f38c653e0199", null ],

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