From 7f6b5b4be465791a3211245746a1e8a8d74cdc26 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 12 Dec 2024 17:11:17 +0000 Subject: [PATCH] build based on 651e8ad --- latest/.documenter-siteinfo.json | 2 +- .../abc_flow/{64aa6f7b.svg => 2cfadc35.svg} | 90 ++++++------- latest/abc_flow/index.html | 4 +- latest/coupled_harmonic_oscillator/index.html | 6 +- latest/diagnostics/index.html | 2 +- latest/double_pendulum/index.html | 6 +- latest/harmonic_oscillator/index.html | 2 +- latest/henon_heiles/index.html | 2 +- latest/index.html | 2 +- latest/initial_condition/index.html | 2 +- latest/inner_solar_system/index.html | 2 +- latest/kepler_problem/index.html | 2 +- .../{0161e543.svg => 738327c6.svg} | 84 ++++++------- latest/linear_wave/index.html | 2 +- latest/lorenz_attractor/index.html | 2 +- latest/lotka_volterra_2d.svg | 118 +++++++++--------- latest/lotka_volterra_2d/index.html | 8 +- latest/lotka_volterra_3d/index.html | 2 +- latest/lotka_volterra_4d/index.html | 2 +- latest/massless_charged_particle.svg | 110 ++++++++-------- latest/massless_charged_particle/index.html | 2 +- latest/nonlinear_oscillators/index.html | 2 +- latest/outer_solar_system/index.html | 2 +- latest/pendulum/index.html | 2 +- latest/point_vortices/index.html | 2 +- latest/releasenotes/index.html | 2 +- latest/rigid_body/index.html | 2 +- latest/toda_lattice/index.html | 2 +- 28 files changed, 233 insertions(+), 233 deletions(-) rename latest/abc_flow/{64aa6f7b.svg => 2cfadc35.svg} (93%) rename latest/linear_wave/{0161e543.svg => 738327c6.svg} (89%) diff --git a/latest/.documenter-siteinfo.json b/latest/.documenter-siteinfo.json index ca83276..2123b8f 100644 --- a/latest/.documenter-siteinfo.json +++ b/latest/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-12T16:47:47","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-12T17:11:11","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/latest/abc_flow/64aa6f7b.svg b/latest/abc_flow/2cfadc35.svg similarity index 93% rename from latest/abc_flow/64aa6f7b.svg rename to latest/abc_flow/2cfadc35.svg index 990daca..4d0c705 100644 --- a/latest/abc_flow/64aa6f7b.svg +++ b/latest/abc_flow/2cfadc35.svg @@ -1,59 +1,59 @@ - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/latest/abc_flow/index.html b/latest/abc_flow/index.html index d264acf..e0c8404 100644 --- a/latest/abc_flow/index.html +++ b/latest/abc_flow/index.html @@ -9,8 +9,8 @@ for solution in ensemble_solution plot!(p, solution.q[:, 1], solution.q[:, 2], solution.q[:, 3]) end -pExample block output

Library functions

GeometricProblems.ABCFlowModule

ABC Flow

\[\begin{aligned} +pExample block output

Library functions

GeometricProblems.ABCFlowModule

ABC Flow

\[\begin{aligned} \dot{x} = A\sin(z) + C\cos(y) \\ \dot{y} = B\sin(x) + A\cos(z) \\ \dot{z} = C\sin(y) + B\cos(x) -\end{aligned}\]

source
[1]
E. Hairer, C. Lubich and G. Wanner. Geometric Numerical integration: structure-preserving algorithms for ordinary differential equations (Springer, Berlin, 2006).
+\end{aligned}\]

source
[1]
E. Hairer, C. Lubich and G. Wanner. Geometric Numerical integration: structure-preserving algorithms for ordinary differential equations (Springer, Berlin, 2006).
diff --git a/latest/coupled_harmonic_oscillator/index.html b/latest/coupled_harmonic_oscillator/index.html index fd0cdbd..6824114 100644 --- a/latest/coupled_harmonic_oscillator/index.html +++ b/latest/coupled_harmonic_oscillator/index.html @@ -1,14 +1,14 @@ -Coupled Harmonic Oscillator · GeometricProblems.jl

Coupled Harmonic Oscillator

This system describes two harmonic oscillators that are coupled nonlinearly.

The following shows the $q_1$ component of the system for different values of $k$:

Library functions

GeometricProblems.CoupledHarmonicOscillatorModule
CoupledHarmonicOscillator

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:

\[H(q_1, q_2, p_1, p_2) = \frac{q_1^2}{2m_1} + \frac{q_2^2}{2m_2} + k_1\frac{q_1^2}{2} + k_2\frac{q_2^2}{2} + k\sigma(q_1)\frac{(q_2 - q_1)^2}{2},\]

where $\sigma(x) = 1 / (1 + e^{-x})$ is the sigmoid activation function.

System parameters:

  • k₁: spring constant of mass 1
  • k₂: spring constant of mass 2
  • m₁: mass 1
  • m₂: mass 2
  • k: coupling strength between the two masses.
source
GeometricProblems.CoupledHarmonicOscillator.hodeproblemFunction
Hamiltonian problem for coupled oscillator

Constructor with default arguments:

hodeproblem(
+Coupled Harmonic Oscillator · GeometricProblems.jl

Coupled Harmonic Oscillator

This system describes two harmonic oscillators that are coupled nonlinearly.

The following shows the $q_1$ component of the system for different values of $k$:

Library functions

GeometricProblems.CoupledHarmonicOscillatorModule
CoupledHarmonicOscillator

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:

\[H(q_1, q_2, p_1, p_2) = \frac{q_1^2}{2m_1} + \frac{q_2^2}{2m_2} + k_1\frac{q_1^2}{2} + k_2\frac{q_2^2}{2} + k\sigma(q_1)\frac{(q_2 - q_1)^2}{2},\]

where $\sigma(x) = 1 / (1 + e^{-x})$ is the sigmoid activation function.

System parameters:

  • k₁: spring constant of mass 1
  • k₂: spring constant of mass 2
  • m₁: mass 1
  • m₂: mass 2
  • k: coupling strength between the two masses.
source
GeometricProblems.CoupledHarmonicOscillator.hodeproblemFunction
Hamiltonian problem for coupled oscillator

Constructor with default arguments:

hodeproblem(
     q₀ = [1.0, 0.0],
     p₀ = [2.0, 0.0];
     tspan = (0.0, 100.0),
     tstep = 0.4,
     parameters = (m₁ = 2.0, m₂ = 1.0, k₁ = 1.5, k₂ = 0.3, k = 1.0)
-)
source
GeometricProblems.CoupledHarmonicOscillator.lodeproblemFunction
Lagrangian problem for the coupled oscillator

Constructor with default arguments:

lodeproblem(
     q₀ = [1.0, 0.0],
     p₀ = [2.0, 0.0];
     tspan = (0.0, 100.0),
     tstep = 0.4,
     parameters = (m₁ = 2.0, m₂ = 1.0, k₁ = 1.5, k₂ = 0.3, k = 1.0)
-)
source
+)
source
diff --git a/latest/diagnostics/index.html b/latest/diagnostics/index.html index fc5c992..f72f63a 100644 --- a/latest/diagnostics/index.html +++ b/latest/diagnostics/index.html @@ -1,2 +1,2 @@ -Diagnostics · GeometricProblems.jl

Diagnostics

GeometricProblems.Diagnostics.compute_error_driftMethod

Computes the drift in an invariant error.

Arguments: (t::TimeSeries, invariant_error::DataSeries{T,1}, interval_length=100)

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.

source
GeometricProblems.Diagnostics.compute_invariantMethod

Compute an invariant for the solution of a partitioned ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.

Returns a ScalarDataSeries holding the time series of the invariant.

source
GeometricProblems.Diagnostics.compute_invariantMethod

Compute an invariant for the solution of an ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.

Returns a ScalarDataSeries holding the time series of the invariant.

source
GeometricProblems.Diagnostics.compute_invariant_errorMethod

Compute the relative error of an invariant for the solution of an ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.

Returns a tuple of two 1d DataSeries holding the time series of the invariant and the relativ error, respectively.

source
GeometricProblems.Diagnostics.compute_invariant_errorMethod

Compute the relative error of an invariant for the solution of a partitioned ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.

Returns a tuple of two ScalarDataSeries holding the time series of the invariant and the relativ error, respectively.

source
GeometricProblems.Diagnostics.compute_momentum_errorMethod

Computes the difference of the momentum and the one-form of an implicit ODE or DAE system.

Arguments: (p::DataSeries{DT}, ϑ::DataSeries{DT})

Returns a DataSeries similar to p holding the time series of the difference between p and ϑ.

source
GeometricProblems.Diagnostics.compute_one_formMethod

Compute the one-form (symplectic potential) for the solution of a Lagrangian system.

Arguments: (t::TimeSeries, q::DataSeries, one_form::Base.Callable)

The one_form function needs to take three arguments (t,q,k) where k is the index of the one-form component.

Returns a DataSeries similar to q holding the time series of the one-form.

source
+Diagnostics · GeometricProblems.jl

Diagnostics

GeometricProblems.Diagnostics.compute_error_driftMethod

Computes the drift in an invariant error.

Arguments: (t::TimeSeries, invariant_error::DataSeries{T,1}, interval_length=100)

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.

source
GeometricProblems.Diagnostics.compute_invariantMethod

Compute an invariant for the solution of a partitioned ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.

Returns a ScalarDataSeries holding the time series of the invariant.

source
GeometricProblems.Diagnostics.compute_invariantMethod

Compute an invariant for the solution of an ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.

Returns a ScalarDataSeries holding the time series of the invariant.

source
GeometricProblems.Diagnostics.compute_invariant_errorMethod

Compute the relative error of an invariant for the solution of an ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.

Returns a tuple of two 1d DataSeries holding the time series of the invariant and the relativ error, respectively.

source
GeometricProblems.Diagnostics.compute_invariant_errorMethod

Compute the relative error of an invariant for the solution of a partitioned ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Base.Callable)

The invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.

Returns a tuple of two ScalarDataSeries holding the time series of the invariant and the relativ error, respectively.

source
GeometricProblems.Diagnostics.compute_momentum_errorMethod

Computes the difference of the momentum and the one-form of an implicit ODE or DAE system.

Arguments: (p::DataSeries{DT}, ϑ::DataSeries{DT})

Returns a DataSeries similar to p holding the time series of the difference between p and ϑ.

source
GeometricProblems.Diagnostics.compute_one_formMethod

Compute the one-form (symplectic potential) for the solution of a Lagrangian system.

Arguments: (t::TimeSeries, q::DataSeries, one_form::Base.Callable)

The one_form function needs to take three arguments (t,q,k) where k is the index of the one-form component.

Returns a DataSeries similar to q holding the time series of the one-form.

source
diff --git a/latest/double_pendulum/index.html b/latest/double_pendulum/index.html index 5611bb4..e28e3bf 100644 --- a/latest/double_pendulum/index.html +++ b/latest/double_pendulum/index.html @@ -20,16 +20,16 @@ \end{align*}\]

the Hamiltonian can be obtained via the Legendre transform,

\[H = \sum_{i=1}^2 \dot{\theta}_i p_i - L ,\]

as

\[\begin{align*} H &= \frac{m_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] } \\ & \qquad\qquad \vphantom{\frac{l}{l}} - g (m_1 + m_2) l_1 \cos\theta_1 - g m_2 l_2 \cos\theta_2 . -\end{align*}\]

Library functions

GeometricProblems.DoublePendulumModule
DoublePendulum

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.

System parameters:

  • l₁: length of rod 1
  • l₂: length of rod 2
  • m₁: mass of pendulum 1
  • m₂: mass of pendulum 2
  • g: gravitational constant
source
GeometricProblems.DoublePendulum.hodeproblemFunction
Hamiltonian problem for the double pendulum

Constructor with default arguments:

hodeproblem(
+\end{align*}\]

Library functions

GeometricProblems.DoublePendulumModule
DoublePendulum

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.

System parameters:

  • l₁: length of rod 1
  • l₂: length of rod 2
  • m₁: mass of pendulum 1
  • m₂: mass of pendulum 2
  • g: gravitational constant
source
GeometricProblems.DoublePendulum.hodeproblemFunction
Hamiltonian problem for the double pendulum

Constructor with default arguments:

hodeproblem(
     q₀ = [π/4, π/2],
     p₀ = [3.3321622036187746, 7.0685834705770345];
     tspan = (0.0, 10.0),
     tstep = 0.01,
     params = (l₁ = 2.0, l₂ = 3.0, m₁ = 1.0, m₂ = 2.0, g = 9.80665)
-)
source
GeometricProblems.DoublePendulum.lodeproblemFunction
Lagrangian problem for the double pendulum

Constructor with default arguments:

lodeproblem(
     q₀ = [π/4, π/2],
     p₀ = [3.3321622036187746, 7.0685834705770345];
     tspan = (0.0, 10.0),
     tstep = 0.01,
     params = (l₁ = 2.0, l₂ = 3.0, m₁ = 1.0, m₂ = 2.0, g = 9.80665)
-)
source
+)source diff --git a/latest/harmonic_oscillator/index.html b/latest/harmonic_oscillator/index.html index 6256f31..34eae57 100644 --- a/latest/harmonic_oscillator/index.html +++ b/latest/harmonic_oscillator/index.html @@ -1,2 +1,2 @@ -Harmonic Oscillator · GeometricProblems.jl +Harmonic Oscillator · GeometricProblems.jl diff --git a/latest/henon_heiles/index.html b/latest/henon_heiles/index.html index 8aa8627..a010817 100644 --- a/latest/henon_heiles/index.html +++ b/latest/henon_heiles/index.html @@ -1,2 +1,2 @@ -Hénon-Heiles System · GeometricProblems.jl +Hénon-Heiles System · GeometricProblems.jl diff --git a/latest/index.html b/latest/index.html index be33076..21e4e92 100644 --- a/latest/index.html +++ b/latest/index.html @@ -11,4 +11,4 @@ year={2020}, howpublished={\url{https://github.com/JuliaGNI/GeometricProblems.jl}}, doi={10.5281/zenodo.4285904} -}

Figure License

Copyright (c) Michael Kraus <michael.kraus@ipp.mpg.de>

All figures are licensed under the Creative Commons CC BY-NC-SA 4.0 License.

Software License

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.

+}

Figure License

Copyright (c) Michael Kraus <michael.kraus@ipp.mpg.de>

All figures are licensed under the Creative Commons CC BY-NC-SA 4.0 License.

Software License

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.

diff --git a/latest/initial_condition/index.html b/latest/initial_condition/index.html index f77091d..1fd45d1 100644 --- a/latest/initial_condition/index.html +++ b/latest/initial_condition/index.html @@ -16,4 +16,4 @@ plot!(p, Ω, ics[3].q, label = L"\mu"*"="*string(μ_vals[3])) png(p, "ics_plot") -nothing

Plot of initial conditions for various values of mu.

+nothing

Plot of initial conditions for various values of mu.

diff --git a/latest/inner_solar_system/index.html b/latest/inner_solar_system/index.html index d42e36d..4dcc736 100644 --- a/latest/inner_solar_system/index.html +++ b/latest/inner_solar_system/index.html @@ -1,2 +1,2 @@ -Inner Solar System · GeometricProblems.jl +Inner Solar System · GeometricProblems.jl diff --git a/latest/kepler_problem/index.html b/latest/kepler_problem/index.html index fbcd5e3..91f7ec8 100644 --- a/latest/kepler_problem/index.html +++ b/latest/kepler_problem/index.html @@ -1,2 +1,2 @@ -Kepler Problem · GeometricProblems.jl +Kepler Problem · GeometricProblems.jl diff --git a/latest/linear_wave/0161e543.svg b/latest/linear_wave/738327c6.svg similarity index 89% rename from latest/linear_wave/0161e543.svg rename to latest/linear_wave/738327c6.svg index 3137426..057332e 100644 --- a/latest/linear_wave/0161e543.svg +++ b/latest/linear_wave/738327c6.svg @@ -1,56 +1,56 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/latest/linear_wave/index.html b/latest/linear_wave/index.html index 6577355..c77eb55 100644 --- a/latest/linear_wave/index.html +++ b/latest/linear_wave/index.html @@ -15,4 +15,4 @@ plot!(p, lw.compute_domain(lw.Ñ + 2), sol.q[time_step, :], label = "t = "*string(round(sol.t[time_step]; digits = 2))) end -pExample block output

As we can see the thin pulse travels in one direction.

Library functions

GeometricProblems.LinearWaveModule

The discretized version of the 1d linear wave equation.

It is a prime example of a non-trivial completely integrable system.

The only system parameters are the number of points $N$ for which the system is discretized and $\mu$.

source
[2]
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:
  • 2The precise shape of $q_0(\cdot;\cdot)$ is described in the chapter on initial conditions.
+pExample block output

As we can see the thin pulse travels in one direction.

Library functions

GeometricProblems.LinearWaveModule

The discretized version of the 1d linear wave equation.

It is a prime example of a non-trivial completely integrable system.

The only system parameters are the number of points $N$ for which the system is discretized and $\mu$.

source
[2]
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:
  • 2The precise shape of $q_0(\cdot;\cdot)$ is described in the chapter on initial conditions.
diff --git a/latest/lorenz_attractor/index.html b/latest/lorenz_attractor/index.html index cc81d9a..dd92205 100644 --- a/latest/lorenz_attractor/index.html +++ b/latest/lorenz_attractor/index.html @@ -1,2 +1,2 @@ -Lorenz Attractor · GeometricProblems.jl +Lorenz Attractor · GeometricProblems.jl diff --git a/latest/lotka_volterra_2d.svg b/latest/lotka_volterra_2d.svg index 4bfc128..375eb43 100644 --- a/latest/lotka_volterra_2d.svg +++ b/latest/lotka_volterra_2d.svg @@ -1,78 +1,78 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/latest/lotka_volterra_2d/index.html b/latest/lotka_volterra_2d/index.html index 4fcb4c5..15f5a83 100644 --- a/latest/lotka_volterra_2d/index.html +++ b/latest/lotka_volterra_2d/index.html @@ -8,13 +8,13 @@ H (q) = a_1 \, q_1 + a_2 \, q_2 + b_1 \, \log q_1 + b_2 \, \log q_2 .\]

Sub-models

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.

GeometricProblems.LotkaVolterra2dModule

Lotka-Volterra model in 2D

\[\begin{aligned} L (q, \dot{q}) &= \bigg( q_2 + \frac{\log q_2}{q_1} \bigg) \, \dot{q_1} + q_1 \, \dot{q_2} - H(q) , \\ H(q) &= a_1 \, q_1 + a_2 \, q_2 + b_1 \, \log q_1 + b_2 \, \log q_2 -\end{aligned}\]

source
GeometricProblems.LotkaVolterra2dSymmetricModule

Lotka-Volterra model in 2D with symmetric Lagrangian

\[\begin{aligned} L (q, \dot{q}) &= \frac{1}{2} \frac{\log q_2}{q_1} \, \dot{q_1} - \frac{1}{2} \frac{\log q_1}{q_2} \, \dot{q_2} - H(q) , \\ H(q) &= a_1 \, q_1 + a_2 \, q_2 + b_1 \, \log q_1 + b_2 \, \log q_2 -\end{aligned}\]

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.

source
GeometricProblems.LotkaVolterra2dSingularModule

Lotka-Volterra model in 2D with "singular" Lagrangian

\[\begin{aligned} +\end{aligned}\]

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.

source
GeometricProblems.LotkaVolterra2dSingularModule

Lotka-Volterra model in 2D with "singular" Lagrangian

\[\begin{aligned} L (q, \dot{q}) &= \frac{\log q_2}{q_1} \, \dot{q_1} - H(q) , \\ H(q) &= a_1 \, q_1 + a_2 \, q_2 + b_1 \, \log q_1 + b_2 \, \log q_2 -\end{aligned}\]

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.

source
GeometricProblems.LotkaVolterra2dGaugeModule

Lotka-Volterra model in 2D with symmetric Lagrangian with gauge term

\[\begin{aligned} +\end{aligned}\]

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.

source
GeometricProblems.LotkaVolterra2dGaugeModule

Lotka-Volterra model in 2D with symmetric Lagrangian with gauge term

\[\begin{aligned} L (q, \dot{q}) &= \bigg( q_2 + \frac{1}{2} \frac{\log q_2}{q_1} \bigg) \, \dot{q_1} + \bigg( q_1 - \frac{1}{2} \frac{\log q_1}{q_2} \bigg) \, \dot{q_2} - H(q) , \\ H(q) &= a_1 \, q_1 + a_2 \, q_2 + b_1 \, \log q_1 + b_2 \, \log q_2 -\end{aligned}\]

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.

source

User Functions

Plotting Functions

GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!Method

Plots the solution of a 2D Lotka-Volterra model together with the energy error.

Arguments:

  • sol <: GeometricSolution
  • equ <: GeometricProblem

Keyword aguments:

  • nplot=1: plot every nplotth time step
  • xlims=:auto: xlims for solution plot
  • ylims=:auto: ylims for solution plot
  • latex=true: use LaTeX guides
source
GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!Method

Plots the solution of a 2D Lotka-Volterra model together with the energy error.

Arguments:

  • sol <: GeometricSolution
  • equ <: GeometricProblem

Keyword aguments:

  • nplot=1: plot every nplotth time step
  • xlims=:auto: xlims for solution plot
  • ylims=:auto: ylims for solution plot
  • latex=true: use LaTeX guides
source
GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2dMethod

Plots the solution of a 2D Lotka-Volterra model together with the energy error.

Arguments:

  • sol <: GeometricSolution
  • equ <: GeometricProblem

Keyword aguments:

  • nplot=1: plot every nplotth time step
  • xlims=:auto: xlims for solution plot
  • ylims=:auto: ylims for solution plot
  • latex=true: use LaTeX guides
source
+\end{aligned}\]

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.

source

User Functions

Plotting Functions

GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!Method

Plots the solution of a 2D Lotka-Volterra model together with the energy error.

Arguments:

  • sol <: GeometricSolution
  • equ <: GeometricProblem

Keyword aguments:

  • nplot=1: plot every nplotth time step
  • xlims=:auto: xlims for solution plot
  • ylims=:auto: ylims for solution plot
  • latex=true: use LaTeX guides
source
GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2d!Method

Plots the solution of a 2D Lotka-Volterra model together with the energy error.

Arguments:

  • sol <: GeometricSolution
  • equ <: GeometricProblem

Keyword aguments:

  • nplot=1: plot every nplotth time step
  • xlims=:auto: xlims for solution plot
  • ylims=:auto: ylims for solution plot
  • latex=true: use LaTeX guides
source
GeometricProblems.LotkaVolterra2dPlots.plot_lotka_volterra_2dMethod

Plots the solution of a 2D Lotka-Volterra model together with the energy error.

Arguments:

  • sol <: GeometricSolution
  • equ <: GeometricProblem

Keyword aguments:

  • nplot=1: plot every nplotth time step
  • xlims=:auto: xlims for solution plot
  • ylims=:auto: ylims for solution plot
  • latex=true: use LaTeX guides
source
diff --git a/latest/lotka_volterra_3d/index.html b/latest/lotka_volterra_3d/index.html index 25c6d1f..b558bc6 100644 --- a/latest/lotka_volterra_3d/index.html +++ b/latest/lotka_volterra_3d/index.html @@ -7,4 +7,4 @@ 0 & - q_{1} q_{2} & \hphantom{-} q_{1} q_{3} \\ \hphantom{-} q_{1} q_{2} & 0 & - q_{2} q_{3} \\ - q_{1} q_{3} & \hphantom{-} q_{2} q_{3} & 0 \\ -\end{pmatrix} ,\]

and Hamiltonian

\[H(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} .\]

References:

  • 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.

source +\end{pmatrix} ,\]

and Hamiltonian

\[H(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} .\]

References:

  • 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.

source diff --git a/latest/lotka_volterra_4d/index.html b/latest/lotka_volterra_4d/index.html index 82549f1..7f31a84 100644 --- a/latest/lotka_volterra_4d/index.html +++ b/latest/lotka_volterra_4d/index.html @@ -1,2 +1,2 @@ -Lotka-Volterra 4d · GeometricProblems.jl +Lotka-Volterra 4d · GeometricProblems.jl diff --git a/latest/massless_charged_particle.svg b/latest/massless_charged_particle.svg index cca2a36..dc71a67 100644 --- a/latest/massless_charged_particle.svg +++ b/latest/massless_charged_particle.svg @@ -1,74 +1,74 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/latest/massless_charged_particle/index.html b/latest/massless_charged_particle/index.html index 2f1d087..5a4d443 100644 --- a/latest/massless_charged_particle/index.html +++ b/latest/massless_charged_particle/index.html @@ -8,4 +8,4 @@ \end{aligned}\]

The Hamiltonian form of the equations of motion reads

\[\dot{x} = \frac{1}{B(x)} \begin{pmatrix} \hphantom{-} 0 & + 1 \\ - 1 & \hphantom{+} 0 \\ -\end{pmatrix} \nabla \phi (x) .\]

source

+\end{pmatrix} \nabla \phi (x) .\]

source

diff --git a/latest/nonlinear_oscillators/index.html b/latest/nonlinear_oscillators/index.html index 97aef3c..2944cc9 100644 --- a/latest/nonlinear_oscillators/index.html +++ b/latest/nonlinear_oscillators/index.html @@ -1,2 +1,2 @@ -Nonlinear Oscillators · GeometricProblems.jl +Nonlinear Oscillators · GeometricProblems.jl diff --git a/latest/outer_solar_system/index.html b/latest/outer_solar_system/index.html index 0a5d604..2312b6c 100644 --- a/latest/outer_solar_system/index.html +++ b/latest/outer_solar_system/index.html @@ -1,2 +1,2 @@ -Outer Solar System · GeometricProblems.jl +Outer Solar System · GeometricProblems.jl diff --git a/latest/pendulum/index.html b/latest/pendulum/index.html index 6b4ac39..e3fb094 100644 --- a/latest/pendulum/index.html +++ b/latest/pendulum/index.html @@ -1,2 +1,2 @@ -Mathematical Pendulum · GeometricProblems.jl +Mathematical Pendulum · GeometricProblems.jl diff --git a/latest/point_vortices/index.html b/latest/point_vortices/index.html index f00b3f2..a7b724c 100644 --- a/latest/point_vortices/index.html +++ b/latest/point_vortices/index.html @@ -1,2 +1,2 @@ -Point Vortices · GeometricProblems.jl +Point Vortices · GeometricProblems.jl diff --git a/latest/releasenotes/index.html b/latest/releasenotes/index.html index 8180fb0..972553c 100644 --- a/latest/releasenotes/index.html +++ b/latest/releasenotes/index.html @@ -1,2 +1,2 @@ -Release Notes · GeometricProblems.jl

Release Notes

0.1.1

New Features

  • Poincaré invariants for Lotka-Volterra 2d model
  • More equation types for massless charged particle

Fixes

  • Fixes in general plot recipes

0.1.0

Initial release with equations for

  • Exponential Growth,
  • Lorenz Attractor in 3D,
  • Lotka-Volterra in 2D,
  • Lotka-Volterra in 3D,
  • Lotka-Volterra in 4D,
  • Massless Charged Particle,
  • Harmonic Oscillator,
  • Mathematical Pendulum,
  • Planar Point Vortices.
+Release Notes · GeometricProblems.jl

Release Notes

0.1.1

New Features

  • Poincaré invariants for Lotka-Volterra 2d model
  • More equation types for massless charged particle

Fixes

  • Fixes in general plot recipes

0.1.0

Initial release with equations for

  • Exponential Growth,
  • Lorenz Attractor in 3D,
  • Lotka-Volterra in 2D,
  • Lotka-Volterra in 3D,
  • Lotka-Volterra in 4D,
  • Massless Charged Particle,
  • Harmonic Oscillator,
  • Mathematical Pendulum,
  • Planar Point Vortices.
diff --git a/latest/rigid_body/index.html b/latest/rigid_body/index.html index 57cd7d2..1128df9 100644 --- a/latest/rigid_body/index.html +++ b/latest/rigid_body/index.html @@ -41,4 +41,4 @@ \dot{x} = Ayz \\ \dot{y} = Bxz \\ \dot{z} = Cxy -\end{aligned},\]

where $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.

The initial condition and the default parameters are taken from [4].

source
[4]
J. Bajārs. Locally-symplectic neural networks for learning volume-preserving dynamics. Journal of Computational Physics 476, 111911 (2023).
+\end{aligned},\]

where $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.

The initial condition and the default parameters are taken from [4].

source
[4]
J. Bajārs. Locally-symplectic neural networks for learning volume-preserving dynamics. Journal of Computational Physics 476, 111911 (2023).
diff --git a/latest/toda_lattice/index.html b/latest/toda_lattice/index.html index 8be0e45..8d627a4 100644 --- a/latest/toda_lattice/index.html +++ b/latest/toda_lattice/index.html @@ -20,4 +20,4 @@ ylims!(ax, 0., 1.) axislegend(ax; position = (1.01, 1.5), labelsize = 8) end -Docs.HTML("""<video mute autoplay loop controls src="toda_animation.mp4" />""")