Skip to content

Commit

Permalink
Deploying to gh-pages from @ 28901f1 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
pancetta committed Oct 21, 2024
1 parent 0445a7e commit fc9ceb1
Show file tree
Hide file tree
Showing 396 changed files with 8,417 additions and 7,424 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/projects/Hamiltonian.doctree
Binary file not shown.
Binary file modified .doctrees/projects/Resilience.doctree
Binary file not shown.
Binary file modified .doctrees/projects/doc_fput.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_2_C.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_3_B.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_4_D.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_7_A.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_7_B.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_7_C.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_7_D.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/doc_step_8_C.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/step_2.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/step_3.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/step_4.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/step_7.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/step_8.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion _images/coverage-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/timings_SDC_variants_Fisher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/timings_SDC_variants_GrayScott.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions _modules/helpers/plot_helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ <h1>Source code for helpers.plot_helper</h1><div class="highlight"><pre>
<span class="s1">&#39;JSC_beamer&#39;</span><span class="p">:</span> <span class="mf">426.79135</span><span class="p">,</span>
<span class="s1">&#39;Springer_Numerical_Algorithms&#39;</span><span class="p">:</span> <span class="mf">338.58778</span><span class="p">,</span>
<span class="s1">&#39;JSC_thesis&#39;</span><span class="p">:</span> <span class="mf">434.26027</span><span class="p">,</span>
<span class="s1">&#39;TUHH_thesis&#39;</span><span class="p">:</span> <span class="mf">426.79135</span><span class="p">,</span>
<span class="p">}</span>
<span class="c1"># store text height in points here, get this from LaTeX using \the\textheight</span>
<span class="n">textheights</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;JSC_beamer&#39;</span><span class="p">:</span> <span class="mf">214.43411</span><span class="p">,</span>
<span class="s1">&#39;JSC_thesis&#39;</span><span class="p">:</span> <span class="mf">635.5</span><span class="p">,</span>
<span class="s1">&#39;TUHH_thesis&#39;</span><span class="p">:</span> <span class="mf">631.65118</span><span class="p">,</span>
<span class="p">}</span>
<span class="k">assert</span> <span class="p">(</span>
<span class="n">journal</span> <span class="ow">in</span> <span class="n">textwidths</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
Expand Down
4 changes: 2 additions & 2 deletions _modules/helpers/pysdc_helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h1>Source code for helpers.pysdc_helper</h1><div class="highlight"><pre>

<span class="k">def</span> <span class="fm">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Function called when setting arttributes</span>
<span class="sd"> Function called when setting attributes</span>

<span class="sd"> Args:</span>
<span class="sd"> key: the attribute</span>
Expand All @@ -76,7 +76,7 @@ <h1>Source code for helpers.pysdc_helper</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">attrs</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">None</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__getattr__</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__getattribute__</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>

<div class="viewcode-block" id="FrozenClass.add_attr">
<a class="viewcode-back" href="../../pySDC/helpers.pysdc_helper.html#helpers.pysdc_helper.FrozenClass.add_attr">[docs]</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h1>Source code for implementations.convergence_controller_classes.step_size_lim
<span class="n">S</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="o">=</span> <span class="n">dt_new</span>
<span class="k">elif</span> <span class="nb">abs</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="o">/</span> <span class="n">L</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">dt</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">dt_rel_min_slope</span><span class="p">:</span>
<span class="k">elif</span> <span class="nb">abs</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="o">/</span> <span class="n">L</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">dt</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">dt_rel_min_slope</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">S</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">restart</span><span class="p">:</span>
<span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">dt</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Step size did not change sufficiently to warrant step size change, keeping </span><span class="si">{</span><span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span><span class="si">:</span><span class="s2">.2e</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
Expand All @@ -214,6 +214,79 @@ <h1>Source code for implementations.convergence_controller_classes.step_size_lim
<span class="k">return</span> <span class="kc">None</span></div>
</div>



<div class="viewcode-block" id="StepSizeRounding">
<a class="viewcode-back" href="../../../pySDC/implementations.convergence_controller_classes.step_size_limiter.html#implementations.convergence_controller_classes.step_size_limiter.StepSizeRounding">[docs]</a>
<span class="k">class</span> <span class="nc">StepSizeRounding</span><span class="p">(</span><span class="n">ConvergenceController</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Class to round step size when using adaptive step size selection.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<div class="viewcode-block" id="StepSizeRounding.setup">
<a class="viewcode-back" href="../../../pySDC/implementations.convergence_controller_classes.step_size_limiter.html#implementations.convergence_controller_classes.step_size_limiter.StepSizeRounding.setup">[docs]</a>
<span class="k">def</span> <span class="nf">setup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">controller</span><span class="p">,</span> <span class="n">params</span><span class="p">,</span> <span class="n">description</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Define parameters here</span>

<span class="sd"> Args:</span>
<span class="sd"> controller (pySDC.Controller): The controller</span>
<span class="sd"> params (dict): The params passed for this specific convergence controller</span>
<span class="sd"> description (dict): The description object used to instantiate the controller</span>

<span class="sd"> Returns:</span>
<span class="sd"> (dict): The updated params dictionary</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">defaults</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;control_order&quot;</span><span class="p">:</span> <span class="o">+</span><span class="mi">93</span><span class="p">,</span>
<span class="s2">&quot;digits&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="s2">&quot;fac&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
<span class="p">}</span>
<span class="k">return</span> <span class="p">{</span><span class="o">**</span><span class="n">defaults</span><span class="p">,</span> <span class="o">**</span><span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">setup</span><span class="p">(</span><span class="n">controller</span><span class="p">,</span> <span class="n">params</span><span class="p">,</span> <span class="n">description</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)}</span></div>


<span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">_round_step_size</span><span class="p">(</span><span class="n">dt</span><span class="p">,</span> <span class="n">fac</span><span class="p">,</span> <span class="n">digits</span><span class="p">):</span>
<span class="n">dt_rounded</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">exponent</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span> <span class="o">//</span> <span class="mi">1</span>

<span class="n">dt_norm</span> <span class="o">=</span> <span class="n">dt</span> <span class="o">/</span> <span class="mi">10</span> <span class="o">**</span> <span class="p">(</span><span class="n">exponent</span> <span class="o">-</span> <span class="n">digits</span><span class="p">)</span>
<span class="n">dt_norm_round</span> <span class="o">=</span> <span class="p">(</span><span class="n">dt_norm</span> <span class="o">//</span> <span class="n">fac</span><span class="p">)</span> <span class="o">*</span> <span class="n">fac</span>
<span class="n">dt_rounded</span> <span class="o">=</span> <span class="n">dt_norm_round</span> <span class="o">*</span> <span class="mi">10</span> <span class="o">**</span> <span class="p">(</span><span class="n">exponent</span> <span class="o">-</span> <span class="n">digits</span><span class="p">)</span>
<span class="k">return</span> <span class="n">dt_rounded</span>

<div class="viewcode-block" id="StepSizeRounding.get_new_step_size">
<a class="viewcode-back" href="../../../pySDC/implementations.convergence_controller_classes.step_size_limiter.html#implementations.convergence_controller_classes.step_size_limiter.StepSizeRounding.get_new_step_size">[docs]</a>
<span class="k">def</span> <span class="nf">get_new_step_size</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">controller</span><span class="p">,</span> <span class="n">S</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Enforce an upper and lower limit to the step size here.</span>
<span class="sd"> Be aware that this is only tested when a new step size has been determined. That means if you set an initial</span>
<span class="sd"> value for the step size outside of the limits, and you don&#39;t do any further step size control, that value will</span>
<span class="sd"> go through.</span>
<span class="sd"> Also, the final step is adjusted such that we reach Tend as best as possible, which might give step sizes below</span>
<span class="sd"> the lower limit set here.</span>

<span class="sd"> Args:</span>
<span class="sd"> controller (pySDC.Controller): The controller</span>
<span class="sd"> S (pySDC.Step): The current step</span>

<span class="sd"> Returns:</span>
<span class="sd"> None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">for</span> <span class="n">L</span> <span class="ow">in</span> <span class="n">S</span><span class="o">.</span><span class="n">levels</span><span class="p">:</span>
<span class="k">if</span> <span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">dt_rounded</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_round_step_size</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">fac</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">digits</span><span class="p">)</span>

<span class="k">if</span> <span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="o">!=</span> <span class="n">dt_rounded</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Step size rounded from </span><span class="si">{</span><span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span><span class="si">:</span><span class="s2">.6e</span><span class="si">}</span><span class="s2"> to </span><span class="si">{</span><span class="n">dt_rounded</span><span class="si">:</span><span class="s2">.6e</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span>
<span class="n">S</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">L</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">dt_new</span> <span class="o">=</span> <span class="n">dt_rounded</span>

<span class="k">return</span> <span class="kc">None</span></div>
</div>

</pre></div>

<div class="clearer"></div>
Expand Down
Loading

0 comments on commit fc9ceb1

Please sign in to comment.