Merge branch 'janitaws/latex-setup' of github.uio.no:FYS3150-G2-2023/Project-3 into janitaws/latex-setup
This commit is contained in:
commit
f767cdc99b
106 changed files with 3862 additions and 1424 deletions
|
|
@ -8,3 +8,5 @@ BreakBeforeBraces: Custom
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
AfterFunction: true
|
AfterFunction: true
|
||||||
BeforeElse: true
|
BeforeElse: true
|
||||||
|
BreakBeforeBinaryOperators: All
|
||||||
|
ColumnLimit: 79
|
||||||
|
|
|
||||||
2
Doxyfile
2
Doxyfile
|
|
@ -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
|
||||||
|
|
|
||||||
72
README.md
72
README.md
|
|
@ -2,6 +2,78 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
[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
|
||||||
|
|
||||||
|
### 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>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 1.5 MiB |
|
|
@ -105,8 +105,8 @@ $(document).ready(function(){initNavTree('Particle_8cpp_source.html',''); initRe
|
||||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "<a class="code" href="Particle_8hpp.html">Particle.hpp</a>"</span></div>
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "<a class="code" href="Particle_8hpp.html">Particle.hpp</a>"</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#a7af9f8d1fef63dd7643b06629ac7bef4"> 15</a></span><a class="code hl_function" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle::Particle</a>(<span class="keywordtype">double</span> q, <span class="keywordtype">double</span> m,</div>
|
||||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> arma::vec::fixed<3> r_vec,</div>
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r_vec,</div>
|
||||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> arma::vec::fixed<3> v_vec)</div>
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> v_vec)</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"> 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> <span class="comment">// Giving the particle its properties</span></div>
|
||||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> this->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->q = <a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a>;</div>
|
||||||
|
|
@ -120,6 +120,7 @@ $(document).ready(function(){initNavTree('Particle_8cpp_source.html',''); initRe
|
||||||
<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_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
|
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
|
<div class="ttc" id="aclassParticle_html_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="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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><!-- fragment --></div><!-- contents -->
|
</div><!-- fragment --></div><!-- contents -->
|
||||||
</div><!-- doc-content -->
|
</div><!-- doc-content -->
|
||||||
<!-- start footer part -->
|
<!-- start footer part -->
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ $(document).ready(function(){initNavTree('Particle_8hpp_source.html',''); initRe
|
||||||
<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_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
|
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
|
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html"><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:31</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< 3 > 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_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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><!-- fragment --></div><!-- contents -->
|
</div><!-- fragment --></div><!-- contents -->
|
||||||
|
|
|
||||||
|
|
@ -105,9 +105,6 @@ $(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 "<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>"</code><br />
|
<div class="textblock"><code>#include "<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>"</code><br />
|
||||||
<code>#include "<a class="el" href="constants_8hpp_source.html">constants.hpp</a>"</code><br />
|
|
||||||
<code>#include "<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>"</code><br />
|
|
||||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</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>
|
||||||
|
|
|
||||||
|
|
@ -103,310 +103,336 @@ $(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 "<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>"</span></div>
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>"</span></div>
|
||||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include "<a class="code" href="constants_8hpp.html">constants.hpp</a>"</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 "<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>"</span></div>
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63"> 15</a></span><a class="code hl_function" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a>(<span class="keywordtype">double</span> B_0, std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> V_0,</div>
|
||||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> t)</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"><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<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> V_0,</div>
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> this->B_0 = <a class="code hl_variable" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">B_0</a>;</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> this-><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="l00020" name="l00020"></a><span class="lineno"> 20</span>{</div>
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> this->d = <a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</div>
|
||||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> this->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> this->t = <a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</div>
|
||||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> this-><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>}</div>
|
||||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> this->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> </div>
|
||||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> this->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"><a class="line" href="classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1"> 24</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="l00025" name="l00025"></a><span class="lineno"> 25</span>}</div>
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> std::function<<span class="keywordtype">double</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="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</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="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>{</div>
|
||||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> std::function<<span class="keywordtype">double</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="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> r, v;</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">for</span> (<span class="keywordtype">size_t</span> j = 0; j < i; j++) {</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> r = <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>().randn() * .1 * this-><a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</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> v = <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>().randn() * .1 * this-><a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>;</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 < i; j++) {</div>
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> this-><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="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-><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> }</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-><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>}</div>
|
||||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> this-><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> </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"><a class="line" href="classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73"> 36</a></span><a class="code hl_function" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a>(std::vector<Particle> particles, <span class="keywordtype">double</span> B_0,</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> std::function<<span class="keywordtype">double</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="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</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="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<Particle> particles, <span class="keywordtype">double</span> B_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> std::function<<span class="keywordtype">double</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="l00040" name="l00040"></a><span class="lineno"> 40</span> this->particles = <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</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>}</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> </div>
|
||||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> this->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"><a class="line" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e"> 43</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="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>{</div>
|
||||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">switch</span> (i) {</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> 0:</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> .5 * dt * this-><a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[0][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> 1:</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> .5 * dt * this->k_v[1][j];</div>
|
||||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> .5 * dt * this-><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> <span class="keywordflow">case</span> 2:</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> <span class="keywordflow">return</span> dt * this->k_v[2][j];</div>
|
||||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">return</span> .5 * dt * this->k_v[1][j];</div>
|
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">case</span> 3:</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> <span class="keywordflow">return</span> (dt / 6.) * (this->k_v[0][j] + 2. * this->k_v[1][j] +</div>
|
||||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">return</span> dt * this->k_v[2][j];</div>
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> 2. * this->k_v[2][j] + this->k_v[3][j]);</div>
|
||||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">case</span> 3:</div>
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">default</span>:</div>
|
||||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">return</span> (dt / 6.) * (this->k_v[0][j].eval() + this->k_v[1][j].eval() +</div>
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> std::cout << <span class="stringliteral">"Not valid!"</span> << std::endl;</div>
|
||||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> this->k_v[2][j].eval() + this->k_v[3][j].eval());</div>
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> abort();</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"> 58</span> }</div>
|
||||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> std::cout << <span class="stringliteral">"Not valid!"</span> << 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> </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"><a class="line" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648"> 61</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="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>{</div>
|
||||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">switch</span> (i) {</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> <span class="keywordflow">case</span> 0:</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> <span class="keywordflow">return</span> .5 * dt * this-><a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[0][j];</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"> 66</span> <span class="keywordflow">case</span> 1:</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> <span class="keywordflow">return</span> .5 * dt * this->k_r[1][j];</div>
|
||||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> .5 * dt * this-><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">case</span> 2:</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> <span class="keywordflow">return</span> dt * this->k_r[2][j];</div>
|
||||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">return</span> .5 * dt * this->k_r[1][j];</div>
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">case</span> 3:</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"> 71</span> <span class="keywordflow">return</span> (dt / 6.) * (this->k_r[0][j] + 2. * this->k_r[1][j] +</div>
|
||||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">return</span> dt * this->k_r[2][j];</div>
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> 2. * this->k_r[2][j] + this->k_r[3][j]);</div>
|
||||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">case</span> 3:</div>
|
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">default</span>:</div>
|
||||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">return</span> (dt / 6.) * (this->k_r[0][j].eval() + this->k_r[1][j].eval() +</div>
|
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> std::cout << <span class="stringliteral">"Not valid!"</span> << std::endl;</div>
|
||||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> this->k_r[2][j].eval() + this->k_r[3][j].eval());</div>
|
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> abort();</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> }</div>
|
||||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::cout << <span class="stringliteral">"Not valid!"</span> << std::endl;</div>
|
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>}</div>
|
||||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> 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"><a class="line" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8"> 79</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="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> this->particles.push_back(particle);</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"> 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> this->particles.push_back(particle);</div>
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9"> 84</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="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> r(2) *= -2.;</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="keywordtype">double</span> f = this-><a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>(this-><a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) / (this-><a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> * this-><a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>);</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> <span class="keywordflow">return</span> f * r;</div>
|
||||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">double</span> f = this-><a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>(this-><a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>) / (this-><a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a> * this-><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>}</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> </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"><a class="line" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c"> 92</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="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> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., this->B_0};</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"> 95</span>}</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->B_0};</div>
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce"> 97</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="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="comment">// Calculate the difference between the particles' position</span></div>
|
||||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce"> 100</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j)</div>
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> res = this->particles[i].r_vec - this->particles[j].r_vec;</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> </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->particles[j];</div>
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="comment">// Get the distance between the particles</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' position</span></div>
|
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordtype">double</span> norm = arma::norm(res, 2);</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->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> </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> <span class="keywordflow">return</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>(res * this->particles[j].q / (norm * norm * norm));</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"> 107</span> </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"><a class="line" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56"> 108</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="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// Multiply res with p_j's charge divided by the norm cubed</span></div>
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span>{</div>
|
||||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_class" href="classParticle.html">Particle</a> p = this->particles[i];</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">if</span> (arma::norm(p.<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a>) > this->d) {</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> <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="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"> 115</span> </div>
|
||||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_class" href="classParticle.html">Particle</a> p = this->particles[i];</div>
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> force =</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> p.<a class="code hl_variable" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">q</a> * (this-><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="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>) > this->d) {</div>
|
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> arma::cross(p.<a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>, this->external_B_field(p.<a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</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> </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> <span class="keywordflow">return</span> force;</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>}</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-><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"><a class="line" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b"> 123</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="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->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"> 124</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> <a class="code hl_class" href="classParticle.html">Particle</a> p = this->particles[i];</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> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> res;</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"><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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < this->particles.size(); j++) {</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> <span class="keywordflow">if</span> (i == j) {</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->particles[i];</div>
|
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">continue</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"> 134</span> res += this-><a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(i, j);</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 < this->particles.size(); j++) {</div>
|
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
|
||||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (i == j) {</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> <span class="keywordflow">continue</span>;</div>
|
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</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="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span>}</div>
|
||||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
<div class="line"><a id="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-><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"><a class="line" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8"> 140</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="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
|
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span>{</div>
|
||||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
|
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">if</span> (arma::norm(this->particles[i].r_vec) > this-><a class="code hl_variable" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">d</a>) {</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> <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="l00144" name="l00144"></a><span class="lineno"> 144</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> </div>
|
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">return</span> this-><a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(i) - this-><a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(i);</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-><a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(i) - this-><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#a36946152fd951b1f7c346c51ff900d8e"> 148</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="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> </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> std::vector<Particle> original_particles = this-><a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</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> std::vector<Particle> tmp_particles = this-><a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>;</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> </div>
|
||||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> std::vector<Particle> original_particles = this-><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> <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="l00155" name="l00155"></a><span class="lineno"> 155</span> std::vector<Particle> tmp_particles = this-><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> <span class="keywordflow">if</span> (particle_interaction) {</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> force = &<a class="code hl_function" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a>;</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"> 158</span> <span class="keywordflow">else</span> {</div>
|
||||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> force = &<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> force = &<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a>;</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> }</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 = &<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> <span class="keywordtype">size_t</span> size = this->particles.size();</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"> 163</span> </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> this-><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="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordtype">size_t</span> size = this->particles.size();</div>
|
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> this-><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="l00166" name="l00166"></a><span class="lineno"> 166</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> this-><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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < 4; i++) {</div>
|
||||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> this-><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><span class="preprocessor">#pragma omp parallel for</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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < this->particles.size(); j++) {</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 < 4; i++) {</div>
|
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> this-><a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[i][j] = (this->*force)(j) / this->particles[j].m;</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> this-><a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[i][j] = this->particles[j].v_vec;</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 < this->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-><a class="code hl_variable" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">k_v</a>[i][j] = (this->*force)(j) / this->particles[j].m;</div>
|
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_class" href="classParticle.html">Particle</a> *p = &tmp_particles[j];</div>
|
||||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> this-><a class="code hl_variable" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">k_r</a>[i][j] = this->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> p-><a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a> = original_particles[j].v_vec + this-><a class="code hl_function" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">v_func</a>(i, j, dt);</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 = &tmp_particles[j];</div>
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> p-><a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> = original_particles[j].r_vec + this-><a class="code hl_function" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a>(i, j, dt);</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> }</div>
|
||||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> p-><a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a> = original_particles[j].v_vec + this-><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->particles.swap(tmp_particles);</div>
|
||||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> p-><a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> = original_particles[j].r_vec + this-><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> }</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> this-><a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</div>
|
||||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> this->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> </div>
|
||||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> this-><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"><a class="line" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e"> 183</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="l00184" name="l00184"></a><span class="lineno"> 184</span>}</div>
|
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>{</div>
|
||||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
|
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordtype">size_t</span> size = this->particles.size();</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> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> force_res[size];</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> <a class="code hl_class" href="classParticle.html">Particle</a> *p;</div>
|
||||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> std::vector<Particle> new_state = this-><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> </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> <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="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> <span class="keywordflow">if</span> (particle_interaction) {</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> force = &<a class="code hl_function" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap::total_force</a>;</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> }</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> <span class="keywordflow">else</span> {</div>
|
||||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> force = &<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> force = &<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap::total_force_external</a>;</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> }</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 = &<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><span class="preprocessor">#pragma omp parallel for</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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < size; i++) {</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> force_res[i] = (this->*force)(i);</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 < this->particles.size(); i++) {</div>
|
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
|
||||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> p = &new_state[i];</div>
|
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span><span class="preprocessor">#pragma omp parallel for private(p)</span></div>
|
||||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> p-><a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a> += dt * (this->*force)(i) / p-><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="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < size; i++) {</div>
|
||||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> p-><a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> += dt * this->particles[i].v_vec;</div>
|
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> p = &this->particles[i];</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> p-><a class="code hl_variable" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">r_vec</a> += dt * p-><a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a>;</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> p-><a class="code hl_variable" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">v_vec</a> += dt * force_res[i] / p-><a class="code hl_variable" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">m</a>;</div>
|
||||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> this->particles = new_state;</div>
|
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> }</div>
|
||||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> this-><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> </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> this-><a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a> += dt;</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>}</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> </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"><a class="line" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599"> 212</a></span><a class="code hl_struct" href="structsimulation.html">simulation_t</a> <a class="code hl_function" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">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="l00213" name="l00213"></a><span class="lineno"> 213</span>{</div>
|
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> std::string method,</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> <span class="keywordtype">bool</span> particle_interaction)</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->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> <span class="keywordtype">double</span> dt = time / (double)steps;</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> </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="keywordtype">unsigned</span> <span class="keywordtype">int</span> size = this->particles.size();</div>
|
||||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">"rk4"</span>) {</div>
|
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> </div>
|
||||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> func = &<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> <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#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>(steps)),</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> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a>(size, <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>(steps))};</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">"euler"</span>) {</div>
|
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> </div>
|
||||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> func = &<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> void (<a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>::*func)(double, bool);</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> <span class="keywordflow">if</span> (method == <span class="stringliteral">"rk4"</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> func = &<a class="code hl_function" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap::evolve_RK4</a>;</div>
|
||||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> std::cout << <span class="stringliteral">"Not a valid method!"</span> << 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> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (method == <span class="stringliteral">"euler"</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"> 228</span> func = &<a class="code hl_function" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a>;</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> }</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 < steps; j++) {</div>
|
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keywordflow">else</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 < this->particles.size(); i++) {</div>
|
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> std::cout << <span class="stringliteral">"Not a valid method!"</span> << std::endl;</div>
|
||||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> res[i][j] = this->particles[i].r_vec;</div>
|
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> abort();</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> }</div>
|
||||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> (this->*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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < steps; j++) {</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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < size; i++) {</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> res.r_vecs[i][j] = this->particles[i].r_vec;</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> res.v_vecs[i][j] = this->particles[i].v_vec;</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> }</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> (this->*func)(dt, particle_interaction);</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> }</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> </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">return</span> res;</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">'/'</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> path += <span class="charliteral">'/'</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> }</div>
|
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"><a class="line" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57"> 246</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="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> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps,</div>
|
||||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> std::cout << <span class="stringliteral">"Hello"</span> << std::endl;</div>
|
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> std::string method,</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="keywordtype">bool</span> particle_interaction)</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>{</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> <span class="keywordflow">if</span> (path.back() != <span class="charliteral">'/'</span>) {</div>
|
||||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <a class="code hl_typedef" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> res = this-><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> path += <span class="charliteral">'/'</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> }</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> <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="l00255" name="l00255"></a><span class="lineno"> 255</span> </div>
|
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> std::cout << <span class="stringliteral">"Hello"</span> << std::endl;</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>;</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 < this->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">"particle_"</span> + std::to_string(i) + <span class="stringliteral">".txt"</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> &vec : res[i]) {</div>
|
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res =</div>
|
||||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> ofile << vec(0) << <span class="stringliteral">","</span> << vec(1) << <span class="stringliteral">","</span> << vec(2) << <span class="stringliteral">"\n"</span>;</div>
|
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> this-><a class="code hl_function" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">simulate</a>(time, steps, method, particle_interaction);</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> </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> std::ofstream ofile;</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> </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><span class="preprocessor">#pragma omp parallel for private(ofile)</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> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < this->particles.size(); i++) {</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> ofile.open(path + <span class="stringliteral">"particle_"</span> + std::to_string(i) + <span class="stringliteral">"_r.txt"</span>);</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> <span class="keywordflow">for</span> (<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> &vec : res.r_vecs[i]) {</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-><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> ofile << vec(0) << <span class="stringliteral">","</span> << vec(1) << <span class="stringliteral">","</span> << vec(2) << <span class="stringliteral">"\n"</span>;</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> ofile.close();</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> ofile.open(path + <span class="stringliteral">"particle_"</span> + std::to_string(i) + <span class="stringliteral">"_v.txt"</span>);</div>
|
||||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">for</span> (<a class="code hl_class" href="classParticle.html">Particle</a> p : this->particles) {</div>
|
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">for</span> (<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> &vec : res.v_vecs[i]) {</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) < this->d) {</div>
|
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> ofile << <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(0), 10, 8) << <span class="stringliteral">","</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> << <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(1), 8, 10) << <span class="stringliteral">","</span></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> << <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(vec(2), 8, 10) << <span class="stringliteral">"\n"</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> }</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> ofile.close();</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->particles.size();</div>
|
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</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>}</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> </div>
|
||||||
|
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b"> 281</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,</div>
|
||||||
|
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> std::string method,</div>
|
||||||
|
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordtype">bool</span> particle_interaction)</div>
|
||||||
|
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span>{</div>
|
||||||
|
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res =</div>
|
||||||
|
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> this-><a class="code hl_function" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">simulate</a>(time, steps, method, particle_interaction);</div>
|
||||||
|
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> </div>
|
||||||
|
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordtype">int</span> particles_left = 0;</div>
|
||||||
|
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
|
||||||
|
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">for</span> (<a class="code hl_class" href="classParticle.html">Particle</a> p : this->particles) {</div>
|
||||||
|
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="keywordflow">if</span> (arma::norm(p.r_vec) < this->d) {</div>
|
||||||
|
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> particles_left++;</div>
|
||||||
|
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> }</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> <span class="keywordflow">return</span> (<span class="keywordtype">double</span>)particles_left / (double)this->particles.size();</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><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::get_r(<span class="keywordtype">int</span> i)</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="keywordflow">return</span> this->particles[i].r_vec;</div>
|
||||||
|
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span>}</div>
|
||||||
|
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> </div>
|
||||||
|
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span><span class="keywordtype">double</span> PenningTrap::get_t()</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> <span class="keywordflow">return</span> this-><a class="code hl_variable" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">t</a>;</div>
|
||||||
|
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</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#l00021">Particle.hpp:21</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00023">Particle.hpp:23</a></div></div>
|
<div class="ttc" id="aclassParticle_html_a566dcc1de4bdc01251776948798ea8e1"><div class="ttname"><a href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle::q</a></div><div class="ttdeci">double q</div><div class="ttdoc">Charge.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00023">Particle.hpp:23</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
|
<div class="ttc" id="aclassParticle_html_a879692772803d6ab65fa4993b54aea6e"><div class="ttname"><a href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle::v_vec</a></div><div class="ttdeci">vec_3d v_vec</div><div class="ttdoc">velocity</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00026">Particle.hpp:26</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
|
<div class="ttc" id="aclassParticle_html_aedcc7e1bc53b0e2b1a4a07c9a1b47563"><div class="ttname"><a href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle::m</a></div><div class="ttdeci">double m</div><div class="ttdoc">Mass.</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00024">Particle.hpp:24</a></div></div>
|
||||||
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
|
<div class="ttc" id="aclassParticle_html_af9497cd8f2dcad0fad54f571ddb383e6"><div class="ttname"><a href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle::r_vec</a></div><div class="ttdeci">vec_3d r_vec</div><div class="ttdoc">position</div><div class="ttdef"><b>Definition:</b> <a href="Particle_8hpp_source.html#l00025">Particle.hpp:25</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html"><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:31</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< Particle > 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_a0112525d9e79a472e761f8ef402a339f"><div class="ttname"><a href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap::particles</a></div><div class="ttdeci">std::vector< Particle > particles</div><div class="ttdoc">The particles in the Penning trap.</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="rk4", 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_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="rk4", 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#l00281">PenningTrap.cpp:281</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#l00033">PenningTrap.hpp:33</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_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#l00084">PenningTrap.cpp:84</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_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#l00140">PenningTrap.cpp:140</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_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#l00040">PenningTrap.hpp:40</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_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#l00148">PenningTrap.cpp:148</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_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#l00061">PenningTrap.cpp:61</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_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#l00123">PenningTrap.cpp:123</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="rk4", 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#l00035">PenningTrap.hpp:35</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#l00079">PenningTrap.cpp:79</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_a6e9776ff5b149f01080800716455d7c8"><div class="ttname"><a href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a></div><div class="ttdeci">void add_particle(Particle particle)</div><div class="ttdoc">Add a particle to the system.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00082">PenningTrap.cpp:82</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00036">PenningTrap.hpp:36</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00035">PenningTrap.hpp:35</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_a9ae34ad740a230e667e96bc6ee8730ce"><div class="ttname"><a href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec_3d force_on_particle(unsigned int i, unsigned int j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00097">PenningTrap.cpp:97</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_a9ae34ad740a230e667e96bc6ee8730ce"><div class="ttname"><a href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec_3d force_on_particle(unsigned int i, unsigned int j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00100">PenningTrap.cpp:100</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_aaf105828121c4a33cc2b217453c20317"><div class="ttname"><a href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap::V_0</a></div><div class="ttdeci">std::function< double(double)> V_0</div><div class="ttdoc">Applied potential.</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_aaf105828121c4a33cc2b217453c20317"><div class="ttname"><a href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap::V_0</a></div><div class="ttdeci">std::function< double(double)> V_0</div><div class="ttdoc">Applied potential.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00033">PenningTrap.hpp:33</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00183">PenningTrap.cpp:183</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00186">PenningTrap.cpp:186</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_abbb832a85139b1a56ebde57d7b8f9a57"><div class="ttname"><a href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, unsigned int steps, std::string method="rk4", 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#l00246">PenningTrap.cpp:246</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="rk4", bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_acbf065c9c125682329ad82a8d166554c"><div class="ttname"><a href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap::external_B_field</a></div><div class="ttdeci">vec_3d external_B_field(vec_3d r)</div><div class="ttdoc">Calculate B at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00092">PenningTrap.cpp:92</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_ae09ef9cfa7e4ed1c108c8576405b3599"><div class="ttname"><a href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">PenningTrap::simulate</a></div><div class="ttdeci">simulation_t simulate(double time, unsigned int steps, std::string method="rk4", 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#l00212">PenningTrap.cpp:212</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< double(double)> 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_ae670d7de621acdb343b01af098086f63"><div class="ttname"><a href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap::PenningTrap</a></div><div class="ttdeci">PenningTrap(double B_0=T, std::function< double(double)> 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#l00015">PenningTrap.cpp:15</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_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#l00108">PenningTrap.cpp:108</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_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#l00038">PenningTrap.hpp:38</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_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#l00043">PenningTrap.cpp:43</a></div></div>
|
||||||
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
|
|
||||||
<div class="ttc" id="aconstants_8hpp_html_a4e451456ad7e9276ed0afa42826e7ccb"><div class="ttname"><a href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">K_E</a></div><div class="ttdeci">#define K_E</div><div class="ttdoc">Coulomb constant. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00015">constants.hpp:15</a></div></div>
|
<div class="ttc" id="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="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="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_a7c2dfa854274262c4e00e4ef0ab2ce23"><div class="ttname"><a href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></div><div class="ttdeci">std::vector< arma::vec::fixed< 3 > > 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_a7c2dfa854274262c4e00e4ef0ab2ce23"><div class="ttname"><a href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></div><div class="ttdeci">std::vector< arma::vec::fixed< 3 > > sim_cols</div><div class="ttdoc">Typedef for the column of the result vector from simulating particles.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00024">typedefs.hpp:24</a></div></div>
|
||||||
<div class="ttc" id="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > vec_3d</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
|
||||||
<div class="ttc" id="atypedefs_8hpp_html_aec69d34220fff45de238b9e01f2686af"><div class="ttname"><a href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></div><div class="ttdeci">std::vector< sim_cols > 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< sim_cols > sim_arr</div><div class="ttdoc">Typedef for the result of the simulate method.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00032">typedefs.hpp:32</a></div></div>
|
||||||
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
|
<div class="ttc" id="autils_8hpp_html_a6fdd7217b750aff5b6295ece7cbdeffa"><div class="ttname"><a href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00074">utils.cpp:74</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 -->
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ $(document).ready(function(){initNavTree('PenningTrap_8hpp.html',''); initResiza
|
||||||
<code>#include "<a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>"</code><br />
|
<code>#include "<a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>"</code><br />
|
||||||
<code>#include "<a class="el" href="constants_8hpp_source.html">constants.hpp</a>"</code><br />
|
<code>#include "<a class="el" href="constants_8hpp_source.html">constants.hpp</a>"</code><br />
|
||||||
<code>#include "<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>"</code><br />
|
<code>#include "<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>"</code><br />
|
||||||
|
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</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">
|
||||||
|
|
|
||||||
|
|
@ -111,105 +111,111 @@ $(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 "<a class="code" href="Particle_8hpp.html">Particle.hpp</a>"</span></div>
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include "<a class="code" href="Particle_8hpp.html">Particle.hpp</a>"</span></div>
|
||||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include "<a class="code" href="constants_8hpp.html">constants.hpp</a>"</span></div>
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include "<a class="code" href="constants_8hpp.html">constants.hpp</a>"</span></div>
|
||||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include "<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>"</span></div>
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include "<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>"</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 "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</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(+ : vec_3d : 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><span class="keyword">private</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<double(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a>; </div>
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716"> 33</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="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="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317"> 34</a></span> std::function<double(<span class="keywordtype">double</span>)> <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#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="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2"> 35</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"><a class="line" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f"> 36</a></span> std::vector<Particle> <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</a>; </div>
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e"> 36</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#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="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f"> 37</a></span> std::vector<Particle> <a class="code hl_variable" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">particles</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="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4"> 38</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="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640"> 40</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="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"> 42</span> </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> <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="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="l00054" name="l00054"></a><span class="lineno"> 54</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> <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="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keyword">public</span>:</div>
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(</div>
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="keyword">public</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="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(</div>
|
||||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</div>
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</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="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="l00077" name="l00077"></a><span class="lineno"> 77</span> std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</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="l00078" name="l00078"></a><span class="lineno"> 78</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="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="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="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="l00080" name="l00080"></a><span class="lineno"> 80</span> </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="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a>(</div>
|
||||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</div>
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</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="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="l00091" name="l00091"></a><span class="lineno"> 91</span> std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</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="l00092" name="l00092"></a><span class="lineno"> 92</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="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</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="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="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
||||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::vector<Particle> <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="l00103" name="l00103"></a><span class="lineno"> 103</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> std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</div>
|
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> std::vector<Particle> <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> [](<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="l00105" name="l00105"></a><span class="lineno"> 105</span> std::function<<span class="keywordtype">double</span>(<span class="keywordtype">double</span>)> <a class="code hl_variable" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">V_0</a> =</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="l00106" name="l00106"></a><span class="lineno"> 106</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="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</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="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="l00108" name="l00108"></a><span class="lineno"> 108</span> </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> <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="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="l00114" name="l00114"></a><span class="lineno"> 114</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> <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="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="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
|
||||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</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="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="l00130" name="l00130"></a><span class="lineno"> 130</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"> 141</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="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i);</div>
|
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </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> <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="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="l00153" name="l00153"></a><span class="lineno"> 153</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> <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="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="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
|
||||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</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="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="l00169" name="l00169"></a><span class="lineno"> 169</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="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="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="l00176" name="l00176"></a><span class="lineno"> 176</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="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="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="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
|
||||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> std::string method = <span class="stringliteral">"rk4"</span>,</div>
|
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> <a class="code hl_function" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">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">bool</span> particle_interaction = <span class="keyword">true</span>);</div>
|
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> std::string method = <span class="stringliteral">"rk4"</span>,</div>
|
||||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
|
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordtype">bool</span> particle_interaction = <span class="keyword">true</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="l00197" name="l00197"></a><span class="lineno"> 197</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">"rk4"</span>,</div>
|
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</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="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="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps, std::string method = <span class="stringliteral">"rk4"</span>,</div>
|
||||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
|
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</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="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
|
||||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> std::string method = <span class="stringliteral">"rk4"</span>,</div>
|
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</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="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="l00221" name="l00221"></a><span class="lineno"> 221</span> std::string method = <span class="stringliteral">"rk4"</span>,</div>
|
||||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span>};</div>
|
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</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="l00223" name="l00223"></a><span class="lineno"> 223</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="l00224" name="l00224"></a><span class="lineno"> 224</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> get_r(<span class="keywordtype">int</span> i);</div>
|
||||||
|
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordtype">double</span> get_t();</div>
|
||||||
|
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span>};</div>
|
||||||
|
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
|
||||||
|
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span><span class="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#l00021">Particle.hpp:21</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html"><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:31</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< Particle > 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_a0112525d9e79a472e761f8ef402a339f"><div class="ttname"><a href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap::particles</a></div><div class="ttdeci">std::vector< Particle > particles</div><div class="ttdoc">The particles in the Penning trap.</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="rk4", 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_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="rk4", 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#l00281">PenningTrap.cpp:281</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#l00033">PenningTrap.hpp:33</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_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#l00084">PenningTrap.cpp:84</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_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#l00140">PenningTrap.cpp:140</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_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#l00040">PenningTrap.hpp:40</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_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#l00148">PenningTrap.cpp:148</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_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#l00061">PenningTrap.cpp:61</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_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#l00123">PenningTrap.cpp:123</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="rk4", 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#l00035">PenningTrap.hpp:35</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#l00079">PenningTrap.cpp:79</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_a6e9776ff5b149f01080800716455d7c8"><div class="ttname"><a href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap::add_particle</a></div><div class="ttdeci">void add_particle(Particle particle)</div><div class="ttdoc">Add a particle to the system.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00082">PenningTrap.cpp:82</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00036">PenningTrap.hpp:36</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_a8ca4e21291f60fde619c14099d8c4e8e"><div class="ttname"><a href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap::t</a></div><div class="ttdeci">double t</div><div class="ttdoc">Current time.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00035">PenningTrap.hpp:35</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_a9ae34ad740a230e667e96bc6ee8730ce"><div class="ttname"><a href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec_3d force_on_particle(unsigned int i, unsigned int j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00097">PenningTrap.cpp:97</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_a9ae34ad740a230e667e96bc6ee8730ce"><div class="ttname"><a href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap::force_on_particle</a></div><div class="ttdeci">vec_3d force_on_particle(unsigned int i, unsigned int j)</div><div class="ttdoc">Calculate the force between 2 particles.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00100">PenningTrap.cpp:100</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_aaf105828121c4a33cc2b217453c20317"><div class="ttname"><a href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap::V_0</a></div><div class="ttdeci">std::function< double(double)> V_0</div><div class="ttdoc">Applied potential.</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_aaf105828121c4a33cc2b217453c20317"><div class="ttname"><a href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap::V_0</a></div><div class="ttdeci">std::function< double(double)> V_0</div><div class="ttdoc">Applied potential.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00033">PenningTrap.hpp:33</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00183">PenningTrap.cpp:183</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html_ab9ea97a406534bbe621a95215144875e"><div class="ttname"><a href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap::evolve_forward_euler</a></div><div class="ttdeci">void evolve_forward_euler(double dt, bool particle_interaction=true)</div><div class="ttdoc">Go forward one timestep using the forward Euler method.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00186">PenningTrap.cpp:186</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_abbb832a85139b1a56ebde57d7b8f9a57"><div class="ttname"><a href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap::write_simulation_to_dir</a></div><div class="ttdeci">void write_simulation_to_dir(std::string path, double time, unsigned int steps, std::string method="rk4", 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#l00246">PenningTrap.cpp:246</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="rk4", bool particle_interaction=true)</div><div class="ttdoc">Simulate and write the displacement of all particles to files.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00240">PenningTrap.cpp:240</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html_acbf065c9c125682329ad82a8d166554c"><div class="ttname"><a href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap::external_B_field</a></div><div class="ttdeci">vec_3d external_B_field(vec_3d r)</div><div class="ttdoc">Calculate B at point r.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8cpp_source.html#l00092">PenningTrap.cpp:92</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_ae09ef9cfa7e4ed1c108c8576405b3599"><div class="ttname"><a href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">PenningTrap::simulate</a></div><div class="ttdeci">simulation_t simulate(double time, unsigned int steps, std::string method="rk4", 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#l00212">PenningTrap.cpp:212</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_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#l00108">PenningTrap.cpp:108</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_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#l00038">PenningTrap.hpp:38</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_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#l00043">PenningTrap.cpp:43</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#l00017">constants.hpp:17</a></div></div>
|
||||||
<div class="ttc" id="aconstants_8hpp_html_af40a326b23c68a27cebe60f16634a2cb"><div class="ttname"><a href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a></div><div class="ttdeci">#define V</div><div class="ttdoc">1 Volt. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00019">constants.hpp:19</a></div></div>
|
<div class="ttc" id="aconstants_8hpp_html_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="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< 3 > 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_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > vec_3d</div><div class="ttdoc">Typedef for a fixed 3d arma vector.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00036">typedefs.hpp:36</a></div></div>
|
||||||
<div class="ttc" id="atypedefs_8hpp_html_aec69d34220fff45de238b9e01f2686af"><div class="ttname"><a href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a></div><div class="ttdeci">std::vector< sim_cols > 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< sim_cols > sim_arr</div><div class="ttdoc">Typedef for the result of the simulate method.</div><div class="ttdef"><b>Definition:</b> <a href="typedefs_8hpp_source.html#l00032">typedefs.hpp:32</a></div></div>
|
||||||
|
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
|
||||||
</div><!-- fragment --></div><!-- contents -->
|
</div><!-- fragment --></div><!-- contents -->
|
||||||
</div><!-- doc-content -->
|
</div><!-- doc-content -->
|
||||||
<!-- start footer part -->
|
<!-- start footer part -->
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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 -->
|
||||||
|
|
|
||||||
|
|
@ -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", null ],
|
||||||
|
[ "simulation", "structsimulation.html", null ]
|
||||||
];
|
];
|
||||||
|
|
@ -113,6 +113,8 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
|
||||||
<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#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a>(vec_3d r)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(unsigned int i, unsigned int j)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(unsigned int i, unsigned int j)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a>(double time, unsigned int steps, std::string method="rk4", 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#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a>(double time, unsigned int steps, std::string method="rk4", bool particle_interaction=true)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
|
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>get_r</b>(int i) (defined in <a class="el" href="classPenningTrap.html">PenningTrap</a>)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
|
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>get_t</b>() (defined in <a class="el" href="classPenningTrap.html">PenningTrap</a>)</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>
|
||||||
|
|
@ -120,7 +122,7 @@ $(document).ready(function(){initNavTree('classPenningTrap.html',''); initResiza
|
||||||
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1">PenningTrap</a>(unsigned int i, double B_0=T, std::function< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1">PenningTrap</a>(unsigned int i, double B_0=T, std::function< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73">PenningTrap</a>(std::vector< Particle > particles, double B_0=T, std::function< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73">PenningTrap</a>(std::vector< Particle > particles, double B_0=T, std::function< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a>(unsigned int i, unsigned int j, double dt)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">r_func</a>(unsigned int i, unsigned int j, double dt)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||||
<tr class="even"><td class="entry"><a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a>(double time, unsigned int steps, std::string method="rk4", 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#ae09ef9cfa7e4ed1c108c8576405b3599">simulate</a>(double time, unsigned int steps, std::string method="rk4", 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#a1f668c4433421136ad51741741aa1bc8">total_force</a>(unsigned int i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
||||||
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(unsigned int i)</td><td class="entry"><a class="el" href="classPenningTrap.html">PenningTrap</a></td><td class="entry"></td></tr>
|
<tr class="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>
|
||||||
|
|
|
||||||
|
|
@ -150,15 +150,19 @@ Public Member Functions</h2></td></tr>
|
||||||
<tr class="memitem:ab9ea97a406534bbe621a95215144875e"><td class="memItemLeft" align="right" valign="top">void </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 </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"> </td><td class="mdescRight">Go forward one timestep using the forward Euler method. <br /></td></tr>
|
<tr class="memdesc:ab9ea97a406534bbe621a95215144875e"><td class="mdescLeft"> </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"> </td></tr>
|
<tr class="separator:ab9ea97a406534bbe621a95215144875e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a5331837e6dd7bce807a99edd2ba7e854"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">simulate</a> (double time, unsigned int steps, std::string method="rk4", bool particle_interaction=true)</td></tr>
|
<tr class="memitem:ae09ef9cfa7e4ed1c108c8576405b3599"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">simulation_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">simulate</a> (double time, unsigned int steps, std::string method="rk4", bool particle_interaction=true)</td></tr>
|
||||||
<tr class="memdesc:a5331837e6dd7bce807a99edd2ba7e854"><td class="mdescLeft"> </td><td class="mdescRight">Simulate the particle system inside the Penning trap over a certain amount of time. <br /></td></tr>
|
<tr class="memdesc:ae09ef9cfa7e4ed1c108c8576405b3599"><td class="mdescLeft"> </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"> </td></tr>
|
<tr class="separator:ae09ef9cfa7e4ed1c108c8576405b3599"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:abbb832a85139b1a56ebde57d7b8f9a57"><td class="memItemLeft" align="right" valign="top">void </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="rk4", bool particle_interaction=true)</td></tr>
|
<tr class="memitem:abbb832a85139b1a56ebde57d7b8f9a57"><td class="memItemLeft" align="right" valign="top">void </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="rk4", bool particle_interaction=true)</td></tr>
|
||||||
<tr class="memdesc:abbb832a85139b1a56ebde57d7b8f9a57"><td class="mdescLeft"> </td><td class="mdescRight">Simulate and write the displacement of all particles to files. <br /></td></tr>
|
<tr class="memdesc:abbb832a85139b1a56ebde57d7b8f9a57"><td class="mdescLeft"> </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"> </td></tr>
|
<tr class="separator:abbb832a85139b1a56ebde57d7b8f9a57"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a0194be61c956a9259c747c23e4163c5b"><td class="memItemLeft" align="right" valign="top">double </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="rk4", bool particle_interaction=true)</td></tr>
|
<tr class="memitem:a0194be61c956a9259c747c23e4163c5b"><td class="memItemLeft" align="right" valign="top">double </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="rk4", bool particle_interaction=true)</td></tr>
|
||||||
<tr class="memdesc:a0194be61c956a9259c747c23e4163c5b"><td class="mdescLeft"> </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:a0194be61c956a9259c747c23e4163c5b"><td class="mdescLeft"> </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"> </td></tr>
|
<tr class="separator:a0194be61c956a9259c747c23e4163c5b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:aea6e41b0cef85c498e69b264a81cfd7f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#aea6e41b0cef85c498e69b264a81cfd7f">get_r</a> (int i)</td></tr>
|
||||||
|
<tr class="separator:aea6e41b0cef85c498e69b264a81cfd7f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a62be138b421f0e550399abadc10efd83"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrap.html#a62be138b421f0e550399abadc10efd83">get_t</a> ()</td></tr>
|
||||||
|
<tr class="separator:a62be138b421f0e550399abadc10efd83"><td class="memSeparator" colspan="2"> </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>
|
||||||
|
|
@ -195,7 +199,7 @@ Private Attributes</h2></td></tr>
|
||||||
<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 & Destructor Documentation</h2>
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||||
<a id="ae670d7de621acdb343b01af098086f63" name="ae670d7de621acdb343b01af098086f63"></a>
|
<a id="ae670d7de621acdb343b01af098086f63" name="ae670d7de621acdb343b01af098086f63"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ae670d7de621acdb343b01af098086f63">◆ </a></span>PenningTrap() <span class="overload">[1/3]</span></h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ae670d7de621acdb343b01af098086f63">◆ </a></span>PenningTrap() <span class="overload">[1/3]</span></h2>
|
||||||
|
|
@ -246,7 +250,7 @@ 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#l00015">15</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -306,7 +310,7 @@ 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#l00024">24</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -366,7 +370,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#l00036">36</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -395,7 +399,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#l00079">79</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -434,7 +438,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#l00183">183</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -473,7 +477,7 @@ 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#l00148">148</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -502,7 +506,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00092">92</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -531,7 +535,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00084">84</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -572,7 +576,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00097">97</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -626,7 +630,46 @@ 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#l00281">281</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a id="aea6e41b0cef85c498e69b264a81cfd7f" name="aea6e41b0cef85c498e69b264a81cfd7f"></a>
|
||||||
|
<h2 class="memtitle"><span class="permalink"><a href="#aea6e41b0cef85c498e69b264a81cfd7f">◆ </a></span>get_r()</h2>
|
||||||
|
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> PenningTrap::get_r </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype">int </td>
|
||||||
|
<td class="paramname"><em>i</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
|
||||||
|
<p class="definition">Definition at line <a class="el" href="PenningTrap_8cpp_source.html#l00299">299</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a id="a62be138b421f0e550399abadc10efd83" name="a62be138b421f0e550399abadc10efd83"></a>
|
||||||
|
<h2 class="memtitle"><span class="permalink"><a href="#a62be138b421f0e550399abadc10efd83">◆ </a></span>get_t()</h2>
|
||||||
|
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">double PenningTrap::get_t </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="PenningTrap_8cpp_source.html#l00304">304</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -676,24 +719,24 @@ 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>vec_3d </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#l00061">61</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="ae09ef9cfa7e4ed1c108c8576405b3599" name="ae09ef9cfa7e4ed1c108c8576405b3599"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#a5331837e6dd7bce807a99edd2ba7e854">◆ </a></span>simulate()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ae09ef9cfa7e4ed1c108c8576405b3599">◆ </a></span>simulate()</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"><a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">simulation_t</a> PenningTrap::simulate </td>
|
||||||
<td>(</td>
|
<td>(</td>
|
||||||
<td class="paramtype">double </td>
|
<td class="paramtype">double </td>
|
||||||
<td class="paramname"><em>time</em>, </td>
|
<td class="paramname"><em>time</em>, </td>
|
||||||
|
|
@ -730,12 +773,13 @@ Private Attributes</h2></td></tr>
|
||||||
<tr><td class="paramname">time</td><td>The time to simulate in microseconds </td></tr>
|
<tr><td class="paramname">time</td><td>The time to simulate in microseconds </td></tr>
|
||||||
<tr><td class="paramname">steps</td><td>The amount of steps for the whole simulation </td></tr>
|
<tr><td class="paramname">steps</td><td>The amount of steps for the whole simulation </td></tr>
|
||||||
<tr><td class="paramname">method</td><td>The method to use when moving forward a timestep </td></tr>
|
<tr><td class="paramname">method</td><td>The method to use when moving forward a timestep </td></tr>
|
||||||
<tr><td class="paramname">particle_interaction</td><td>Turn particle interactions on/off </td></tr>
|
<tr><td class="paramname">particle_interaction</td><td>Turn particle interactions on/off</td></tr>
|
||||||
</table>
|
</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#l00212">212</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -764,7 +808,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00140">140</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -794,7 +838,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00108">108</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -823,7 +867,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00123">123</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -879,7 +923,7 @@ Private Attributes</h2></td></tr>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>vec_3d </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>vec_3d </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#l00043">43</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -939,7 +983,7 @@ 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#l00246">246</a> of file <a class="el" href="PenningTrap_8cpp_source.html">PenningTrap.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -966,7 +1010,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#l00033">33</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -992,7 +1036,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#l00035">35</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1017,7 +1061,7 @@ Private Attributes</h2></td></tr>
|
||||||
</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>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 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>
|
||||||
|
|
@ -1042,7 +1086,7 @@ Private Attributes</h2></td></tr>
|
||||||
</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>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 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>
|
||||||
|
|
@ -1068,7 +1112,7 @@ 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#l00037">37</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1094,7 +1138,7 @@ 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#l00036">36</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1120,7 +1164,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#l00034">34</a> of file <a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ var classPenningTrap =
|
||||||
[ "force_on_particle", "classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce", null ],
|
[ "force_on_particle", "classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce", null ],
|
||||||
[ "fraction_of_particles_left", "classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b", null ],
|
[ "fraction_of_particles_left", "classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b", null ],
|
||||||
[ "r_func", "classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648", null ],
|
[ "r_func", "classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648", null ],
|
||||||
[ "simulate", "classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854", null ],
|
[ "simulate", "classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599", null ],
|
||||||
[ "total_force", "classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8", null ],
|
[ "total_force", "classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8", null ],
|
||||||
[ "total_force_external", "classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56", null ],
|
[ "total_force_external", "classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56", null ],
|
||||||
[ "total_force_particles", "classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b", null ],
|
[ "total_force_particles", "classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b", null ],
|
||||||
|
|
|
||||||
|
|
@ -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#acb806e49a688424588e0c501bc57a230">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><span class="mlabel">static</span></td></tr>
|
||||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>test_external_E_field</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
|
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">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><span class="mlabel">static</span></td></tr>
|
||||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>test_force_on_particle</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
|
<tr class="even"><td class="entry"><a class="el" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">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><span class="mlabel">static</span></td></tr>
|
||||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>test_total_force_external</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
|
<tr class="odd"><td class="entry"><a class="el" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">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><span class="mlabel">static</span></td></tr>
|
||||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>test_total_force_particles</b>() (defined in <a class="el" href="classPenningTrapTest.html">PenningTrapTest</a>)</td><td class="entry"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
|
<tr class="even"><td class="entry"><a class="el" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">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><span class="mlabel">static</span></td></tr>
|
||||||
</table></div><!-- contents -->
|
</table></div><!-- contents -->
|
||||||
</div><!-- doc-content -->
|
</div><!-- doc-content -->
|
||||||
<!-- start footer part -->
|
<!-- start footer part -->
|
||||||
|
|
|
||||||
|
|
@ -104,23 +104,32 @@ $(document).ready(function(){initNavTree('classPenningTrapTest.html',''); initRe
|
||||||
<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-static-methods" name="pub-static-methods"></a>
|
||||||
Static Public Member Functions</h2></td></tr>
|
Static Public Member Functions</h2></td></tr>
|
||||||
<tr class="memitem:a542996d72c713636b95e0aa9118f7901"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">test_external_E_field</a> ()</td></tr>
|
<tr class="memitem:a542996d72c713636b95e0aa9118f7901"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">test_external_E_field</a> ()</td></tr>
|
||||||
|
<tr class="memdesc:a542996d72c713636b95e0aa9118f7901"><td class="mdescLeft"> </td><td class="mdescRight">Test that the external E field gives correct values. <br /></td></tr>
|
||||||
<tr class="separator:a542996d72c713636b95e0aa9118f7901"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a542996d72c713636b95e0aa9118f7901"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:acb806e49a688424588e0c501bc57a230"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">test_external_B_field</a> ()</td></tr>
|
<tr class="memitem:acb806e49a688424588e0c501bc57a230"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">test_external_B_field</a> ()</td></tr>
|
||||||
|
<tr class="memdesc:acb806e49a688424588e0c501bc57a230"><td class="mdescLeft"> </td><td class="mdescRight">Test that the external B field gives correct values. <br /></td></tr>
|
||||||
<tr class="separator:acb806e49a688424588e0c501bc57a230"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:acb806e49a688424588e0c501bc57a230"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:addf81fa5692d8146cce5571ccdc5999b"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">test_force_on_particle</a> ()</td></tr>
|
<tr class="memitem:addf81fa5692d8146cce5571ccdc5999b"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">test_force_on_particle</a> ()</td></tr>
|
||||||
|
<tr class="memdesc:addf81fa5692d8146cce5571ccdc5999b"><td class="mdescLeft"> </td><td class="mdescRight">Test that the force between particles gives expected results. <br /></td></tr>
|
||||||
<tr class="separator:addf81fa5692d8146cce5571ccdc5999b"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:addf81fa5692d8146cce5571ccdc5999b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ae104e04dcd21ac63281c908132fdf255"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">test_total_force_external</a> ()</td></tr>
|
<tr class="memitem:ae104e04dcd21ac63281c908132fdf255"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">test_total_force_external</a> ()</td></tr>
|
||||||
|
<tr class="memdesc:ae104e04dcd21ac63281c908132fdf255"><td class="mdescLeft"> </td><td class="mdescRight">Test that the total external force returns expected results. <br /></td></tr>
|
||||||
<tr class="separator:ae104e04dcd21ac63281c908132fdf255"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ae104e04dcd21ac63281c908132fdf255"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">test_total_force_particles</a> ()</td></tr>
|
<tr class="memitem:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">test_total_force_particles</a> ()</td></tr>
|
||||||
|
<tr class="memdesc:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="mdescLeft"> </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:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a0ee2bbf5e26c115164208b89c5a29e3d"><td class="memSeparator" colspan="2"> </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#l00022">22</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="acb806e49a688424588e0c501bc57a230" name="acb806e49a688424588e0c501bc57a230"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#acb806e49a688424588e0c501bc57a230">◆ </a></span>test_external_B_field()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#acb806e49a688424588e0c501bc57a230">◆ </a></span>test_external_B_field()</h2>
|
||||||
|
|
@ -145,7 +154,9 @@ Static Public Member Functions</h2></td></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#l00065">65</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -172,7 +183,9 @@ Static Public Member Functions</h2></td></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#l00026">26</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -199,7 +212,9 @@ Static Public Member Functions</h2></td></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#l00078">78</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -226,7 +241,9 @@ Static Public Member Functions</h2></td></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#l00105">105</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -253,7 +270,9 @@ Static Public Member Functions</h2></td></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#l00121">121</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -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> | <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 -->
|
||||||
|
|
|
||||||
132
docs/dir_634e799a3947388232110823971192a8.html
Normal file
132
docs/dir_634e799a3947388232110823971192a8.html
Normal 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&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&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&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  </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"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </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>
|
||||||
10
docs/dir_634e799a3947388232110823971192a8.js
Normal file
10
docs/dir_634e799a3947388232110823971192a8.js
Normal 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 ]
|
||||||
|
];
|
||||||
|
|
@ -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  </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"> </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  </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"> </td></tr>
|
|
||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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  </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"> </td><td class="mdescRight">The main program for this project. <br /></td></tr>
|
<tr class="memdesc:main_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">The main program for this project. <br /></td></tr>
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
|
@ -115,8 +118,6 @@ Files</h2></td></tr>
|
||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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  </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"> </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"> </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"> </td></tr>
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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"> </td></tr>
|
|
||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </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  </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"> </td><td class="mdescRight">The test suite for the project. <br /></td></tr>
|
<tr class="memdesc:test__suite_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">The test suite for the project. <br /></td></tr>
|
||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
|
|
||||||
|
|
@ -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" ]
|
||||||
];
|
];
|
||||||
|
|
@ -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;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </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;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">▼</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')"> </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;"> </span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">▼</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')"> </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;"> </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;"> </span><span id="arr_1_0_" class="arrow" onclick="toggleFolder('1_0_')">▼</span><span id="img_1_0_" class="iconfopen" onclick="toggleFolder('1_0_')"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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 -->
|
||||||
|
|
|
||||||
|
|
@ -98,33 +98,92 @@ $(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() : <a class="el" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">PenningTrap</a></li>
|
<li>add_particle() : <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 : <a class="el" href="classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716">PenningTrap</a></li>
|
<li>B_0 : <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 : <a class="el" href="classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2">PenningTrap</a></li>
|
<li>d : <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() : <a class="el" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap</a></li>
|
<li>evolve_forward_euler() : <a class="el" href="classPenningTrap.html#ab9ea97a406534bbe621a95215144875e">PenningTrap</a></li>
|
||||||
<li>evolve_RK4() : <a class="el" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap</a></li>
|
<li>evolve_RK4() : <a class="el" href="classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e">PenningTrap</a></li>
|
||||||
<li>external_B_field() : <a class="el" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap</a></li>
|
<li>external_B_field() : <a class="el" href="classPenningTrap.html#acbf065c9c125682329ad82a8d166554c">PenningTrap</a></li>
|
||||||
<li>external_E_field() : <a class="el" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap</a></li>
|
<li>external_E_field() : <a class="el" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">PenningTrap</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_f" name="index_f"></a>- f -</h3><ul>
|
||||||
<li>force_on_particle() : <a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap</a></li>
|
<li>force_on_particle() : <a class="el" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">PenningTrap</a></li>
|
||||||
<li>fraction_of_particles_left() : <a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap</a></li>
|
<li>fraction_of_particles_left() : <a class="el" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">PenningTrap</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
|
||||||
<li>k_r : <a class="el" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap</a></li>
|
<li>k_r : <a class="el" href="classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640">PenningTrap</a></li>
|
||||||
<li>k_v : <a class="el" href="classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4">PenningTrap</a></li>
|
<li>k_v : <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 : <a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle</a></li>
|
<li>m : <a class="el" href="classParticle.html#aedcc7e1bc53b0e2b1a4a07c9a1b47563">Particle</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
|
||||||
<li>Particle() : <a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a></li>
|
<li>Particle() : <a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a></li>
|
||||||
<li>particles : <a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap</a></li>
|
<li>particles : <a class="el" href="classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f">PenningTrap</a></li>
|
||||||
<li>PenningTrap : <a class="el" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232">Particle</a>, <a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a></li>
|
<li>PenningTrap : <a class="el" href="classParticle.html#aa797d319549dc2a0beb06cdbfd430232">Particle</a>, <a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_q" name="index_q"></a>- q -</h3><ul>
|
||||||
<li>q : <a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle</a></li>
|
<li>q : <a class="el" href="classParticle.html#a566dcc1de4bdc01251776948798ea8e1">Particle</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
|
||||||
<li>r_func() : <a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li>
|
<li>r_func() : <a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li>
|
||||||
<li>r_vec : <a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle</a></li>
|
<li>r_vec : <a class="el" href="classParticle.html#af9497cd8f2dcad0fad54f571ddb383e6">Particle</a></li>
|
||||||
<li>simulate() : <a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap</a></li>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
|
||||||
|
<li>simulate() : <a class="el" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">PenningTrap</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
|
||||||
<li>t : <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap</a></li>
|
<li>t : <a class="el" href="classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e">PenningTrap</a></li>
|
||||||
|
<li>test_external_B_field() : <a class="el" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">PenningTrapTest</a></li>
|
||||||
|
<li>test_external_E_field() : <a class="el" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">PenningTrapTest</a></li>
|
||||||
|
<li>test_force_on_particle() : <a class="el" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">PenningTrapTest</a></li>
|
||||||
|
<li>test_total_force_external() : <a class="el" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">PenningTrapTest</a></li>
|
||||||
|
<li>test_total_force_particles() : <a class="el" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">PenningTrapTest</a></li>
|
||||||
<li>total_force() : <a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li>
|
<li>total_force() : <a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li>
|
||||||
<li>total_force_external() : <a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li>
|
<li>total_force_external() : <a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li>
|
||||||
<li>total_force_particles() : <a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li>
|
<li>total_force_particles() : <a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_v" name="index_v"></a>- v -</h3><ul>
|
||||||
<li>V_0 : <a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap</a></li>
|
<li>V_0 : <a class="el" href="classPenningTrap.html#aaf105828121c4a33cc2b217453c20317">PenningTrap</a></li>
|
||||||
<li>v_func() : <a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap</a></li>
|
<li>v_func() : <a class="el" href="classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e">PenningTrap</a></li>
|
||||||
<li>v_vec : <a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle</a></li>
|
<li>v_vec : <a class="el" href="classParticle.html#a879692772803d6ab65fa4993b54aea6e">Particle</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3><a id="index_w" name="index_w"></a>- w -</h3><ul>
|
||||||
<li>write_simulation_to_dir() : <a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap</a></li>
|
<li>write_simulation_to_dir() : <a class="el" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">PenningTrap</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- contents -->
|
</div><!-- contents -->
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,12 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
|
||||||
<li>Particle() : <a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a></li>
|
<li>Particle() : <a class="el" href="classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4">Particle</a></li>
|
||||||
<li>PenningTrap() : <a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a></li>
|
<li>PenningTrap() : <a class="el" href="classPenningTrap.html#ae670d7de621acdb343b01af098086f63">PenningTrap</a></li>
|
||||||
<li>r_func() : <a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li>
|
<li>r_func() : <a class="el" href="classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648">PenningTrap</a></li>
|
||||||
<li>simulate() : <a class="el" href="classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854">PenningTrap</a></li>
|
<li>simulate() : <a class="el" href="classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599">PenningTrap</a></li>
|
||||||
|
<li>test_external_B_field() : <a class="el" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">PenningTrapTest</a></li>
|
||||||
|
<li>test_external_E_field() : <a class="el" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">PenningTrapTest</a></li>
|
||||||
|
<li>test_force_on_particle() : <a class="el" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">PenningTrapTest</a></li>
|
||||||
|
<li>test_total_force_external() : <a class="el" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">PenningTrapTest</a></li>
|
||||||
|
<li>test_total_force_particles() : <a class="el" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">PenningTrapTest</a></li>
|
||||||
<li>total_force() : <a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li>
|
<li>total_force() : <a class="el" href="classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8">PenningTrap</a></li>
|
||||||
<li>total_force_external() : <a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li>
|
<li>total_force_external() : <a class="el" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">PenningTrap</a></li>
|
||||||
<li>total_force_particles() : <a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li>
|
<li>total_force_particles() : <a class="el" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">PenningTrap</a></li>
|
||||||
|
|
|
||||||
|
|
@ -100,16 +100,25 @@ $(document).ready(function(){initNavTree('globals.html',''); initResizable(); })
|
||||||
<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><ul>
|
||||||
<li>__METHOD_NAME__ : <a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li>
|
<li>__METHOD_NAME__ : <a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li>
|
||||||
<li>arma_vector_close_to() : <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() : <a class="el" href="main_8cpp.html#a6451833d72816ef393087956c766125b">main.cpp</a></li>
|
||||||
<li>ASSERT : <a class="el" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">utils.hpp</a></li>
|
<li>ASSERT : <a class="el" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">utils.hpp</a></li>
|
||||||
|
<li>close_to() : <a class="el" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">utils.hpp</a>, <a class="el" href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">utils.cpp</a></li>
|
||||||
<li>DEBUG : <a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
|
<li>DEBUG : <a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
|
||||||
<li>K_E : <a class="el" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">constants.hpp</a></li>
|
<li>K_E : <a class="el" href="constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb">constants.hpp</a></li>
|
||||||
<li>m_assert() : <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() : <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() : <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() : <a class="el" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">utils.hpp</a>, <a class="el" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">utils.cpp</a></li>
|
||||||
|
<li>p1 : <a class="el" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">main.cpp</a></li>
|
||||||
|
<li>p2 : <a class="el" href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46">main.cpp</a></li>
|
||||||
<li>scientific_format() : <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() : <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 : <a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</a></li>
|
<li>sim_arr : <a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</a></li>
|
||||||
<li>sim_cols : <a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">typedefs.hpp</a></li>
|
<li>sim_cols : <a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">typedefs.hpp</a></li>
|
||||||
<li>sim_rows : <a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li>
|
<li>sim_rows : <a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li>
|
||||||
|
<li>simulate_100_particles() : <a class="el" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">main.cpp</a></li>
|
||||||
|
<li>simulate_100_particles_with_time_potential() : <a class="el" href="main_8cpp.html#a330668384dc073980ba11116309bacc5">main.cpp</a></li>
|
||||||
|
<li>simulate_single_particle() : <a class="el" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">main.cpp</a></li>
|
||||||
|
<li>simulate_single_particle_with_different_steps() : <a class="el" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">main.cpp</a></li>
|
||||||
|
<li>simulate_two_particles() : <a class="el" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">main.cpp</a></li>
|
||||||
|
<li>simulation_t : <a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">typedefs.hpp</a></li>
|
||||||
<li>T : <a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">constants.hpp</a></li>
|
<li>T : <a class="el" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">constants.hpp</a></li>
|
||||||
<li>V : <a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">constants.hpp</a></li>
|
<li>V : <a class="el" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">constants.hpp</a></li>
|
||||||
<li>vec_3d : <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">typedefs.hpp</a></li>
|
<li>vec_3d : <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">typedefs.hpp</a></li>
|
||||||
|
|
|
||||||
|
|
@ -99,10 +99,16 @@ $(document).ready(function(){initNavTree('globals_func.html',''); initResizable(
|
||||||
|
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
 <ul>
|
 <ul>
|
||||||
<li>arma_vector_close_to() : <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() : <a class="el" href="main_8cpp.html#a6451833d72816ef393087956c766125b">main.cpp</a></li>
|
||||||
|
<li>close_to() : <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() : <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() : <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() : <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() : <a class="el" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">utils.hpp</a>, <a class="el" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">utils.cpp</a></li>
|
||||||
<li>scientific_format() : <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() : <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() : <a class="el" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">main.cpp</a></li>
|
||||||
|
<li>simulate_100_particles_with_time_potential() : <a class="el" href="main_8cpp.html#a330668384dc073980ba11116309bacc5">main.cpp</a></li>
|
||||||
|
<li>simulate_single_particle() : <a class="el" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">main.cpp</a></li>
|
||||||
|
<li>simulate_single_particle_with_different_steps() : <a class="el" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">main.cpp</a></li>
|
||||||
|
<li>simulate_two_particles() : <a class="el" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">main.cpp</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- contents -->
|
</div><!-- contents -->
|
||||||
</div><!-- doc-content -->
|
</div><!-- doc-content -->
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ $(document).ready(function(){initNavTree('globals_type.html',''); initResizable(
|
||||||
<li>sim_arr : <a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</a></li>
|
<li>sim_arr : <a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">typedefs.hpp</a></li>
|
||||||
<li>sim_cols : <a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">typedefs.hpp</a></li>
|
<li>sim_cols : <a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">typedefs.hpp</a></li>
|
||||||
<li>sim_rows : <a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li>
|
<li>sim_rows : <a class="el" href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">typedefs.hpp</a></li>
|
||||||
|
<li>simulation_t : <a class="el" href="typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6">typedefs.hpp</a></li>
|
||||||
<li>vec_3d : <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">typedefs.hpp</a></li>
|
<li>vec_3d : <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">typedefs.hpp</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- contents -->
|
</div><!-- contents -->
|
||||||
|
|
|
||||||
114
docs/globals_vars.html
Normal file
114
docs/globals_vars.html
Normal 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&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&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&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">
|
||||||
|
 <ul>
|
||||||
|
<li>p1 : <a class="el" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">main.cpp</a></li>
|
||||||
|
<li>p2 : <a class="el" href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46">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>
|
||||||
|
|
@ -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>
|
||||||
<h1><a class="anchor" id="autotoc_md1"></a>
|
<p><a href="https://github.uio.no/FYS3150-G2-2023/Project-3">Repo</a></p>
|
||||||
|
<p><a href="https://pages.github.uio.no/FYS3150-G2-2023/Project-3/">Documentation</a></p>
|
||||||
|
<h1><a class="anchor" id="autotoc_md1"></a>
|
||||||
|
Requirements</h1>
|
||||||
|
<h2><a class="anchor" id="autotoc_md2"></a>
|
||||||
|
Operating systems</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Linux<ul>
|
||||||
|
<li>Has been tested on <a href="https://fedoraproject.org/">Fedora 38</a></li>
|
||||||
|
<li>Will most likely work on other Linux distributions</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>MacOS<ul>
|
||||||
|
<li>Might work, but hasn't been tested</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Windows<ul>
|
||||||
|
<li>Will most likely not work</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2><a class="anchor" id="autotoc_md3"></a>
|
||||||
|
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">./<program-name></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/<script-name></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/<script-name></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 -->
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,10 @@ $(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 <cmath></code><br />
|
<div class="textblock"><code>#include <cmath></code><br />
|
||||||
|
<code>#include <complex></code><br />
|
||||||
<code>#include <fstream></code><br />
|
<code>#include <fstream></code><br />
|
||||||
<code>#include <omp.h></code><br />
|
<code>#include <omp.h></code><br />
|
||||||
<code>#include <string></code><br />
|
<code>#include <string></code><br />
|
||||||
<code>#include <sys/stat.h></code><br />
|
|
||||||
<code>#include <vector></code><br />
|
<code>#include <vector></code><br />
|
||||||
<code>#include "<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>"</code><br />
|
<code>#include "<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>"</code><br />
|
||||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||||
|
|
@ -123,7 +123,7 @@ $(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 </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a7b24a37e8ce9d243351bfc9b24945e63">PARTICLES</a>   100</td></tr>
|
<tr class="memitem:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a7b24a37e8ce9d243351bfc9b24945e63">PARTICLES</a>   100</td></tr>
|
||||||
<tr class="separator:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a7b24a37e8ce9d243351bfc9b24945e63"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a0240ac851181b84ac374872dc5434ee4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a0240ac851181b84ac374872dc5434ee4">N</a>   10000</td></tr>
|
<tr class="memitem:a0240ac851181b84ac374872dc5434ee4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a0240ac851181b84ac374872dc5434ee4">N</a>   40000</td></tr>
|
||||||
<tr class="separator:a0240ac851181b84ac374872dc5434ee4"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a0240ac851181b84ac374872dc5434ee4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a16cdf08eafbd529171c64d69a0ec02b3"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a16cdf08eafbd529171c64d69a0ec02b3">CHARGE</a>   1.</td></tr>
|
<tr class="memitem:a16cdf08eafbd529171c64d69a0ec02b3"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a16cdf08eafbd529171c64d69a0ec02b3">CHARGE</a>   1.</td></tr>
|
||||||
<tr class="separator:a16cdf08eafbd529171c64d69a0ec02b3"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a16cdf08eafbd529171c64d69a0ec02b3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
|
@ -132,15 +132,23 @@ Macros</h2></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:a6451833d72816ef393087956c766125b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a6451833d72816ef393087956c766125b">analytical_solution_particle_1</a> (double t)</td></tr>
|
||||||
|
<tr class="memdesc:a6451833d72816ef393087956c766125b"><td class="mdescLeft"> </td><td class="mdescRight">The analytical solution for particle p1. <br /></td></tr>
|
||||||
|
<tr class="separator:a6451833d72816ef393087956c766125b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a8fdbe2d5a872e50ef5ec1263243589d6"><td class="memItemLeft" align="right" valign="top">void </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 </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"> </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"> </td></tr>
|
<tr class="separator:a8fdbe2d5a872e50ef5ec1263243589d6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a783789519f97c6430081171cacb0ffb1"><td class="memItemLeft" align="right" valign="top">void </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 </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"> </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"> </td></tr>
|
<tr class="separator:a783789519f97c6430081171cacb0ffb1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ac67e0d59227856c4d42e7d01c75e0ad2"><td class="memItemLeft" align="right" valign="top">void </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 </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"> </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"> </td></tr>
|
<tr class="separator:ac67e0d59227856c4d42e7d01c75e0ad2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a213713d6ecc02a32b588ffd179dc7513"><td class="memItemLeft" align="right" valign="top">void </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 </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"> </td><td class="mdescRight">Simulate 100 particles over 50 \( \mu s \). <br /></td></tr>
|
||||||
<tr class="separator:a213713d6ecc02a32b588ffd179dc7513"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a213713d6ecc02a32b588ffd179dc7513"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a330668384dc073980ba11116309bacc5"><td class="memItemLeft" align="right" valign="top">void </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:a330668384dc073980ba11116309bacc5"><td class="memItemLeft" align="right" valign="top">void </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="memdesc:a330668384dc073980ba11116309bacc5"><td class="mdescLeft"> </td><td class="mdescRight">Simulate 100 particles over 500 \( \mu s \) using a time dependent potential. <br /></td></tr>
|
||||||
<tr class="separator:a330668384dc073980ba11116309bacc5"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a330668384dc073980ba11116309bacc5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </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 </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"> </td></tr>
|
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
|
@ -149,9 +157,11 @@ Functions</h2></td></tr>
|
||||||
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:a87da4ef9f2cd753579484824310467b8"><td class="memItemLeft" align="right" valign="top"><a id="a87da4ef9f2cd753579484824310467b8" name="a87da4ef9f2cd753579484824310467b8"></a>
|
||||||
<a class="el" href="classParticle.html">Particle</a> </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> </td><td class="memItemRight" valign="bottom"><b>p1</b> (CHARGE, MASS, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{20., 0., 20.}, <a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 25., 0.})</td></tr>
|
||||||
|
<tr class="memdesc:a87da4ef9f2cd753579484824310467b8"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classParticle.html" title="A class that holds attributes of a particle.">Particle</a> 1. <br /></td></tr>
|
||||||
<tr class="separator:a87da4ef9f2cd753579484824310467b8"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a87da4ef9f2cd753579484824310467b8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memItemLeft" align="right" valign="top"><a id="a90f661586eb3c318fdca6f95ebc4fc46" name="a90f661586eb3c318fdca6f95ebc4fc46"></a>
|
<tr class="memitem:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memItemLeft" align="right" valign="top"><a id="a90f661586eb3c318fdca6f95ebc4fc46" name="a90f661586eb3c318fdca6f95ebc4fc46"></a>
|
||||||
<a class="el" href="classParticle.html">Particle</a> </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>
|
<a class="el" href="classParticle.html">Particle</a> </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="memdesc:a90f661586eb3c318fdca6f95ebc4fc46"><td class="mdescLeft"> </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:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a90f661586eb3c318fdca6f95ebc4fc46"><td class="memSeparator" colspan="2"> </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>
|
||||||
|
|
@ -203,7 +213,7 @@ 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   10000</td>
|
<td class="memname">#define N   40000</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
@ -229,6 +239,35 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="groupheader">Function Documentation</h2>
|
<h2 class="groupheader">Function Documentation</h2>
|
||||||
|
<a id="a6451833d72816ef393087956c766125b" name="a6451833d72816ef393087956c766125b"></a>
|
||||||
|
<h2 class="memtitle"><span class="permalink"><a href="#a6451833d72816ef393087956c766125b">◆ </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#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> analytical_solution_particle_1 </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype">double </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>vec_3d </dd></dl>
|
||||||
|
|
||||||
|
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00038">38</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">◆ </a></span>main()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||||
|
|
||||||
|
|
@ -244,7 +283,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="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#l00194">194</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -263,7 +302,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>
|
||||||
|
|
||||||
|
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00131">131</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -282,7 +323,10 @@ 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#l00091">91</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
<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#l00146">146</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -301,7 +345,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#l00055">55</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -320,7 +366,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#l00088">88</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -339,7 +387,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#l00070">70</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
11
docs/main_8cpp.js
Normal file
11
docs/main_8cpp.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
var main_8cpp =
|
||||||
|
[
|
||||||
|
[ "analytical_solution_particle_1", "main_8cpp.html#a6451833d72816ef393087956c766125b", null ],
|
||||||
|
[ "simulate_100_particles", "main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513", null ],
|
||||||
|
[ "simulate_100_particles_with_time_potential", "main_8cpp.html#a330668384dc073980ba11116309bacc5", 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#a87da4ef9f2cd753579484824310467b8", null ],
|
||||||
|
[ "p2", "main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46", null ]
|
||||||
|
];
|
||||||
|
|
@ -103,148 +103,205 @@ $(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 <cmath></span></div>
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include <cmath></span></div>
|
||||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <fstream></span></div>
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <complex></span></div>
|
||||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <omp.h></span></div>
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <fstream></span></div>
|
||||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <string></span></div>
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <omp.h></span></div>
|
||||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <sys/stat.h></span></div>
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <string></span></div>
|
||||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <vector></span></div>
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <vector></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 "<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>"</span></div>
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include "<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>"</span></div>
|
||||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</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> </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><span class="preprocessor">#define PARTICLES 100</span></div>
|
||||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define N 10000</span></div>
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define N 40000</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 CHARGE 1. </span><span class="comment">// unit: e</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><span class="preprocessor">#define MASS 40. </span><span class="comment">// unit: amu</span></div>
|
||||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
||||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><a class="code hl_class" href="classParticle.html">Particle</a> p1(CHARGE, MASS, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{20., 0., 20.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 25., 0.});</div>
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// Particles used for testing</span></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#a87da4ef9f2cd753579484824310467b8"> 29</a></span><a class="code hl_class" href="classParticle.html">Particle</a> <a class="code hl_variable" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a>(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="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46"> 30</a></span><a class="code hl_class" href="classParticle.html">Particle</a> <a class="code hl_variable" href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46">p2</a>(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="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keywordtype">void</span> simulate_single_particle()</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>{</div>
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="main_8cpp.html#a6451833d72816ef393087956c766125b"> 38</a></span><a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> <a class="code hl_function" href="main_8cpp.html#a6451833d72816ef393087956c766125b">analytical_solution_particle_1</a>(<span class="keywordtype">double</span> t)</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">"Inside single particle sim"</span>);</div>
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>{</div>
|
||||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector<Particle>{p1});</div>
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">double</span> w_0 = <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a> / MASS;</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_z2 = (50. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.) / (MASS * 500. * 500.);</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_p = (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> w_n = (w_0 - std::sqrt(w_0 * w_0 - 2. * w_z2)) / 2.;</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">"Write to dir"</span>);</div>
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordtype">double</span> A_p = (25. + w_n * 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">"output/simulate_single_particle"</span>, time, N);</div>
|
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordtype">double</span> A_n = -(25. + w_p * 20.) / (w_n - w_p);</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> std::complex<double> f =</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_p * std::exp(std::complex<double>(0., -w_p * 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_n * std::exp(std::complex<double>(0., -w_n * 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> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> res{std::real(f), std::imag(f), 20. * std::cos(std::sqrt(w_z2) * t)};</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<Particle>{p1, p2});</div>
|
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> res;</div>
|
||||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap_with_interaction(std::vector<Particle>{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="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
||||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6"> 55</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a>()</div>
|
||||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
|
||||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> trap_no_interaction.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(</div>
|
|
||||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="stringliteral">"output/simulate_2_particles/no_interaction"</span>, time, N, <span class="stringliteral">"rk4"</span>, <span class="keyword">false</span>);</div>
|
|
||||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> trap_with_interaction.write_simulation_to_dir(</div>
|
|
||||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction"</span>, time, N);</div>
|
|
||||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>}</div>
|
|
||||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
|
|
||||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="keywordtype">void</span> simulate_single_particle_with_different_steps()</div>
|
|
||||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>{</div>
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>{</div>
|
||||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Initialize trap with particle 1</span></div>
|
||||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">double</span> time = 50; <span class="comment">// microseconds</span></div>
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector<Particle>{<a class="code hl_variable" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a>});</div>
|
||||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 4; i++) {</div>
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
|
||||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">int</span> steps = 4000 * (i + 1);</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> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector<Particle>{p1});</div>
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// Simulate and write results to file</span></div>
|
||||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> trap.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(<span class="stringliteral">"output/N_steps/RK4/"</span> +</div>
|
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> trap.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(<span class="stringliteral">"output/simulate_single_particle"</span>, time, N,</div>
|
||||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> std::to_string(steps) + <span class="stringliteral">"_steps"</span>,</div>
|
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="stringliteral">"rk4"</span>, <span class="keyword">false</span>);</div>
|
||||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> time, steps, <span class="stringliteral">"rk4"</span>, <span class="keyword">false</span>);</div>
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>}</div>
|
||||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
|
<div class="line"><a id="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="l00070" name="l00070"></a><span class="lineno"><a class="line" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1"> 70</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a>()</div>
|
||||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 4; i++) {</div>
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>{</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="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment">// Initialize traps with particles</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(std::vector<Particle>{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_no_interaction(std::vector<Particle>{<a class="code hl_variable" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a>, <a class="code hl_variable" href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46">p2</a>});</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">"output/N_steps/euler/"</span> +</div>
|
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap_with_interaction(std::vector<Particle>{<a class="code hl_variable" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a>, <a class="code hl_variable" href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46">p2</a>});</div>
|
||||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> std::to_string(steps) + <span class="stringliteral">"_steps"</span>,</div>
|
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
|
||||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> time, steps, <span class="stringliteral">"euler"</span>, <span class="keyword">false</span>);</div>
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
|
||||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</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>}</div>
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="comment">// Simulate and write results to files</span></div>
|
||||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> trap_no_interaction.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(</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="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="stringliteral">"output/simulate_2_particles/no_interaction"</span>, time, N, <span class="stringliteral">"rk4"</span>, <span class="keyword">false</span>);</div>
|
||||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>{</div>
|
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> trap_with_interaction.write_simulation_to_dir(</div>
|
||||||
<div class="line"><a id="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="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction"</span>, time, N);</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="l00083" name="l00083"></a><span class="lineno"> 83</span>}</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="l00084" name="l00084"></a><span class="lineno"> 84</span> </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="l00088" name="l00088"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2"> 88</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a>()</div>
|
||||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> },</div>
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>{</div>
|
||||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> 500., 0);</div>
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></div>
|
||||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</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="l00092" name="l00092"></a><span class="lineno"> 92</span> std::ofstream ofile;</div>
|
||||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</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">"output/simulate_100_particles"</span>, time, N*5);</div>
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// Calculate relative error for RK4</span></div>
|
||||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>}</div>
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> std::string path = <span class="stringliteral">"output/relative_error/RK4/"</span>;</div>
|
||||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</div>
|
||||||
<div class="line"><a id="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="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 4; i++) {</div>
|
||||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span>{</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="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</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="l00094" name="l00094"></a><span class="lineno"> 94</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">"_steps.txt"</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="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector<Particle>{<a class="code hl_variable" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a>});</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="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">"rk4"</span>, <span class="keyword">false</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="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < steps; 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="l00104" name="l00104"></a><span class="lineno"> 104</span> ofile << arma::norm(res.r_vecs[0][i] -</div>
|
||||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
|
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_function" href="main_8cpp.html#a6451833d72816ef393087956c766125b">analytical_solution_particle_1</a>(dt*i))</div>
|
||||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::string path = <span class="stringliteral">"output/time_dependent_potential/"</span>;</div>
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> << <span class="stringliteral">"\n"</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="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
|
||||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> ofile.close();</div>
|
||||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::ofstream ofile;</div>
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
|
||||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
|
||||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">for</span> (<span class="keywordtype">double</span> f : amplitudes) {</div>
|
<div class="line"><a id="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="l00106" name="l00106"></a><span class="lineno"> 106</span> ofile.open(path + <span class="stringliteral">"f_"</span> + std::to_string(f) + <span class="stringliteral">".txt"</span>);</div>
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> path = <span class="stringliteral">"output/relative_error/euler/"</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="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="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i < freq_iterations; i++) {</div>
|
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 4; i++) {</div>
|
||||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordtype">double</span> freq = freq_start + i*freq_increment;</div>
|
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordtype">int</span> steps = 4000 * std::pow(2, i);</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="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordtype">double</span> dt = time / (double)steps;</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="l00117" name="l00117"></a><span class="lineno"> 117</span> ofile.open(path + std::to_string(steps) + <span class="stringliteral">"_steps.txt"</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="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(std::vector<Particle>{<a class="code hl_variable" href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a>});</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="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_struct" href="structsimulation.html">simulation_t</a> res = trap.simulate(time, steps, <span class="stringliteral">"euler"</span>, <span class="keyword">false</span>);</div>
|
||||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> },</div>
|
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < steps; i++) {</div>
|
||||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> 500., 0.);</div>
|
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> ofile << arma::norm(res.r_vecs[0][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">"rk4"</span>, <span class="keyword">true</span>);</div>
|
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_function" href="main_8cpp.html#a6451833d72816ef393087956c766125b">analytical_solution_particle_1</a>(dt*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="l00123" name="l00123"></a><span class="lineno"> 123</span> << <span class="stringliteral">"\n"</span>;</div>
|
||||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> ofile << freq << <span class="stringliteral">","</span> << res << <span class="stringliteral">"\n"</span>;</div>
|
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
|
||||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
|
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> ofile.close();</div>
|
||||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ofile.close();</div>
|
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
|
||||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
|
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>}</div>
|
||||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}</div>
|
|
||||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
|
||||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="keywordtype">int</span> main()</div>
|
|
||||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>{</div>
|
|
||||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
|
||||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> simulate_single_particle();</div>
|
|
||||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
|
<div class="line"><a id="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="l00131" name="l00131"></a><span class="lineno"><a class="line" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513"> 131</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="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
|
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span>{</div>
|
||||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> simulate_single_particle_with_different_steps();</div>
|
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap((<span class="keywordtype">unsigned</span>)100);</div>
|
||||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
|
||||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordtype">double</span> start = omp_get_wtime();</div>
|
|
||||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
|
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
|
||||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="comment">//simulate_100_particles();</span></div>
|
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordtype">double</span> time = 50.; <span class="comment">// microseconds</span></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> simulate_100_particles_with_time_potential();</div>
|
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> trap.<a class="code hl_function" href="classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57">write_simulation_to_dir</a>(<span class="stringliteral">"output/simulate_100_particles"</span>, time, N);</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>}</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="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="main_8cpp.html#a330668384dc073980ba11116309bacc5"> 146</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a330668384dc073980ba11116309bacc5">simulate_100_particles_with_time_potential</a>()</div>
|
||||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> std::cout << <span class="stringliteral">"Time: "</span> << end - start << <span class="stringliteral">" seconds"</span> << std::endl;</div>
|
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>{</div>
|
||||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
|
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</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="l00149" name="l00149"></a><span class="lineno"> 149</span> </div>
|
||||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
|
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordtype">double</span> amplitudes[]{.1, .4, .7};</div>
|
||||||
|
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> </div>
|
||||||
|
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordtype">double</span> freq_start = .2;</div>
|
||||||
|
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordtype">double</span> freq_end = 2.5;</div>
|
||||||
|
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordtype">double</span> freq_increment = .02;</div>
|
||||||
|
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordtype">size_t</span> freq_iterations = (size_t)((freq_end - freq_start) / freq_increment);</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> <span class="keywordtype">double</span> res[4][freq_iterations];</div>
|
||||||
|
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
|
||||||
|
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> std::string path = <span class="stringliteral">"output/time_dependent_potential/"</span>;</div>
|
||||||
|
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(path);</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> std::ofstream ofile;</div>
|
||||||
|
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
|
||||||
|
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordtype">double</span> freq = freq_start;</div>
|
||||||
|
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < freq_iterations; i++) {</div>
|
||||||
|
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> res[0][i] = freq;</div>
|
||||||
|
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> freq += freq_increment;</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="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="preprocessor">#pragma omp parallel for collapse(2) num_threads(4)</span></div>
|
||||||
|
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < 3; i++) {</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 < freq_iterations; j++) {</div>
|
||||||
|
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap(</div>
|
||||||
|
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> (<span class="keywordtype">unsigned</span>)100, <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>,</div>
|
||||||
|
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> std::bind(</div>
|
||||||
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> [](<span class="keywordtype">double</span> f, <span class="keywordtype">double</span> r, <span class="keywordtype">double</span> t) {</div>
|
||||||
|
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">return</span> (25. * <a class="code hl_define" href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a> / 1000.) * (1. + f * std::cos(r * t));</div>
|
||||||
|
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> },</div>
|
||||||
|
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> amplitudes[i], res[0][j], std::placeholders::_1),</div>
|
||||||
|
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> 500., 0.);</div>
|
||||||
|
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> res[i + 1][j] =</div>
|
||||||
|
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> trap.<a class="code hl_function" href="classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b">fraction_of_particles_left</a>(time, N, <span class="stringliteral">"rk4"</span>, <span class="keyword">false</span>);</div>
|
||||||
|
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> }</div>
|
||||||
|
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> }</div>
|
||||||
|
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
|
||||||
|
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> ofile.open(path + <span class="stringliteral">"res.txt"</span>);</div>
|
||||||
|
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < freq_iterations; i++) {</div>
|
||||||
|
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> ofile << res[0][i] << <span class="stringliteral">","</span> << res[1][i] << <span class="stringliteral">","</span> << res[2][i] << <span class="stringliteral">","</span></div>
|
||||||
|
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> << res[3][i] << <span class="stringliteral">"\n"</span>;</div>
|
||||||
|
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
|
||||||
|
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> ofile.close();</div>
|
||||||
|
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span>}</div>
|
||||||
|
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
|
||||||
|
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="keywordtype">int</span> main()</div>
|
||||||
|
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>{</div>
|
||||||
|
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordtype">double</span> t0 = omp_get_wtime();</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> <span class="comment">// simulate_single_particle();</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="comment">// simulate_two_particles();</span></div>
|
||||||
|
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
|
||||||
|
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_function" href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a>();</div>
|
||||||
|
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> </div>
|
||||||
|
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordtype">double</span> t1 = omp_get_wtime();</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> <a class="code hl_function" href="main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513">simulate_100_particles</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="comment">//simulate_100_particles_with_time_potential();</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> <span class="keywordtype">double</span> end = omp_get_wtime();</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> std::cout << <span class="stringliteral">"Time: "</span> << (end - t1) << <span class="stringliteral">" seconds"</span> << std::endl;</div>
|
||||||
|
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
|
||||||
|
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordflow">return</span> 0;</div>
|
||||||
|
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</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#l00021">Particle.hpp:21</a></div></div>
|
||||||
<div class="ttc" id="aclassPenningTrap_html"><div class="ttname"><a href="classPenningTrap.html">PenningTrap</a></div><div class="ttdoc">A class that simulates a Penning trap.</div><div class="ttdef"><b>Definition:</b> <a href="PenningTrap_8hpp_source.html#l00030">PenningTrap.hpp:30</a></div></div>
|
<div class="ttc" id="aclassPenningTrap_html"><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:31</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="rk4", 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_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="rk4", 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#l00281">PenningTrap.cpp:281</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="rk4", 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_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="rk4", 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#l00246">PenningTrap.cpp:246</a></div></div>
|
||||||
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00017">constants.hpp:17</a></div></div>
|
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00017">constants.hpp:17</a></div></div>
|
||||||
<div class="ttc" id="aconstants_8hpp_html_af40a326b23c68a27cebe60f16634a2cb"><div class="ttname"><a href="constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb">V</a></div><div class="ttdeci">#define V</div><div class="ttdoc">1 Volt. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00019">constants.hpp:19</a></div></div>
|
<div class="ttc" id="aconstants_8hpp_html_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="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#l00131">main.cpp:131</a></div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_a330668384dc073980ba11116309bacc5"><div class="ttname"><a href="main_8cpp.html#a330668384dc073980ba11116309bacc5">simulate_100_particles_with_time_potential</a></div><div class="ttdeci">void simulate_100_particles_with_time_potential()</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#l00146">main.cpp:146</a></div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_a6451833d72816ef393087956c766125b"><div class="ttname"><a href="main_8cpp.html#a6451833d72816ef393087956c766125b">analytical_solution_particle_1</a></div><div class="ttdeci">vec_3d 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#l00038">main.cpp:38</a></div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_a783789519f97c6430081171cacb0ffb1"><div class="ttname"><a href="main_8cpp.html#a783789519f97c6430081171cacb0ffb1">simulate_two_particles</a></div><div class="ttdeci">void simulate_two_particles()</div><div class="ttdoc">Simulate 2 particles over the period of 50 with and without particle interactions.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00070">main.cpp:70</a></div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_a87da4ef9f2cd753579484824310467b8"><div class="ttname"><a href="main_8cpp.html#a87da4ef9f2cd753579484824310467b8">p1</a></div><div class="ttdeci">Particle p1(CHARGE, MASS, vec_3d{20., 0., 20.}, vec_3d{0., 25., 0.})</div><div class="ttdoc">Particle 1.</div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_a8fdbe2d5a872e50ef5ec1263243589d6"><div class="ttname"><a href="main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6">simulate_single_particle</a></div><div class="ttdeci">void simulate_single_particle()</div><div class="ttdoc">Simulate a single particle over the period of 50 .</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00055">main.cpp:55</a></div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_a90f661586eb3c318fdca6f95ebc4fc46"><div class="ttname"><a href="main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46">p2</a></div><div class="ttdeci">Particle p2(CHARGE, MASS, vec_3d{25., 25., 0.}, vec_3d{0., 40., 5.})</div><div class="ttdoc">Particle 2.</div></div>
|
||||||
|
<div class="ttc" id="amain_8cpp_html_ac67e0d59227856c4d42e7d01c75e0ad2"><div class="ttname"><a href="main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2">simulate_single_particle_with_different_steps</a></div><div class="ttdeci">void simulate_single_particle_with_different_steps()</div><div class="ttdoc">Simulate a single particle over 50 using different amount of steps and different methods.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00088">main.cpp:88</a></div></div>
|
||||||
|
<div class="ttc" id="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_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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="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#l00074">utils.cpp:74</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 -->
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,21 @@ 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"}]}]},
|
||||||
|
|
@ -38,5 +52,6 @@ var menudata={children:[
|
||||||
{text:"File Members",url:"globals.html",children:[
|
{text:"File Members",url:"globals.html",children:[
|
||||||
{text:"All",url:"globals.html"},
|
{text:"All",url:"globals.html"},
|
||||||
{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"}]}]}]}
|
||||||
|
|
|
||||||
|
|
@ -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 ]
|
||||||
] ]
|
] ]
|
||||||
|
|
|
||||||
|
|
@ -1,95 +1,121 @@
|
||||||
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#a566dcc1de4bdc01251776948798ea8e1":[5,0,0,3],
|
||||||
"classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4":[2,0,0,0],
|
"classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4":[5,0,0,0],
|
||||||
"classParticle.html#a879692772803d6ab65fa4993b54aea6e":[2,0,0,5],
|
"classParticle.html#a879692772803d6ab65fa4993b54aea6e":[5,0,0,5],
|
||||||
"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#af9497cd8f2dcad0fad54f571ddb383e6":[5,0,0,4],
|
||||||
"classPenningTrap.html":[2,0,1],
|
"classPenningTrap.html":[5,0,1],
|
||||||
"classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f":[2,0,1,21],
|
"classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f":[5,0,1,21],
|
||||||
"classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b":[2,0,1,9],
|
"classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b":[5,0,1,9],
|
||||||
"classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716":[2,0,1,17],
|
"classPenningTrap.html#a0cac3509aa96e71a26d3b2c902e27716":[5,0,1,17],
|
||||||
"classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9":[2,0,1,7],
|
"classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9":[5,0,1,7],
|
||||||
"classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8":[2,0,1,12],
|
"classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8":[5,0,1,12],
|
||||||
"classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640":[2,0,1,19],
|
"classPenningTrap.html#a2f168622587709b9e3c49077f0b9a640":[5,0,1,19],
|
||||||
"classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e":[2,0,1,5],
|
"classPenningTrap.html#a36946152fd951b1f7c346c51ff900d8e":[5,0,1,5],
|
||||||
"classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648":[2,0,1,10],
|
"classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648":[5,0,1,10],
|
||||||
"classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b":[2,0,1,14],
|
"classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b":[5,0,1,14],
|
||||||
"classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854":[2,0,1,11],
|
"classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2":[5,0,1,18],
|
||||||
"classPenningTrap.html#a66dfe89c68716b9502927b97f59c27d2":[2,0,1,18],
|
"classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73":[5,0,1,2],
|
||||||
"classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73":[2,0,1,2],
|
"classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8":[5,0,1,3],
|
||||||
"classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8":[2,0,1,3],
|
"classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1":[5,0,1,1],
|
||||||
"classPenningTrap.html#a763700316b502d5900e587c1f61e6bf1":[2,0,1,1],
|
"classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e":[5,0,1,22],
|
||||||
"classPenningTrap.html#a8ca4e21291f60fde619c14099d8c4e8e":[2,0,1,22],
|
"classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce":[5,0,1,8],
|
||||||
"classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce":[2,0,1,8],
|
"classPenningTrap.html#aaf105828121c4a33cc2b217453c20317":[5,0,1,23],
|
||||||
"classPenningTrap.html#aaf105828121c4a33cc2b217453c20317":[2,0,1,23],
|
"classPenningTrap.html#ab9ea97a406534bbe621a95215144875e":[5,0,1,4],
|
||||||
"classPenningTrap.html#ab9ea97a406534bbe621a95215144875e":[2,0,1,4],
|
"classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57":[5,0,1,16],
|
||||||
"classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57":[2,0,1,16],
|
"classPenningTrap.html#acbf065c9c125682329ad82a8d166554c":[5,0,1,6],
|
||||||
"classPenningTrap.html#acbf065c9c125682329ad82a8d166554c":[2,0,1,6],
|
"classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599":[5,0,1,11],
|
||||||
"classPenningTrap.html#ae670d7de621acdb343b01af098086f63":[2,0,1,0],
|
"classPenningTrap.html#ae670d7de621acdb343b01af098086f63":[5,0,1,0],
|
||||||
"classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56":[2,0,1,13],
|
"classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56":[5,0,1,13],
|
||||||
"classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4":[2,0,1,20],
|
"classPenningTrap.html#ae9b5afdaa5cd366e94bd294452a1eed4":[5,0,1,20],
|
||||||
"classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e":[2,0,1,15],
|
"classPenningTrap.html#af98a720da60b0e1a62aefa5f5cb37c1e":[5,0,1,15],
|
||||||
"classPenningTrapTest.html":[2,0,2],
|
"classPenningTrapTest.html":[5,0,2],
|
||||||
"classes.html":[2,1],
|
"classes.html":[5,1],
|
||||||
"constants_8hpp.html":[3,0,0,0],
|
"constants_8hpp.html":[6,0,0,0],
|
||||||
"constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5":[3,0,0,0,1],
|
"constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5":[6,0,0,0,1],
|
||||||
"constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb":[3,0,0,0,0],
|
"constants_8hpp.html#a4e451456ad7e9276ed0afa42826e7ccb":[6,0,0,0,0],
|
||||||
"constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb":[3,0,0,0,2],
|
"constants_8hpp.html#af40a326b23c68a27cebe60f16634a2cb":[6,0,0,0,2],
|
||||||
"constants_8hpp_source.html":[3,0,0,0],
|
"constants_8hpp_source.html":[6,0,0,0],
|
||||||
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[3,0,1],
|
"dir_634e799a3947388232110823971192a8.html":[6,0,1,0],
|
||||||
"dir_d44c64559bbebec7f509842c48db8b23.html":[3,0,0],
|
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[6,0,1],
|
||||||
"files.html":[3,0],
|
"dir_d44c64559bbebec7f509842c48db8b23.html":[6,0,0],
|
||||||
"functions.html":[2,2,0],
|
"files.html":[6,0],
|
||||||
"functions_func.html":[2,2,1],
|
"functions.html":[5,2,0],
|
||||||
"functions_rela.html":[2,2,3],
|
"functions_func.html":[5,2,1],
|
||||||
"functions_vars.html":[2,2,2],
|
"functions_rela.html":[5,2,3],
|
||||||
"globals.html":[3,1,0],
|
"functions_vars.html":[5,2,2],
|
||||||
"globals_defs.html":[3,1,3],
|
"globals.html":[6,1,0],
|
||||||
"globals_func.html":[3,1,1],
|
"globals_defs.html":[6,1,4],
|
||||||
"globals_type.html":[3,1,2],
|
"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,1],
|
||||||
|
"main_8cpp.html#a330668384dc073980ba11116309bacc5":[6,0,1,1,2],
|
||||||
|
"main_8cpp.html#a6451833d72816ef393087956c766125b":[6,0,1,1,0],
|
||||||
|
"main_8cpp.html#a783789519f97c6430081171cacb0ffb1":[6,0,1,1,5],
|
||||||
|
"main_8cpp.html#a87da4ef9f2cd753579484824310467b8":[6,0,1,1,6],
|
||||||
|
"main_8cpp.html#a8fdbe2d5a872e50ef5ec1263243589d6":[6,0,1,1,3],
|
||||||
|
"main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46":[6,0,1,1,7],
|
||||||
|
"main_8cpp.html#ac67e0d59227856c4d42e7d01c75e0ad2":[6,0,1,1,4],
|
||||||
|
"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#a784799c37b5e4fb8bf4f6368e004dec6":[6,0,0,3,4],
|
||||||
"utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a":[3,0,1,6,0],
|
"typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23":[6,0,0,3,2],
|
||||||
"utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746":[3,0,1,6,4],
|
"typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66":[6,0,0,3,3],
|
||||||
"utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de":[3,0,1,6,2],
|
"typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df":[6,0,0,3,5],
|
||||||
"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]
|
||||||
};
|
};
|
||||||
|
|
|
||||||
153
docs/plot__2__particles_8py_source.html
Normal file
153
docs/plot__2__particles_8py_source.html
Normal 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&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&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&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">"output/simulate_2_particles/no_interaction/particle_0_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">"output/simulate_2_particles/no_interaction/particle_1_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction/particle_0_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction/particle_1_r.txt"</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">"particle 1 no interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">"particle 2 no interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">"particle 1 with interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">"particle 2 with interaction"</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">"lightskyblue"</span>,</div>
|
||||||
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">"lightskyblue"</span>,</div>
|
||||||
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">"salmon"</span>,</div>
|
||||||
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">"salmon"</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">","</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"x $(\mu m)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> plt.ylabel(<span class="stringliteral">r"y $(\mu m)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> plt.title(<span class="stringliteral">r"2 particles with and without interactions."</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">"../latex/images/plot_2_particles_xy.pdf"</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">"__main__"</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>
|
||||||
154
docs/plot__3d_8py_source.html
Normal file
154
docs/plot__3d_8py_source.html
Normal 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&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&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&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">"output/simulate_2_particles/no_interaction/particle_0_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">"output/simulate_2_particles/no_interaction/particle_1_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction/particle_0_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction/particle_1_r.txt"</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">"particle 1 no interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">"particle 2 no interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="stringliteral">"particle 1 with interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">"particle 2 with interaction"</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">"lightskyblue"</span>,</div>
|
||||||
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">"deepskyblue"</span>,</div>
|
||||||
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="stringliteral">"salmon"</span>,</div>
|
||||||
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">"darkred"</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">"3d"</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">","</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"x $(\mu m)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> ax.set_ylabel(<span class="stringliteral">r"y $(\mu m)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> ax.set_zlabel(<span class="stringliteral">r"z $(\mu m)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> plt.title(<span class="stringliteral">r"2 particles with and without interactions."</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">"../latex/images/3d_plot.pdf"</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">"__main__"</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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -104,42 +104,39 @@ $(document).ready(function(){initNavTree('plot__particles__left_8py_source.html'
|
||||||
<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> </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><span class="keyword">def </span>main():</div>
|
||||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> files = [</div>
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> <span class="keyword">with</span> open(<span class="stringliteral">"output/time_dependent_potential/res.txt"</span>) <span class="keyword">as</span> f:</div>
|
||||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> <span class="stringliteral">"output/time_dependent_potential/f_0.100000.txt"</span>,</div>
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> lines = f.readlines()</div>
|
||||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="stringliteral">"output/time_dependent_potential/f_0.400000.txt"</span>,</div>
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> x = []</div>
|
||||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">"output/time_dependent_potential/f_0.700000.txt"</span>,</div>
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> y1 = []</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> y2 = []</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> y3 = []</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="keywordflow">for</span> line <span class="keywordflow">in</span> lines:</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> l = line.strip().split(<span class="stringliteral">","</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> x.append(float(l[0]))</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> y1.append(float(l[1]))</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> y2.append(float(l[2]))</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> y3.append(float(l[3]))</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> plt.plot(x,y1,label=f<span class="stringliteral">"amplitude: 0.1"</span>)</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> plt.plot(x,y2,label=f<span class="stringliteral">"amplitude: 0.4"</span>)</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> plt.plot(x,y3,label=f<span class="stringliteral">"amplitude: 0.7"</span>)</div>
|
||||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> a,b = line.strip().split(<span class="stringliteral">","</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> x.append(float(a))</div>
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> plt.xlabel(<span class="stringliteral">r"$\omega_V$ (MHz)"</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> plt.ylabel(<span class="stringliteral">r"Fraction of particles left"</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">"amplitude: {vals[i]}"</span>)</div>
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> plt.title(<span class="stringliteral">r"The fraction of particles left in the Penning trap "</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">"after 500 microseconds for different amplitudes and frequencies"</span>)</div>
|
||||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> plt.xlabel(<span class="stringliteral">r"$\omega_V$"</span>)</div>
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> plt.legend()</div>
|
||||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> plt.ylabel(<span class="stringliteral">r"Fraction of particles left"</span>)</div>
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment"># plt.show()</span></div>
|
||||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> plt.title(<span class="stringliteral">r"The fraction of particles left in the Penning trap "</span></div>
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> plt.savefig(<span class="stringliteral">"../latex/images/particles_left.pdf"</span>)</div>
|
||||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">"after 500 microseconds for different amplitudes and frequencies"</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> plt.legend()</div>
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">"__main__"</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> main()</div>
|
||||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
|
||||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keywordflow">if</span> __name__ == <span class="stringliteral">"__main__"</span>:</div>
|
|
||||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</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>
|
||||||
|
|
|
||||||
167
docs/plot__phase__space_8py_source.html
Normal file
167
docs/plot__phase__space_8py_source.html
Normal 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&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&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&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">"output/simulate_2_particles/no_interaction/"</span>,</div>
|
||||||
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">"output/simulate_2_particles/with_interaction/"</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">"particles without interaction"</span>,</div>
|
||||||
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">"particles with interaction"</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">"particle_0_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="stringliteral">"particle_0_v.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="stringliteral">"particle_1_r.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="stringliteral">"particle_1_v.txt"</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"particle 1 r"</span>,</div>
|
||||||
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="stringliteral">r"particle 1 v"</span>,</div>
|
||||||
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="stringliteral">r"particle 2 r"</span>,</div>
|
||||||
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">r"particle 2 v"</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">"lightskyblue"</span>,</div>
|
||||||
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">"deepskyblue"</span>,</div>
|
||||||
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="stringliteral">"salmon"</span>,</div>
|
||||||
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">"tomato"</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">","</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"t $(\mu s)$"</span>, ylabel = <span class="stringliteral">r"z $(\mu m)$"</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">"../latex/images/phase_space_2_particles_x.pdf"</span>)</div>
|
||||||
|
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> fig2.savefig(<span class="stringliteral">"../latex/images/phase_space_2_particles_z.pdf"</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">"__main__"</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>
|
||||||
165
docs/plot__relative__error_8py_source.html
Normal file
165
docs/plot__relative__error_8py_source.html
Normal 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&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&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&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">"output/relative_error/RK4/"</span>,</div>
|
||||||
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="stringliteral">"output/relative_error/euler/"</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">"4000_steps.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="stringliteral">"8000_steps.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="stringliteral">"16000_steps.txt"</span>,</div>
|
||||||
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="stringliteral">"32000_steps.txt"</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"4000 steps"</span>,</div>
|
||||||
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="stringliteral">r"8000 steps"</span>,</div>
|
||||||
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="stringliteral">r"16000 steps"</span>,</div>
|
||||||
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">r"32000 steps"</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">"Relative error for the RK4 method"</span>,</div>
|
||||||
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">"Relative error for the forward Euler method"</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">"rk4"</span>,</div>
|
||||||
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">"euler"</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"t $(\mu s)$"</span>, ylabel = <span class="stringliteral">r"relative_error $(\mu m)$"</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">"{methods[i]}: {conv_rate}"</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">"../latex/images/phase_space_2_particles_x.pdf"</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">"__main__"</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>
|
||||||
144
docs/plot__single__particle_8py_source.html
Normal file
144
docs/plot__single__particle_8py_source.html
Normal 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&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&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&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">"output/simulate_single_particle/particle_0_r.txt"</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">","</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">"approximation"</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">"analytical"</span>)</div>
|
||||||
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> plt.xlabel(<span class="stringliteral">r"time $(\mu s)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> plt.ylabel(<span class="stringliteral">r"z $(\mu m)$"</span>)</div>
|
||||||
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> plt.title(<span class="stringliteral">r"Movement of a single particle in the x direction"</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("../latex/images/single_particle.pdf")</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">"__main__"</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>
|
||||||
|
|
@ -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 &a, arma::vec &b, double tol=1e-8): utils.cpp'],['../utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a',1,'arma_vector_close_to(arma::vec &a, arma::vec &b, double tol): utils.cpp']]],
|
['analytical_5fsolution_5fparticle_5f1_1',['analytical_solution_particle_1',['../main_8cpp.html#a6451833d72816ef393087956c766125b',1,'main.cpp']]],
|
||||||
['assert_2',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]]
|
['assert_2',['ASSERT',['../utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'utils.hpp']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
|
['close_5fto_0',['close_to',['../utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9',1,'close_to(arma::vec &a, arma::vec &b, double tol=1e-8): utils.cpp'],['../utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2',1,'close_to(arma::vec &a, arma::vec &b, double tol): utils.cpp']]],
|
||||||
|
['constants_2ehpp_1',['constants.hpp',['../constants_8hpp.html',1,'']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['particle_0',['Particle',['../classParticle.html',1,'Particle'],['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle::Particle()']]],
|
['p1_0',['p1',['../main_8cpp.html#a87da4ef9f2cd753579484824310467b8',1,'main.cpp']]],
|
||||||
['particle_2ecpp_1',['Particle.cpp',['../Particle_8cpp.html',1,'']]],
|
['p2_1',['p2',['../main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46',1,'main.cpp']]],
|
||||||
['particle_2ehpp_2',['Particle.hpp',['../Particle_8hpp.html',1,'']]],
|
['particle_2',['Particle',['../classParticle.html',1,'Particle'],['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle::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< double(double)> 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< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73',1,'PenningTrap::PenningTrap(std::vector< Particle > particles, double B_0=T, std::function< double(double)> 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',1,'PenningTrap'],['../classParticle.html#aa797d319549dc2a0beb06cdbfd430232',1,'Particle::PenningTrap()'],['../classPenningTrap.html#ae670d7de621acdb343b01af098086f63',1,'PenningTrap::PenningTrap(double B_0=T, std::function< double(double)> 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< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73',1,'PenningTrap::PenningTrap(std::vector< Particle > particles, double B_0=T, std::function< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)']]],
|
||||||
['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',['../classPenningTrapTest.html',1,'']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,12 @@ var searchData=
|
||||||
['sim_5farr_1',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]],
|
['sim_5farr_1',['sim_arr',['../typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af',1,'typedefs.hpp']]],
|
||||||
['sim_5fcols_2',['sim_cols',['../typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23',1,'typedefs.hpp']]],
|
['sim_5fcols_2',['sim_cols',['../typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23',1,'typedefs.hpp']]],
|
||||||
['sim_5frows_3',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]],
|
['sim_5frows_3',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]],
|
||||||
['simulate_4',['simulate',['../classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854',1,'PenningTrap']]]
|
['simulate_4',['simulate',['../classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599',1,'PenningTrap']]],
|
||||||
|
['simulate_5f100_5fparticles_5',['simulate_100_particles',['../main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513',1,'main.cpp']]],
|
||||||
|
['simulate_5f100_5fparticles_5fwith_5ftime_5fpotential_6',['simulate_100_particles_with_time_potential',['../main_8cpp.html#a330668384dc073980ba11116309bacc5',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']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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#acb806e49a688424588e0c501bc57a230',1,'PenningTrapTest']]],
|
||||||
['total_5fforce_3',['total_force',['../classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8',1,'PenningTrap']]],
|
['test_5fexternal_5fe_5ffield_3',['test_external_E_field',['../classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901',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#addf81fa5692d8146cce5571ccdc5999b',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#ae104e04dcd21ac63281c908132fdf255',1,'PenningTrapTest']]],
|
||||||
|
['test_5ftotal_5fforce_5fparticles_7',['test_total_force_particles',['../classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d',1,'PenningTrapTest']]],
|
||||||
|
['total_5fforce_8',['total_force',['../classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8',1,'PenningTrap']]],
|
||||||
|
['total_5fforce_5fexternal_9',['total_force_external',['../classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56',1,'PenningTrap']]],
|
||||||
|
['total_5fforce_5fparticles_10',['total_force_particles',['../classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b',1,'PenningTrap']]],
|
||||||
|
['typedefs_2ehpp_11',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
4
docs/search/classes_1.js
Normal file
4
docs/search/classes_1.js
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['simulation_0',['simulation',['../structsimulation.html',1,'']]]
|
||||||
|
];
|
||||||
|
|
@ -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 &a, arma::vec &b, double tol=1e-8): utils.cpp'],['../utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a',1,'arma_vector_close_to(arma::vec &a, arma::vec &b, double tol): utils.cpp']]]
|
['analytical_5fsolution_5fparticle_5f1_1',['analytical_solution_particle_1',['../main_8cpp.html#a6451833d72816ef393087956c766125b',1,'main.cpp']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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 &a, arma::vec &b, double tol=1e-8): utils.cpp'],['../utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2',1,'close_to(arma::vec &a, arma::vec &b, double tol): 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']]]
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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#acbf065c9c125682329ad82a8d166554c',1,'PenningTrap']]],
|
||||||
|
['external_5fe_5ffield_3',['external_E_field',['../classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9',1,'PenningTrap']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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): 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): utils.cpp']]],
|
['force_5fon_5fparticle_0',['force_on_particle',['../classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce',1,'PenningTrap']]],
|
||||||
['mkpath_1',['mkpath',['../utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa',1,'mkpath(std::string path, int mode=0777): utils.cpp'],['../utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de',1,'mkpath(std::string path, int mode): utils.cpp']]]
|
['fraction_5fof_5fparticles_5fleft_1',['fraction_of_particles_left',['../classPenningTrap.html#a0194be61c956a9259c747c23e4163c5b',1,'PenningTrap']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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): 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): utils.cpp']]],
|
||||||
['penningtrap_1',['PenningTrap',['../classPenningTrap.html#ae670d7de621acdb343b01af098086f63',1,'PenningTrap::PenningTrap(double B_0=T, std::function< double(double)> 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< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73',1,'PenningTrap::PenningTrap(std::vector< Particle > particles, double B_0=T, std::function< double(double)> 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): utils.cpp'],['../utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de',1,'mkpath(std::string path, int mode): utils.cpp']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648',1,'PenningTrap']]]
|
['particle_0',['Particle',['../classParticle.html#a7af9f8d1fef63dd7643b06629ac7bef4',1,'Particle']]],
|
||||||
|
['penningtrap_1',['PenningTrap',['../classPenningTrap.html#ae670d7de621acdb343b01af098086f63',1,'PenningTrap::PenningTrap(double B_0=T, std::function< double(double)> 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< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)'],['../classPenningTrap.html#a67139e04ef69c0bcffde8f30f67cbf73',1,'PenningTrap::PenningTrap(std::vector< Particle > particles, double B_0=T, std::function< double(double)> V_0=[](double t) { return 25. *V/1000.;}, double d=500., double t=0.)']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['scientific_5fformat_0',['scientific_format',['../utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384',1,'scientific_format(double d, int width=20, int prec=10): utils.cpp'],['../utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d',1,'scientific_format(const std::vector< double > &v, int width=20, int prec=10): utils.cpp'],['../utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746',1,'scientific_format(double d, int width, int prec): utils.cpp'],['../utils_8cpp.html#a58565270b643b24e3132f38c653e0199',1,'scientific_format(const std::vector< double > &v, int width, int prec): utils.cpp']]],
|
['r_5ffunc_0',['r_func',['../classPenningTrap.html#a43e74792ab4b3f9299f35cb64bdb2648',1,'PenningTrap']]]
|
||||||
['simulate_1',['simulate',['../classPenningTrap.html#a5331837e6dd7bce807a99edd2ba7e854',1,'PenningTrap']]]
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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): utils.cpp'],['../utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d',1,'scientific_format(const std::vector< double > &v, int width=20, int prec=10): utils.cpp'],['../utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746',1,'scientific_format(double d, int width, int prec): utils.cpp'],['../utils_8cpp.html#a58565270b643b24e3132f38c653e0199',1,'scientific_format(const std::vector< double > &v, int width, int prec): utils.cpp']]],
|
||||||
['total_5fforce_5fexternal_1',['total_force_external',['../classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56',1,'PenningTrap']]],
|
['simulate_1',['simulate',['../classPenningTrap.html#ae09ef9cfa7e4ed1c108c8576405b3599',1,'PenningTrap']]],
|
||||||
['total_5fforce_5fparticles_2',['total_force_particles',['../classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b',1,'PenningTrap']]]
|
['simulate_5f100_5fparticles_2',['simulate_100_particles',['../main_8cpp.html#a213713d6ecc02a32b588ffd179dc7513',1,'main.cpp']]],
|
||||||
|
['simulate_5f100_5fparticles_5fwith_5ftime_5fpotential_3',['simulate_100_particles_with_time_potential',['../main_8cpp.html#a330668384dc073980ba11116309bacc5',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']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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#acb806e49a688424588e0c501bc57a230',1,'PenningTrapTest']]],
|
||||||
|
['test_5fexternal_5fe_5ffield_1',['test_external_E_field',['../classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901',1,'PenningTrapTest']]],
|
||||||
|
['test_5fforce_5fon_5fparticle_2',['test_force_on_particle',['../classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b',1,'PenningTrapTest']]],
|
||||||
|
['test_5ftotal_5fforce_5fexternal_3',['test_total_force_external',['../classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255',1,'PenningTrapTest']]],
|
||||||
|
['test_5ftotal_5fforce_5fparticles_4',['test_total_force_particles',['../classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d',1,'PenningTrapTest']]],
|
||||||
|
['total_5fforce_5',['total_force',['../classPenningTrap.html#a1f668c4433421136ad51741741aa1bc8',1,'PenningTrap']]],
|
||||||
|
['total_5fforce_5fexternal_6',['total_force_external',['../classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56',1,'PenningTrap']]],
|
||||||
|
['total_5fforce_5fparticles_7',['total_force_particles',['../classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b',1,'PenningTrap']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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#af98a720da60b0e1a62aefa5f5cb37c1e',1,'PenningTrap']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
4
docs/search/functions_a.js
Normal file
4
docs/search/functions_a.js
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['write_5fsimulation_5fto_5fdir_0',['write_simulation_to_dir',['../classPenningTrap.html#abbb832a85139b1a56ebde57d7b8f9a57',1,'PenningTrap']]]
|
||||||
|
];
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
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",
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@ 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#a7c2dfa854274262c4e00e4ef0ab2ce23',1,'typedefs.hpp']]],
|
||||||
['sim_5frows_2',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]]
|
['sim_5frows_2',['sim_rows',['../typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66',1,'typedefs.hpp']]],
|
||||||
|
['simulation_5ft_3',['simulation_t',['../typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6',1,'typedefs.hpp']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['particles_0',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]]
|
['p1_0',['p1',['../main_8cpp.html#a87da4ef9f2cd753579484824310467b8',1,'main.cpp']]],
|
||||||
|
['p2_1',['p2',['../main_8cpp.html#a90f661586eb3c318fdca6f95ebc4fc46',1,'main.cpp']]],
|
||||||
|
['particles_2',['particles',['../classPenningTrap.html#a0112525d9e79a472e761f8ef402a339f',1,'PenningTrap']]]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
118
docs/structsimulation-members.html
Normal file
118
docs/structsimulation-members.html
Normal 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&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&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&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
170
docs/structsimulation.html
Normal 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&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&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&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> |
|
||||||
|
<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 <<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>></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> </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"> </td></tr>
|
||||||
|
<tr class="memitem:a80244043fe839f7ab50cf10da47b4129"><td class="memItemLeft" align="right" valign="top"><a class="el" href="typedefs_8hpp.html#aec69d34220fff45de238b9e01f2686af">sim_arr</a> </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"> </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">◆ </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">◆ </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>
|
||||||
|
|
@ -107,17 +107,18 @@ $(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 "<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>"</code><br />
|
<div class="textblock"><code>#include <iomanip></code><br />
|
||||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
|
||||||
<code>#include <iomanip></code><br />
|
|
||||||
<code>#include <sstream></code><br />
|
<code>#include <sstream></code><br />
|
||||||
<code>#include <string></code><br />
|
<code>#include <string></code><br />
|
||||||
|
<code>#include "<a class="el" href="PenningTrap_8hpp_source.html">PenningTrap.hpp</a>"</code><br />
|
||||||
|
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</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  </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  </td><td class="memItemRight" valign="bottom"><a class="el" href="classPenningTrapTest.html">PenningTrapTest</a></td></tr>
|
||||||
|
<tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr>
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </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>
|
||||||
|
|
@ -150,7 +151,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#l00148">148</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -102,151 +102,157 @@ $(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 "<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>"</span></div>
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include <iomanip></span></div>
|
||||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <sstream></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 <string></span></div>
|
||||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <iomanip></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 <sstream></span></div>
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include "<a class="code" href="PenningTrap_8hpp.html">PenningTrap.hpp</a>"</span></div>
|
||||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <string></span></div>
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</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"><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="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html"> 22</a></span><span class="keyword">class </span><a class="code hl_class" href="classPenningTrapTest.html">PenningTrapTest</a> {</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"> 23</span><span class="keyword">public</span>:</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="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901"> 26</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">test_external_E_field</a>()</div>
|
||||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> {</div>
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</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"> 28</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</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> <span class="comment">// Vector containing inputs and expected results</span></div>
|
||||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::vector<std::pair<arma::vec, arma::vec>> tests;</div>
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> std::vector<std::pair<vec_3d, vec_3d>> tests;</div>
|
||||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</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="l00033" name="l00033"></a><span class="lineno"> 33</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="l00034" name="l00034"></a><span class="lineno"> 34</span> std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 0.}));</div>
|
||||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</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="l00036" name="l00036"></a><span class="lineno"> 36</span> tests.push_back(std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{10., 0., 0.},</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="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{96.4852558, 0., 0.}));</div>
|
||||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</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="l00039" name="l00039"></a><span class="lineno"> 39</span> tests.push_back(std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{10., 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="l00040" name="l00040"></a><span class="lineno"> 40</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{96.4852558, 0., 0.}));</div>
|
||||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
|
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </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="l00042" name="l00042"></a><span class="lineno"> 42</span> tests.push_back(std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 10., 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="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 96.4852558, 0.}));</div>
|
||||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </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="l00045" name="l00045"></a><span class="lineno"> 45</span> tests.push_back(std::make_pair(<a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 10.},</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="l00046" name="l00046"></a><span class="lineno"> 46</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., -192.9705116}));</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"> 47</span> </div>
|
||||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> arma::vec result;</div>
|
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> result;</div>
|
||||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> arma::vec 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#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> v;</div>
|
||||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> std::stringstream msg;</div>
|
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> std::stringstream msg;</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 < tests.size(); i++) {</div>
|
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < tests.size(); i++) {</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="l00052" name="l00052"></a><span class="lineno"> 52</span> v = tests.at(i).first;</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="l00053" name="l00053"></a><span class="lineno"> 53</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a1d58feaa2c9e34cbf26b1c5ed75ca9d9">external_E_field</a>(v);</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> msg.str(<span class="stringliteral">""</span>);</div>
|
|
||||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> msg << <span class="stringliteral">"Testing the external E field at ("</span> << std::setprecision(2)</div>
|
|
||||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> << v(0) << <span class="stringliteral">","</span> << v(1) << <span class="stringliteral">","</span> << v(2) << <span class="stringliteral">")."</span>;</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> </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> msg.str(<span class="stringliteral">""</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 << <span class="stringliteral">"Testing the external E field at ("</span> << std::setprecision(2)</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> << v(0) << <span class="stringliteral">","</span> << v(1) << <span class="stringliteral">","</span> << v(2) << <span class="stringliteral">")."</span>;</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> </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> <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="l00060" name="l00060"></a><span class="lineno"> 60</span> {</div>
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
|
||||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// No point in testing at different points since it'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="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230"> 65</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">test_external_B_field</a>()</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"> 66</span> {</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> <span class="comment">// No point in testing at different points since it's not dependent</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">// on position.</span></div>
|
||||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="stringliteral">"Testing the external B field at (0,0,0)"</span>);</div>
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</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_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> expected{0., 0., <a class="code hl_define" href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a>};</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#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> result = trap.<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>{0., 0., 0.});</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_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="l00071" name="l00071"></a><span class="lineno"> 71</span> {</div>
|
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="stringliteral">"Testing the external B field at (0,0,0)"</span>);</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> }</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="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b"> 78</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">test_force_on_particle</a>()</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="l00079" name="l00079"></a><span class="lineno"> 79</span> {</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="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</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="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> v{0., 0., 0.};</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="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
||||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="comment">// Add particles to test</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="l00084" name="l00084"></a><span class="lineno"> 84</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., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 0.}, v));</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="l00085" name="l00085"></a><span class="lineno"> 85</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., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{1., 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="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>(1., 40., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 3., 4.}, 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="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
||||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="stringliteral">"Testing the force on a particle at (0,0,0) from a "</span></div>
|
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</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="stringliteral">"particle at (1,0,0)."</span>);</div>
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> expected{-1., 0., 0.};</div>
|
||||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> 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> <span class="comment">// Test p0 and p2</span></div>
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</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="l00088" name="l00088"></a><span class="lineno"> 88</span> expected = arma::vec{0, -.024, -.032};</div>
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="stringliteral">"Testing the force on a particle at (0,0,0) from a "</span></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="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="stringliteral">"particle at (1,0,0)."</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="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="stringliteral">"Testing the force on a particle at (0,0,0) from a "</span></div>
|
|
||||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="stringliteral">"particle at (0,3,4)."</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"> 95</span> <span class="keyword">static</span> <span class="keywordtype">void</span> test_total_force_external()</div>
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="comment">// Test p0 and p2</span></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> expected = <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0, -.024, -.032};</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="l00097" name="l00097"></a><span class="lineno"> 97</span> result = trap.<a class="code hl_function" href="classPenningTrap.html#a9ae34ad740a230e667e96bc6ee8730ce">force_on_particle</a>(0, 2);</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="l00098" name="l00098"></a><span class="lineno"> 98</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="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="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="stringliteral">"Testing the force on a particle at (0,0,0) from a "</span></div>
|
||||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="stringliteral">"particle at (0,3,4)."</span>);</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="l00101" name="l00101"></a><span class="lineno"> 101</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="l00102" name="l00102"></a><span class="lineno"> 102</span> </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="l00105" name="l00105"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255"> 105</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">test_total_force_external</a>()</div>
|
||||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="stringliteral">"Testing the total external force on a particle at "</span></div>
|
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {</div>
|
||||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="stringliteral">"(1,2,3) with velocity (3,4,5)"</span>);</div>
|
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</div>
|
||||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</div>
|
||||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{1., 2., 3.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{3., 4., 5.}));</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="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
|
||||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> {</div>
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> expected{395.58954878, -270.15871624, -57.89115348};</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="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> result = trap.<a class="code hl_function" href="classPenningTrap.html#ae72d203b0bfa1b9e72bea28cb2863c56">total_force_external</a>(0);</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="l00113" name="l00113"></a><span class="lineno"> 113</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="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="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="stringliteral">"Testing the total external force on a particle at "</span></div>
|
||||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
|
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="stringliteral">"(1,2,3) with velocity (3,4,5)"</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="l00116" name="l00116"></a><span class="lineno"> 116</span> }</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="l00117" name="l00117"></a><span class="lineno"> 117</span> </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="l00121" name="l00121"></a><span class="lineno"><a class="line" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d"> 121</a></span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">test_total_force_particles</a>()</div>
|
||||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="stringliteral">"Testing the total force of all particles on particle 0 "</span></div>
|
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> {</div>
|
||||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="stringliteral">"with only a single particle"</span>);</div>
|
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_class" href="classPenningTrap.html">PenningTrap</a> trap;</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="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="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{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#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</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#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a> result = trap.<a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">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">"Testing the total force of all particles on particle 0 "</span></div>
|
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="stringliteral">"Testing the total force of all particles on particle 0 "</span></div>
|
||||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="stringliteral">"with 3 other particles."</span>);</div>
|
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="stringliteral">"with only a single particle"</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>(</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> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{1., 0., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</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>(</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> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 1., 0.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 0.}));</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> trap.<a class="code hl_function" href="classPenningTrap.html#a6e9776ff5b149f01080800716455d7c8">add_particle</a>(</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> <a class="code hl_class" href="classParticle.html">Particle</a>(1., 40., <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 1.}, <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>{0., 0., 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> </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> expected = <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a>().fill(-3473.383325);</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> result = trap.<a class="code hl_function" href="classPenningTrap.html#a46a954a0946def199e30fb300ba1c47b">total_force_particles</a>(0);</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> <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="l00143" name="l00143"></a><span class="lineno"> 143</span>}</div>
|
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="stringliteral">"Testing the total force of all particles on particle 0 "</span></div>
|
||||||
|
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="stringliteral">"with 3 other particles."</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"> 146</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="keywordtype">int</span> main()</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> <a class="code hl_function" href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">PenningTrapTest::test_external_E_field</a>();</div>
|
||||||
|
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_function" href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">PenningTrapTest::test_external_B_field</a>();</div>
|
||||||
|
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <a class="code hl_function" href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">PenningTrapTest::test_force_on_particle</a>();</div>
|
||||||
|
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">PenningTrapTest::test_total_force_external</a>();</div>
|
||||||
|
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_function" href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">PenningTrapTest::test_total_force_particles</a>();</div>
|
||||||
|
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">return</span> 0;</div>
|
||||||
|
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</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#l00021">Particle.hpp:21</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#l00022">test_suite.cpp:22</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_a0ee2bbf5e26c115164208b89c5a29e3d"><div class="ttname"><a href="classPenningTrapTest.html#a0ee2bbf5e26c115164208b89c5a29e3d">PenningTrapTest::test_total_force_particles</a></div><div class="ttdeci">static 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#l00121">test_suite.cpp:121</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_a542996d72c713636b95e0aa9118f7901"><div class="ttname"><a href="classPenningTrapTest.html#a542996d72c713636b95e0aa9118f7901">PenningTrapTest::test_external_E_field</a></div><div class="ttdeci">static 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#l00026">test_suite.cpp:26</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_acb806e49a688424588e0c501bc57a230"><div class="ttname"><a href="classPenningTrapTest.html#acb806e49a688424588e0c501bc57a230">PenningTrapTest::test_external_B_field</a></div><div class="ttdeci">static 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#l00065">test_suite.cpp:65</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_addf81fa5692d8146cce5571ccdc5999b"><div class="ttname"><a href="classPenningTrapTest.html#addf81fa5692d8146cce5571ccdc5999b">PenningTrapTest::test_force_on_particle</a></div><div class="ttdeci">static 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#l00078">test_suite.cpp:78</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_ae104e04dcd21ac63281c908132fdf255"><div class="ttname"><a href="classPenningTrapTest.html#ae104e04dcd21ac63281c908132fdf255">PenningTrapTest::test_total_force_external</a></div><div class="ttdeci">static 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#l00105">test_suite.cpp:105</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:31</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_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#l00084">PenningTrap.cpp:84</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#l00123">PenningTrap.cpp:123</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#l00079">PenningTrap.cpp:79</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#l00097">PenningTrap.cpp:97</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#l00092">PenningTrap.cpp:92</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#l00108">PenningTrap.cpp:108</a></div></div>
|
||||||
<div class="ttc" id="aconstants_8hpp_html_a0acb682b8260ab1c60b918599864e2e5"><div class="ttname"><a href="constants_8hpp.html#a0acb682b8260ab1c60b918599864e2e5">T</a></div><div class="ttdeci">#define T</div><div class="ttdoc">1 Tesla. unit:</div><div class="ttdef"><b>Definition:</b> <a href="constants_8hpp_source.html#l00017">constants.hpp:17</a></div></div>
|
<div class="ttc" id="aconstants_8hpp_html_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="atypedefs_8hpp_html_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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="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 &a, arma::vec &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 &a, arma::vec &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#l00060">utils.cpp:60</a></div></div>
|
||||||
</div><!-- fragment --></div><!-- contents -->
|
</div><!-- fragment --></div><!-- contents -->
|
||||||
</div><!-- doc-content -->
|
</div><!-- doc-content -->
|
||||||
<!-- start footer part -->
|
<!-- start footer part -->
|
||||||
|
|
|
||||||
|
|
@ -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> |
|
||||||
<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,11 +107,17 @@ $(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 <vector></code><br />
|
<div class="textblock"><code>#include <armadillo></code><br />
|
||||||
<code>#include <armadillo></code><br />
|
<code>#include <vector></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  </td><td class="memItemRight" valign="bottom"><a class="el" href="structsimulation.html">simulation</a></td></tr>
|
||||||
|
<tr class="memdesc:"><td class="mdescLeft"> </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"> </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< arma::vec::fixed< 3 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></td></tr>
|
<tr class="memitem:a7c2dfa854274262c4e00e4ef0ab2ce23"><td class="memItemLeft" align="right" valign="top">typedef std::vector< arma::vec::fixed< 3 > > </td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></td></tr>
|
||||||
|
|
@ -125,6 +132,10 @@ Typedefs</h2></td></tr>
|
||||||
<tr class="memitem:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="memItemLeft" align="right" valign="top">typedef arma::vec::fixed< 3 > </td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></td></tr>
|
<tr class="memitem:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="memItemLeft" align="right" valign="top">typedef arma::vec::fixed< 3 > </td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></td></tr>
|
||||||
<tr class="memdesc:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="mdescLeft"> </td><td class="mdescRight">Typedef for a fixed 3d arma vector. <br /></td></tr>
|
<tr class="memdesc:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="mdescLeft"> </td><td class="mdescRight">Typedef for a fixed 3d arma vector. <br /></td></tr>
|
||||||
<tr class="separator:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a9f33f4962c8fb62cc5ccd0e4e039a8df"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a784799c37b5e4fb8bf4f6368e004dec6"><td class="memItemLeft" align="right" valign="top"><a id="a784799c37b5e4fb8bf4f6368e004dec6" name="a784799c37b5e4fb8bf4f6368e004dec6"></a>
|
||||||
|
typedef struct <a class="el" href="structsimulation.html">simulation</a> </td><td class="memItemRight" valign="bottom"><b>simulation_t</b></td></tr>
|
||||||
|
<tr class="memdesc:a784799c37b5e4fb8bf4f6368e004dec6"><td class="mdescLeft"> </td><td class="mdescRight">Typedef for PenningTrap::simulation return value. <br /></td></tr>
|
||||||
|
<tr class="separator:a784799c37b5e4fb8bf4f6368e004dec6"><td class="memSeparator" colspan="2"> </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>
|
||||||
|
|
|
||||||
|
|
@ -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#a7c2dfa854274262c4e00e4ef0ab2ce23", null ],
|
||||||
[ "sim_rows", "typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66", null ],
|
[ "sim_rows", "typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66", null ],
|
||||||
|
[ "simulation_t", "typedefs_8hpp.html#a784799c37b5e4fb8bf4f6368e004dec6", null ],
|
||||||
[ "vec_3d", "typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df", null ]
|
[ "vec_3d", "typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df", null ]
|
||||||
];
|
];
|
||||||
|
|
@ -105,8 +105,8 @@ $(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 <vector></span></div>
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <armadillo></span></div>
|
||||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <armadillo></span></div>
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <vector></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<arma::vec::fixed<3>> <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>;</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<arma::vec::fixed<3>> <a class="code hl_typedef" href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a>;</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> </div>
|
||||||
|
|
@ -116,7 +116,14 @@ $(document).ready(function(){initNavTree('typedefs_8hpp_source.html',''); initRe
|
||||||
<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<3> <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#a9f33f4962c8fb62cc5ccd0e4e039a8df"> 36</a></span><span class="keyword">typedef</span> arma::vec::fixed<3> <a class="code hl_typedef" href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</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="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="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="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="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_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_a7c2dfa854274262c4e00e4ef0ab2ce23"><div class="ttname"><a href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></div><div class="ttdeci">std::vector< arma::vec::fixed< 3 > > 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_a7c2dfa854274262c4e00e4ef0ab2ce23"><div class="ttname"><a href="typedefs_8hpp.html#a7c2dfa854274262c4e00e4ef0ab2ce23">sim_cols</a></div><div class="ttdeci">std::vector< arma::vec::fixed< 3 > > 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_a8502989b1b361725834fc185bd575f66"><div class="ttname"><a href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">sim_rows</a></div><div class="ttdeci">std::vector< arma::vec::fixed< 3 > > 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="ttc" id="atypedefs_8hpp_html_a8502989b1b361725834fc185bd575f66"><div class="ttname"><a href="typedefs_8hpp.html#a8502989b1b361725834fc185bd575f66">sim_rows</a></div><div class="ttdeci">std::vector< arma::vec::fixed< 3 > > 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="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< 3 > 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_a9f33f4962c8fb62cc5ccd0e4e039a8df"><div class="ttname"><a href="typedefs_8hpp.html#a9f33f4962c8fb62cc5ccd0e4e039a8df">vec_3d</a></div><div class="ttdeci">arma::vec::fixed< 3 > 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>
|
||||||
|
|
|
||||||
|
|
@ -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 <sys/stat.h></code><br />
|
<div class="textblock"><code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</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 </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 </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"> </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"> </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"> </td></tr>
|
<tr class="separator:aff5e07c3c1d321709b0cc38e999f427b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a5d2e1e032fd19614f2fbb58149a7b02a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a">arma_vector_close_to</a> (arma::vec &a, arma::vec &b, double tol)</td></tr>
|
<tr class="memitem:a6be6f938bcbb235ebb6a2ed9d08411b2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">close_to</a> (arma::vec &a, arma::vec &b, double tol)</td></tr>
|
||||||
<tr class="memdesc:a5d2e1e032fd19614f2fbb58149a7b02a"><td class="mdescLeft"> </td><td class="mdescRight">Test if two armadillo vectors are close to each other. <br /></td></tr>
|
<tr class="memdesc:a6be6f938bcbb235ebb6a2ed9d08411b2"><td class="mdescLeft"> </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"> </td></tr>
|
<tr class="separator:a6be6f938bcbb235ebb6a2ed9d08411b2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:acf13f4e492199cb7231bfa646dbd08de"><td class="memItemLeft" align="right" valign="top">bool </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 </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"> </td><td class="mdescRight">Make path given. <br /></td></tr>
|
<tr class="memdesc:acf13f4e492199cb7231bfa646dbd08de"><td class="mdescLeft"> </td><td class="mdescRight">Make path given. <br /></td></tr>
|
||||||
<tr class="separator:acf13f4e492199cb7231bfa646dbd08de"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:acf13f4e492199cb7231bfa646dbd08de"><td class="memSeparator" colspan="2"> </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">◆ </a></span>arma_vector_close_to()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#a6be6f938bcbb235ebb6a2ed9d08411b2">◆ </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 & </td>
|
<td class="paramtype">arma::vec & </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#l00060">60</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#l00041">41</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#l00074">74</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>
|
||||||
|
|
|
||||||
|
|
@ -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 ],
|
||||||
|
|
|
||||||
|
|
@ -102,97 +102,95 @@ $(document).ready(function(){initNavTree('utils_8cpp_source.html',''); initResiz
|
||||||
</div><!--header-->
|
</div><!--header-->
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
<a href="utils_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="utils_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 <sys/stat.h></span></div>
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</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"> 15</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384"> 15</a></span>std::string <a class="code hl_function" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a>(<span class="keywordtype">double</span> d, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> prec)</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"><a class="line" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384"> 17</a></span>std::string <a class="code hl_function" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a>(<span class="keywordtype">double</span> d, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> prec)</div>
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> std::stringstream ss;</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> ss << std::setw(width) << std::setprecision(prec) << std::scientific << d;</div>
|
||||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> std::stringstream ss;</div>
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordflow">return</span> ss.str();</div>
|
||||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> ss << std::setw(width) << std::setprecision(prec) << std::scientific << d;</div>
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>}</div>
|
||||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordflow">return</span> ss.str();</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>}</div>
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d"> 22</a></span>std::string <a class="code hl_function" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a>(<span class="keyword">const</span> std::vector<double> &v, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> prec)</div>
|
||||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</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"><a class="line" href="utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d"> 24</a></span>std::string <a class="code hl_function" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a>(<span class="keyword">const</span> std::vector<double> &v, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> prec)</div>
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> std::stringstream ss;</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">for</span> (<span class="keywordtype">double</span> elem : v) {</div>
|
||||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> std::stringstream ss;</div>
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> ss << <a class="code hl_function" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a>(elem, width, prec);</div>
|
||||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">for</span> (<span class="keywordtype">double</span> elem : v) {</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> ss << <a class="code hl_function" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a>(elem, width, prec);</div>
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">return</span> ss.str();</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="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">return</span> ss.str();</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><span class="keyword">static</span> <span class="keywordtype">void</span> print_message(std::string msg)</div>
|
||||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>{</div>
|
||||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">static</span> <span class="keywordtype">void</span> print_message(std::string msg)</div>
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">if</span> (msg.size() > 0) {</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> std::cout << <span class="stringliteral">"message: "</span> << msg << <span class="stringliteral">"\n\n"</span>;</div>
|
||||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">if</span> (msg.size() > 0) {</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> std::cout << <span class="stringliteral">"message: "</span> << msg << <span class="stringliteral">"\n\n"</span>;</div>
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">else</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> std::cout << <span class="stringliteral">"\n"</span>;</div>
|
||||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">else</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> std::cout << <span class="stringliteral">"\n"</span>;</div>
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>}</div>
|
||||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> }</div>
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>}</div>
|
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38"> 41</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">m_assert</a>(<span class="keywordtype">bool</span> expr, std::string expr_str, std::string f, std::string file,</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="keywordtype">int</span> line, std::string msg)</div>
|
||||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38"> 43</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">m_assert</a>(<span class="keywordtype">bool</span> expr, std::string expr_str, std::string f, std::string file,</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> <span class="keywordtype">int</span> line, std::string msg)</div>
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> std::string new_assert(f.size() + (expr ? 4 : 6), <span class="charliteral">'-'</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"> 45</span> std::cout << <span class="stringliteral">"\x1B[36m"</span> << new_assert << <span class="stringliteral">"\033[0m\n"</span>;</div>
|
||||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> std::string new_assert(f.size() + (expr ? 4 : 6), <span class="charliteral">'-'</span>);</div>
|
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> std::cout << f << <span class="stringliteral">": "</span>;</div>
|
||||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> std::cout << <span class="stringliteral">"\x1B[36m"</span> << new_assert << <span class="stringliteral">"\033[0m\n"</span>;</div>
|
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (expr) {</div>
|
||||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> std::cout << f << <span class="stringliteral">": "</span>;</div>
|
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> std::cout << <span class="stringliteral">"\x1B[32mOK\033[0m\n"</span>;</div>
|
||||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">if</span> (expr) {</div>
|
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> print_message(msg);</div>
|
||||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> std::cout << <span class="stringliteral">"\x1B[32mOK\033[0m\n"</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> print_message(msg);</div>
|
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">else</span> {</div>
|
||||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
|
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> std::cout << <span class="stringliteral">"\x1B[31mFAIL\033[0m\n"</span>;</div>
|
||||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">else</span> {</div>
|
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> print_message(msg);</div>
|
||||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::cout << <span class="stringliteral">"\x1B[31mFAIL\033[0m\n"</span>;</div>
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::cout << file << <span class="stringliteral">" "</span> << line << <span class="stringliteral">": Assertion \""</span> << expr_str</div>
|
||||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> print_message(msg);</div>
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> << <span class="stringliteral">"\" Failed\n\n"</span>;</div>
|
||||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> std::cout << file << <span class="stringliteral">" "</span> << line << <span class="stringliteral">": Assertion \""</span> << expr_str</div>
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> abort();</div>
|
||||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> << <span class="stringliteral">"\" Failed\n\n"</span>;</div>
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
|
||||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> abort();</div>
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>}</div>
|
||||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> }</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"><a class="line" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9"> 60</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">close_to</a>(arma::vec &a, arma::vec &b, <span class="keywordtype">double</span> tol)</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"><a class="line" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772"> 62</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a">arma_vector_close_to</a>(arma::vec &a, arma::vec &b, <span class="keywordtype">double</span> tol)</div>
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">if</span> (a.n_elem != b.n_elem) {</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> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">if</span> (a.n_elem != b.n_elem) {</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> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < a.n_elem; i++) {</div>
|
||||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">if</span> (std::abs(a(i) - b(i)) >= tol) {</div>
|
||||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < a.n_elem; i++) {</div>
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">if</span> (std::abs(a(i) - b(i)) >= tol) {</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> <span class="keyword">false</span>;</div>
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> }</div>
|
||||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>}</div>
|
||||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>}</div>
|
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa"> 74</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">mkpath</a>(std::string path, <span class="keywordtype">int</span> mode)</div>
|
||||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</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"><a class="line" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa"> 76</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">mkpath</a>(std::string path, <span class="keywordtype">int</span> mode)</div>
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> std::string cur_dir;</div>
|
||||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>{</div>
|
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::string::size_type pos = -1;</div>
|
||||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> std::string cur_dir;</div>
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">struct </span>stat buf;</div>
|
||||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> std::string::size_type pos = -1;</div>
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
||||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">struct </span>stat buf;</div>
|
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (path.back() != <span class="charliteral">'/'</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> path += <span class="charliteral">'/'</span>;</div>
|
||||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">if</span> (path.back() != <span class="charliteral">'/'</span>) {</div>
|
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> }</div>
|
||||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> path += <span class="charliteral">'/'</span>;</div>
|
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
||||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div>
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> pos++;</div>
|
||||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> pos = path.find(<span class="charliteral">'/'</span>, pos);</div>
|
||||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> pos++;</div>
|
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">if</span> (pos != std::string::npos) {</div>
|
||||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> pos = path.find(<span class="charliteral">'/'</span>, pos);</div>
|
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> cur_dir = path.substr(0, pos);</div>
|
||||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">if</span> (pos != std::string::npos) {</div>
|
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">if</span> (mkdir(cur_dir.c_str(), mode) != 0 && stat(cur_dir.c_str(), &buf) != 0) {</div>
|
||||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> cur_dir = path.substr(0, pos);</div>
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> -1;</div>
|
||||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">if</span> (mkdir(cur_dir.c_str(), mode) != 0 && stat(cur_dir.c_str(), &buf) != 0) {</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="keywordflow">return</span> -1;</div>
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> }</div>
|
||||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">else</span> {</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> <span class="keywordflow">break</span>;</div>
|
||||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">else</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"> 95</span> <span class="keywordflow">break</span>;</div>
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
|
||||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">return</span> 0;</div>
|
||||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>}</div>
|
||||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">return</span> 0;</div>
|
<div class="ttc" id="autils_8cpp_html_a6be6f938bcbb235ebb6a2ed9d08411b2"><div class="ttname"><a href="utils_8cpp.html#a6be6f938bcbb235ebb6a2ed9d08411b2">close_to</a></div><div class="ttdeci">bool close_to(arma::vec &a, arma::vec &b, double tol)</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#l00060">utils.cpp:60</a></div></div>
|
||||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span>}</div>
|
<div class="ttc" id="autils_8cpp_html_acd2a9c7a7d5a7fe9163be8c4cc110746"><div class="ttname"><a href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a></div><div class="ttdeci">std::string scientific_format(double d, int width, int prec)</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 class="ttc" id="autils_8cpp_html_a5d2e1e032fd19614f2fbb58149a7b02a"><div class="ttname"><a href="utils_8cpp.html#a5d2e1e032fd19614f2fbb58149a7b02a">arma_vector_close_to</a></div><div class="ttdeci">bool arma_vector_close_to(arma::vec &a, arma::vec &b, double tol)</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_8cpp_html_acf13f4e492199cb7231bfa646dbd08de"><div class="ttname"><a href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00074">utils.cpp:74</a></div></div>
|
||||||
<div class="ttc" id="autils_8cpp_html_acd2a9c7a7d5a7fe9163be8c4cc110746"><div class="ttname"><a href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a></div><div class="ttdeci">std::string scientific_format(double d, int width, int prec)</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#l00017">utils.cpp:17</a></div></div>
|
<div class="ttc" id="autils_8cpp_html_aff5e07c3c1d321709b0cc38e999f427b"><div class="ttname"><a href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">m_assert</a></div><div class="ttdeci">void m_assert(bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg)</div><div class="ttdoc">Test an expression, confirm that test is ok, or abort execution.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00041">utils.cpp:41</a></div></div>
|
||||||
<div class="ttc" id="autils_8cpp_html_acf13f4e492199cb7231bfa646dbd08de"><div class="ttname"><a href="utils_8cpp.html#acf13f4e492199cb7231bfa646dbd08de">mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode)</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_8cpp_html_aff5e07c3c1d321709b0cc38e999f427b"><div class="ttname"><a href="utils_8cpp.html#aff5e07c3c1d321709b0cc38e999f427b">m_assert</a></div><div class="ttdeci">void m_assert(bool expr, std::string expr_str, std::string f, std::string file, int line, std::string msg)</div><div class="ttdoc">Test an expression, confirm that test is ok, or abort execution.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00043">utils.cpp:43</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><!-- fragment --></div><!-- contents -->
|
</div><!-- fragment --></div><!-- contents -->
|
||||||
</div><!-- doc-content -->
|
</div><!-- doc-content -->
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ $(document).ready(function(){initNavTree('utils_8hpp.html',''); initResizable();
|
||||||
<code>#include <iomanip></code><br />
|
<code>#include <iomanip></code><br />
|
||||||
<code>#include <sstream></code><br />
|
<code>#include <sstream></code><br />
|
||||||
<code>#include <string></code><br />
|
<code>#include <string></code><br />
|
||||||
|
<code>#include <sys/stat.h></code><br />
|
||||||
<code>#include <vector></code><br />
|
<code>#include <vector></code><br />
|
||||||
</div>
|
</div>
|
||||||
<p><a href="utils_8hpp_source.html">Go to the source code of this file.</a></p>
|
<p><a href="utils_8hpp_source.html">Go to the source code of this file.</a></p>
|
||||||
|
|
@ -124,7 +125,7 @@ Macros</h2></td></tr>
|
||||||
<tr class="memdesc:a73d4f21ad937dbc50a0c0538c78fd4f9"><td class="mdescLeft"> </td><td class="mdescRight">A prettier assertion function. <br /></td></tr>
|
<tr class="memdesc:a73d4f21ad937dbc50a0c0538c78fd4f9"><td class="mdescLeft"> </td><td class="mdescRight">A prettier assertion function. <br /></td></tr>
|
||||||
<tr class="separator:a73d4f21ad937dbc50a0c0538c78fd4f9"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a73d4f21ad937dbc50a0c0538c78fd4f9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a60dca3177fb9cb5256609adc7af55168"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">__METHOD_NAME__</a>   methodName(__PRETTY_FUNCTION__)</td></tr>
|
<tr class="memitem:a60dca3177fb9cb5256609adc7af55168"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">__METHOD_NAME__</a>   methodName(__PRETTY_FUNCTION__)</td></tr>
|
||||||
<tr class="memdesc:a60dca3177fb9cb5256609adc7af55168"><td class="mdescLeft"> </td><td class="mdescRight">Get the name of the current method/function. <br /></td></tr>
|
<tr class="memdesc:a60dca3177fb9cb5256609adc7af55168"><td class="mdescLeft"> </td><td class="mdescRight">Get the name of the current method/function without the return type. <br /></td></tr>
|
||||||
<tr class="separator:a60dca3177fb9cb5256609adc7af55168"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a60dca3177fb9cb5256609adc7af55168"><td class="memSeparator" colspan="2"> </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>
|
||||||
|
|
@ -138,9 +139,9 @@ Functions</h2></td></tr>
|
||||||
<tr class="memitem:a2cc3a2cdb635bac3c8b02e89d4d6af38"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a> (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</td></tr>
|
<tr class="memitem:a2cc3a2cdb635bac3c8b02e89d4d6af38"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a> (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</td></tr>
|
||||||
<tr class="memdesc:a2cc3a2cdb635bac3c8b02e89d4d6af38"><td class="mdescLeft"> </td><td class="mdescRight">Test an expression, confirm that test is ok, or abort execution. <br /></td></tr>
|
<tr class="memdesc:a2cc3a2cdb635bac3c8b02e89d4d6af38"><td class="mdescLeft"> </td><td class="mdescRight">Test an expression, confirm that test is ok, or abort execution. <br /></td></tr>
|
||||||
<tr class="separator:a2cc3a2cdb635bac3c8b02e89d4d6af38"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a2cc3a2cdb635bac3c8b02e89d4d6af38"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a0c95c4791692b06f8811905a76dbd772"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a> (arma::vec &a, arma::vec &b, double tol=1e-8)</td></tr>
|
<tr class="memitem:ab3e0cf669bddc59bd53998490ffb68b9"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a> (arma::vec &a, arma::vec &b, double tol=1e-8)</td></tr>
|
||||||
<tr class="memdesc:a0c95c4791692b06f8811905a76dbd772"><td class="mdescLeft"> </td><td class="mdescRight">Test if two armadillo vectors are close to each other. <br /></td></tr>
|
<tr class="memdesc:ab3e0cf669bddc59bd53998490ffb68b9"><td class="mdescLeft"> </td><td class="mdescRight">Test if two armadillo vectors are close to each other. <br /></td></tr>
|
||||||
<tr class="separator:a0c95c4791692b06f8811905a76dbd772"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ab3e0cf669bddc59bd53998490ffb68b9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
<tr class="memitem:a6fdd7217b750aff5b6295ece7cbdeffa"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a> (std::string path, int mode=0777)</td></tr>
|
<tr class="memitem:a6fdd7217b750aff5b6295ece7cbdeffa"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a> (std::string path, int mode=0777)</td></tr>
|
||||||
<tr class="memdesc:a6fdd7217b750aff5b6295ece7cbdeffa"><td class="mdescLeft"> </td><td class="mdescRight">Make path given. <br /></td></tr>
|
<tr class="memdesc:a6fdd7217b750aff5b6295ece7cbdeffa"><td class="mdescLeft"> </td><td class="mdescRight">Make path given. <br /></td></tr>
|
||||||
<tr class="separator:a6fdd7217b750aff5b6295ece7cbdeffa"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:a6fdd7217b750aff5b6295ece7cbdeffa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
|
@ -168,9 +169,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Get the name of the current method/function. </p>
|
<p>Get the name of the current method/function without the return type. </p>
|
||||||
|
|
||||||
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00051">51</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00052">52</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -201,13 +202,13 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<b>Value:</b><div class="fragment"><div class="line"> <a class="code hl_function" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a>(expr, #expr, <a class="code hl_define" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">__METHOD_NAME__</a>, __FILE__, \</div>
|
<b>Value:</b><div class="fragment"><div class="line"> <a class="code hl_function" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a>(expr, #expr, <a class="code hl_define" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">__METHOD_NAME__</a>, __FILE__, \</div>
|
||||||
<div class="line"> __LINE__, msg)</div>
|
<div class="line"> __LINE__, msg)</div>
|
||||||
<div class="ttc" id="autils_8hpp_html_a2cc3a2cdb635bac3c8b02e89d4d6af38"><div class="ttname"><a href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a></div><div class="ttdeci">void m_assert(bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</div><div class="ttdoc">Test an expression, confirm that test is ok, or abort execution.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00043">utils.cpp:43</a></div></div>
|
<div class="ttc" id="autils_8hpp_html_a2cc3a2cdb635bac3c8b02e89d4d6af38"><div class="ttname"><a href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a></div><div class="ttdeci">void m_assert(bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</div><div class="ttdoc">Test an expression, confirm that test is ok, or abort execution.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00041">utils.cpp:41</a></div></div>
|
||||||
<div class="ttc" id="autils_8hpp_html_a60dca3177fb9cb5256609adc7af55168"><div class="ttname"><a href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">__METHOD_NAME__</a></div><div class="ttdeci">#define __METHOD_NAME__</div><div class="ttdoc">Get the name of the current method/function.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8hpp_source.html#l00051">utils.hpp:51</a></div></div>
|
<div class="ttc" id="autils_8hpp_html_a60dca3177fb9cb5256609adc7af55168"><div class="ttname"><a href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">__METHOD_NAME__</a></div><div class="ttdeci">#define __METHOD_NAME__</div><div class="ttdoc">Get the name of the current method/function without the return type.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8hpp_source.html#l00052">utils.hpp:52</a></div></div>
|
||||||
</div><!-- fragment -->
|
</div><!-- fragment -->
|
||||||
<p>A prettier assertion function. </p>
|
<p>A prettier assertion function. </p>
|
||||||
<p>This macro calls the m_assert function which is a more informative assertion function than the regular assert function from cassert. </p>
|
<p>This macro calls the m_assert function which is a more informative assertion function than the regular assert function from cassert. </p>
|
||||||
|
|
||||||
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00045">45</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00046">46</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -230,19 +231,19 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||||
<p>Writes a debug message. </p>
|
<p>Writes a debug message. </p>
|
||||||
<p>This macro writes a debug message that includes the filename, line number, and a custom message. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling. </p>
|
<p>This macro writes a debug message that includes the filename, line number, and a custom message. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling. </p>
|
||||||
|
|
||||||
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00036">36</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00037">37</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="groupheader">Function Documentation</h2>
|
<h2 class="groupheader">Function Documentation</h2>
|
||||||
<a id="a0c95c4791692b06f8811905a76dbd772" name="a0c95c4791692b06f8811905a76dbd772"></a>
|
<a id="ab3e0cf669bddc59bd53998490ffb68b9" name="ab3e0cf669bddc59bd53998490ffb68b9"></a>
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#a0c95c4791692b06f8811905a76dbd772">◆ </a></span>arma_vector_close_to()</h2>
|
<h2 class="memtitle"><span class="permalink"><a href="#ab3e0cf669bddc59bd53998490ffb68b9">◆ </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 & </td>
|
<td class="paramtype">arma::vec & </td>
|
||||||
<td class="paramname"><em>a</em>, </td>
|
<td class="paramname"><em>a</em>, </td>
|
||||||
|
|
@ -279,7 +280,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#l00060">60</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -347,7 +348,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#l00041">41</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -386,9 +387,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#l00074">74</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -436,7 +437,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>
|
||||||
|
|
@ -484,7 +485,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>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ var utils_8hpp =
|
||||||
[ "__METHOD_NAME__", "utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168", null ],
|
[ "__METHOD_NAME__", "utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168", null ],
|
||||||
[ "ASSERT", "utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9", null ],
|
[ "ASSERT", "utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9", null ],
|
||||||
[ "DEBUG", "utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b", null ],
|
[ "DEBUG", "utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b", null ],
|
||||||
[ "arma_vector_close_to", "utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772", null ],
|
[ "close_to", "utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9", null ],
|
||||||
[ "m_assert", "utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38", null ],
|
[ "m_assert", "utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38", null ],
|
||||||
[ "mkpath", "utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa", null ],
|
[ "mkpath", "utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa", null ],
|
||||||
[ "scientific_format", "utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d", null ],
|
[ "scientific_format", "utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d", null ],
|
||||||
|
|
|
||||||
|
|
@ -109,57 +109,58 @@ $(document).ready(function(){initNavTree('utils_8hpp_source.html',''); initResiz
|
||||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <iomanip></span></div>
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <iomanip></span></div>
|
||||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <sstream></span></div>
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <sstream></span></div>
|
||||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <string></span></div>
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <string></span></div>
|
||||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <vector></span></div>
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <sys/stat.h></span></div>
|
||||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include <vector></span></div>
|
||||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#ifdef DBG</span></div>
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor"> #define DEBUG(msg) std::cout << __FILE__ << " "</span> << __LINE__ << ": " \</div>
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#ifdef DBG</span></div>
|
||||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> << msg << std::endl</div>
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor"> #define DEBUG(msg) std::cout << __FILE__ << " "</span> << __LINE__ << ": " \</div>
|
||||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#else</span></div>
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> << msg << std::endl</div>
|
||||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b"> 36</a></span><span class="preprocessor"> #define DEBUG(msg)</span></div>
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#else</span></div>
|
||||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#endif</span></div>
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b"> 37</a></span><span class="preprocessor"> #define DEBUG(msg)</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><span class="preprocessor">#endif</span></div>
|
||||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9"> 45</a></span><span class="preprocessor">#define ASSERT(expr, msg) m_assert(expr, #expr, __METHOD_NAME__, __FILE__, \</span></div>
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor"> __LINE__, msg)</span></div>
|
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9"> 46</a></span><span class="preprocessor">#define ASSERT(expr, msg) m_assert(expr, #expr, __METHOD_NAME__, __FILE__, \</span></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="preprocessor"> __LINE__, msg)</span></div>
|
||||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168"> 51</a></span><span class="preprocessor">#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)</span></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"> 52</span> </div>
|
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168"> 52</a></span><span class="preprocessor">#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)</span></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>std::string <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(<span class="keywordtype">double</span> d, <span class="keywordtype">int</span> width=20, <span class="keywordtype">int</span> prec=10);</div>
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</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>std::string <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(<span class="keywordtype">double</span> d, <span class="keywordtype">int</span> width=20, <span class="keywordtype">int</span> prec=10);</div>
|
||||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>std::string <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(<span class="keyword">const</span> std::vector<double>& v, </div>
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">int</span> width=20, </div>
|
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>std::string <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(<span class="keyword">const</span> std::vector<double>& v, </div>
|
||||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">int</span> prec=10);</div>
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">int</span> width=20, </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> <span class="keywordtype">int</span> prec=10);</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="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="keywordtype">void</span> <a class="code hl_function" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a>(<span class="keywordtype">bool</span> expr, </div>
|
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
||||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> std::string expr_str, </div>
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="keywordtype">void</span> <a class="code hl_function" href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a>(<span class="keywordtype">bool</span> expr, </div>
|
||||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> std::string func, </div>
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> std::string expr_str, </div>
|
||||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> std::string file, </div>
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> std::string func, </div>
|
||||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">int</span> line,</div>
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> std::string file, </div>
|
||||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> std::string msg);</div>
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">int</span> line,</div>
|
||||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::string msg);</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> </div>
|
||||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8hpp.html#a0c95c4791692b06f8811905a76dbd772">arma_vector_close_to</a>(arma::vec &a, arma::vec &b, <span class="keywordtype">double</span> tol=1e-8);</div>
|
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </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="keywordtype">bool</span> <a class="code hl_function" href="utils_8hpp.html#ab3e0cf669bddc59bd53998490ffb68b9">close_to</a>(arma::vec &a, arma::vec &b, <span class="keywordtype">double</span> tol=1e-8);</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"> 115</span> </div>
|
||||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="keyword">static</span> <span class="keyword">inline</span> std::string methodName(<span class="keyword">const</span> std::string& pretty_function)</div>
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</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="keyword">static</span> <span class="keyword">inline</span> std::string methodName(<span class="keyword">const</span> std::string& pretty_function)</div>
|
||||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordtype">size_t</span> colons = pretty_function.find(<span class="stringliteral">"::"</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> <span class="keywordtype">size_t</span> begin = pretty_function.substr(0,colons).rfind(<span class="stringliteral">" "</span>) + 1;</div>
|
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordtype">size_t</span> colons = pretty_function.find(<span class="stringliteral">"::"</span>);</div>
|
||||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordtype">size_t</span> end = pretty_function.rfind(<span class="stringliteral">"("</span>) - begin;</div>
|
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordtype">size_t</span> begin = pretty_function.substr(0,colons).rfind(<span class="stringliteral">" "</span>) + 1;</div>
|
||||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">size_t</span> end = pretty_function.rfind(<span class="stringliteral">"("</span>) - begin;</div>
|
||||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> pretty_function.substr(begin,end) + <span class="stringliteral">"()"</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> <span class="keywordflow">return</span> pretty_function.substr(begin,end) + <span class="stringliteral">"()"</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"> 134</span>}</div>
|
||||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
|
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
|
||||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(std::string path, <span class="keywordtype">int</span> mode = 0777);</div>
|
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</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><span class="keywordtype">bool</span> <a class="code hl_function" href="utils_8hpp.html#a6fdd7217b750aff5b6295ece7cbdeffa">mkpath</a>(std::string path, <span class="keywordtype">int</span> mode = 0777);</div>
|
||||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="preprocessor">#endif</span></div>
|
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </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 &a, arma::vec &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="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="preprocessor">#endif</span></div>
|
||||||
<div class="ttc" id="autils_8hpp_html_a2cc3a2cdb635bac3c8b02e89d4d6af38"><div class="ttname"><a href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a></div><div class="ttdeci">void m_assert(bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</div><div class="ttdoc">Test an expression, confirm that test is ok, or abort execution.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00043">utils.cpp:43</a></div></div>
|
<div class="ttc" id="autils_8hpp_html_a2cc3a2cdb635bac3c8b02e89d4d6af38"><div class="ttname"><a href="utils_8hpp.html#a2cc3a2cdb635bac3c8b02e89d4d6af38">m_assert</a></div><div class="ttdeci">void m_assert(bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</div><div class="ttdoc">Test an expression, confirm that test is ok, or abort execution.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00041">utils.cpp:41</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_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#l00074">utils.cpp:74</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#l00017">utils.cpp:17</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 &a, arma::vec &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#l00060">utils.cpp:60</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 -->
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,11 @@
|
||||||
#include "Particle.hpp"
|
#include "Particle.hpp"
|
||||||
#include "constants.hpp"
|
#include "constants.hpp"
|
||||||
#include "typedefs.hpp"
|
#include "typedefs.hpp"
|
||||||
|
#include "utils.hpp"
|
||||||
|
|
||||||
#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \
|
#pragma omp declare reduction(+ : vec_3d : omp_out += omp_in) \
|
||||||
initializer(omp_priv = omp_orig)
|
initializer(omp_priv = omp_orig)
|
||||||
|
|
||||||
typedef struct simulation {
|
|
||||||
sim_arr r_vecs;
|
|
||||||
sim_arr v_vecs;
|
|
||||||
} simulation_t;
|
|
||||||
|
|
||||||
/** @brief A class that simulates a Penning trap.
|
/** @brief A class that simulates a Penning trap.
|
||||||
*
|
*
|
||||||
* This class simulates a Penning trap. It can take in a number of particles
|
* This class simulates a Penning trap. It can take in a number of particles
|
||||||
|
|
@ -62,7 +58,7 @@ private:
|
||||||
*
|
*
|
||||||
* @param i Index i for \f$k_{r,i,j}\f$
|
* @param i Index i for \f$k_{r,i,j}\f$
|
||||||
* @param j Index j for \f$k_{r,i,j}\f$
|
* @param j Index j for \f$k_{r,i,j}\f$
|
||||||
* @param dt the step length (delta time)
|
* @param dt The step length (delta time)
|
||||||
*
|
*
|
||||||
* @return vec_3d
|
* @return vec_3d
|
||||||
* */
|
* */
|
||||||
|
|
@ -78,8 +74,8 @@ public:
|
||||||
* */
|
* */
|
||||||
PenningTrap(
|
PenningTrap(
|
||||||
double B_0 = T,
|
double B_0 = T,
|
||||||
std::function<double(double)> V_0 =
|
std::function<double(double)> V_0
|
||||||
[](double t) { return 25. * V / 1000.; },
|
= [](double t) { return (25. * V) / 1000.; },
|
||||||
double d = 500., double t = 0.);
|
double d = 500., double t = 0.);
|
||||||
|
|
||||||
/** @brief Constructor for the PenningTrap class
|
/** @brief Constructor for the PenningTrap class
|
||||||
|
|
@ -92,8 +88,8 @@ public:
|
||||||
* */
|
* */
|
||||||
PenningTrap(
|
PenningTrap(
|
||||||
unsigned int i, double B_0 = T,
|
unsigned int i, double B_0 = T,
|
||||||
std::function<double(double)> V_0 =
|
std::function<double(double)> V_0
|
||||||
[](double t) { return 25. * V / 1000.; },
|
= [](double t) { return 25. * V / 1000.; },
|
||||||
double d = 500., double t = 0.);
|
double d = 500., double t = 0.);
|
||||||
|
|
||||||
/** @brief Constructor for the PenningTrap class
|
/** @brief Constructor for the PenningTrap class
|
||||||
|
|
@ -106,10 +102,21 @@ public:
|
||||||
* */
|
* */
|
||||||
PenningTrap(
|
PenningTrap(
|
||||||
std::vector<Particle> particles, double B_0 = T,
|
std::vector<Particle> particles, double B_0 = T,
|
||||||
std::function<double(double)> V_0 =
|
std::function<double(double)> V_0
|
||||||
[](double t) { return 25. * V / 1000.; },
|
= [](double t) { return 25. * V / 1000.; },
|
||||||
double d = 500., double t = 0.);
|
double d = 500., double t = 0.);
|
||||||
|
|
||||||
|
/** @brief Give all particles new positions and velocities, and change t
|
||||||
|
* and V_0.
|
||||||
|
*
|
||||||
|
* @param V_0 The tiome dependent applied potential
|
||||||
|
* @param t The starting time
|
||||||
|
* */
|
||||||
|
void reinitialize(
|
||||||
|
std::function<double(double)> V_0
|
||||||
|
= [](double t) { return 25. * V / 1000.; },
|
||||||
|
double t = 0.);
|
||||||
|
|
||||||
/** @brief Add a particle to the system
|
/** @brief Add a particle to the system
|
||||||
*
|
*
|
||||||
* @param particle The particle to add to the Penning trap
|
* @param particle The particle to add to the Penning trap
|
||||||
|
|
@ -155,7 +162,8 @@ public:
|
||||||
* */
|
* */
|
||||||
vec_3d total_force_external(unsigned int i);
|
vec_3d total_force_external(unsigned int i);
|
||||||
|
|
||||||
/** @brief Calculate the total force on a particle p_i from other particles.
|
/** @brief Calculate the total force on a particle p_i from other
|
||||||
|
* particles.
|
||||||
*
|
*
|
||||||
* @param i The index of particle p_i
|
* @param i The index of particle p_i
|
||||||
*
|
*
|
||||||
|
|
@ -192,6 +200,8 @@ public:
|
||||||
* @param steps The amount of steps for the whole simulation
|
* @param steps The amount of steps for the whole simulation
|
||||||
* @param method The method to use when moving forward a timestep
|
* @param method The method to use when moving forward a timestep
|
||||||
* @param particle_interaction Turn particle interactions on/off
|
* @param particle_interaction Turn particle interactions on/off
|
||||||
|
*
|
||||||
|
* @return simulation_t
|
||||||
* */
|
* */
|
||||||
simulation_t simulate(double time, unsigned int steps,
|
simulation_t simulate(double time, unsigned int steps,
|
||||||
std::string method = "rk4",
|
std::string method = "rk4",
|
||||||
|
|
@ -206,7 +216,8 @@ public:
|
||||||
* @param particle_interaction Turn particle interactions on/off
|
* @param particle_interaction Turn particle interactions on/off
|
||||||
* */
|
* */
|
||||||
void write_simulation_to_dir(std::string path, double time,
|
void write_simulation_to_dir(std::string path, double time,
|
||||||
unsigned int steps, std::string method = "rk4",
|
unsigned int steps,
|
||||||
|
std::string method = "rk4",
|
||||||
bool particle_interaction = true);
|
bool particle_interaction = true);
|
||||||
|
|
||||||
/** @brief Simulate and calculate what fraction of particles are still
|
/** @brief Simulate and calculate what fraction of particles are still
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@
|
||||||
#ifndef __CONST__
|
#ifndef __CONST__
|
||||||
#define __CONST__
|
#define __CONST__
|
||||||
|
|
||||||
#define K_E 138935.333 ///< Coulomb constant. unit: \f$\frac{u(\mu m)^3}{(\mu s)^2 e^2}\f$
|
#define K_E 1.38935333*1e5 ///< Coulomb constant. unit: \f$\frac{u(\mu m)^3}{(\mu s)^2 e^2}\f$
|
||||||
|
|
||||||
#define T 96.4852558 ///< 1 Tesla. unit: \f$ \frac{u}{(\mu s) e} \f$
|
#define T 9.64852558*1e1 ///< 1 Tesla. unit: \f$ \frac{u}{(\mu s) e} \f$
|
||||||
|
|
||||||
#define V 96485255.8 ///< 1 Volt. unit: \f$ \frac{u (\mu m)^2}{(\mu s)^2 e} \f$
|
#define V 9.64852558*1e7 ///< 1 Volt. unit: \f$ \frac{u (\mu m)^2}{(\mu s)^2 e} \f$
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
#ifndef __TYPEDEFS__
|
#ifndef __TYPEDEFS__
|
||||||
#define __TYPEDEFS__
|
#define __TYPEDEFS__
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <armadillo>
|
#include <armadillo>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
/** @brief Typedef for the column of the result vector from simulating
|
/** @brief Typedef for the column of the result vector from simulating
|
||||||
* particles.
|
* particles.
|
||||||
|
|
@ -35,4 +35,11 @@ typedef std::vector<sim_cols> sim_arr;
|
||||||
* */
|
* */
|
||||||
typedef arma::vec::fixed<3> vec_3d;
|
typedef arma::vec::fixed<3> vec_3d;
|
||||||
|
|
||||||
|
/** @brief Typedef for PenningTrap::simulation return value.
|
||||||
|
* */
|
||||||
|
typedef struct simulation {
|
||||||
|
sim_arr r_vecs;
|
||||||
|
sim_arr v_vecs;
|
||||||
|
} simulation_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/** @def DEBUG(msg)
|
/** @def DEBUG(msg)
|
||||||
|
|
@ -46,7 +47,7 @@
|
||||||
__LINE__, msg)
|
__LINE__, msg)
|
||||||
|
|
||||||
/** @def __METHOD_NAME__
|
/** @def __METHOD_NAME__
|
||||||
* @brief Get the name of the current method/function.
|
* @brief Get the name of the current method/function without the return type.
|
||||||
* */
|
* */
|
||||||
#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)
|
#define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)
|
||||||
|
|
||||||
|
|
@ -110,7 +111,7 @@ void m_assert(bool expr,
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* */
|
* */
|
||||||
bool arma_vector_close_to(arma::vec &a, arma::vec &b, double tol=1e-8);
|
bool close_to(arma::vec &a, arma::vec &b, double tol=1e-8);
|
||||||
|
|
||||||
|
|
||||||
/** @brief Takes in the __PRETTY_FUNCTION__ string and removes the return type.
|
/** @brief Takes in the __PRETTY_FUNCTION__ string and removes the return type.
|
||||||
|
|
@ -141,7 +142,7 @@ static inline std::string methodName(const std::string& pretty_function)
|
||||||
* @param path The path to be created
|
* @param path The path to be created
|
||||||
* @param mode The mode/permissions for all the new directories
|
* @param mode The mode/permissions for all the new directories
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool Success/Fail
|
||||||
* */
|
* */
|
||||||
bool mkpath(std::string path, int mode = 0777);
|
bool mkpath(std::string path, int mode = 0777);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
\documentclass[../main.tex]{subfiles}
|
|
||||||
\graphicspath{{\subfix{../images/}}}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
\appendix
|
|
||||||
\section*{Appendix A}\label{sec:appendix_a}
|
|
||||||
Equations given
|
|
||||||
\begin{equation}\label{eq:newton_second}
|
|
||||||
m \ddot{\mathbf{r}} = \sum_{i} \mathbf{F}_{i}
|
|
||||||
\end{equation}
|
|
||||||
%
|
|
||||||
|
|
||||||
%
|
|
||||||
\begin{equation}\label{eq:e_field_point}
|
|
||||||
\mathbf{E} = k_{e} \sum_{j=1}^{n} q_j \frac{\mathbf{r} - \mathbf{r}_{j}}{|\mathbf{r} - \mathbf{r}_{j}|^{3}}
|
|
||||||
\end{equation}
|
|
||||||
%
|
|
||||||
\begin{equation}\label{eq:e_field_potential}
|
|
||||||
\mathbf{E} = - \nabla V
|
|
||||||
\end{equation}
|
|
||||||
|
|
||||||
\section*{Appendix B}\label{sec:appendix_b}
|
|
||||||
Sum of all forces
|
|
||||||
\begin{align*}
|
|
||||||
sum
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
We find the physical coordinates from $x(t) = \text{Re} f(t)$ and $y(t) = \text{Im} f(t)$, where $f(t)$ is given by equation \eqref{eq:general_solution}.
|
|
||||||
|
|
||||||
We can rewrite $f(t)$ using the definition as
|
|
||||||
\begin{align*}
|
|
||||||
% f(t) =& A_{+}e^{-i(\omega_{+} t + \phi_{+})} + A_{-}e^{-i(\omega_{-} t + \phi_{-})} \\
|
|
||||||
f(t) =& A_{+}(\cos{\omega_{+} t + \phi_{+}} - i \sin{\omega_{+} t + \phi_{+}}) \\
|
|
||||||
\numberthis \label{eq:general_solution_trig}
|
|
||||||
&+ A_{-}(\cos{\omega_{-} t + \phi_{-}} - i \sin{\omega_{-} t + \phi_{-}})
|
|
||||||
\end{align*}
|
|
||||||
%
|
|
||||||
If we rearrange the right side of equation \eqref{eq:general_solution_trig}, we find the physical coordinates
|
|
||||||
\begin{align}\label{eq:physical_coord}
|
|
||||||
x(t) &= A_{+}(\cos{\omega_{+} t + \phi_{+}}) + A_{-}(\cos{\omega_{-} t + \phi_{-}}) \\
|
|
||||||
y(t) &= - A_{+}(i \sin{\omega_{+} t + \phi_{+}}) - A_{-}(i \sin{\omega_{-} t + \phi_{-}})
|
|
||||||
\end{align}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
29
latex/appendix/appendix_a.tex
Normal file
29
latex/appendix/appendix_a.tex
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
\documentclass[../main.tex]{subfiles}
|
||||||
|
\graphicspath{{\subfix{../images/}}}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\section{Equations of electrodynamics and classical mechanics}\label{sec:appendix_a}
|
||||||
|
Newton's second law
|
||||||
|
\begin{equation}\label{eq:newton_second}
|
||||||
|
m \ddot{\mathbf{r}} = \sum_{i} \mathbf{F}_{i}
|
||||||
|
\end{equation}%
|
||||||
|
%
|
||||||
|
Lorentz force
|
||||||
|
\begin{equation}\label{eq:lorentz_force}
|
||||||
|
\mathbf{F} = q \mathbf{E} + q \mathbf{v} \times \mathbf{B},
|
||||||
|
\end{equation}%
|
||||||
|
%
|
||||||
|
Electric field
|
||||||
|
\begin{equation}\label{eq:e_field_potential}
|
||||||
|
\mathbf{E} = - \nabla V
|
||||||
|
\end{equation} %
|
||||||
|
%
|
||||||
|
Electric field at a point $\mathbf{r}$
|
||||||
|
\begin{equation}\label{eq:e_field_point}
|
||||||
|
\mathbf{E} = k_{e} \sum_{j=1}^{n} q_j \frac{\mathbf{r} - \mathbf{r}_{j}}{|\mathbf{r} - \mathbf{r}_{j}|^{3}}
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\end{document}
|
||||||
145
latex/appendix/appendix_b.tex
Normal file
145
latex/appendix/appendix_b.tex
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
\documentclass[../main.tex]{subfiles}
|
||||||
|
\graphicspath{{\subfix{../images/}}}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\section{Derivation of equations}\label{sec:appendix_b}
|
||||||
|
% Problem 1
|
||||||
|
\subsection{Equations of motion}\label{sec:eq_motion} %
|
||||||
|
First, we need to define the velocity of the particle
|
||||||
|
\begin{align*}
|
||||||
|
\mathbf{v} \equiv \frac{d \mathbf{r}}{dt} &= \bigg( \frac{dx}{dt}, \frac{dy}{dt}, \frac{dz}{dt} \bigg).
|
||||||
|
\end{align*} %
|
||||||
|
We can rewrite the velocity as $\dot{r} = (\dot{x}, \dot{y}, \dot{z})$, and find the cross product
|
||||||
|
\begin{align*}
|
||||||
|
q \mathbf{v} \cross \mathbf{B} &=
|
||||||
|
q \begin{vmatrix}
|
||||||
|
\hat{e}_{x} & \hat{e}_{y} & \hat{e}_{z} \\
|
||||||
|
\dot{x} & \dot{y} & \dot{z} \\
|
||||||
|
0 & 0 & B_{0}
|
||||||
|
\end{vmatrix}
|
||||||
|
= q \big( B_{0} \dot{y}, -B_{0} \dot{x}, 0 \big).
|
||||||
|
\end{align*} %
|
||||||
|
We are considering an ideal Penning traps, where we define the electric potential as
|
||||||
|
\begin{align*}
|
||||||
|
V(x, y, z) &= \frac{V_{0}}{2 d^{2}}(2z^{2} - x^{2} - y^{2}).
|
||||||
|
\end{align*} %
|
||||||
|
The relationship between the electric field $\mathbf{E}$ and the electric potential of the field is given by
|
||||||
|
\begin{align*}
|
||||||
|
\mathbf{E} &= - \nabla V \\
|
||||||
|
&= - \bigg( \frac{dV}{dx}, \frac{dV}{dy} \frac{dV}{dz} \bigg) \\
|
||||||
|
&= \frac{V_{0}}{d^{2}} \big( x, y, -2z \big).
|
||||||
|
\end{align*} %
|
||||||
|
We can now express the Lorentz force as
|
||||||
|
\begin{align*}
|
||||||
|
\mathbf{F} &= q \mathbf{E} + q \mathbf{v} \cross \mathbf{B} \\
|
||||||
|
&= \frac{q V_{0}}{d^{2}} \big( x, y, -2z \big) + \big(q B_{0} \dot{y}, -q B_{0} \dot{x}, 0 \big),
|
||||||
|
\end{align*} %
|
||||||
|
and insert it into Newtons equation \eqref{eq:newton_second}. We get
|
||||||
|
\begin{align*}
|
||||||
|
\ddot{\mathbf{r}} &= \bigg( \frac{q V_{0}}{m d^{2}} x, \frac{q V_{0}}{m d^{2}} y, -\frac{2 q V_{0}}{m d^{2}} z \bigg) + \bigg(\frac{q B_{0}}{m} \dot{y}, -\frac{q B_{0}}{m} \dot{x}, 0 \bigg),
|
||||||
|
\end{align*} %
|
||||||
|
which can be written as
|
||||||
|
\begin{align*}
|
||||||
|
\ddot{x} &= \frac{q V_{0}}{m d^{2}} x + \frac{q B_{0}}{m} \dot{y}, \\
|
||||||
|
\ddot{y} &= \frac{q V_{0}}{m d^{2}} y - \frac{q B_{0}}{m} \dot{x}, \\
|
||||||
|
\ddot{z} &= -\frac{2 q V_{0}}{m d^{2}} z.
|
||||||
|
\end{align*}
|
||||||
|
If we define
|
||||||
|
\begin{equation*}
|
||||||
|
\omega_{0} \equiv \frac{q B_{0}}{m}, \quad \omega_{z}^{2} \equiv \frac{2 q V_{0}}{m d^{2}},
|
||||||
|
\end{equation*}
|
||||||
|
the equations of motion can be written as
|
||||||
|
\begin{align*}
|
||||||
|
\ddot{x} &= \frac{1}{2} \omega_{z}^{2} x + \omega_{0} \dot{y}, \\
|
||||||
|
\ddot{y} &= \frac{1}{2} \omega_{z}^{2} y - \omega_{0} \dot{x}, \\
|
||||||
|
\ddot{z} &= -\omega_{z}^{2} z. \\
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
\subsection{General solution}\label{sec:eq_general}
|
||||||
|
We consider the characteristic equation of a second order differential equation \cite{lindstrom:2016:ch10:5},
|
||||||
|
\begin{align*}
|
||||||
|
r^{2} + \omega_{z}^{2} &= 0 \\
|
||||||
|
r &= \pm \sqrt{- \omega_{z}^{2}}.
|
||||||
|
\end{align*} %
|
||||||
|
The characteristic equation has two complex roots
|
||||||
|
\begin{equation*}
|
||||||
|
r_{1} = - i \omega_{z}, \quad r_{2} = i \omega_{z},
|
||||||
|
\end{equation*}
|
||||||
|
which give us solutions in the general form
|
||||||
|
\begin{equation*}
|
||||||
|
z = c_{1} e^{i \omega_{z} t} + c_{2} e^{-i \omega_{z} t}.
|
||||||
|
\end{equation*}
|
||||||
|
In addition, for a complex number $z = a + ib$, we can define $e^{z} \equiv e^{a} (\cos{b} + i \sin{b})$ \cite{lindstrom:2016:ch3}. We can rewrite the general solution as
|
||||||
|
\begin{align*}
|
||||||
|
c_{1} e^{i \omega_{z} t} + c_{2} e^{-i \omega_{z} t} &= c_{1} (\cos{\omega_{z} t} + i \sin{\omega_{z} t}) \\
|
||||||
|
& \quad + c_{2} (\cos{\omega_{z} t} - i \sin{\omega_{z} t} \\
|
||||||
|
&= E \cos{\omega_{z} t} + i F \sin{\omega_{z} t}.
|
||||||
|
\end{align*} %
|
||||||
|
%
|
||||||
|
\subsection{Complex function}\label{sec:eq_complex} %
|
||||||
|
In sec. \ref{sec:eq_motion} we found the differential equations for $\ddot{x}$ and $\ddot{y}$. To derive a single differential equation, we introduce the complex function $f(t) = x(t) + iy(t)$, which gives us
|
||||||
|
\begin{align*}
|
||||||
|
0 &= \Big(\ddot{x} - \omega_{0} \dot{y} - \frac{1}{2} \omega_{z}^{2} x \Big) + i \Big(\ddot{y} + \omega_{0} \dot{x} - \frac{1}{2} \omega_{z}^{2} y \Big) \\
|
||||||
|
&= \ddot{x} - \omega_{0} \dot{y} - \frac{1}{2} \omega_{z}^{2} x + i\ddot{y} + i\omega_{0} \dot{x} - i \frac{1}{2} \omega_{z}^{2} y \\
|
||||||
|
&= \ddot{x} + i\ddot{y} + i\omega_{0} \dot{x} - \omega_{0} \dot{y} - \frac{1}{2} \omega_{z}^{2} x - i \frac{1}{2} \omega_{z}^{2} y. \\
|
||||||
|
\end{align*}
|
||||||
|
Using the definition $i = \sqrt{-1}$, we can rewrite
|
||||||
|
\begin{equation*}
|
||||||
|
i \omega_{0} \dot{x} + (-1) \omega_{0} \dot{y} = i \omega_{0} \dot{x} + i^{2} \omega_{0} \dot{y}.
|
||||||
|
\end{equation*}
|
||||||
|
This gives us a single differential equation
|
||||||
|
\begin{align*}
|
||||||
|
0 &= \ddot{x} + i\ddot{y} + i\omega_{0} (\dot{x} + i \dot{y}) - \frac{1}{2} \omega_{z}^{2} x - i \frac{1}{2} \omega_{z}^{2} y \\
|
||||||
|
&= \ddot{f} + i \omega_{0} \dot{f} - \frac{1}{2} \omega_{z}^{2} f.
|
||||||
|
\end{align*}
|
||||||
|
%
|
||||||
|
\subsection{Physical coordinates}\label{sec:eq_coord}
|
||||||
|
We can rewrite eq. \eqref{eq:general_solution}, as
|
||||||
|
\begin{align*}
|
||||||
|
f(t) &= A_{+}e^{-i(\omega_{+} t + \phi_{+})} + A_{-}e^{-i(\omega_{-} t + \phi_{-})} \\
|
||||||
|
&= A_{+}(\cos{(\omega_{+} t + \phi_{+})} - i \sin{(\omega_{+} t + \phi_{+})}) \\
|
||||||
|
% \numberthis \label{eq:general_solution_trig}
|
||||||
|
& \quad + A_{-}(\cos{(\omega_{-} t + \phi_{-})} - i \sin{(\omega_{-} t + \phi_{-})}).
|
||||||
|
\end{align*} %
|
||||||
|
%
|
||||||
|
\subsection{Upper and lower bounds}\label{sec:upper_lower_bound}
|
||||||
|
To obtain the upper and lower bounds of the particle's distance from the origin, we first find an expression for the second norm (?) defined as $|f(t)| = \sqrt{(x(t))^{2} + (y(t))^{2}}$.
|
||||||
|
\begin{align*}
|
||||||
|
(x(t))^{2} &= \big( A_{+}\cos(\omega_{+} t + \phi_{+}) + A_{-}\cos(\omega_{-} t + \phi_{-}) \big)^{2} \\
|
||||||
|
&= A_{+}^{2} \cos^{2}(\omega_{+} t + \phi_{+}) \\
|
||||||
|
& \quad + 2 A_{+}A_{-} \cos(\omega_{+} t + \phi_{+})\cos(\omega_{-} t + \phi_{-}) \\
|
||||||
|
& \quad + A_{-}^{2}\cos^{2}(\omega_{-} t + \phi_{-}), \\
|
||||||
|
\end{align*} %
|
||||||
|
\begin{align*}
|
||||||
|
(y(t))^{2} &= \big( - A_{+} \sin(\omega_{+} t + \phi_{+}) - A_{-} \sin(\omega_{-} t + \phi_{-}) \big)^{2} \\
|
||||||
|
&= A_{+}^{2} \sin^{2}(\omega_{+} t + \phi_{+}) \\
|
||||||
|
& \quad + 2 A_{+}A_{-} \sin(\omega_{+} t + \phi_{+})\sin(\omega_{-} t + \phi_{-}) \\
|
||||||
|
& \quad + A_{-}^{2} \sin^{2}(\omega_{-} t + \phi_{-}).
|
||||||
|
\end{align*} %
|
||||||
|
We insert these expressions, and find
|
||||||
|
\begin{align*}
|
||||||
|
|f(t)| &= \sqrt{(x(t))^{2} + (y(t))^{2}} \\
|
||||||
|
&= \sqrt{A_{+}^{2} + 2 A_{+} A_{-} \cos^{2}(\alpha) + A_{-}^{2}},
|
||||||
|
\end{align*} %
|
||||||
|
where $\alpha = (\omega_{+} - \omega_{-}) t +( \phi_{+} - \phi_{-})$. If we set $\alpha = 0$ we get $\cos(0) = 1$, and obtain the upper bound
|
||||||
|
\begin{align*}
|
||||||
|
R_{+} &= \sqrt{A_{+}^{2} + 2 A_{+} A_{-} + A_{-}^{2}} \\
|
||||||
|
&= \sqrt{(A_{+} + A_{-})^{2}} \\
|
||||||
|
&= A_{+} + A_{-}.
|
||||||
|
\end{align*}
|
||||||
|
If $\alpha = \pi$ we get $\cos(\pi) = -1$, and find the lower bound
|
||||||
|
\begin{align*}
|
||||||
|
R_{-} &= \sqrt{A_{+}^{2} - 2 A_{+} A_{-} + A_{-}^{2}} \\
|
||||||
|
&= \sqrt{(A_{+} - A_{-})^{2}} \\
|
||||||
|
&= |A_{+} - A_{-}|.
|
||||||
|
\end{align*} %
|
||||||
|
%
|
||||||
|
\subsection{Bounded solution}\label{sec:bounded_solution}
|
||||||
|
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
|
||||||
|
% \begin{align*}
|
||||||
|
% \omega_{+} - \omega_{-} &= \frac{\omega_{0} + \sqrt{\omega_{0}^{2} - 2 \omega_{z}^{2}}}{2} - \frac{\omega_{0} - \sqrt{\omega_{0}^{2} - 2 \omega_{z}^{2}}}{2} \\
|
||||||
|
% &=
|
||||||
|
% \end{align*}
|
||||||
21
latex/appendix/appendix_c.tex
Normal file
21
latex/appendix/appendix_c.tex
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
\documentclass[../main.tex]{subfiles}
|
||||||
|
\graphicspath{{\subfix{../images/}}}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\section{Numbers and units}\label{sec:appendix_c}
|
||||||
|
\begin{table}[H]
|
||||||
|
\centering
|
||||||
|
\begin{tabular}[c]{lll}
|
||||||
|
Constant & Value & Unit \\
|
||||||
|
\hline
|
||||||
|
$k_{e}$ (Coulomb) & $1.38935333 \cross 10^{5}$ & $\frac{u (\mu m)^{3}}{(\mu s)^{2} e^{2}}$ \\
|
||||||
|
T (Tesla) & $9.64852558 \cross 10^{1}$ & $\frac{u}{(\mu s) e}$ \\
|
||||||
|
V (Volt) & $9.64852558 \cross 10^{7}$ & $\frac{u (\mu m)^{2}}{(\mu s)^{2} e}$ \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Value of the Coulomb constant ($k_{e}$), and the SI units for magnetic field strength ($T$) and electric potential ($V$). The base units are given by length in micrometre ($\mu m$), time in microseconds ($\mu s$), mass in ($u$), and charge in elementary charge ($e$).}
|
||||||
|
\label{tab:constants}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
latex/images/relative_error.pdf
Normal file
BIN
latex/images/relative_error.pdf
Normal file
Binary file not shown.
BIN
latex/main.pdf
Normal file
BIN
latex/main.pdf
Normal file
Binary file not shown.
|
|
@ -10,6 +10,7 @@
|
||||||
% Allows special characters (including æøå)
|
% Allows special characters (including æøå)
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
\usepackage{fontawesome}
|
\usepackage{fontawesome}
|
||||||
|
% \usepackage{tabularx}
|
||||||
% \usepackage[english]{babel}
|
% \usepackage[english]{babel}
|
||||||
|
|
||||||
%% Note that you may need to download some of these packages manually, it depends on your setup.
|
%% Note that you may need to download some of these packages manually, it depends on your setup.
|
||||||
|
|
@ -24,12 +25,12 @@
|
||||||
\usepackage{listings} % display code
|
\usepackage{listings} % display code
|
||||||
\usepackage{subfigure} % imports a lot of cool and useful figure commands
|
\usepackage{subfigure} % imports a lot of cool and useful figure commands
|
||||||
% \usepackage{float}
|
% \usepackage{float}
|
||||||
% \usepackage[section]{placeins}
|
%\usepackage[section]{placeins}
|
||||||
\usepackage{algorithm}
|
\usepackage{algorithm}
|
||||||
\usepackage[noend]{algpseudocode}
|
\usepackage[noend]{algpseudocode}
|
||||||
\usepackage{subfigure}
|
\usepackage{subfigure}
|
||||||
\usepackage{tikz}
|
\usepackage{tikz}
|
||||||
% \usetikzlibrary{quantikz2}
|
\usetikzlibrary{quantikz2}
|
||||||
% defines the color of hyperref objects
|
% defines the color of hyperref objects
|
||||||
% Blending two colors: blue!80!black = 80% blue and 20% black
|
% Blending two colors: blue!80!black = 80% blue and 20% black
|
||||||
\hypersetup{ % this is just my personal choice, feel free to change things
|
\hypersetup{ % this is just my personal choice, feel free to change things
|
||||||
|
|
@ -63,9 +64,6 @@
|
||||||
% Introduction
|
% Introduction
|
||||||
\subfile{sections/introduction}
|
\subfile{sections/introduction}
|
||||||
|
|
||||||
% Theory
|
|
||||||
\subfile{sections/theory}
|
|
||||||
|
|
||||||
% Methods
|
% Methods
|
||||||
\subfile{sections/methods}
|
\subfile{sections/methods}
|
||||||
|
|
||||||
|
|
@ -76,7 +74,10 @@
|
||||||
\subfile{sections/conclusion}
|
\subfile{sections/conclusion}
|
||||||
|
|
||||||
|
|
||||||
\subfile{appendix/appendix}
|
\appendix
|
||||||
|
\subfile{appendix/appendix_a}
|
||||||
|
\subfile{appendix/appendix_b}
|
||||||
|
\subfile{appendix/appendix_c}
|
||||||
|
|
||||||
\onecolumngrid
|
\onecolumngrid
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,87 +1,104 @@
|
||||||
@book{vogel:2018,
|
@book{vogel:2018,
|
||||||
author = {Manuel Vogel},
|
author = {Manuel Vogel},
|
||||||
title = {Particle Confinement in Penning Traps},
|
title = {Particle Confinement in Penning Traps},
|
||||||
subtitle = {An Introduction},
|
subtitle = {An Introduction},
|
||||||
publisher = {Springer Cham},
|
publisher = {Springer Cham},
|
||||||
year = {2018},
|
year = {2018},
|
||||||
edition = {1},
|
edition = {1},
|
||||||
abstract = {An introduction to the field of Penning traps and related experimental techniques. The book is motivated by the observation that often a vast number of different resources have to be explored to gain a good overview of Penning trap principles. This is especially true for students who experience additional difficulty due to the different styles of presentation and notation.}
|
abstract = {An introduction to the field of Penning traps and related experimental techniques. The book is motivated by the observation that often a vast number of different resources have to be explored to gain a good overview of Penning trap principles. This is especially true for students who experience additional difficulty due to the different styles of presentation and notation.}
|
||||||
}
|
}
|
||||||
|
|
||||||
@inbook{vogel:2018:ch5,
|
@inbook{vogel:2018:ch5,
|
||||||
author = {Manuel Vogel},
|
author = {Manuel Vogel},
|
||||||
title = {Particle Confinement in Penning Traps},
|
title = {Particle Confinement in Penning Traps},
|
||||||
subtitle = {An Introduction},
|
subtitle = {An Introduction},
|
||||||
publisher = {Springer Cham},
|
publisher = {Springer Cham},
|
||||||
year = {2018},
|
year = {2018},
|
||||||
edition = {1},
|
edition = {1},
|
||||||
pages = {45--50}
|
pages = {45--50}
|
||||||
}
|
}
|
||||||
|
|
||||||
@inbook{vogel:2018:ch1,
|
@inbook{vogel:2018:ch1,
|
||||||
author = {Manuel Vogel},
|
author = {Manuel Vogel},
|
||||||
title = {Particle Confinement in Penning Traps},
|
title = {Particle Confinement in Penning Traps},
|
||||||
subtitle = {An Introduction},
|
subtitle = {An Introduction},
|
||||||
publisher = {Springer Cham},
|
publisher = {Springer Cham},
|
||||||
year = {2018},
|
year = {2018},
|
||||||
edition = {1--6}
|
edition ={1--6}
|
||||||
}
|
}
|
||||||
|
|
||||||
@article{hunter:2007,
|
@article{hunter:2007:matplotlib,
|
||||||
author = {Hunter, J. D.},
|
author = {Hunter, J. D.},
|
||||||
title = {Matplotlib: A 2D graphics environment},
|
title = {Matplotlib: A 2D graphics environment},
|
||||||
journal = {Computing in Science \& Engineering},
|
journal = {Computing in Science \& Engineering},
|
||||||
volume = {9},
|
volume = {9},
|
||||||
number = {3},
|
number = {3},
|
||||||
pages = {90--95},
|
pages = {90--95},
|
||||||
abstract = {Matplotlib is a 2D graphics package used for Python for
|
abstract = {Matplotlib is a 2D graphics package used for Python for
|
||||||
application development, interactive scripting, and publication-quality
|
application development, interactive scripting, and publication-quality
|
||||||
image generation across user interfaces and operating systems.},
|
image generation across user interfaces and operating systems.},
|
||||||
publisher = {IEEE COMPUTER SOC},
|
publisher = {IEEE COMPUTER SOC},
|
||||||
doi = {10.1109/MCSE.2007.55},
|
doi = {10.1109/MCSE.2007.55},
|
||||||
year = 2007
|
year = 2007
|
||||||
}
|
}
|
||||||
|
|
||||||
@inbook{lindstrom:2016:ch3,
|
@inbook{lindstrom:2016:ch3,
|
||||||
author = {Tom Lindstrøm},
|
author = {Tom Lindstrøm},
|
||||||
title = {Kalkulus},
|
title = {Kalkulus},
|
||||||
publisher = {Universitetsforlaget},
|
publisher = {Universitetsforlaget},
|
||||||
year = {2016},
|
year = {2016},
|
||||||
edition = {4},
|
edition = {4},
|
||||||
pages = {133--137}
|
pages = {133--137}
|
||||||
}
|
}
|
||||||
|
|
||||||
@inbook{lindstrom:2016:ch10:5,
|
@inbook{lindstrom:2016:ch10:5,
|
||||||
author = {Tom Lindstrøm},
|
author = {Tom Lindstrøm},
|
||||||
title = {Kalkulus},
|
title = {Kalkulus},
|
||||||
publisher = {Universitetsforlaget},
|
publisher = {Universitetsforlaget},
|
||||||
year = {2016},
|
year = {2016},
|
||||||
edition = {4},
|
edition = {4},
|
||||||
pages = {589--606}
|
pages = {589--606}
|
||||||
}
|
}
|
||||||
|
|
||||||
@article{britannica:2023:matter,
|
@online{britannica:2023:matter,
|
||||||
author = {The Editors of Encyclopaedia Britannica},
|
author = {The Editors of Encyclopaedia Britannica},
|
||||||
title = {matter},
|
title = {matter},
|
||||||
year = {2023},
|
year = {2023},
|
||||||
url = {https://www.britannica.com/science/matter},
|
url = {https://www.britannica.com/science/matter},
|
||||||
urldate = {2023-10-17}
|
urldate = {2023-10-17}
|
||||||
}
|
}
|
||||||
|
|
||||||
@inbook{gjevik:2014:appendix,
|
@inbook{gjevik:2014:appendix,
|
||||||
author = {Bjørn Gjevik and Morten Wang Fagerland},
|
author = {Bjørn Gjevik and Morten Wang Fagerland},
|
||||||
title = {Feltteori og vektoranalyse},
|
title = {Feltteori og vektoranalyse},
|
||||||
publisher = {Farleia Forlag},
|
publisher = {Farleia Forlag},
|
||||||
year = {2018},
|
year = {2018},
|
||||||
pages = {162--163}
|
pages = {162--163}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@article{waskom:2021:seaborn,
|
||||||
|
author = {Michael L. Waskom},
|
||||||
|
title = {seaborn: statistical data visualization},
|
||||||
|
journal = {Journal of Open Source Software},
|
||||||
|
volume = {6},
|
||||||
|
number = {60},
|
||||||
|
publisher = {The Open Journal},
|
||||||
|
year = {2021},
|
||||||
|
doi = {10.21105/joss.03021},
|
||||||
|
url = {https://doi.org/10.21105/joss.03021},
|
||||||
|
pages = {3021}
|
||||||
|
}
|
||||||
|
|
||||||
@article{rk4_method,
|
@online{openmp:2018,
|
||||||
author = "Morten Hjorth-Jensen",
|
author = {OpenMP},
|
||||||
title = "Computational Physics, Lecture Notes Fall 2015",
|
title = {OpenMP Application Programming Interface},
|
||||||
journal = "Department of Physics, University of Oslo",
|
year = {2018},
|
||||||
year = "2015",
|
url = {https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf},
|
||||||
chapter = "8.4",
|
urldate = {2023-10-22}
|
||||||
pages = "250--252",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@misc{penning:fig,
|
||||||
|
key = ,
|
||||||
|
url = {https://www.med.physik.uni-muenchen.de/research/nuclear-science/nuclear-masses/mlltrap/layout/traps/index.html}
|
||||||
|
note = {Configuration figure a}
|
||||||
|
}
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
\graphicspath{{\subfix{../images/}}}
|
\graphicspath{{\subfix{../images/}}}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
%
|
||||||
\section{Introduction}
|
\section{Introduction}
|
||||||
We are surrounded by matter, which are made up of elementary particles. In the field of physics we want to understand the properties of these particles, measure their physical quantities, not to mention explain the origin of mass \cite{britannica:2023:matter}.
|
We are surrounded by matter, which are made up of elementary particles. In the field of physics we want to understand the properties of these particles, measure their physical quantities, not to mention explain the origin of mass \cite{britannica:2023:matter}.
|
||||||
|
|
||||||
However, to study a particle, it is necessary isolate and contain it over time. The Penning trap is a device, able to confine charged particles for a period of time. This concept was evolved from F. M. Penning's implementation of magnetic fiels to a vaccum gauge, and J. R. Pierce's work with electron beams, and put into practice by Hans Dehmelt. In 1973 Dehmelt and his group of researchers were able to confine a particle and store it over several months \cite{vogel:2018:ch1}.
|
However, to study a particle, it is necessary isolate and contain it over time. The Penning trap is a device, able to confine charged particles for a period of time. This concept was evolved from F. M. Penning's implementation of magnetic fiels to a vaccum gauge, and J. R. Pierce's work with electron beams, and put into practice by Hans Dehmelt. In 1973 Dehmelt and his group of researchers were able to confine a particle and store it over several months \cite{vogel:2018:ch1}.
|
||||||
|
|
||||||
In practice, a Penning trap is not easy to obtain, and an experiment is both time consuming and expensive. A numerical approach, allow us to study the effects of the Penning trap on a charged particle, without the cost. We can use ordinary differential equations to model the particle's movement, confined within an Penning trap. Our focus will be on an ideal Penning trap, where an electrostatic field confines the particle in z-direction, and a magnetic field confines it in the radial direction. We will use numerical methods to model a single particle, and study the particle motion in radial direction. In addition, we will model a system of particles, and study their motion both with and without particle interaction.
|
In practice, a Penning trap is not easy to obtain, and an experiment is both time consuming and expensive. A numerical approach, allow us to study the effects of the Penning trap on a charged particle, without the cost. We can use ordinary differential equations to model the particle's movement, confined within an Penning trap. Our focus will be on an ideal Penning trap, where an electrostatic field confines the particle in z-direction, and a magnetic field confines it in the radial direction. We will use numerical methods to model a single particle, and study the particle motion in radial direction. In addition, we will model a system of particles, and study their motion both with and without particle interaction.
|
||||||
|
%
|
||||||
\end{document}
|
\end{document}
|
||||||
BIN
latex/sections/methods.pdf
Normal file
BIN
latex/sections/methods.pdf
Normal file
Binary file not shown.
|
|
@ -3,39 +3,100 @@
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\section{Methods}
|
\section{Methods}
|
||||||
|
% Problem 1
|
||||||
|
When we study the Penning traps effect on a particle with a charge $q$, we need to consider the forces acting on the particle. We can use Newton's second law \eqref{eq:newton_second} to determine the position of a particle as a function of time. In addition, we introduce the Lorentz force \eqref{eq:lorentz_force}, which describes the force on the particle. The position can be described by %
|
||||||
|
%
|
||||||
|
\begin{equation}\label{eq:newton_lorentz}
|
||||||
|
m \ddot{\mathbf{r}} = (q \mathbf{E} + q \mathbf{v} \times \mathbf{B}).
|
||||||
|
\end{equation}
|
||||||
|
%
|
||||||
|
Using eq. \eqref{eq:newton_lorentz} we derive the differential equations in sec. \ref{sec:eq_motion}, and can rewrite them as
|
||||||
|
\begin{align}
|
||||||
|
\label{eq:motion_x}
|
||||||
|
\ddot{x} - \omega_{0} \dot{y} - \frac{1}{2} \omega_{z}^{2} x &= 0, \\
|
||||||
|
\label{eq:motion_y}
|
||||||
|
\ddot{y} - \omega_{0} \dot{x} - \frac{1}{2} \omega_{z}^{2} y &= 0, \\
|
||||||
|
\label{eq:motion_z}
|
||||||
|
\ddot{z} + \omega_{z}^{2} z &= 0,
|
||||||
|
\end{align} %
|
||||||
|
%
|
||||||
|
We find the general solution for eq. \eqref{eq:motion_z}
|
||||||
|
\begin{equation}\label{eq:eq_general}
|
||||||
|
z(t) = c_{1} e^{i \omega_{z} t} + c_{2} e^{-i \omega_{z} t},
|
||||||
|
\end{equation} %
|
||||||
|
derived in sec. \ref{sec:eq_general}. Continuing, we will use a Calcium ion with a single positive charge. That is, we assume the charge of the particle is $q > 0$.
|
||||||
|
|
||||||
|
% Problem 2
|
||||||
|
Since eq. \eqref{eq:motion_x} and eq. \eqref{eq:motion_y} are coupled, we want to rewrite them as a single differential equation. We derive this in sec. \ref{sec:eq_complex}, and the resulting equation is given by
|
||||||
|
\begin{equation}\label{eq:single_differential}
|
||||||
|
\ddot{f} + i \omega_{0} \dot{f} - \frac{1}{2} \omega_{z}^{2} f = 0.
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
% Problem 3
|
||||||
|
Eq. \eqref{eq:single_differential} has a general solution given by
|
||||||
|
\begin{equation}\label{eq:general_solution}
|
||||||
|
f(t) = A_{+}e^{-i(\omega_{+} t + \phi_{+})} + A_{-}e^{-i(\omega_{-} t + \phi_{-})}.
|
||||||
|
\end{equation} %
|
||||||
|
The amplitude $A_{+}$ and $A_{-}$ are positive, the phases $\phi_{+}$ and $\phi_{-}$ are constant, and the rate is given by
|
||||||
|
\begin{equation*}
|
||||||
|
\omega_{\pm} = \frac{\omega_{0} \pm \sqrt{\omega_{0}^{2} - 2 \omega_{z}^{2}}}{2}.
|
||||||
|
\end{equation*}
|
||||||
|
We find the physical coordinates at a given time $t$ using
|
||||||
|
\begin{equation*}
|
||||||
|
x(t) = \text{Re}f(t), \quad y(t) = \text{Im}f(t),
|
||||||
|
\end{equation*} %
|
||||||
|
and eq. \eqref{eq:general_solution}. We can rearrange the right hand side of the derived expression in \ref{sec:eq_coord}, and find the physical coordinates
|
||||||
|
\begin{align}\label{eq:physical_coord}
|
||||||
|
x(t) &= A_{+} \cos(\omega_{+} t + \phi_{+}) + A_{-} \cos(\omega_{-} t + \phi_{-}) \\
|
||||||
|
y(t) &= - A_{+} \sin(\omega_{+} t + \phi_{+}) - A_{-} \sin(\omega_{-} t + \phi_{-})
|
||||||
|
\end{align} %
|
||||||
|
% Problem 4
|
||||||
|
However, to obtain a bound on the particle's movement in the radial direction, we have to ensure that
|
||||||
|
\begin{align*}
|
||||||
|
|f(t)| &= \sqrt{(x(t))^{2} + (y(t))^{2}}. \\
|
||||||
|
\end{align*} %
|
||||||
|
When $t \rightarrow \infty$, the upper and lower limits are
|
||||||
|
\begin{align}
|
||||||
|
R_{+} &= A_{+} + A_{-} \\
|
||||||
|
R_{-} &= |A_{+} - A_{-}|,
|
||||||
|
\end{align}
|
||||||
|
derived in sec. \ref{sec:bounded_solution}.
|
||||||
|
|
||||||
|
% Problem 3
|
||||||
|
To obtain the bounded solution, we need to consider the expression
|
||||||
|
\begin{equation*}
|
||||||
|
\alpha = (\omega_{+} - \omega_{-}) t +( \phi_{+} - \phi_{-}).
|
||||||
|
\end{equation*}
|
||||||
|
When $t \rightarrow \infty$ the constant phases will not affect the expression, we obtain a bounded solution if we consider the rate such that $|f(t)| < \infty$. That is, we need $\omega_{0}^{2} - 2 \omega_{z}^{2}$ in eq. \eqref{eq:angular_rate} to be real.
|
||||||
|
\begin{align*}
|
||||||
|
\omega_{0}^{2} - 2 \omega_{z}^{2} = 0, \quad \omega_{0} > 2 \omega_{z}
|
||||||
|
\end{align*}
|
||||||
|
\begin{equation}\label{eq:angular_rate}
|
||||||
|
\omega_{\pm} = \frac{\omega_{0} \pm \sqrt{\omega_{0}^{2} - 2 \omega_{z}^{2}}}{2}
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
We find the solution
|
||||||
|
Physical properties given by newtons second law \eqref{eq:newton_second}
|
||||||
|
|
||||||
|
The particle moves and its position can be determined using newton. where the electric field
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\subsection{Units and constants}
|
|
||||||
|
|
||||||
Before continuing, we need to define the units we'll be working with.
|
|
||||||
Since we are working with particles, we need small units to work with so the
|
|
||||||
numbers we are working with aren't so small that they could potentially lead
|
|
||||||
to large round-off errors in our simulation. The units that we will use are listed in Table~\ref{tab:units}.
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\begin{center}
|
\centering
|
||||||
\begin{tabular}[c]{lll}
|
\begin{tabular}[c]{lll}
|
||||||
Dimension & Unit & Symbol \\
|
Constant & Value & \\
|
||||||
\hline
|
\hline
|
||||||
Length & micrometer & $\mu m$ \\
|
$B_{0}$ & $1.00 T$ & $9.65 \cross 10^{1} \frac{u}{(\mu s) e}$ \\
|
||||||
Time & microseconds & $\mu s$ \\
|
$V_{0}$ & $25.0 mV$ & $2.41 \cross 10^{6} \frac{u (\mu m)^{2}}{(\mu s)^{2} e}$ \\
|
||||||
Mass & atomic mass unit & $u$ \\
|
$d$ & $500 \ \mu m$ & \\
|
||||||
Charge & the elementary charge & $e$ \\
|
|
||||||
\hline
|
\hline
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\end{center}
|
\caption{Default configuration of the Penning trap, where the value of T and V can be found in table \ref{tab:constants}.}
|
||||||
\caption{The set of units we'll be working with.}\label{tab:units}
|
\label{tab:penning_config}
|
||||||
\end{table}
|
\end{table}
|
||||||
With these base units, we get
|
|
||||||
\begin{equation}
|
|
||||||
k_e = 1.3893533 \cdot 10^5 \frac{u(\mu m)^3}{(\mu s)^2 e},
|
|
||||||
\end{equation}
|
|
||||||
and we get that the unit for magnetic field strength (Tesla, $T$) and electric potential (Volt, $V$) are
|
|
||||||
\begin{equation}
|
|
||||||
\begin{split}
|
|
||||||
T &= 9.64852558 \cdot 10^1 \frac{u}{(\mu s) e} \\
|
|
||||||
V &= 9.64852558 \cdot 10^7 \frac{u (\mu m)^2}{(\mu s)^2 e}. \\
|
|
||||||
\end{split}
|
|
||||||
\label{eq:}
|
|
||||||
\end{equation}
|
|
||||||
|
|
||||||
\subsection{Dealing with a multi--particle system}
|
\subsection{Dealing with a multi--particle system}
|
||||||
|
|
||||||
|
|
@ -230,7 +291,6 @@ and would reduce the required amount of loops down to 4.
|
||||||
\subsection{Relative error and error convergance rate}
|
\subsection{Relative error and error convergance rate}
|
||||||
|
|
||||||
\subsection{Tools}
|
\subsection{Tools}
|
||||||
We used matplotlib
|
The numerical methods implemented in C++, are parallelized using OpenMP \cite{openmp:2018}. We used the Python library matplotlib \cite{hunter:2007:matplotlib} to produce all the plots, and seaborn \cite{waskom:2021:seaborn} to set the theme in the figures.
|
||||||
|
|
||||||
%\biblio
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,86 @@
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\section{Results and Discussion}
|
\section{Results and Discussion}
|
||||||
From equation \eqref{eq:general_solution} we can find
|
% Single particle
|
||||||
|
We simulated the movement of particles confined in a Penning trap. All simulations used the initial conditions for particle 1 and 2 given in table \ref{tab:initial_condition_particles}.
|
||||||
|
|
||||||
Problem 9: we have to deal with $|\mathbf{r}| = d$
|
First we simulated a single particle for $50 \mu s$, approximating the particle's motion using the RK4 method. In addition we compared the motion of particle 1 with the analytical solution in figure \ref{fig:single_particle}. What we see is a complete overlap of the analytical solution completely overlap the approximated, suggest that the simulation result is good.
|
||||||
|
% Add something about why the simulated result is good, cos(wt) when w is
|
||||||
|
%
|
||||||
|
\begin{table}[H]
|
||||||
|
\centering
|
||||||
|
\begin{tabular}[c]{lll}
|
||||||
|
Particle & Position & Velocity \\
|
||||||
|
\hline
|
||||||
|
$p_{1}$ & $(20, 0, 20) \mu m$ & $(0, 25, 0) \mu m/ \mu s$ \\
|
||||||
|
$p_{2}$ & $(25, 25, 0) \mu m$ & $(0, 40, 5) \mu m/ \mu s$ \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Initial position and velocity of particle 1 ($p_{1}$) particle 2 ($p_{2}$), where the analytical solution is given by $z(t) = z_{0} \cos (\omega_{z} t)$}
|
||||||
|
\label{tab:initial_condition_particles}
|
||||||
|
\end{table}
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/single_particle.pdf}
|
||||||
|
\caption{A single particle in the Penning trap, approximated and analytical motion in z-direction.}
|
||||||
|
\label{fig:single_particle}
|
||||||
|
\end{figure}
|
||||||
|
% Add equations of motion for particle with interaction eq. (18, 19, 20)
|
||||||
|
% Multiple particles
|
||||||
|
% Add initial condition of Penning trap
|
||||||
|
We will now consider the Penning trap with initial conditions given in table \ref{tab:initial_condition_penning}, and simulate using one or two particles. In addition, we simulate two particles both with and without interactions, the result is found in figure \ref{fig:two_particles}. When we add interaction between the particles, they both still follow the same inherent path. However, we observe a small shift in both particle's movement.
|
||||||
|
\begin{table}[H]
|
||||||
|
\centering
|
||||||
|
\begin{tabular}{lll}
|
||||||
|
$B_0$ & $V_{0}$ & $d$ \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Caption}
|
||||||
|
\label{tab:initial_condition_penning}
|
||||||
|
\end{table}
|
||||||
|
%
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/plot_2_particles_xy.pdf}
|
||||||
|
\caption{Movement of two particles in the xy-plane. $\hat{p}_{1}$ and $\hat{p}_{2}$ include particle interaction, whereas $p_{1}$ and $p_{2}$ does not include particle interaction.}
|
||||||
|
\label{fig:two_particles}
|
||||||
|
\end{figure}
|
||||||
|
% Phase space plot
|
||||||
|
When we simulate two particles, we can see the effect of interaction between the particles in the xy-plane in fig. \ref{fig:phase_space_2x} and in the z-direction in fig. \ref{fig:phase_space_2z}. What we observe is a very small shift in position for particle 1 in x-direction, whereas particle 2 does not have a visible shift. In the z-direction, however, the oscillation of particle 2 experience a greater shift. Particle 2 experience the force of particle 1 such that particle 2 moves larger distance.
|
||||||
|
%
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/phase_space_2_particles_x.pdf}
|
||||||
|
\caption{Phase space plot of two particles in x-direction.}
|
||||||
|
\label{fig:phase_space_2x}
|
||||||
|
\end{figure}
|
||||||
|
%
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/phase_space_2_particles_z.pdf}
|
||||||
|
\caption{Phase space plot of two particles in z-direction.}
|
||||||
|
\label{fig:phase_space_2z}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/3d_plot.pdf}
|
||||||
|
\caption{3D plot of particles-}
|
||||||
|
\label{fig:3d_particles}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/phase_space_2_particles.pdf}
|
||||||
|
\caption{Phase space plot of two particles.}
|
||||||
|
\label{fig:phase_space_2}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{images/particles_left.pdf}
|
||||||
|
\caption{Fraction of particles left in the Penning trap, with a given amplitude $f$.}
|
||||||
|
\label{fig:particles_left}
|
||||||
|
\end{figure}
|
||||||
\end{document}
|
\end{document}
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
matplotlib
|
||||||
|
numpy
|
||||||
12
src/Makefile
12
src/Makefile
|
|
@ -21,7 +21,7 @@ endif
|
||||||
|
|
||||||
PROFILE ?= 0
|
PROFILE ?= 0
|
||||||
ifeq ($(PROFILE), 1)
|
ifeq ($(PROFILE), 1)
|
||||||
PROFFLAG=-pg
|
PROFFLAG=-pg -fno-inline-functions
|
||||||
else
|
else
|
||||||
PROFFLAG=
|
PROFFLAG=
|
||||||
endif
|
endif
|
||||||
|
|
@ -30,6 +30,16 @@ endif
|
||||||
|
|
||||||
all: test_suite main
|
all: test_suite main
|
||||||
|
|
||||||
|
instrument:
|
||||||
|
scorep $(CC) -c PenningTrap.cpp -o PenningTrap.o $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
||||||
|
scorep $(CC) -c Particle.cpp -o Particle.o $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
||||||
|
scorep $(CC) -c utils.cpp -o utils.o $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
||||||
|
scorep $(CC) -c main.cpp -o main.o $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
||||||
|
scorep $(CC) $(LIBOBJS) $(CLASSOBJS) main.o -o main $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Rules for executables
|
# Rules for executables
|
||||||
main: main.o $(LIBOBJS) $(CLASSOBJS)
|
main: main.o $(LIBOBJS) $(CLASSOBJS)
|
||||||
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@
|
||||||
#include "Particle.hpp"
|
#include "Particle.hpp"
|
||||||
|
|
||||||
Particle::Particle(double q, double m,
|
Particle::Particle(double q, double m,
|
||||||
arma::vec::fixed<3> r_vec,
|
vec_3d r_vec,
|
||||||
arma::vec::fixed<3> v_vec)
|
vec_3d v_vec)
|
||||||
{
|
{
|
||||||
// Giving the particle its properties
|
// Giving the particle its properties
|
||||||
this->q = q;
|
this->q = q;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue