Skip to content

Commit eda581e

Browse files
author
Documenter.jl
committed
build based on 78772fd
1 parent 0c8d5a7 commit eda581e

File tree

11 files changed

+34
-34
lines changed

11 files changed

+34
-34
lines changed

dev/.documenter-siteinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.11.6","generation_timestamp":"2025-08-15T22:37:32","documenter_version":"1.14.1"}}
1+
{"documenter":{"julia_version":"1.11.6","generation_timestamp":"2025-09-02T16:58:40","documenter_version":"1.14.1"}}

dev/advanced_usage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
# test accuracy
4242
println("max error in target one: ", maximum(abs.(target_one.potential[5:7,:] .- v1)))
4343
println(&quot;max error in target two: &quot;, maximum(abs.(target_two.gradient_stretching[1:3,:] .- v2)))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">max error in target one: 1.4007503612439853e-5
44-
max error in target two: 1.0289615966441179e-5</code></pre><p>Note that <code>scalar_potential</code>, <code>gradient</code>, and <code>hessian</code> can be passed as a single boolean or as a tuple of booleans, one for each target system. This allows the user to specify which values are desired for each target system, and avoids unnecessary calculations for values that are not needed. In this case, we have set <code>scalar_potential=false</code> and <code>gradient=true</code> to indicate all target systems, but a tuple <code>hessian=(false,true)</code> to indicate different settings for each. It is worth remembering that these switches must be implemented by the user when overloading the <code>direct!</code> function for each system to act as a source.</p><div class="admonition is-success" id="Tip-39caa8a77e0973de"><header class="admonition-header">Tip<a class="admonition-anchor" href="#Tip-39caa8a77e0973de" title="Permalink"></a></header><div class="admonition-body"><p>The <code>fmm!</code> keyword arguments <code>scalar_potential</code>, <code>gradient</code>, and <code>hessian</code> can be passed as a single boolean or as a tuple of booleans, one for each target system. This allows the user to specify which values are desired for each target system, and avoids unnecessary calculations for values that are not needed.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tuning/">« Tuning Parameters</a><a class="docs-footer-nextpage" href="../advanced_usage_2/">Automated Tuning »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Friday 15 August 2025 22:37">Friday 15 August 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
44+
max error in target two: 1.0289615966441179e-5</code></pre><p>Note that <code>scalar_potential</code>, <code>gradient</code>, and <code>hessian</code> can be passed as a single boolean or as a tuple of booleans, one for each target system. This allows the user to specify which values are desired for each target system, and avoids unnecessary calculations for values that are not needed. In this case, we have set <code>scalar_potential=false</code> and <code>gradient=true</code> to indicate all target systems, but a tuple <code>hessian=(false,true)</code> to indicate different settings for each. It is worth remembering that these switches must be implemented by the user when overloading the <code>direct!</code> function for each system to act as a source.</p><div class="admonition is-success" id="Tip-39caa8a77e0973de"><header class="admonition-header">Tip<a class="admonition-anchor" href="#Tip-39caa8a77e0973de" title="Permalink"></a></header><div class="admonition-body"><p>The <code>fmm!</code> keyword arguments <code>scalar_potential</code>, <code>gradient</code>, and <code>hessian</code> can be passed as a single boolean or as a tuple of booleans, one for each target system. This allows the user to specify which values are desired for each target system, and avoids unnecessary calculations for values that are not needed.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tuning/">« Tuning Parameters</a><a class="docs-footer-nextpage" href="../advanced_usage_2/">Automated Tuning »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Tuesday 2 September 2025 16:58">Tuesday 2 September 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/advanced_usage_2/index.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,39 +36,39 @@
3636
leaf_size_source: [90]
3737
expansion_order: 1
3838
multipole_acceptance: 0.3
39-
cost: 0.183041371 seconds
39+
cost: 0.182964897 seconds
4040

4141
multipole_acceptance = 0.4...
4242

4343
Best Parameters:
4444
leaf_size_source: [45]
4545
expansion_order: 2
4646
multipole_acceptance: 0.4
47-
cost: 0.173020906 seconds
47+
cost: 0.17285372 seconds
4848

4949
multipole_acceptance = 0.5...
5050

5151
Best Parameters:
5252
leaf_size_source: [110]
5353
expansion_order: 1
5454
multipole_acceptance: 0.5
55-
cost: 0.183037524 seconds
55+
cost: 0.183058333 seconds
5656

5757
multipole_acceptance = 0.6...
5858

5959
Best Parameters:
60-
leaf_size_source: [874]
60+
leaf_size_source: [876]
6161
expansion_order: 1
6262
multipole_acceptance: 0.6
63-
cost: 0.183068711 seconds
63+
cost: 0.182948496 seconds
6464

6565
multipole_acceptance = 0.7...
6666

6767
Best Parameters:
68-
leaf_size_source: [437]
68+
leaf_size_source: [438]
6969
expansion_order: 1
7070
multipole_acceptance: 0.7
71-
cost: 0.183161947 seconds
71+
cost: 0.182759151 seconds
7272

7373
multipole_acceptance = 0.8...
7474
<span class="sgr33"><span class="sgr1">┌ Warning: </span></span>Error tolerance 0.0001 not reached! Using max expansion order P=3.
@@ -77,22 +77,22 @@
7777
<span class="sgr33"><span class="sgr1"></span></span><span class="sgr90">@ FastMultipole ~/work/FastMultipole.jl/FastMultipole.jl/src/translate.jl:990</span>
7878

7979
Best Parameters:
80-
leaf_size_source: [218]
80+
leaf_size_source: [219]
8181
expansion_order: 6
8282
multipole_acceptance: 0.8
83-
cost: 0.165113369 seconds
83+
cost: 0.167892134 seconds
8484

8585
Finished autotune!
8686

8787
Parameters:
88-
leaf_size_source: [218]
88+
leaf_size_source: [219]
8989
expansion_order: 6
9090
multipole_acceptance: 0.8
91-
cost: 0.165113369 seconds
91+
cost: 0.167892134 seconds
9292

9393
#===============================================#
9494

95-
Optimal parameters: (leaf_size_source = [218], expansion_order = 6, multipole_acceptance = 0.8)</code></pre><p>This will return a named tuple of the optimal parameters, which can then be passed to the <code>fmm!</code> function. The <code>cache</code> is a preallocated buffer that can be used to reduce memory allocations during the FMM call.</p><pre><code class="language-julia hljs"># run FMM without default parameters
95+
Optimal parameters: (leaf_size_source = [219], expansion_order = 6, multipole_acceptance = 0.8)</code></pre><p>This will return a named tuple of the optimal parameters, which can then be passed to the <code>fmm!</code> function. The <code>cache</code> is a preallocated buffer that can be used to reduce memory allocations during the FMM call.</p><pre><code class="language-julia hljs"># run FMM without default parameters
9696
println(&quot;Default Tuning Parameters:&quot;)
9797
system.potential .= 0.0
9898
t1 = @elapsed fmm!(system; scalar_potential=true, gradient=false, hessian=false, error_tolerance=PowerAbsolutePotential(1e-4))
@@ -110,7 +110,7 @@
110110
println(&quot;\tmax error: &quot;, maximum(abs.(phi_direct .- phi_fmm)))
111111
println(&quot;\ttime cost: &quot;, t2, &quot; seconds&quot;)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Default Tuning Parameters:
112112
max error: 0.00033237800897240044
113-
time cost: 0.179067088 seconds
113+
time cost: 0.180733856 seconds
114114
Optimal Tuning Parameters:
115115
max error: 0.00033237800897240044
116-
time cost: 0.194694323 seconds</code></pre><p>Note that the <code>tune_fmm</code> function iterates over each requested <code>multipole_acceptance</code> criterion, so it is not optimal to call it before every FMM call. Instead, <code>tune_fmm</code> can be called once for a representative system primarily to choose <code>multipole_acceptance</code>. Since the optimal parameters depend on the size, distribution, and strengths of the sources and targets, it is recommended to set the keyword argument <code>tune=true</code> to iteratively update the <code>expansion_order</code> and <code>leaf_size_source</code> parameters each time <code>fmm!</code> is called. This will allow the FMM to adapt to the system as it evolves, and will ensure that the optimal parameters are used for each call.</p><div class="admonition is-success" id="Tip-709239aed0176e90"><header class="admonition-header">Tip<a class="admonition-anchor" href="#Tip-709239aed0176e90" title="Permalink"></a></header><div class="admonition-body"><p>The <code>tune_fmm</code> function can be used to automatically tune the FMM parameters to satisfy an error tolerance. It returns a named tuple of the optimal parameters and a preallocated buffer to reduce memory allocations.</p></div></div><div class="admonition is-warning" id="Warning-36707f035a97fc82"><header class="admonition-header">Warning<a class="admonition-anchor" href="#Warning-36707f035a97fc82" title="Permalink"></a></header><div class="admonition-body"><p>The <code>tune_fmm</code> function is computationally expensive, so it should not be called before every FMM call. Instead, it should be called once for a representative system to choose the optimal <code>multipole_acceptance</code> parameter. Then, the optimal parameters will be updated in each <code>fmm!</code> call if the <code>tune=true</code> keyword argument is set. This allows the FMM to adapt to the system as it evolves.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../advanced_usage/">« Multiple Systems</a><a class="docs-footer-nextpage" href="../reference/">Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Friday 15 August 2025 22:37">Friday 15 August 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
116+
time cost: 0.198114755 seconds</code></pre><p>Note that the <code>tune_fmm</code> function iterates over each requested <code>multipole_acceptance</code> criterion, so it is not optimal to call it before every FMM call. Instead, <code>tune_fmm</code> can be called once for a representative system primarily to choose <code>multipole_acceptance</code>. Since the optimal parameters depend on the size, distribution, and strengths of the sources and targets, it is recommended to set the keyword argument <code>tune=true</code> to iteratively update the <code>expansion_order</code> and <code>leaf_size_source</code> parameters each time <code>fmm!</code> is called. This will allow the FMM to adapt to the system as it evolves, and will ensure that the optimal parameters are used for each call.</p><div class="admonition is-success" id="Tip-709239aed0176e90"><header class="admonition-header">Tip<a class="admonition-anchor" href="#Tip-709239aed0176e90" title="Permalink"></a></header><div class="admonition-body"><p>The <code>tune_fmm</code> function can be used to automatically tune the FMM parameters to satisfy an error tolerance. It returns a named tuple of the optimal parameters and a preallocated buffer to reduce memory allocations.</p></div></div><div class="admonition is-warning" id="Warning-36707f035a97fc82"><header class="admonition-header">Warning<a class="admonition-anchor" href="#Warning-36707f035a97fc82" title="Permalink"></a></header><div class="admonition-body"><p>The <code>tune_fmm</code> function is computationally expensive, so it should not be called before every FMM call. Instead, it should be called once for a representative system to choose the optimal <code>multipole_acceptance</code> parameter. Then, the optimal parameters will be updated in each <code>fmm!</code> call if the <code>tune=true</code> keyword argument is set. This allows the FMM to adapt to the system as it evolves.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../advanced_usage/">« Multiple Systems</a><a class="docs-footer-nextpage" href="../reference/">Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Tuesday 2 September 2025 16:58">Tuesday 2 September 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)