Skip to content

Commit

Permalink
build based on 8ef244f
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jan 29, 2024
1 parent f7e8a78 commit 00f4613
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-01T12:43:23","documenter_version":"1.2.0"}}
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-29T12:55:43","documenter_version":"1.2.1"}}
4 changes: 2 additions & 2 deletions dev/api_reference/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.</code></pre></blockquote></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../api_reference/">« API reference</a><a class="docs-footer-nextpage" href="../license/">License »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.0 on <span class="colophon-date" title="Friday 1 December 2023 12:43">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
this project or the open source license(s) involved.</code></pre></blockquote></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../api_reference/">« API reference</a><a class="docs-footer-nextpage" href="../license/">License »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Monday 29 January 2024 12:55">Monday 29 January 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
76 changes: 38 additions & 38 deletions dev/index-d62e5dc9.svg → dev/index-34d07f51.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 38 additions & 38 deletions dev/index-924e4383.svg → dev/index-557f8211.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

sol = solve(prob, Tsit5())</code></pre><p>Finally, we can use <a href="https://docs.juliaplots.org/stable/">Plots.jl</a> to visualize the solution.</p><pre><code class="language-julia hljs">using Plots

plot(sol)</code></pre><img src="index-924e4383.svg" alt="Example block output"/><h4 id="Conservative-production-destruction-systems"><a class="docs-heading-anchor" href="#Conservative-production-destruction-systems">Conservative production-destruction systems</a><a id="Conservative-production-destruction-systems-1"></a><a class="docs-heading-anchor-permalink" href="#Conservative-production-destruction-systems" title="Permalink"></a></h4><p>A PDS with the additional property</p><p class="math-container">\[ p_{ii}(t,\boldsymbol y)=d_{ii}(t,\boldsymbol y)=0\]</p><p>for <span>$i=1,\dots,N$</span> is called conservative. In this case we have <span>$p_{ij}=d_{ji}$</span> for all <span>$i,j=1,\dots,N$</span>, which leads to</p><p class="math-container">\[\frac{d}{dt}\sum_{i=1}^N y_i=\sum_{i=1}^N y_i&#39; = \sum_{\mathclap{i,j=1}}^N \bigl(p_{ij}(t,\boldsymbol y) - d_{ij}(t,\boldsymbol y)\bigr)= \sum_{\mathclap{i,j=1}}^N \bigl(p_{ij}(t,\boldsymbol y) - p_{ji}(t,\boldsymbol y)\bigr) = 0.\]</p><p>This shows that the sum of the state variables of a conservative PDS remains constant over time, i.e.</p><p class="math-container">\[\sum_{i=1}^N y_i(t) = \sum_{i=1}^N y_i(0) \]</p><p>for all times <span>$t&gt;0$</span>. Moreover, a conservative PDS is completely defined by the square matrix <span>$\mathbf P=(p_{ij})_{i,j=1,\dots,N}$</span>. There is no need to store an additional vector of destruction terms since <span>$d_{ij} = p_{ji}$</span> for all <span>$i,j=1,\dots,N$</span>. </p><p>One specific example of a conservative PDS is the SIR model</p><p class="math-container">\[S&#39; = -\frac{β S I}{N},\quad I&#39;= \frac{β S I}{N} - γ I,\quad R&#39;=γ I,\]</p><p>with <span>$N=S+I+R$</span> and <span>$\beta,\gamma&gt;0$</span>. Assuming <span>$S,I,R&gt;0$</span> the production and destruction terms are given by</p><p class="math-container">\[p_{21}(S,I,R) = d_{12}(S,I,R) = \frac{β S I}{N},\quad p_{32}(S,I,R) = d_{23}(S,I,R) = γ I,\]</p><p>where the remaining production and destruction terms are zero. The corresponding production matrix <span>$\mathbf P$</span> is</p><p class="math-container">\[\mathbf P(S,I,R) = \begin{pmatrix}0 &amp; 0 &amp; 0\\ \frac{β S I}{N} &amp; 0 &amp; 0\\ 0 &amp; γ I &amp; 0\end{pmatrix}.\]</p><p>The following example shows how to implement the above SIR model with <span>$\beta=0.4, \gamma=0.04$</span>, initial conditions <span>$S(0)=997, I(0)=3, R(0)=0$</span> and time domain <span>$(0, 100)$</span> using <code>ConservativePDSProblem</code> from <a href="https://github.com/SKopecz/PositiveIntegrators.jl">PositiveIntegrators.jl</a>.</p><pre><code class="language-julia hljs">using PositiveIntegrators
plot(sol)</code></pre><img src="index-557f8211.svg" alt="Example block output"/><h4 id="Conservative-production-destruction-systems"><a class="docs-heading-anchor" href="#Conservative-production-destruction-systems">Conservative production-destruction systems</a><a id="Conservative-production-destruction-systems-1"></a><a class="docs-heading-anchor-permalink" href="#Conservative-production-destruction-systems" title="Permalink"></a></h4><p>A PDS with the additional property</p><p class="math-container">\[ p_{ii}(t,\boldsymbol y)=d_{ii}(t,\boldsymbol y)=0\]</p><p>for <span>$i=1,\dots,N$</span> is called conservative. In this case we have <span>$p_{ij}=d_{ji}$</span> for all <span>$i,j=1,\dots,N$</span>, which leads to</p><p class="math-container">\[\frac{d}{dt}\sum_{i=1}^N y_i=\sum_{i=1}^N y_i&#39; = \sum_{\mathclap{i,j=1}}^N \bigl(p_{ij}(t,\boldsymbol y) - d_{ij}(t,\boldsymbol y)\bigr)= \sum_{\mathclap{i,j=1}}^N \bigl(p_{ij}(t,\boldsymbol y) - p_{ji}(t,\boldsymbol y)\bigr) = 0.\]</p><p>This shows that the sum of the state variables of a conservative PDS remains constant over time, i.e.</p><p class="math-container">\[\sum_{i=1}^N y_i(t) = \sum_{i=1}^N y_i(0) \]</p><p>for all times <span>$t&gt;0$</span>. Moreover, a conservative PDS is completely defined by the square matrix <span>$\mathbf P=(p_{ij})_{i,j=1,\dots,N}$</span>. There is no need to store an additional vector of destruction terms since <span>$d_{ij} = p_{ji}$</span> for all <span>$i,j=1,\dots,N$</span>. </p><p>One specific example of a conservative PDS is the SIR model</p><p class="math-container">\[S&#39; = -\frac{β S I}{N},\quad I&#39;= \frac{β S I}{N} - γ I,\quad R&#39;=γ I,\]</p><p>with <span>$N=S+I+R$</span> and <span>$\beta,\gamma&gt;0$</span>. Assuming <span>$S,I,R&gt;0$</span> the production and destruction terms are given by</p><p class="math-container">\[p_{21}(S,I,R) = d_{12}(S,I,R) = \frac{β S I}{N},\quad p_{32}(S,I,R) = d_{23}(S,I,R) = γ I,\]</p><p>where the remaining production and destruction terms are zero. The corresponding production matrix <span>$\mathbf P$</span> is</p><p class="math-container">\[\mathbf P(S,I,R) = \begin{pmatrix}0 &amp; 0 &amp; 0\\ \frac{β S I}{N} &amp; 0 &amp; 0\\ 0 &amp; γ I &amp; 0\end{pmatrix}.\]</p><p>The following example shows how to implement the above SIR model with <span>$\beta=0.4, \gamma=0.04$</span>, initial conditions <span>$S(0)=997, I(0)=3, R(0)=0$</span> and time domain <span>$(0, 100)$</span> using <code>ConservativePDSProblem</code> from <a href="https://github.com/SKopecz/PositiveIntegrators.jl">PositiveIntegrators.jl</a>.</p><pre><code class="language-julia hljs">using PositiveIntegrators

# Out-of-place implementation of the P matrix for the SIR model
function P(u, p, t)
Expand All @@ -41,11 +41,11 @@
# Create SIR problem
prob = ConservativePDSProblem(P, u0, tspan)</code></pre><p>Since the SIR model is not only conservative but also positive, we can use any MPRK scheme from <a href="https://github.com/SKopecz/PositiveIntegrators.jl">PositiveIntegrators.jl</a> to solve it. Here we use <code>MPRK22(1.0)</code>. Please note that any method from <a href="https://docs.sciml.ai/OrdinaryDiffEq/stable/">OrdinaryDiffEq.jl</a> can be used as well, but might possibly generate negative approximations.</p><pre><code class="language-julia hljs">sol = solve(prob, MPRK22(1.0))</code></pre><p>Finally, we can use <a href="https://docs.juliaplots.org/stable/">Plots.jl</a> to visualize the solution.</p><pre><code class="language-julia hljs">using Plots

plot(sol, legend=:right)</code></pre><img src="index-d62e5dc9.svg" alt="Example block output"/><h2 id="Referencing"><a class="docs-heading-anchor" href="#Referencing">Referencing</a><a id="Referencing-1"></a><a class="docs-heading-anchor-permalink" href="#Referencing" title="Permalink"></a></h2><p>If you use <a href="https://github.com/ranocha/PositiveIntegrators.jl">PositiveIntegrators.jl</a> for your research, please cite it using the bibtex entry</p><pre><code class="language-bibtex hljs">@misc{PositiveIntegrators.jl,
plot(sol, legend=:right)</code></pre><img src="index-34d07f51.svg" alt="Example block output"/><h2 id="Referencing"><a class="docs-heading-anchor" href="#Referencing">Referencing</a><a id="Referencing-1"></a><a class="docs-heading-anchor-permalink" href="#Referencing" title="Permalink"></a></h2><p>If you use <a href="https://github.com/ranocha/PositiveIntegrators.jl">PositiveIntegrators.jl</a> for your research, please cite it using the bibtex entry</p><pre><code class="language-bibtex hljs">@misc{PositiveIntegrators.jl,
title={{PositiveIntegrators.jl}: {A} {J}ulia library of positivity-preserving
time integration methods},
author={Kopecz, Stefan and Ranocha, Hendrik and contributors},
year={2023},
doi={TODO},
url={https://github.com/SKopecz/PositiveIntegrators.jl}
}</code></pre><h2 id="License-and-contributing"><a class="docs-heading-anchor" href="#License-and-contributing">License and contributing</a><a id="License-and-contributing-1"></a><a class="docs-heading-anchor-permalink" href="#License-and-contributing" title="Permalink"></a></h2><p>This project is licensed under the MIT license (see <a href="license/#License">License</a>). Since it is an open-source project, we are very happy to accept contributions from the community. Please refer to the section <a href="contributing/#Contributing">Contributing</a> for more details.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="api_reference/">API 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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.0 on <span class="colophon-date" title="Friday 1 December 2023 12:43">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
}</code></pre><h2 id="License-and-contributing"><a class="docs-heading-anchor" href="#License-and-contributing">License and contributing</a><a id="License-and-contributing-1"></a><a class="docs-heading-anchor-permalink" href="#License-and-contributing" title="Permalink"></a></h2><p>This project is licensed under the MIT license (see <a href="license/#License">License</a>). Since it is an open-source project, we are very happy to accept contributions from the community. Please refer to the section <a href="contributing/#Contributing">Contributing</a> for more details.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="api_reference/">API 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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Monday 29 January 2024 12:55">Monday 29 January 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 00f4613

Please sign in to comment.