diff --git a/stable b/stable
index d6c415b..52c6119 120000
--- a/stable
+++ b/stable
@@ -1 +1 @@
-v0.6.6
\ No newline at end of file
+v0.6.7
\ No newline at end of file
diff --git a/v0.6 b/v0.6
index d6c415b..52c6119 120000
--- a/v0.6
+++ b/v0.6
@@ -1 +1 @@
-v0.6.6
\ No newline at end of file
+v0.6.7
\ No newline at end of file
diff --git a/v0.6.7/.documenter-siteinfo.json b/v0.6.7/.documenter-siteinfo.json
new file mode 100644
index 0000000..8ae1efe
--- /dev/null
+++ b/v0.6.7/.documenter-siteinfo.json
@@ -0,0 +1 @@
+{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-12T18:28:30","documenter_version":"1.8.0"}}
\ No newline at end of file
diff --git a/v0.6.7/GeometricProblems.bib b/v0.6.7/GeometricProblems.bib
new file mode 100644
index 0000000..68c1b19
--- /dev/null
+++ b/v0.6.7/GeometricProblems.bib
@@ -0,0 +1,49 @@
+@article{toda1967vibration,
+ title={Vibration of a chain with nonlinear interaction},
+ author={Toda, Morikazu},
+ journal={Journal of the Physical Society of Japan},
+ volume={22},
+ number={2},
+ pages={431--436},
+ year={1967},
+ publisher={The Physical Society of Japan}
+}
+
+@book{arnold1978mathematical,
+ title={Mathematical methods of classical mechanics},
+ author={Arnold, Vladimir Igorevich},
+ volume={60},
+ year={1978},
+ series={Graduate Texts in Mathematics},
+ publisher={Springer Verlag},
+ address={Berlin}
+}
+
+@book{hairer2006geometric,
+ title={Geometric Numerical integration: structure-preserving algorithms for ordinary differential equations},
+ author={Hairer, Ernst and Lubich, Christian and Wanner, Gerhard},
+ year={2006},
+ publisher={Springer},
+ address={Berlin}
+}
+
+@article{bajars2023locally,
+ title={Locally-symplectic neural networks for learning volume-preserving dynamics},
+ author={Baj{\=a}rs, J{\=a}nis},
+ journal={Journal of Computational Physics},
+ volume={476},
+ pages={111911},
+ year={2023},
+ publisher={Elsevier}
+}
+
+@article{buchfink2023symplectic,
+ title={Symplectic model reduction of Hamiltonian systems on nonlinear manifolds and approximation with weakly symplectic autoencoder},
+ author={Buchfink, Patrick and Glas, Silke and Haasdonk, Bernard},
+ journal={SIAM Journal on Scientific Computing},
+ volume={45},
+ number={2},
+ pages={A289--A311},
+ year={2023},
+ publisher={SIAM}
+}
\ No newline at end of file
diff --git a/v0.6.7/abc_flow/f66208c8.svg b/v0.6.7/abc_flow/f66208c8.svg
new file mode 100644
index 0000000..4159a71
--- /dev/null
+++ b/v0.6.7/abc_flow/f66208c8.svg
@@ -0,0 +1,59 @@
+
+
diff --git a/v0.6.7/abc_flow/index.html b/v0.6.7/abc_flow/index.html
new file mode 100644
index 0000000..423b0c4
--- /dev/null
+++ b/v0.6.7/abc_flow/index.html
@@ -0,0 +1,16 @@
+
+
E. Hairer, C. Lubich and G. Wanner. Geometric Numerical integration: structure-preserving algorithms for ordinary differential equations (Springer, Berlin, 2006).
Settings
This document was generated with Documenter.jl version 1.8.0 on Thursday 12 December 2024. Using Julia version 1.11.2.
diff --git a/v0.6.7/assets/documenter.js b/v0.6.7/assets/documenter.js
new file mode 100644
index 0000000..7d68cd8
--- /dev/null
+++ b/v0.6.7/assets/documenter.js
@@ -0,0 +1,1082 @@
+// Generated by Documenter.jl
+requirejs.config({
+ paths: {
+ 'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/julia.min',
+ 'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/headroom.min',
+ 'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min',
+ 'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min',
+ 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min',
+ 'headroom-jquery': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/jQuery.headroom.min',
+ 'katex': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min',
+ 'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min',
+ 'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/julia-repl.min',
+ },
+ shim: {
+ "highlight-julia": {
+ "deps": [
+ "highlight"
+ ]
+ },
+ "katex-auto-render": {
+ "deps": [
+ "katex"
+ ]
+ },
+ "headroom-jquery": {
+ "deps": [
+ "jquery",
+ "headroom"
+ ]
+ },
+ "highlight-julia-repl": {
+ "deps": [
+ "highlight"
+ ]
+ }
+}
+});
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'katex', 'katex-auto-render'], function($, katex, renderMathInElement) {
+$(document).ready(function() {
+ renderMathInElement(
+ document.body,
+ {
+ "delimiters": [
+ {
+ "left": "$",
+ "right": "$",
+ "display": false
+ },
+ {
+ "left": "$$",
+ "right": "$$",
+ "display": true
+ },
+ {
+ "left": "\\[",
+ "right": "\\]",
+ "display": true
+ }
+ ]
+}
+
+ );
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'highlight', 'highlight-julia', 'highlight-julia-repl'], function($) {
+$(document).ready(function() {
+ hljs.highlightAll();
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+let timer = 0;
+var isExpanded = true;
+
+$(document).on(
+ "click",
+ ".docstring .docstring-article-toggle-button",
+ function () {
+ let articleToggleTitle = "Expand docstring";
+ const parent = $(this).parent();
+
+ debounce(() => {
+ if (parent.siblings("section").is(":visible")) {
+ parent
+ .find("a.docstring-article-toggle-button")
+ .removeClass("fa-chevron-down")
+ .addClass("fa-chevron-right");
+ } else {
+ parent
+ .find("a.docstring-article-toggle-button")
+ .removeClass("fa-chevron-right")
+ .addClass("fa-chevron-down");
+
+ articleToggleTitle = "Collapse docstring";
+ }
+
+ parent
+ .children(".docstring-article-toggle-button")
+ .prop("title", articleToggleTitle);
+ parent.siblings("section").slideToggle();
+ });
+ }
+);
+
+$(document).on("click", ".docs-article-toggle-button", function (event) {
+ let articleToggleTitle = "Expand docstring";
+ let navArticleToggleTitle = "Expand all docstrings";
+ let animationSpeed = event.noToggleAnimation ? 0 : 400;
+
+ debounce(() => {
+ if (isExpanded) {
+ $(this).removeClass("fa-chevron-up").addClass("fa-chevron-down");
+ $("a.docstring-article-toggle-button")
+ .removeClass("fa-chevron-down")
+ .addClass("fa-chevron-right");
+
+ isExpanded = false;
+
+ $(".docstring section").slideUp(animationSpeed);
+ } else {
+ $(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
+ $("a.docstring-article-toggle-button")
+ .removeClass("fa-chevron-right")
+ .addClass("fa-chevron-down");
+
+ isExpanded = true;
+ articleToggleTitle = "Collapse docstring";
+ navArticleToggleTitle = "Collapse all docstrings";
+
+ $(".docstring section").slideDown(animationSpeed);
+ }
+
+ $(this).prop("title", navArticleToggleTitle);
+ $(".docstring-article-toggle-button").prop("title", articleToggleTitle);
+ });
+});
+
+function debounce(callback, timeout = 300) {
+ if (Date.now() - timer > timeout) {
+ callback();
+ }
+
+ clearTimeout(timer);
+
+ timer = Date.now();
+}
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require([], function() {
+function addCopyButtonCallbacks() {
+ for (const el of document.getElementsByTagName("pre")) {
+ const button = document.createElement("button");
+ button.classList.add("copy-button", "fa-solid", "fa-copy");
+ button.setAttribute("aria-label", "Copy this code block");
+ button.setAttribute("title", "Copy");
+
+ el.appendChild(button);
+
+ const success = function () {
+ button.classList.add("success", "fa-check");
+ button.classList.remove("fa-copy");
+ };
+
+ const failure = function () {
+ button.classList.add("error", "fa-xmark");
+ button.classList.remove("fa-copy");
+ };
+
+ button.addEventListener("click", function () {
+ copyToClipboard(el.innerText).then(success, failure);
+
+ setTimeout(function () {
+ button.classList.add("fa-copy");
+ button.classList.remove("success", "fa-check", "fa-xmark");
+ }, 5000);
+ });
+ }
+}
+
+function copyToClipboard(text) {
+ // clipboard API is only available in secure contexts
+ if (window.navigator && window.navigator.clipboard) {
+ return window.navigator.clipboard.writeText(text);
+ } else {
+ return new Promise(function (resolve, reject) {
+ try {
+ const el = document.createElement("textarea");
+ el.textContent = text;
+ el.style.position = "fixed";
+ el.style.opacity = 0;
+ document.body.appendChild(el);
+ el.select();
+ document.execCommand("copy");
+
+ resolve();
+ } catch (err) {
+ reject(err);
+ } finally {
+ document.body.removeChild(el);
+ }
+ });
+ }
+}
+
+if (document.readyState === "loading") {
+ document.addEventListener("DOMContentLoaded", addCopyButtonCallbacks);
+} else {
+ addCopyButtonCallbacks();
+}
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'headroom', 'headroom-jquery'], function($, Headroom) {
+
+// Manages the top navigation bar (hides it when the user starts scrolling down on the
+// mobile).
+window.Headroom = Headroom; // work around buggy module loading?
+$(document).ready(function () {
+ $("#documenter .docs-navbar").headroom({
+ tolerance: { up: 10, down: 10 },
+ });
+});
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+$(document).ready(function () {
+ let meta = $("div[data-docstringscollapsed]").data();
+
+ if (meta?.docstringscollapsed) {
+ $("#documenter-article-toggle-button").trigger({
+ type: "click",
+ noToggleAnimation: true,
+ });
+ }
+});
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+/*
+To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc
+
+PSEUDOCODE:
+
+Searching happens automatically as the user types or adjusts the selected filters.
+To preserve responsiveness, as much as possible of the slow parts of the search are done
+in a web worker. Searching and result generation are done in the worker, and filtering and
+DOM updates are done in the main thread. The filters are in the main thread as they should
+be very quick to apply. This lets filters be changed without re-searching with minisearch
+(which is possible even if filtering is on the worker thread) and also lets filters be
+changed _while_ the worker is searching and without message passing (neither of which are
+possible if filtering is on the worker thread)
+
+SEARCH WORKER:
+
+Import minisearch
+
+Build index
+
+On message from main thread
+ run search
+ find the first 200 unique results from each category, and compute their divs for display
+ note that this is necessary and sufficient information for the main thread to find the
+ first 200 unique results from any given filter set
+ post results to main thread
+
+MAIN:
+
+Launch worker
+
+Declare nonconstant globals (worker_is_running, last_search_text, unfiltered_results)
+
+On text update
+ if worker is not running, launch_search()
+
+launch_search
+ set worker_is_running to true, set last_search_text to the search text
+ post the search query to worker
+
+on message from worker
+ if last_search_text is not the same as the text in the search field,
+ the latest search result is not reflective of the latest search query, so update again
+ launch_search()
+ otherwise
+ set worker_is_running to false
+
+ regardless, display the new search results to the user
+ save the unfiltered_results as a global
+ update_search()
+
+on filter click
+ adjust the filter selection
+ update_search()
+
+update_search
+ apply search filters by looping through the unfiltered_results and finding the first 200
+ unique results that match the filters
+
+ Update the DOM
+*/
+
+/////// SEARCH WORKER ///////
+
+function worker_function(documenterSearchIndex, documenterBaseURL, filters) {
+ importScripts(
+ "https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min.js"
+ );
+
+ let data = documenterSearchIndex.map((x, key) => {
+ x["id"] = key; // minisearch requires a unique for each object
+ return x;
+ });
+
+ // list below is the lunr 2.1.3 list minus the intersect with names(Base)
+ // (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with)
+ // ideally we'd just filter the original list but it's not available as a variable
+ const stopWords = new Set([
+ "a",
+ "able",
+ "about",
+ "across",
+ "after",
+ "almost",
+ "also",
+ "am",
+ "among",
+ "an",
+ "and",
+ "are",
+ "as",
+ "at",
+ "be",
+ "because",
+ "been",
+ "but",
+ "by",
+ "can",
+ "cannot",
+ "could",
+ "dear",
+ "did",
+ "does",
+ "either",
+ "ever",
+ "every",
+ "from",
+ "got",
+ "had",
+ "has",
+ "have",
+ "he",
+ "her",
+ "hers",
+ "him",
+ "his",
+ "how",
+ "however",
+ "i",
+ "if",
+ "into",
+ "it",
+ "its",
+ "just",
+ "least",
+ "like",
+ "likely",
+ "may",
+ "me",
+ "might",
+ "most",
+ "must",
+ "my",
+ "neither",
+ "no",
+ "nor",
+ "not",
+ "of",
+ "off",
+ "often",
+ "on",
+ "or",
+ "other",
+ "our",
+ "own",
+ "rather",
+ "said",
+ "say",
+ "says",
+ "she",
+ "should",
+ "since",
+ "so",
+ "some",
+ "than",
+ "that",
+ "the",
+ "their",
+ "them",
+ "then",
+ "there",
+ "these",
+ "they",
+ "this",
+ "tis",
+ "to",
+ "too",
+ "twas",
+ "us",
+ "wants",
+ "was",
+ "we",
+ "were",
+ "what",
+ "when",
+ "who",
+ "whom",
+ "why",
+ "will",
+ "would",
+ "yet",
+ "you",
+ "your",
+ ]);
+
+ let index = new MiniSearch({
+ fields: ["title", "text"], // fields to index for full-text search
+ storeFields: ["location", "title", "text", "category", "page"], // fields to return with results
+ processTerm: (term) => {
+ let word = stopWords.has(term) ? null : term;
+ if (word) {
+ // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names
+ word = word
+ .replace(/^[^a-zA-Z0-9@!]+/, "")
+ .replace(/[^a-zA-Z0-9@!]+$/, "");
+
+ word = word.toLowerCase();
+ }
+
+ return word ?? null;
+ },
+ // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not
+ // find anything if searching for "add!", only for the entire qualification
+ tokenize: (string) => string.split(/[\s\-\.]+/),
+ // options which will be applied during the search
+ searchOptions: {
+ prefix: true,
+ boost: { title: 100 },
+ fuzzy: 2,
+ },
+ });
+
+ index.addAll(data);
+
+ /**
+ * Used to map characters to HTML entities.
+ * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts
+ */
+ const htmlEscapes = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'",
+ };
+
+ /**
+ * Used to match HTML entities and HTML characters.
+ * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts
+ */
+ const reUnescapedHtml = /[&<>"']/g;
+ const reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /**
+ * Escape function from lodash
+ * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts
+ */
+ function escape(string) {
+ return string && reHasUnescapedHtml.test(string)
+ ? string.replace(reUnescapedHtml, (chr) => htmlEscapes[chr])
+ : string || "";
+ }
+
+ /**
+ * RegX escape function from MDN
+ * Refer: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+ function escapeRegExp(string) {
+ return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+ }
+
+ /**
+ * Make the result component given a minisearch result data object and the value
+ * of the search input as queryString. To view the result object structure, refer:
+ * https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult
+ *
+ * @param {object} result
+ * @param {string} querystring
+ * @returns string
+ */
+ function make_search_result(result, querystring) {
+ let search_divider = ``;
+ let display_link =
+ result.location.slice(Math.max(0), Math.min(50, result.location.length)) +
+ (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div
+
+ if (result.page !== "") {
+ display_link += ` (${result.page})`;
+ }
+ searchstring = escapeRegExp(querystring);
+ let textindex = new RegExp(`${searchstring}`, "i").exec(result.text);
+ let text =
+ textindex !== null
+ ? result.text.slice(
+ Math.max(textindex.index - 100, 0),
+ Math.min(
+ textindex.index + querystring.length + 100,
+ result.text.length
+ )
+ )
+ : ""; // cut-off text before and after from the match
+
+ text = text.length ? escape(text) : "";
+
+ let display_result = text.length
+ ? "..." +
+ text.replace(
+ new RegExp(`${escape(searchstring)}`, "i"), // For first occurrence
+ '$&'
+ ) +
+ "..."
+ : ""; // highlights the match
+
+ let in_code = false;
+ if (!["page", "section"].includes(result.category.toLowerCase())) {
+ in_code = true;
+ }
+
+ // We encode the full url to escape some special characters which can lead to broken links
+ let result_div = `
+
+
`;
+ }
+}
+
+function waitUntilSearchIndexAvailable() {
+ // It is possible that the documenter.js script runs before the page
+ // has finished loading and documenterSearchIndex gets defined.
+ // So we need to wait until the search index actually loads before setting
+ // up all the search-related stuff.
+ if (typeof documenterSearchIndex !== "undefined") {
+ runSearchMainCode();
+ } else {
+ console.warn("Search Index not available, waiting");
+ setTimeout(waitUntilSearchIndexAvailable, 1000);
+ }
+}
+
+// The actual entry point to the search code
+waitUntilSearchIndexAvailable();
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+// Modal settings dialog
+$(document).ready(function () {
+ var settings = $("#documenter-settings");
+ $("#documenter-settings-button").click(function () {
+ settings.toggleClass("is-active");
+ });
+ // Close the dialog if X is clicked
+ $("#documenter-settings button.delete").click(function () {
+ settings.removeClass("is-active");
+ });
+ // Close dialog if ESC is pressed
+ $(document).keyup(function (e) {
+ if (e.keyCode == 27) settings.removeClass("is-active");
+ });
+});
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+$(document).ready(function () {
+ let search_modal_header = `
+
+
The CoupledHarmonicOscillator module provides functions hodeproblem and lodeproblem each returning a Hamiltonian or Lagrangian problem, respectively, to be solved in the GeometricIntegrators.jl ecosystem. The actual code is generated with EulerLagrange.jl.
The coupled harmonic oscillator is a collection of two point masses that are connected to a fixed wall with spring constants $k_1$ and $k_2$ and are furthermore coupled nonlinearly resulting in the Hamiltonian:
The time series of the solution is split into intervals of interval_length time steps. In each interval, the maximum of the absolute value of the invariant error is determined. Returns a tuple of a TimeSeries that holds the centers of all intervals and a ScalarDataSeries that holds the maxima.
This is useful to detect drifts in invariants that are not preserved exactly but whose error is oscillating such as the energy error of Hamiltonian systems with symplectic integrators.
The double pendulum consists of two pendula, one attached to the origin at $(x,y) = (0,0)$, and the second attached to the first. Each pendulum consists of a point mass $m_i$ attached to a massless rod of length $l_i$ with $i \in (1,2)$. All motion is assumed to be frictionless.
The dynamics of the system is most naturally described in terms of the angles $\theta_i$ between the rods $l_i$ and the vertical axis $y$. In terms of these angles, the cartesian coordinates are given by
The DoublePendulum module provides functions hodeproblem and lodeproblem each returning a Hamiltonian or Lagrangian problem, respectively, to be solved in the GeometricIntegrators.jl ecosystem. The actual code is generated with EulerLagrange.jl.
The double pendulum consists of two pendula, one attached to the origin at $(x,y) = (0,0)$, and the second attached to the first. Each pendulum consists of a point mass $m_i$ attached to a massless rod of length $l_i$ with $i \in (1,2)$. The dynamics of the system is described in terms of the angles $\theta_i$ between the rods $l_i$ and the vertical axis $y$. All motion is assumed to be frictionless.
Copyright (c) Michael Kraus <michael.kraus@ipp.mpg.de>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Settings
This document was generated with Documenter.jl version 1.8.0 on Thursday 12 December 2024. Using Julia version 1.11.2.
In here we describe the initial condition used for the discretized linear wave and the Toda lattice. The initial conditions are based on the following third-degree spline (also used in [2]):
And we end up with the following choice of parametrized initial conditions:
\[ q_0(\mu)(\omega).\]
Three initial conditions and their time evolutions are shown in the figure below. As was required, we can see that the peak gets sharper and moves to the left as we increase the parameter $\mu$; the curves also get a good coverage of the domain $\Omega$.
where the domain is $\Omega = (-1/2, 1/2)$. We then divide the domain into $\tilde{N}$ equidistantly spaces points[1]$\xi_i = i\Delta_\xi - 1/2$ for $i = 1, \ldots, \tilde{N}$ and $\Delta_xi := 1/(\tilde{N} + 1)$.
The discretized linear wave equation example of an completely-integrable system, i.e. a Hamiltonian system evolving in $\mathbb{R}^{2n}$ that has $n$ Poisson-commuting invariants of motion (see [3]).
For evaluating the system we specify the following initial[2] and boundary conditions:
P. Buchfink, S. Glas and B. Haasdonk. Symplectic model reduction of Hamiltonian systems on nonlinear manifolds and approximation with weakly symplectic autoencoder. SIAM Journal on Scientific Computing 45, A289–A311 (2023).
1In total the system is therefore described by $N = \tilde{N} + 2$ coordinates, since we also have to consider the boundary. The resulting Hamiltonian then is:
Lotka–Volterra models are used in mathematical biology for modelling population dynamics of animal species, as well as many other fields where predator-prey and similar models appear. The dynamics of the growth of two interacting species can be modelled by the following noncanonical Hamiltonian system
The Euler-Lagrange equations of the Lotka-Volterra model can be obtained from different Lagrangians, which are connected by gauge transformations. Although they all lead to the same equations of motion, they lead to different variational integrators. Therefore different models based on different Lagrangians are implemented.
This Lagrangian is a slight generalization of Equation (5) in José Fernández-Núñez, Lagrangian Structure of the Two-Dimensional Lotka-Volterra System, International Journal of Theoretical Physics, Vol. 37, No. 9, pp. 2457-2462, 1998.
This Lagrangian is equivalent to the Lagrangian of the symmetric Lotka-Volterra model. It differs only by a gauge transformation with the term $- 1/2 \, d(\log(q_1) \log(q_2))/dt$. It leads to the same Euler-Lagrange equations but to a different variational integrator.
This Lagrangian is equivalent to the Lagrangian of the symmetric Lotka-Volterra model. It differs only by a gauge transformation with the term $d(q_1 q_2)/dt$. It leads to the same Euler-Lagrange equations but to a different variational integrator.
A. M. Perelomov. Selected topics on classical integrable systems, Troisième cycle de la physique, expanded version of lectures delivered in May 1995.
Yuri B. Suris. Integrable discretizations for lattice systems: local equations of motion and their Hamiltonian properties, Rev. Math. Phys. 11, pp. 727–822, 1999.
J. Bajārs. Locally-symplectic neural networks for learning volume-preserving dynamics. Journal of Computational Physics 476, 111911 (2023).
Settings
This document was generated with Documenter.jl version 1.8.0 on Thursday 12 December 2024. Using Julia version 1.11.2.
diff --git a/v0.6.7/search_index.js b/v0.6.7/search_index.js
new file mode 100644
index 0000000..d8bcbaa
--- /dev/null
+++ b/v0.6.7/search_index.js
@@ -0,0 +1,3 @@
+var documenterSearchIndex = {"docs":
+[{"location":"lorenz_attractor/#Lorenz-Attractor-in-3d","page":"Lorenz Attractor","title":"Lorenz Attractor in 3d","text":"","category":"section"},{"location":"lorenz_attractor/","page":"Lorenz Attractor","title":"Lorenz Attractor","text":"Modules = [GeometricProblems.LorenzAttractor]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"coupled_harmonic_oscillator/#Coupled-Harmonic-Oscillator","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"","category":"section"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"This system describes two harmonic oscillators that are coupled nonlinearly. ","category":"page"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"HTML(\"\"\"\"\"\") # hide","category":"page"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"HTML(\"\"\"\"\"\") # hide","category":"page"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"The following shows the q_1 component of the system for different values of k: ","category":"page"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"using GeometricIntegrators: integrate, ImplicitMidpoint \nusing GeometricProblems.CoupledHarmonicOscillator: hodeensemble, default_parameters\nusing Plots \n \nconst m₁ = default_parameters.m₁ \nconst m₂ = default_parameters.m₂ \nconst k₁ = default_parameters.k₁ \nconst k₂ = default_parameters.k₂ \nconst k = [0.0, 0.5, 0.75, 1.0, 2.0, 3.0, 4.0] \n \nparams_collection = [(m₁ = m₁, m₂ = m₂, k₁ = k₁, k₂ = k₂, k = k_val) for k_val in k] \n# ensemble problem\nep = hodeensemble(; parameters = params_collection)\nensemble_solution = integrate(ep, ImplicitMidpoint())\n \nt = ensemble_solution.t\n\nq₁ = zeros(1, length(t), length(k))\n\nfor index in axes(k, 1)\n q₁[1, :, index] = ensemble_solution.s[index].q[:, 1]\nend\n\nn_param_sets = length(params_collection) #hide \nlabels = reshape([\"k = \"*string(parameters.k) for parameters in params_collection], 1, n_param_sets) \n \nq₁ = q₁[1, :, :]\nconst one_plot = false \nconst psize = (900, 600) \nplot_q₁ = one_plot ? plot(0.0:0.4:100.0, q₁, size=psize) : plot(0.0:0.4:100.0, q₁, layout=(n_param_sets, 1), size=psize, label=labels, legend=:topright)\n\npng(plot_q₁, \"q_component\")\n\nnothing","category":"page"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"(Image: )","category":"page"},{"location":"coupled_harmonic_oscillator/#Library-functions","page":"Coupled Harmonic Oscillator","title":"Library functions","text":"","category":"section"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"GeometricProblems.CoupledHarmonicOscillator","category":"page"},{"location":"coupled_harmonic_oscillator/#GeometricProblems.CoupledHarmonicOscillator","page":"Coupled Harmonic Oscillator","title":"GeometricProblems.CoupledHarmonicOscillator","text":"CoupledHarmonicOscillator\n\nThe CoupledHarmonicOscillator module provides functions hodeproblem and lodeproblem each returning a Hamiltonian or Lagrangian problem, respectively, to be solved in the GeometricIntegrators.jl ecosystem. The actual code is generated with EulerLagrange.jl.\n\nThe coupled harmonic oscillator is a collection of two point masses that are connected to a fixed wall with spring constants k_1 and k_2 and are furthermore coupled nonlinearly resulting in the Hamiltonian: \n\nH(q_1 q_2 p_1 p_2) = fracq_1^22m_1 + fracq_2^22m_2 + k_1fracq_1^22 + k_2fracq_2^22 + ksigma(q_1)frac(q_2 - q_1)^22\n\nwhere sigma(x) = 1 (1 + e^-x) is the sigmoid activation function. \n\nSystem parameters:\n\nk₁: spring constant of mass 1\nk₂: spring constant of mass 2\nm₁: mass 1\nm₂: mass 2\nk: coupling strength between the two masses. \n\n\n\n\n\n","category":"module"},{"location":"coupled_harmonic_oscillator/","page":"Coupled Harmonic Oscillator","title":"Coupled Harmonic Oscillator","text":"Modules = [GeometricProblems.CoupledHarmonicOscillator]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"coupled_harmonic_oscillator/#GeometricProblems.CoupledHarmonicOscillator.hodeproblem","page":"Coupled Harmonic Oscillator","title":"GeometricProblems.CoupledHarmonicOscillator.hodeproblem","text":"Hamiltonian problem for coupled oscillator\n\nConstructor with default arguments:\n\nhodeproblem(\n q₀ = [1.0, 0.0],\n p₀ = [2.0, 0.0];\n tspan = (0.0, 100.0),\n tstep = 0.4,\n parameters = (m₁ = 2.0, m₂ = 1.0, k₁ = 1.5, k₂ = 0.3, k = 1.0)\n)\n\n\n\n\n\n","category":"function"},{"location":"coupled_harmonic_oscillator/#GeometricProblems.CoupledHarmonicOscillator.lodeproblem","page":"Coupled Harmonic Oscillator","title":"GeometricProblems.CoupledHarmonicOscillator.lodeproblem","text":"Lagrangian problem for the coupled oscillator\n\nConstructor with default arguments:\n\nlodeproblem(\n q₀ = [1.0, 0.0],\n p₀ = [2.0, 0.0];\n tspan = (0.0, 100.0),\n tstep = 0.4,\n parameters = (m₁ = 2.0, m₂ = 1.0, k₁ = 1.5, k₂ = 0.3, k = 1.0)\n)\n\n\n\n\n\n","category":"function"},{"location":"abc_flow/#ABC-Flow","page":"ABC Flow","title":"ABC Flow","text":"","category":"section"},{"location":"abc_flow/","page":"ABC Flow","title":"ABC Flow","text":"The ABC flow (see [1]) is described by a divergence-free differential equation whose flow strongly depends on the initial condition. ","category":"page"},{"location":"abc_flow/","page":"ABC Flow","title":"ABC Flow","text":"using GeometricIntegrators: integrate, ImplicitMidpoint\nusing GeometricProblems.ABCFlow\nusing Plots\n\nensemble_solution = integrate(odeensemble(), ImplicitMidpoint())\n\np = plot()\nfor solution in ensemble_solution\n plot!(p, solution.q[:, 1], solution.q[:, 2], solution.q[:, 3])\nend\np","category":"page"},{"location":"abc_flow/#Library-functions","page":"ABC Flow","title":"Library functions","text":"","category":"section"},{"location":"abc_flow/","page":"ABC Flow","title":"ABC Flow","text":"GeometricProblems.ABCFlow","category":"page"},{"location":"abc_flow/#GeometricProblems.ABCFlow","page":"ABC Flow","title":"GeometricProblems.ABCFlow","text":"ABC Flow\n\nbeginaligned\n dotx = Asin(z) + Ccos(y) \n doty = Bsin(x) + Acos(z) \n dotz = Csin(y) + Bcos(x)\nendaligned\n\n\n\n\n\n","category":"module"},{"location":"abc_flow/","page":"ABC Flow","title":"ABC Flow","text":"Modules = [GeometricProblems.ABCFlow]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"abc_flow/","page":"ABC Flow","title":"ABC Flow","text":"E. Hairer, C. Lubich and G. Wanner. Geometric Numerical integration: structure-preserving algorithms for ordinary differential equations (Springer, Berlin, 2006).\n\n\n\n","category":"page"},{"location":"lotka_volterra_4d/#Lotka-Volterra-4d","page":"Lotka-Volterra 4d","title":"Lotka-Volterra 4d","text":"","category":"section"},{"location":"lotka_volterra_4d/","page":"Lotka-Volterra 4d","title":"Lotka-Volterra 4d","text":"Modules = [GeometricProblems.LotkaVolterra4d]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"massless_charged_particle/#Massless-Charged-Particle","page":"Massless Charged Particle","title":"Massless Charged Particle","text":"","category":"section"},{"location":"massless_charged_particle/","page":"Massless Charged Particle","title":"Massless Charged Particle","text":"GeometricProblems.MasslessChargedParticle","category":"page"},{"location":"massless_charged_particle/#GeometricProblems.MasslessChargedParticle","page":"Massless Charged Particle","title":"GeometricProblems.MasslessChargedParticle","text":"Massless charged particle in 2D\n\nThe Lagrangian is given by\n\nL(x dotx) = A(x) cdot dotx - phi (x) \n\nwith magnetic vector potential\n\nA(x) = fracA_02 big( 1 + x_1^2 + x_2^2 big) beginpmatrix\n- x_2 \n+ x_1 \nendpmatrix \n\nelectrostatic potential\n\nphi(x) = E_0 big( cos (x_1) + sin(x_2) big) \n\nand magnetic and electric fields\n\nbeginaligned\nB(x) = nabla times A(x) = A_0 (1 + 2 x_1^2 + 2 x_2^2) \nE(x) = - nabla phi(x) = E_0 big( sin x_1 - cos x_2 big)^T \nendaligned\n\nThe Hamiltonian form of the equations of motion reads\n\ndotx = frac1B(x) beginpmatrix\nhphantom- 0 + 1 \n- 1 hphantom+ 0 \nendpmatrix nabla phi (x) \n\n\n\n\n\n","category":"module"},{"location":"massless_charged_particle/","page":"Massless Charged Particle","title":"Massless Charged Particle","text":"using Plots\nusing GeometricIntegrators\nusing GeometricProblems.MasslessChargedParticle\nusing GeometricProblems.MasslessChargedParticlePlots\n\node = odeproblem()\nsol = integrate(ode, Gauss(1))\n\nplot_massless_charged_particle(sol, ode)\nsavefig(\"massless_charged_particle.svg\")\n\nnothing","category":"page"},{"location":"massless_charged_particle/","page":"Massless Charged Particle","title":"Massless Charged Particle","text":"(Image: )","category":"page"},{"location":"massless_charged_particle/","page":"Massless Charged Particle","title":"Massless Charged Particle","text":"Modules = [GeometricProblems.MasslessChargedParticle]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"massless_charged_particle/#GeometricProblems.MasslessChargedParticle.idaeproblem","page":"Massless Charged Particle","title":"GeometricProblems.MasslessChargedParticle.idaeproblem","text":"Creates an implicit DAE object for the massless charged particle in 2D.\n\n\n\n\n\n","category":"function"},{"location":"massless_charged_particle/#GeometricProblems.MasslessChargedParticle.idaeproblem_spark","page":"Massless Charged Particle","title":"GeometricProblems.MasslessChargedParticle.idaeproblem_spark","text":"Creates an implicit DAE object for the massless charged particle in 2D.\n\n\n\n\n\n","category":"function"},{"location":"massless_charged_particle/#GeometricProblems.MasslessChargedParticle.iodeproblem","page":"Massless Charged Particle","title":"GeometricProblems.MasslessChargedParticle.iodeproblem","text":"Creates an implicit ODE object for the massless charged particle in 2D.\n\n\n\n\n\n","category":"function"},{"location":"massless_charged_particle/#GeometricProblems.MasslessChargedParticle.odeproblem","page":"Massless Charged Particle","title":"GeometricProblems.MasslessChargedParticle.odeproblem","text":"Creates an ODE object for the massless charged particle in 2D.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_3d/#Lotka-Volterra-3d","page":"Lotka-Volterra 3d","title":"Lotka-Volterra 3d","text":"","category":"section"},{"location":"lotka_volterra_3d/","page":"Lotka-Volterra 3d","title":"Lotka-Volterra 3d","text":"GeometricProblems.LotkaVolterra3d","category":"page"},{"location":"lotka_volterra_3d/#GeometricProblems.LotkaVolterra3d","page":"Lotka-Volterra 3d","title":"GeometricProblems.LotkaVolterra3d","text":"Lotka-Volterra Model in 3D\n\nThe Lotka–Volterra model in 3D is an example of a Hamiltonian system with degenerate Poisson structure.\n\nThe equations read\n\nbeginaligned\ndotq_1 = q_1 ( - a_2 q_2 + a_3 q_3 - b_2 + b_3 ) \ndotq_2 = q_2 ( hphantom- a_1 q_1 - a_3 q_3 + b_1 - b_3 ) \ndotq_3 = q_3 ( - a_1 q_1 + a_2 q_2 - b_1 + b_2 ) \nendaligned\n\nwhich can be written in Poisson-form as\n\ndotq = P(q) nabla H(q) \n\nwith Poisson matrix\n\nP(q) = beginpmatrix\n 0 - q_1 q_2 hphantom- q_1 q_3 \nhphantom- q_1 q_2 0 - q_2 q_3 \n- q_1 q_3 hphantom- q_2 q_3 0 \nendpmatrix \n\nand Hamiltonian\n\nH(q) = a_1 q_1 + a_2 q_2 + a_3 q_3 + b_1 ln q_1 + b_2 ln q_2 + b_3 ln q_3 \n\nReferences:\n\nA. M. Perelomov. Selected topics on classical integrable systems, Troisième cycle de la physique, expanded version of lectures delivered in May 1995.\nYuri B. Suris. Integrable discretizations for lattice systems: local equations of motion and their Hamiltonian properties, Rev. Math. Phys. 11, pp. 727–822, 1999.\n\n\n\n\n\n","category":"module"},{"location":"lotka_volterra_3d/","page":"Lotka-Volterra 3d","title":"Lotka-Volterra 3d","text":"Modules = [GeometricProblems.LotkaVolterra3d]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"diagnostics/#Diagnostics","page":"Diagnostics","title":"Diagnostics","text":"","category":"section"},{"location":"diagnostics/","page":"Diagnostics","title":"Diagnostics","text":"Modules = [GeometricProblems.Diagnostics]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_error_drift-Union{Tuple{T}, Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.ScalarDataSeries{T}}, Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.ScalarDataSeries{T}, Any}} where T","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_error_drift","text":"Computes the drift in an invariant error.\n\nArguments: (t::TimeSeries, invariant_error::DataSeries{T,1}, interval_length=100)\n\nThe time series of the solution is split into intervals of interval_length time steps. In each interval, the maximum of the absolute value of the invariant error is determined. Returns a tuple of a TimeSeries that holds the centers of all intervals and a ScalarDataSeries that holds the maxima.\n\nThis is useful to detect drifts in invariants that are not preserved exactly but whose error is oscillating such as the energy error of Hamiltonian systems with symplectic integrators.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_invariant-Union{Tuple{T}, Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.DataSeries{T, AT} where AT<:Union{AbstractArray{T}, T}, GeometricSolutions.DataSeries{T, AT} where AT<:Union{AbstractArray{T}, T}, Union{Function, Type}}} where T","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_invariant","text":"Compute an invariant for the solution of a partitioned ODE or DAE system.\n\nArguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Base.Callable)\n\nThe invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.\n\nReturns a ScalarDataSeries holding the time series of the invariant.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_invariant-Union{Tuple{T}, Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.DataSeries{T, AT} where AT<:Union{AbstractArray{T}, T}, Union{Function, Type}}} where T","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_invariant","text":"Compute an invariant for the solution of an ODE or DAE system.\n\nArguments: (t::TimeSeries, q::DataSeries{T}, invariant::Base.Callable)\n\nThe invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.\n\nReturns a ScalarDataSeries holding the time series of the invariant.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_invariant_error-Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.DataSeries, Union{Function, Type}}","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_invariant_error","text":"Compute the relative error of an invariant for the solution of an ODE or DAE system.\n\nArguments: (t::TimeSeries, q::DataSeries{T}, invariant::Base.Callable)\n\nThe invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.\n\nReturns a tuple of two 1d DataSeries holding the time series of the invariant and the relativ error, respectively.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_invariant_error-Union{Tuple{T}, Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.DataSeries{T, AT} where AT<:Union{AbstractArray{T}, T}, GeometricSolutions.DataSeries{T, AT} where AT<:Union{AbstractArray{T}, T}, Union{Function, Type}}} where T","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_invariant_error","text":"Compute the relative error of an invariant for the solution of a partitioned ODE or DAE system.\n\nArguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Base.Callable)\n\nThe invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.\n\nReturns a tuple of two ScalarDataSeries holding the time series of the invariant and the relativ error, respectively.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_momentum_error-Union{Tuple{DT}, Tuple{GeometricSolutions.DataSeries{DT, AT} where AT<:Union{AbstractArray{DT}, DT}, GeometricSolutions.DataSeries{DT, AT} where AT<:Union{AbstractArray{DT}, DT}}} where DT","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_momentum_error","text":"Computes the difference of the momentum and the one-form of an implicit ODE or DAE system.\n\nArguments: (p::DataSeries{DT}, ϑ::DataSeries{DT})\n\nReturns a DataSeries similar to p holding the time series of the difference between p and ϑ.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_one_form-Tuple{GeometricSolutions.TimeSeries, GeometricSolutions.DataSeries, Union{Function, Type}}","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_one_form","text":"Compute the one-form (symplectic potential) for the solution of a Lagrangian system.\n\nArguments: (t::TimeSeries, q::DataSeries, one_form::Base.Callable)\n\nThe one_form function needs to take three arguments (t,q,k) where k is the index of the one-form component.\n\nReturns a DataSeries similar to q holding the time series of the one-form.\n\n\n\n\n\n","category":"method"},{"location":"diagnostics/#GeometricProblems.Diagnostics.compute_relative_error-Union{Tuple{GeometricSolutions.ScalarDataSeries{T}}, Tuple{T}} where T","page":"Diagnostics","title":"GeometricProblems.Diagnostics.compute_relative_error","text":"Takes a ScalarDataSeries holding an invariant and computes the relative error (inv(t)-inv(0))/inv(0).\n\nReturns a ScalarDataSeries similar to the argument holding the time series of the relativ errors.\n\n\n\n\n\n","category":"method"},{"location":"kepler_problem/#Kepler-Problem","page":"Kepler Problem","title":"Kepler Problem","text":"","category":"section"},{"location":"initial_condition/#Bump-as-Initial-Condition","page":"bump","title":"Bump as Initial Condition","text":"","category":"section"},{"location":"initial_condition/","page":"bump","title":"bump","text":"In here we describe the initial condition used for the discretized linear wave and the Toda lattice. The initial conditions are based on the following third-degree spline (also used in [2]): ","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":" h(s) = begincases\n 1 - frac32s^2 + frac34s^3 textif 0 leq s leq 1 \n frac14(2 - s)^3 textif 1 s leq 2 \n 0 textelse \n endcases","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"Plotted on the relevant domain it takes the following shape: ","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"HTML(\"\"\"\"\"\") # hide","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"HTML(\"\"\"\"\"\") # hide","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"Taking the above function h(s) as a starting point, the initial conditions for the linear wave equations are modelled with ","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"\tq_0(omegamu) = h(s(omega mu))","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"Further for s(cdot cdot) we pick: ","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":" s(omega mu) = 20 mu leftomega + fracmu2right","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"And we end up with the following choice of parametrized initial conditions: ","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":" q_0(mu)(omega)","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"Three initial conditions and their time evolutions are shown in the figure below. As was required, we can see that the peak gets sharper and moves to the left as we increase the parameter mu; the curves also get a good coverage of the domain Omega.","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"# Plot our initial conditions for different values of μ here! \nusing GeometricProblems: compute_initial_condition, compute_domain\nusing Plots # hide\nusing LaTeXStrings # hide\n\nμ_vals = [0.416, 0.508, 0.600]\nÑ = 128\n\nΩ = compute_domain(Ñ)\nics = [compute_initial_condition(μ, Ñ) for μ in μ_vals]\np = plot(Ω, ics[1].q, label = L\"\\mu\"*\"=\"*string(μ_vals[1]), xlabel = L\"\\Omega\", ylabel = L\"q_0\")\nplot!(p, Ω, ics[2].q, label = L\"\\mu\"*\"=\"*string(μ_vals[2]))\nplot!(p, Ω, ics[3].q, label = L\"\\mu\"*\"=\"*string(μ_vals[3]))\npng(p, \"ics_plot\")\n\nnothing","category":"page"},{"location":"initial_condition/","page":"bump","title":"bump","text":"(Image: Plot of initial conditions for various values of mu.)","category":"page"},{"location":"pendulum/#Mathematical-Pendulum","page":"Mathematical Pendulum","title":"Mathematical Pendulum","text":"","category":"section"},{"location":"pendulum/","page":"Mathematical Pendulum","title":"Mathematical Pendulum","text":"Modules = [GeometricProblems.Pendulum]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"releasenotes/#Release-Notes","page":"Release Notes","title":"Release Notes","text":"","category":"section"},{"location":"releasenotes/#0.1.1","page":"Release Notes","title":"0.1.1","text":"","category":"section"},{"location":"releasenotes/#New-Features","page":"Release Notes","title":"New Features","text":"","category":"section"},{"location":"releasenotes/","page":"Release Notes","title":"Release Notes","text":"Poincaré invariants for Lotka-Volterra 2d model\nMore equation types for massless charged particle","category":"page"},{"location":"releasenotes/#Fixes","page":"Release Notes","title":"Fixes","text":"","category":"section"},{"location":"releasenotes/","page":"Release Notes","title":"Release Notes","text":"Fixes in general plot recipes","category":"page"},{"location":"releasenotes/#0.1.0","page":"Release Notes","title":"0.1.0","text":"","category":"section"},{"location":"releasenotes/","page":"Release Notes","title":"Release Notes","text":"Initial release with equations for","category":"page"},{"location":"releasenotes/","page":"Release Notes","title":"Release Notes","text":"Exponential Growth,\nLorenz Attractor in 3D,\nLotka-Volterra in 2D,\nLotka-Volterra in 3D,\nLotka-Volterra in 4D,\nMassless Charged Particle,\nHarmonic Oscillator,\nMathematical Pendulum,\nPlanar Point Vortices.","category":"page"},{"location":"nonlinear_oscillators/#Nonlinear-Oscillators","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"","category":"section"},{"location":"nonlinear_oscillators/#Duffing-Oscillator","page":"Nonlinear Oscillators","title":"Duffing Oscillator","text":"","category":"section"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"GeometricProblems.DuffingOscillator","category":"page"},{"location":"nonlinear_oscillators/#GeometricProblems.DuffingOscillator","page":"Nonlinear Oscillators","title":"GeometricProblems.DuffingOscillator","text":"\n\n\n\n","category":"module"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"Modules = [GeometricProblems.DuffingOscillator]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"nonlinear_oscillators/#Lennard-Jones-Oscillator","page":"Nonlinear Oscillators","title":"Lennard-Jones Oscillator","text":"","category":"section"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"GeometricProblems.LennardJonesOscillator","category":"page"},{"location":"nonlinear_oscillators/#GeometricProblems.LennardJonesOscillator","page":"Nonlinear Oscillators","title":"GeometricProblems.LennardJonesOscillator","text":"\n\n\n\n","category":"module"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"Modules = [GeometricProblems.LennardJonesOscillator]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"nonlinear_oscillators/#Mathews-Lakshmanan-Oscillator","page":"Nonlinear Oscillators","title":"Mathews-Lakshmanan Oscillator","text":"","category":"section"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"GeometricProblems.MathewsLakshmananOscillator","category":"page"},{"location":"nonlinear_oscillators/#GeometricProblems.MathewsLakshmananOscillator","page":"Nonlinear Oscillators","title":"GeometricProblems.MathewsLakshmananOscillator","text":"\n\n\n\n","category":"module"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"Modules = [GeometricProblems.MathewsLakshmananOscillator]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"nonlinear_oscillators/#Morse-Oscillator","page":"Nonlinear Oscillators","title":"Morse Oscillator","text":"","category":"section"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"GeometricProblems.MorseOscillator","category":"page"},{"location":"nonlinear_oscillators/#GeometricProblems.MorseOscillator","page":"Nonlinear Oscillators","title":"GeometricProblems.MorseOscillator","text":"\n\n\n\n","category":"module"},{"location":"nonlinear_oscillators/","page":"Nonlinear Oscillators","title":"Nonlinear Oscillators","text":"Modules = [GeometricProblems.MorseOscillator]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"rigid_body/#The-rigid-body","page":"Rigid body","title":"The rigid body","text":"","category":"section"},{"location":"rigid_body/","page":"Rigid body","title":"Rigid body","text":"using GeometricProblems.RigidBody: odeensemble\nusing GeometricIntegrators: integrate, ImplicitMidpoint\nusing GeometricEquations: EnsembleProblem\nusing GeometricSolutions: GeometricSolution\nusing CairoMakie\n\nics = [\n [sin(1.1), 0., cos(1.1)],\n [sin(2.1), 0., cos(2.1)],\n [sin(2.2), 0., cos(2.2)],\n [0., sin(1.1), cos(1.1)],\n [0., sin(1.5), cos(1.5)], \n [0., sin(1.6), cos(1.6)]\n ]\n\nensemble_problem = odeensemble(ics)\nensemble_solution = integrate(ensemble_problem, ImplicitMidpoint())\n\nfunction plot_geometric_solution!(p, solution::GeometricSolution; kwargs...)\n lines!(p, solution.q[:, 1].parent, solution.q[:, 2].parent, solution.q[:, 3].parent; kwargs...)\nend\n\nfunction sphere(r, C) # r: radius; C: center [cx,cy,cz]\n n = 100\n u = range(-π, π; length = n)\n v = range(0, π; length = n)\n x = C[1] .+ r * cos.(u) * sin.(v)'\n y = C[2] .+ r * sin.(u) * sin.(v)'\n z = C[3] .+ r * ones(n) * cos.(v)'\n return x, y, z\n end\n\nfig, ax, plt = surface(sphere(1., [0., 0., 0.])..., alpha = .6)\n\nfor (i, solution) in zip(1:length(ensemble_solution), ensemble_solution.s)\n plot_geometric_solution!(ax, solution; label = \"trajectory \"*string(i), linewidth=2)\nend\n\nfig","category":"page"},{"location":"rigid_body/#Library-functions","page":"Rigid body","title":"Library functions","text":"","category":"section"},{"location":"rigid_body/","page":"Rigid body","title":"Rigid body","text":"GeometricProblems.RigidBody","category":"page"},{"location":"rigid_body/#GeometricProblems.RigidBody","page":"Rigid body","title":"GeometricProblems.RigidBody","text":"Rigid body\n\nbeginaligned\n dotx = Ayz \n doty = Bxz \n dotz = Cxy\nendaligned\n\nwhere A = (I_2 - I_3)(I_2I_3), B = (I_3 - I_1)(I_3I_1) and C = (I_1 - I_2)(I_1I_2); I_cdot are the principal components of inertia. \n\nThe initial condition and the default parameters are taken from [4].\n\n\n\n\n\n","category":"module"},{"location":"rigid_body/","page":"Rigid body","title":"Rigid body","text":"Modules = [GeometricProblems.RigidBody]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"rigid_body/","page":"Rigid body","title":"Rigid body","text":"J. Bajārs. Locally-symplectic neural networks for learning volume-preserving dynamics. Journal of Computational Physics 476, 111911 (2023).\n\n\n\n","category":"page"},{"location":"henon_heiles/#Henon-Heiles-System","page":"Hénon-Heiles System","title":"Hénon-Heiles System","text":"","category":"section"},{"location":"linear_wave/#The-Discretized-Linear-Wave","page":"Linear Wave Equation","title":"The Discretized Linear Wave","text":"","category":"section"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"The linear wave equation in one dimension has the following Hamiltonian (see e.g. [2]): ","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":" mathcalH_mathrmcont(q p mu) = frac12int_Omega mu^2(partial_xi q(t xi mu))^2 + p(t xi mu)^2 dxi","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"where the domain is Omega = (-12 12). We then divide the domain into tildeN equidistantly spaces points[1] xi_i = iDelta_xi - 12 for i = 1 ldots tildeN and Delta_xi = 1(tildeN + 1).","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"[1]: In total the system is therefore described by N = tildeN + 2 coordinates, since we also have to consider the boundary. The resulting Hamiltonian then is:","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":" mathcalH_h(z) = sum_i = 1^tildeNfracDeltax2left p_i^2 + mu^2 frac(q_i - q_i - 1)^2 + (q_i+1 - q_i)^22Deltax right","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"The discretized linear wave equation example of an completely-integrable system, i.e. a Hamiltonian system evolving in mathbbR^2n that has n Poisson-commuting invariants of motion (see [3]). ","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"For evaluating the system we specify the following initial[2] and boundary conditions: ","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"beginaligned\n\tq_0(omegamu) = q(0 omega mu) \n\tp(0 omega mu) = partial_tq(0ximu) = -mupartial_omegaq_0(ximu) \n\tq(tomegamu) = 0 text for omegainpartialOmega\nendaligned","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"[2]: The precise shape of q_0(cdotcdot) is described in the chapter on initial conditions.","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"By default GeometricProblems uses the following parameters: ","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"using GeometricIntegrators, Plots # hide\nimport GeometricProblems.LinearWave as lw\n\nlw.default_parameters","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"And if we integrate we get: ","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"problem = lw.hodeproblem() \nsol = integrate(problem, ImplicitMidpoint())\n\n# plot 6 time steps\ntime_steps = 0 : (length(sol.t) - 1) ÷ 5 : (length(sol.t) - 1)\np = plot()\nfor time_step in time_steps\n plot!(p, lw.compute_domain(lw.Ñ + 2), sol.q[time_step, :], label = \"t = \"*string(round(sol.t[time_step]; digits = 2)))\nend\n\np","category":"page"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"As we can see the thin pulse travels in one direction. ","category":"page"},{"location":"linear_wave/#Library-functions","page":"Linear Wave Equation","title":"Library functions","text":"","category":"section"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"GeometricProblems.LinearWave","category":"page"},{"location":"linear_wave/#GeometricProblems.LinearWave","page":"Linear Wave Equation","title":"GeometricProblems.LinearWave","text":"The discretized version of the 1d linear wave equation.\n\nIt is a prime example of a non-trivial completely integrable system.\n\nThe only system parameters are the number of points N for which the system is discretized and mu.\n\n\n\n\n\n","category":"module"},{"location":"linear_wave/","page":"Linear Wave Equation","title":"Linear Wave Equation","text":"P. Buchfink, S. Glas and B. Haasdonk. Symplectic model reduction of Hamiltonian systems on nonlinear manifolds and approximation with weakly symplectic autoencoder. SIAM Journal on Scientific Computing 45, A289–A311 (2023).\n\n\n\n","category":"page"},{"location":"lotka_volterra_2d/#Lotka-Volterra-2d","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"","category":"section"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"Lotka–Volterra models are used in mathematical biology for modelling population dynamics of animal species, as well as many other fields where predator-prey and similar models appear. The dynamics of the growth of two interacting species can be modelled by the following noncanonical Hamiltonian system","category":"page"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"dotq = beginpmatrix\nhphantom- 0 + q_1 q_2 \n- q_1 q_2 hphantom+ 0 \nendpmatrix\nnabla H (q) \nquad\nH (q) = a_1 q_1 + a_2 q_2 + b_1 log q_1 + b_2 log q_2 ","category":"page"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"using Plots\nusing GeometricIntegrators\nusing GeometricProblems.LotkaVolterra2d\nusing GeometricProblems.LotkaVolterra2dPlots\n\node = odeproblem()\nsol = integrate(ode, Gauss(1))\n\nplot_lotka_volterra_2d(sol, ode)\nsavefig(\"lotka_volterra_2d.svg\")\n\nnothing","category":"page"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"(Image: )","category":"page"},{"location":"lotka_volterra_2d/#Sub-models","page":"Lotka-Volterra 2d","title":"Sub-models","text":"","category":"section"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"The Euler-Lagrange equations of the Lotka-Volterra model can be obtained from different Lagrangians, which are connected by gauge transformations. Although they all lead to the same equations of motion, they lead to different variational integrators. Therefore different models based on different Lagrangians are implemented.","category":"page"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"GeometricProblems.LotkaVolterra2d","category":"page"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d","text":"Lotka-Volterra model in 2D\n\nbeginaligned\nL (q dotq) = bigg( q_2 + fraclog q_2q_1 bigg) dotq_1 + q_1 dotq_2 - H(q) \nH(q) = a_1 q_1 + a_2 q_2 + b_1 log q_1 + b_2 log q_2\nendaligned\n\n\n\n\n\n","category":"module"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"GeometricProblems.LotkaVolterra2dSymmetric","category":"page"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dSymmetric","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dSymmetric","text":"Lotka-Volterra model in 2D with symmetric Lagrangian\n\nbeginaligned\nL (q dotq) = frac12 fraclog q_2q_1 dotq_1 - frac12 fraclog q_1q_2 dotq_2 - H(q) \nH(q) = a_1 q_1 + a_2 q_2 + b_1 log q_1 + b_2 log q_2\nendaligned\n\nThis Lagrangian is a slight generalization of Equation (5) in José Fernández-Núñez, Lagrangian Structure of the Two-Dimensional Lotka-Volterra System, International Journal of Theoretical Physics, Vol. 37, No. 9, pp. 2457-2462, 1998.\n\n\n\n\n\n","category":"module"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"GeometricProblems.LotkaVolterra2dSingular","category":"page"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dSingular","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dSingular","text":"Lotka-Volterra model in 2D with \"singular\" Lagrangian\n\nbeginaligned\nL (q dotq) = fraclog q_2q_1 dotq_1 - H(q) \nH(q) = a_1 q_1 + a_2 q_2 + b_1 log q_1 + b_2 log q_2\nendaligned\n\nThis Lagrangian is equivalent to the Lagrangian of the symmetric Lotka-Volterra model. It differs only by a gauge transformation with the term - 12 d(log(q_1) log(q_2))dt. It leads to the same Euler-Lagrange equations but to a different variational integrator.\n\n\n\n\n\n","category":"module"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"GeometricProblems.LotkaVolterra2dGauge","category":"page"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dGauge","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dGauge","text":"Lotka-Volterra model in 2D with symmetric Lagrangian with gauge term\n\nbeginaligned\nL (q dotq) = bigg( q_2 + frac12 fraclog q_2q_1 bigg) dotq_1 + bigg( q_1 - frac12 fraclog q_1q_2 bigg) dotq_2 - H(q) \nH(q) = a_1 q_1 + a_2 q_2 + b_1 log q_1 + b_2 log q_2\nendaligned\n\nThis Lagrangian is equivalent to the Lagrangian of the symmetric Lotka-Volterra model. It differs only by a gauge transformation with the term d(q_1 q_2)dt. It leads to the same Euler-Lagrange equations but to a different variational integrator.\n\n\n\n\n\n","category":"module"},{"location":"lotka_volterra_2d/#User-Functions","page":"Lotka-Volterra 2d","title":"User Functions","text":"","category":"section"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"Modules = [GeometricProblems.LotkaVolterra2d]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.daeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.daeproblem","text":"Creates a DAE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.hdaeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.hdaeproblem","text":"Creates a Hamiltonian DAE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.hodeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.hodeproblem","text":"Creates a Hamiltonian ODE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.idaeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.idaeproblem","text":"Creates an implicit DAE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.idaeproblem_spark","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.idaeproblem_spark","text":"Creates an implicit DAE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.iodeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.iodeproblem","text":"Creates an implicit ODE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.iodeproblem_dg","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.iodeproblem_dg","text":"Creates an implicit ODE object for the Lotka-Volterra 2D model for use with DG integrators.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.ldaeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.ldaeproblem","text":"Creates a variational DAE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.ldaeproblem_slrk","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.ldaeproblem_slrk","text":"Creates a variational DAE object for the Lotka-Volterra 2D model for use with SLRK integrators.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.lodeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.lodeproblem","text":"Creates a variational ODE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.odeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.odeproblem","text":"Creates an ODE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.pdaeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.pdaeproblem","text":"Creates a partitioned DAE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2d.podeproblem","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2d.podeproblem","text":"Creates a partitioned ODE object for the Lotka-Volterra 2D model.\n\n\n\n\n\n","category":"function"},{"location":"lotka_volterra_2d/#Plotting-Functions","page":"Lotka-Volterra 2d","title":"Plotting Functions","text":"","category":"section"},{"location":"lotka_volterra_2d/","page":"Lotka-Volterra 2d","title":"Lotka-Volterra 2d","text":"Modules = [GeometricProblems.LotkaVolterra2dPlots]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!-Tuple","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!","text":"Plots the solution of a 2D Lotka-Volterra model together with the energy error.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nxlims=:auto: xlims for solution plot\nylims=:auto: ylims for solution plot\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!-Tuple{RecipesBase.AbstractPlot, Vararg{Any}}","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!","text":"Plots the solution of a 2D Lotka-Volterra model together with the energy error.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nxlims=:auto: xlims for solution plot\nylims=:auto: ylims for solution plot\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d-Tuple","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d","text":"Plots the solution of a 2D Lotka-Volterra model together with the energy error.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nxlims=:auto: xlims for solution plot\nylims=:auto: ylims for solution plot\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_solution!-Tuple","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_solution!","text":"Plots the solution of a 2D Lotka-Volterra model.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nxlims=:auto: xlims for solution plot\nylims=:auto: ylims for solution plot\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_solution!-Tuple{RecipesBase.AbstractPlot, Vararg{Any}}","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_solution!","text":"Plots the solution of a 2D Lotka-Volterra model.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nxlims=:auto: xlims for solution plot\nylims=:auto: ylims for solution plot\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_solution-Tuple","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_solution","text":"Plots the solution of a 2D Lotka-Volterra model.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nxlims=:auto: xlims for solution plot\nylims=:auto: ylims for solution plot\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_traces!-Tuple","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_traces!","text":"Plots time traces of the solution of a 2D Lotka-Volterra model and its energy error.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_traces!-Tuple{RecipesBase.AbstractPlot, Vararg{Any}}","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_traces!","text":"Plots time traces of the solution of a 2D Lotka-Volterra model and its energy error.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"lotka_volterra_2d/#GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_traces-Tuple","page":"Lotka-Volterra 2d","title":"GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d_traces","text":"Plots time traces of the solution of a 2D Lotka-Volterra model and its energy error.\n\nArguments:\n\nsol <: GeometricSolution\nequ <: GeometricProblem\n\nKeyword aguments:\n\nnplot=1: plot every nplotth time step\nlatex=true: use LaTeX guides\n\n\n\n\n\n","category":"method"},{"location":"point_vortices/#Planar-Point-Vortices","page":"Point Vortices","title":"Planar Point Vortices","text":"","category":"section"},{"location":"point_vortices/","page":"Point Vortices","title":"Point Vortices","text":"Modules = [GeometricProblems.PointVortices]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"inner_solar_system/#Inner-Solar-System","page":"Inner Solar System","title":"Inner Solar System","text":"","category":"section"},{"location":"outer_solar_system/#Outer-Solar-System","page":"Outer Solar System","title":"Outer Solar System","text":"","category":"section"},{"location":"toda_lattice/#Toda-Lattice","page":"Toda Lattice","title":"Toda Lattice","text":"","category":"section"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"The Toda lattice is a prime example of an completely-integrable system, i.e. a Hamiltonian system evolving in mathbbR^2n that has n Poisson-commuting invariants of motion (see [3]). It is named after Morikazu Toda who used it to model a one-dimensional crystal [5].","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"The Hamiltonian of the Toda lattice takes the following form: ","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":" H(q p) = sum_ninmathbbZleft( fracp_n^22 + alpha e^q_n - q_n+1 right)","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"In practice we work with a finite number of particles N and impose periodic boundary conditions: ","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"beginaligned\n q_n+N equiv q_n \n p_n+N equiv p_n\nendaligned","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"Hence we have: ","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":" H(q p) = sum_n=1^N-1 left( fracp_n^22 + alpha e^q_n - q_n+1 right) + fracp_N^22 + alpha e^q_N - q_1","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"We can model the evolution of a thin pulse in this system:","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"using GeometricProblems, GeometricIntegrators, GLMakie # hide\n\nproblem = GeometricProblems.TodaLattice.hodeproblem(; tspan = (0.0, 2000.)) \nsol = integrate(problem, ImplicitMidpoint())\n\ntime_steps = 0:10:length(sol.q)\n\nfig = Figure()\nax = Axis(fig[1, 1])\nmblue = RGBf(31 / 256, 119 / 256, 180 / 256)\nlines!(ax, sol.q[0, :], label = \"t = $(sol.t[0])\", color = mblue)\nframerate = 30\nmblue = \nrecord(fig, \"toda_animation.mp4\", time_steps;\n framerate = framerate) do time_step\n empty!(ax)\n lines!(ax, sol.q[time_step, :], label = \"t = $(sol.t[time_step])\", color = mblue)\n ylims!(ax, 0., 1.)\n axislegend(ax; position = (1.01, 1.5), labelsize = 8)\nend\nDocs.HTML(\"\"\"\"\"\")","category":"page"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"As we can see the thin pulse separates into two smaller pulses an they start traveling in opposite directions until they meet again at time tapprox120. But it is important to note that the right peak at time 120 is below the one at time 0. This is not a numerical artifact but a feature of the Toda lattice! ","category":"page"},{"location":"toda_lattice/#Library-functions","page":"Toda Lattice","title":"Library functions","text":"","category":"section"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"GeometricProblems.TodaLattice","category":"page"},{"location":"toda_lattice/#GeometricProblems.TodaLattice","page":"Toda Lattice","title":"GeometricProblems.TodaLattice","text":"The Toda lattice is a model for a one-dimensional crystal named after its discoverer Morikazu Toda [5].\n\nIt is a prime example of a non-trivial completely integrable system.\n\nThe only system parameters are the number of points N in the periodic lattice and alpha which adjusts the strength of the interactions in the lattice.\n\n\n\n\n\n","category":"module"},{"location":"toda_lattice/","page":"Toda Lattice","title":"Toda Lattice","text":"V. I. Arnold. Mathematical methods of classical mechanics. Vol. 60 of Graduate Texts in Mathematics (Springer Verlag, Berlin, 1978).\n\n\n\nM. Toda. Vibration of a chain with nonlinear interaction. Journal of the Physical Society of Japan 22, 431–436 (1967).\n\n\n\n","category":"page"},{"location":"harmonic_oscillator/#Harmonic-Oscillator","page":"Harmonic Oscillator","title":"Harmonic Oscillator","text":"","category":"section"},{"location":"harmonic_oscillator/","page":"Harmonic Oscillator","title":"Harmonic Oscillator","text":"Modules = [GeometricProblems.HarmonicOscillator]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"#GeometricProblems.jl","page":"Home","title":"GeometricProblems.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"GeometricProblems.jl is a collection of ODEs and DAEs with interesting geometric structures together with useful diagnostics and plotting tools.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: PkgEval Status) (Image: CI) (Image: Build Status) (Image: Coverage Status) (Image: codecov) (Image: DOI)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Typical structures are","category":"page"},{"location":"","page":"Home","title":"Home","text":"Variational structure, i.e., the equations can defined in terms of a Lagrangian function and be obtained from an action principle;\nHamiltonian structure, i.e., the equations can be defined in terms of a Hamiltonian function together with a symplectic or Poisson matrix;\nInvariants, i.e., the equations have symmetries and associated conservation laws;\nVolume preservation, i.e., the flow of the equations is divergence-free.","category":"page"},{"location":"#Contents","page":"Home","title":"Contents","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\n\"diagnostics.md\",\n\"abc_flow.md\",\n\"coupled_harmonic_oscillator.md\",\n\"henon_heiles.md\",\n\"kepler_problem.md\",\n\"lorenz_attractor.md\",\n\"lotka_volterra_2d.md\",\n\"lotka_volterra_3d.md\",\n\"lotka_volterra_4d.md\",\n\"massless_charged_particle.md\",\n\"harmonic_oscillator.md\",\n\"nonlinear_oscillators.md\",\n\"pendulum.md\",\n\"double_pendulum.md\",\n\"point_vortices.md\",\n\"inner_solar_system.md\",\n\"outer_solar_system.md\",\n\"rigid_body.md\",\n\"toda_lattice.md\"\n]\nDepth = 1","category":"page"},{"location":"#References","page":"Home","title":"References","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you use the figures or implementations provided here, please consider citing GeometricIntegrators.jl as","category":"page"},{"location":"","page":"Home","title":"Home","text":"@misc{Kraus:2020:GeometricIntegratorsRepo,\n title={GeometricIntegrators.jl: Geometric Numerical Integration in Julia},\n author={Kraus, Michael},\n year={2020},\n howpublished={\\url{https://github.com/JuliaGNI/GeometricIntegrators.jl}},\n doi={10.5281/zenodo.3648325}\n}","category":"page"},{"location":"","page":"Home","title":"Home","text":"as well as this repository as","category":"page"},{"location":"","page":"Home","title":"Home","text":"@misc{Kraus:2020:GeometricProblemsRepo,\n title={GeometricProblems.jl: Collection of Differential Equations with Geometric Structure.},\n author={Kraus, Michael},\n year={2020},\n howpublished={\\url{https://github.com/JuliaGNI/GeometricProblems.jl}},\n doi={10.5281/zenodo.4285904}\n}","category":"page"},{"location":"#Figure-License","page":"Home","title":"Figure License","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Copyright (c) Michael Kraus All figures are licensed under the Creative Commons CC BY-NC-SA 4.0 License.","category":"page"},{"location":"#Software-License","page":"Home","title":"Software License","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Copyright (c) Michael Kraus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","category":"page"},{"location":"double_pendulum/#Double-Pendulum","page":"Double Pendulum","title":"Double Pendulum","text":"","category":"section"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"The double pendulum consists of two pendula, one attached to the origin at (xy) = (00), and the second attached to the first. Each pendulum consists of a point mass m_i attached to a massless rod of length l_i with i in (12). All motion is assumed to be frictionless.","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"HTML(\"\"\"\"\"\") # hide","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"HTML(\"\"\"\"\"\") # hide","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"The dynamics of the system is most naturally described in terms of the angles theta_i between the rods l_i and the vertical axis y. In terms of these angles, the cartesian coordinates are given by","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"beginalign*\nx_1 = l_1 sintheta_1 \nx_2 = l_1 sintheta_1 + l_2 sintheta_2 \ny_1 = - l_1 costheta_1 \ny_2 = -l_1 costheta_1 - l_2 costheta_2 \nendalign*","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"In terms of the generalized coordinates theta_i, the Lagrangian reads","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"beginalign*\nL (theta_1 theta_2 dottheta_1 dottheta_2)\n = frac12 (m_1 + m_2) l_1^2 dottheta_1^2 \n + frac12 m_2 l_2^2 dottheta_2^2\n + m_2 l_1 l_2 dottheta_1 dottheta_2 cos(theta_1 - theta_2) \n + g (m_1 + m_2) l_1 costheta_1\n + g m_2 l_2 costheta_2 \nendalign*","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"The canonical conjugate momenta p_i are obtained from the Lagrangian as","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"beginalign*\np_1 = fracpartial Lpartial dottheta_1 = (m_1 + m_2) l_1^2 dottheta_1 + m_2 l_1 l_2 dottheta_2 cos(theta_1 - theta_2) \np_2 = fracpartial Lpartial dottheta_2 = m_2 l_2^2 dottheta_2 + m_2 l_1 l_2 dottheta_1 cos(theta_1 - theta_2) \nendalign*","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"After solving these relations for the generalized velocities dottheta_i,","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"beginalign*\ndottheta_1 = fracl_2 p_theta_1 - l_1 p_theta_2 cos(theta_1 - theta_2)l_1^2 l_2 left m_1 + m_2 sin^2(theta_1 - theta_2) right \ndottheta_2 = frac(m_1 + m_2) l_1 p_theta_2 - m_2 l_2 p_theta_1 cos(theta_1 - theta_2)m_2 l_1 l_2^2 left m_1 + m_2 sin^2 (theta_1 - theta_2) right \nendalign*","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"the Hamiltonian can be obtained via the Legendre transform,","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"H = sum_i=1^2 dottheta_i p_i - L ","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"as","category":"page"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"beginalign*\nH = fracm_2 l_2^2 p^2_theta_1 + (m_1 + m_2) l_1^2 p^2_theta_2 - 2 m_2 l_1 l_2 p_theta_1 p_theta_2 cos(theta_1 - theta_2)2 m_2 l_1^2 l_2^2 left m_1 + m_2 sin^2(theta_1 - theta_2) right \n qquadqquad vphantomfracll - g (m_1 + m_2) l_1 costheta_1 - g m_2 l_2 costheta_2 \nendalign*","category":"page"},{"location":"double_pendulum/#Library-functions","page":"Double Pendulum","title":"Library functions","text":"","category":"section"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"GeometricProblems.DoublePendulum","category":"page"},{"location":"double_pendulum/#GeometricProblems.DoublePendulum","page":"Double Pendulum","title":"GeometricProblems.DoublePendulum","text":"DoublePendulum\n\nThe DoublePendulum module provides functions hodeproblem and lodeproblem each returning a Hamiltonian or Lagrangian problem, respectively, to be solved in the GeometricIntegrators.jl ecosystem. The actual code is generated with EulerLagrange.jl.\n\nThe double pendulum consists of two pendula, one attached to the origin at (xy) = (00), and the second attached to the first. Each pendulum consists of a point mass m_i attached to a massless rod of length l_i with i in (12). The dynamics of the system is described in terms of the angles theta_i between the rods l_i and the vertical axis y. All motion is assumed to be frictionless.\n\nSystem parameters:\n\nl₁: length of rod 1\nl₂: length of rod 2\nm₁: mass of pendulum 1\nm₂: mass of pendulum 2\ng: gravitational constant\n\n\n\n\n\n","category":"module"},{"location":"double_pendulum/","page":"Double Pendulum","title":"Double Pendulum","text":"Modules = [GeometricProblems.DoublePendulum]\nOrder = [:constant, :type, :macro, :function]","category":"page"},{"location":"double_pendulum/#GeometricProblems.DoublePendulum.hodeproblem","page":"Double Pendulum","title":"GeometricProblems.DoublePendulum.hodeproblem","text":"Hamiltonian problem for the double pendulum\n\nConstructor with default arguments:\n\nhodeproblem(\n q₀ = [π/4, π/2],\n p₀ = [3.3321622036187746, 7.0685834705770345];\n tspan = (0.0, 10.0),\n tstep = 0.01,\n params = (l₁ = 2.0, l₂ = 3.0, m₁ = 1.0, m₂ = 2.0, g = 9.80665)\n)\n\n\n\n\n\n","category":"function"},{"location":"double_pendulum/#GeometricProblems.DoublePendulum.lodeproblem","page":"Double Pendulum","title":"GeometricProblems.DoublePendulum.lodeproblem","text":"Lagrangian problem for the double pendulum\n\nConstructor with default arguments:\n\nlodeproblem(\n q₀ = [π/4, π/2],\n p₀ = [3.3321622036187746, 7.0685834705770345];\n tspan = (0.0, 10.0),\n tstep = 0.01,\n params = (l₁ = 2.0, l₂ = 3.0, m₁ = 1.0, m₂ = 2.0, g = 9.80665)\n)\n\n\n\n\n\n","category":"function"}]
+}
diff --git a/v0.6.7/siteinfo.js b/v0.6.7/siteinfo.js
new file mode 100644
index 0000000..f1d9ce8
--- /dev/null
+++ b/v0.6.7/siteinfo.js
@@ -0,0 +1 @@
+var DOCUMENTER_CURRENT_VERSION = "v0.6.7";
diff --git a/v0.6.7/toda_animation.mp4 b/v0.6.7/toda_animation.mp4
new file mode 100644
index 0000000..f5c5dfd
Binary files /dev/null and b/v0.6.7/toda_animation.mp4 differ
diff --git a/v0.6.7/toda_lattice/index.html b/v0.6.7/toda_lattice/index.html
new file mode 100644
index 0000000..116c8ed
--- /dev/null
+++ b/v0.6.7/toda_lattice/index.html
@@ -0,0 +1,23 @@
+
+Toda Lattice · GeometricProblems.jl
The Toda lattice is a prime example of an completely-integrable system, i.e. a Hamiltonian system evolving in $\mathbb{R}^{2n}$ that has $n$ Poisson-commuting invariants of motion (see [3]). It is named after Morikazu Toda who used it to model a one-dimensional crystal [5].
The Hamiltonian of the Toda lattice takes the following form:
As we can see the thin pulse separates into two smaller pulses an they start traveling in opposite directions until they meet again at time $t\approx120$. But it is important to note that the right peak at time $120$ is below the one at time $0$. This is not a numerical artifact but a feature of the Toda lattice!
The Toda lattice is a model for a one-dimensional crystal named after its discoverer Morikazu Toda [5].
It is a prime example of a non-trivial completely integrable system.
The only system parameters are the number of points$N$ in the periodic lattice and $\alpha$ which adjusts the strength of the interactions in the lattice.