Project-3/docs/index.html
2023-10-24 21:33:30 +02:00

224 lines
9.1 KiB
HTML

<!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: Penning trap simulation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Penning Trap Simulation
</div>
<div id="projectbrief">Simulate particle behavior inside a Penning Trap</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('index.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><div class="header">
<div class="headertitle"><div class="title">Penning trap simulation </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md_README"></a> </p><div class="image">
<img src="100_particles.gif" alt=""/>
</div>
<p><a href="https://github.uio.no/FYS3150-G2-2023/Project-3">Repo</a></p>
<p><a href="https://pages.github.uio.no/FYS3150-G2-2023/Project-3/">Documentation</a></p>
<h1><a class="anchor" id="autotoc_md1"></a>
Requirements</h1>
<h2><a class="anchor" id="autotoc_md2"></a>
Operating systems</h2>
<ul>
<li>Linux<ul>
<li>Has been tested on <a href="https://fedoraproject.org/">Fedora 38</a></li>
<li>Will most likely work on other Linux distributions</li>
</ul>
</li>
<li>MacOS<ul>
<li>Might work, but hasn't been tested</li>
</ul>
</li>
<li>Windows<ul>
<li>Will most likely not work</li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md3"></a>
Tools</h2>
<ul>
<li>Profiling<ul>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_mono/gprof.html">gprof</a></li>
<li><a href="https://www.scalasca.org/">scalasca</a></li>
<li><a href="https://www.vi-hps.org/projects/score-p">score-p</a></li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md4"></a>
Libraries</h2>
<ul>
<li>Python<ul>
<li><a href="https://matplotlib.org/">matplotlib</a></li>
<li><a href="https://numpy.org/">numpy</a></li>
</ul>
</li>
<li>C++<ul>
<li><a href="https://www.openmp.org/">openmp</a></li>
<li><a href="https://arma.sourceforge.net/">armadillo</a></li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="autotoc_md5"></a>
Compiling</h1>
<p>Compiling is as easy as running this command while being inside the src directory:</p>
<div class="fragment"><div class="line">make</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md6"></a>
Running programs</h1>
<h2><a class="anchor" id="autotoc_md7"></a>
C++ binaries</h2>
<p>To run <b>main</b> or <b>test_suite</b>, just run this command while being inside src:</p>
<div class="fragment"><div class="line">./&lt;program-name&gt;</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md8"></a>
Python scripts</h2>
<h3><a class="anchor" id="autotoc_md9"></a>
Install libraries</h3>
<p>Before running the scripts, make sure that all libraries are installed. Using pip, you can install all requirements like this:</p>
<div class="fragment"><div class="line">pip install -r requirements.txt</div>
</div><!-- fragment --><p>This recursively install all the packages that are listed in <b>requirements.txt</b>.</p>
<h3><a class="anchor" id="autotoc_md10"></a>
Running scripts</h3>
<p>For the Python scripts, run them from the src directory like this:</p>
<div class="fragment"><div class="line">python scripts/&lt;script-name&gt;</div>
</div><!-- fragment --><p>If you have any problems running the scripts, you might have to run this instead:</p>
<div class="fragment"><div class="line">python3 scripts/&lt;script-name&gt;</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md11"></a>
Batch system</h2>
<p>For the <b>frequency_narrow_sweeps_long</b> program, the is a script called <b>job.script</b> that comes along with it. This is to be able to run it on a batch system using Slurm if you have access to one. This is the recommended way to use this program as it takes approximately 90 minutes to complete when using 16 cores.</p>
<p>If you happen to have such a system available to you, then you should clone this repo on that system, then compile it by running:</p>
<div class="fragment"><div class="line">make frequency_narrow_sweeps_long</div>
</div><!-- fragment --><p>You might have to load the Armadillo library before compiling.</p>
<p>After compiling, you can schedule it by running:</p>
<div class="fragment"><div class="line">sbatch job.script</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md12"></a>
Performance</h1>
<p>This section aims to give an idea to the time it takes for the program to run so that you know a bit what to expect if you decide to run it for yourself.</p>
<h2><a class="anchor" id="autotoc_md13"></a>
CPU</h2>
<p>The times mentioned here are times achieved on a computer with these specifications:</p>
<ul>
<li>CPU model<ul>
<li>Intel i7-9850H</li>
</ul>
</li>
<li>Threads<ul>
<li>12</li>
</ul>
</li>
<li>Clock speed<ul>
<li>4.6GHz</li>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md14"></a>
Times</h2>
<p>All times mentioned use the <b>evolve_RK4</b> method.</p>
<p>Running a simulation with 100 particles without particle interactions over 40000 steps takes around 1.8 seconds. With particle interactions, it takes around 4.8 seconds.</p>
<p><b>potential_resonance_wide_sweep</b> takes around 56 seconds to complete.</p>
<p><b>potential_resonance_narrow_sweep</b> takes around 172 seconds to complete.</p>
<p><b>potential_resonance_narrow_sweep_interaction</b> takes around 936 seconds to complete.</p>
<h1><a class="anchor" id="autotoc_md15"></a>
Credits</h1>
<p>The Doxygen theme used here is <a href="https://github.com/jothepro/doxygen-awesome-css">doxygen-awesome-css</a>. </p>
</div></div><!-- PageDoc -->
</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>