Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiLehe committed Apr 26, 2024
1 parent 61d1dc0 commit d2b771f
Show file tree
Hide file tree
Showing 59 changed files with 287 additions and 190 deletions.
6 changes: 3 additions & 3 deletions _modules/fbpic/fields/smoothing.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.fields.smoothing &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.fields.smoothing &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/fbpic/lpa_utils/boosted_frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.lpa_utils.boosted_frame &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.lpa_utils.boosted_frame &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/fbpic/lpa_utils/bunch.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.lpa_utils.bunch &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.lpa_utils.bunch &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/fbpic/lpa_utils/external_fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.lpa_utils.external_fields &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.lpa_utils.external_fields &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/fbpic/lpa_utils/laser/laser.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.lpa_utils.laser.laser &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.lpa_utils.laser.laser &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
Expand Down
13 changes: 7 additions & 6 deletions _modules/fbpic/lpa_utils/laser/laser_profiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.lpa_utils.laser.laser_profiles &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.lpa_utils.laser.laser_profiles &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
Expand Down Expand Up @@ -998,15 +998,16 @@ <h1>Source code for fbpic.lpa_utils.laser.laser_profiles</h1><div class="highlig

<span class="c1"># Check lasy version</span>
<span class="n">valid_version</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="p">(</span><span class="s1">&#39;softwareVersion&#39;</span> <span class="ow">in</span> <span class="n">f</span><span class="o">.</span><span class="n">attrs</span><span class="p">):</span>
<span class="k">if</span> <span class="p">(</span><span class="s1">&#39;software&#39;</span> <span class="ow">in</span> <span class="n">f</span><span class="o">.</span><span class="n">attrs</span><span class="p">)</span> <span class="ow">and</span> <span class="p">(</span><span class="s1">&#39;softwareVersion&#39;</span> <span class="ow">in</span> <span class="n">f</span><span class="o">.</span><span class="n">attrs</span><span class="p">):</span>
<span class="n">software</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;software&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">()</span>
<span class="n">version_string</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">attrs</span><span class="p">[</span><span class="s1">&#39;softwareVersion&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">()</span>
<span class="n">version_list</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">number</span><span class="p">)</span> <span class="k">for</span> <span class="n">number</span> <span class="ow">in</span> <span class="n">version_string</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">))</span>
<span class="k">if</span> <span class="n">version_list</span> <span class="o">&gt;=</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">0</span><span class="p">):</span>
<span class="k">if</span> <span class="p">(</span><span class="n">software</span> <span class="o">==</span> <span class="s2">&quot;lasy&quot;</span><span class="p">)</span> <span class="ow">and</span> <span class="p">(</span><span class="n">version_list</span> <span class="o">&gt;=</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">0</span><span class="p">)):</span>
<span class="n">valid_version</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">valid_version</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span>
<span class="s2">&quot;The `lasy` version that was used to create the file </span><span class="si">%s</span><span class="s2"> &quot;</span>
<span class="s2">&quot;is obsolete and not supported by FBPIC. Please upgrade your lasy &quot;</span>
<span class="s2">&quot;is obsolete and not supported by FBPIC.</span><span class="se">\n</span><span class="s2">Please upgrade your lasy &quot;</span>
<span class="s2">&quot;version to at least 0.3.0 (e.g. with `pip install --upgrade lasy`) &quot;</span>
<span class="s2">&quot;and re-create the file </span><span class="si">%s</span><span class="s2">.&quot;</span> <span class="o">%</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span> <span class="p">)</span>

Expand Down
21 changes: 17 additions & 4 deletions _modules/fbpic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.main &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.main &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -424,7 +424,8 @@ <h1>Source code for fbpic.main</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../api_reference/simulation.html#fbpic.main.Simulation.step">[docs]</a>
<span class="k">def</span> <span class="nf">step</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">N</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">correct_currents</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">correct_divE</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">use_true_rho</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">move_positions</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">move_momenta</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">show_progress</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="n">move_positions</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">move_momenta</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">show_progress</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Perform N PIC cycles.</span>

Expand Down Expand Up @@ -560,13 +561,25 @@ <h1>Source code for fbpic.main</h1><div class="highlight"><pre>
<span class="c1"># were smoothed/corrected, and copy the data from the GPU.)</span>
<span class="n">diag</span><span class="o">.</span><span class="n">write</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">iteration</span> <span class="p">)</span>

<span class="c1"># If spin tracking is enabled, store the previous momenta</span>
<span class="k">for</span> <span class="n">species</span> <span class="ow">in</span> <span class="n">ptcl</span><span class="p">:</span>
<span class="k">if</span> <span class="n">species</span><span class="o">.</span><span class="n">spin_tracker</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">species</span><span class="o">.</span><span class="n">spin_tracker</span><span class="o">.</span><span class="n">store_previous_momenta</span><span class="p">(</span><span class="n">species</span><span class="p">)</span>

<span class="c1"># Push the particles&#39; positions and velocities to t = (n+1/2) dt</span>
<span class="k">if</span> <span class="n">move_momenta</span><span class="p">:</span>
<span class="k">for</span> <span class="n">species</span> <span class="ow">in</span> <span class="n">ptcl</span><span class="p">:</span>
<span class="n">species</span><span class="o">.</span><span class="n">push_p</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">time</span> <span class="o">+</span> <span class="mf">0.5</span><span class="o">*</span><span class="bp">self</span><span class="o">.</span><span class="n">dt</span> <span class="p">)</span>
<span class="k">if</span> <span class="n">move_positions</span><span class="p">:</span>
<span class="k">for</span> <span class="n">species</span> <span class="ow">in</span> <span class="n">ptcl</span><span class="p">:</span>
<span class="n">species</span><span class="o">.</span><span class="n">push_x</span><span class="p">(</span> <span class="mf">0.5</span><span class="o">*</span><span class="n">dt</span> <span class="p">)</span>

<span class="c1"># Push the particles&#39; spin to t = (n+1/2) dt</span>
<span class="c1"># averaging over velocities at t = (n-1/2) dt and t = (n+1/2) dt</span>
<span class="k">for</span> <span class="n">species</span> <span class="ow">in</span> <span class="n">ptcl</span><span class="p">:</span>
<span class="k">if</span> <span class="n">species</span><span class="o">.</span><span class="n">spin_tracker</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">species</span><span class="o">.</span><span class="n">spin_tracker</span><span class="o">.</span><span class="n">push_s</span><span class="p">(</span><span class="n">species</span><span class="p">)</span>

<span class="c1"># Get positions/velocities for antenna particles at t = (n+1/2) dt</span>
<span class="k">for</span> <span class="n">antenna</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">laser_antennas</span><span class="p">:</span>
<span class="n">antenna</span><span class="o">.</span><span class="n">update_v</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">time</span> <span class="o">+</span> <span class="mf">0.5</span><span class="o">*</span><span class="n">dt</span><span class="p">,</span> <span class="n">dt</span> <span class="p">)</span>
Expand Down
6 changes: 3 additions & 3 deletions _modules/fbpic/openpmd_diag/boosted_field_diag.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fbpic.openpmd_diag.boosted_field_diag &mdash; FBPIC 0.25.0 documentation</title>
<title>fbpic.openpmd_diag.boosted_field_diag &mdash; FBPIC 0.26.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/documentation_options.js?v=d8dd0411"></script>
<script src="../../../_static/documentation_options.js?v=4aa2dafa"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
Expand All @@ -30,7 +30,7 @@
FBPIC
</a>
<div class="version">
0.25.0
0.26.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down
Loading

0 comments on commit d2b771f

Please sign in to comment.