From 8c88723f4c0bbcac1df9249d2cc1ce000b548876 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 12 Apr 2024 08:47:56 +0000 Subject: [PATCH] build based on c71d594 --- latest/.documenter-siteinfo.json | 2 +- latest/caveats/index.html | 2 +- latest/degenerate_lagrangian/index.html | 2 +- latest/hamiltonian/index.html | 2 +- latest/index.html | 2 +- latest/lagrangian/index.html | 2 +- latest/library/index.html | 2 +- latest/objects.inv | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/latest/.documenter-siteinfo.json b/latest/.documenter-siteinfo.json index b2de7ea..076318e 100644 --- a/latest/.documenter-siteinfo.json +++ b/latest/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-21T15:48:56","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-12T08:47:51","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/latest/caveats/index.html b/latest/caveats/index.html index 4819b29..f9a32eb 100644 --- a/latest/caveats/index.html +++ b/latest/caveats/index.html @@ -1,2 +1,2 @@ -Caveats · EulerLagrange.jl

Caveats

In the following, we sketch some caveats and limitations of the package that may be useful to be aware of.

Simplicity

The Hamiltonian or Lagrangian should be provided in a form as simple as possible to aid the symbolic algebra system. Many expressions lead to involved symbolic expressions that can be hard to differentiate and lead to errors in the code generation pipeline.

For example, scalar products should be specified as x ⋅ x and not as x' * x. As the transposition also entails complex conjugation, the resulting symbolic expression is substantially more complicated, which can cause problems down the line.

Another potential problem is an array operation, like the dot product, that is preceded by scalar multiplication like in α * x ⋅ x. This can cause problems due to the order of operations, which is (α * x) ⋅ x, where first x is rescaled by α, implying the creation of a temporary array holding the result, which is then contracted with x. This should rather be expressed as x ⋅ x * α or α * (x ⋅ x), where the scalar product is computed first and then the result, which now is just a scalar, is multiplied by α.

Parameters

The handling of parameters requires some massaging of the code generated by Symbolics.jl. To facilitate this, symbolic parameters get attached to their names.

Initial Guesses

For some problems, in particular regular Lagrangian systems, it is in general not straightforward to automatically compute a first-order system of equations to be used as an initial guess for x in GeometricIntegrators. To circumvent this issue, it is possible to manually specify a function that computes the vector field to the LODE and LODEProblem constructors via the keyword. It is also possible to provide a vector field for the initial guess of p via the keyword, although this is usually not necessary as can be derived automatically. The same keyword arguments exist for the respective constructors of degenerate Lagrangian systems, although also here the vector fields are provided by default.

+Caveats · EulerLagrange.jl

Caveats

In the following, we sketch some caveats and limitations of the package that may be useful to be aware of.

Simplicity

The Hamiltonian or Lagrangian should be provided in a form as simple as possible to aid the symbolic algebra system. Many expressions lead to involved symbolic expressions that can be hard to differentiate and lead to errors in the code generation pipeline.

For example, scalar products should be specified as x ⋅ x and not as x' * x. As the transposition also entails complex conjugation, the resulting symbolic expression is substantially more complicated, which can cause problems down the line.

Another potential problem is an array operation, like the dot product, that is preceded by scalar multiplication like in α * x ⋅ x. This can cause problems due to the order of operations, which is (α * x) ⋅ x, where first x is rescaled by α, implying the creation of a temporary array holding the result, which is then contracted with x. This should rather be expressed as x ⋅ x * α or α * (x ⋅ x), where the scalar product is computed first and then the result, which now is just a scalar, is multiplied by α.

Parameters

The handling of parameters requires some massaging of the code generated by Symbolics.jl. To facilitate this, symbolic parameters get attached to their names.

Initial Guesses

For some problems, in particular regular Lagrangian systems, it is in general not straightforward to automatically compute a first-order system of equations to be used as an initial guess for x in GeometricIntegrators. To circumvent this issue, it is possible to manually specify a function that computes the vector field to the LODE and LODEProblem constructors via the keyword. It is also possible to provide a vector field for the initial guess of p via the keyword, although this is usually not necessary as can be derived automatically. The same keyword arguments exist for the respective constructors of degenerate Lagrangian systems, although also here the vector fields are provided by default.

diff --git a/latest/degenerate_lagrangian/index.html b/latest/degenerate_lagrangian/index.html index c9383d1..d99948e 100644 --- a/latest/degenerate_lagrangian/index.html +++ b/latest/degenerate_lagrangian/index.html @@ -99,4 +99,4 @@ using CairoMakie fig = lines(parent(sol.q[:,1]), parent(sol.q[:,2]); axis = (; xlabel = "x₁", ylabel = "x₂", title = "Lotka-Volterra system in 2d"), - figure = (; size = (800,600), fontsize = 22))

+ figure = (; size = (800,600), fontsize = 22))

diff --git a/latest/hamiltonian/index.html b/latest/hamiltonian/index.html index b65b1a2..71382df 100644 --- a/latest/hamiltonian/index.html +++ b/latest/hamiltonian/index.html @@ -68,4 +68,4 @@ using CairoMakie fig = lines(parent(sol.q[:,1]), parent(sol.p[:,1]); axis = (; xlabel = "q₁", ylabel = "p₁", title = "Harmonic Oscillator"), - figure = (; size = (800,600), fontsize = 22))

+ figure = (; size = (800,600), fontsize = 22))

diff --git a/latest/index.html b/latest/index.html index 2e45bc0..ecf6d88 100644 --- a/latest/index.html +++ b/latest/index.html @@ -5,4 +5,4 @@ year={2023}, howpublished={\url{https://github.com/JuliaGNI/EulerLagrange.jl}}, doi={10.5281/zenodo.8241048} -} +} diff --git a/latest/lagrangian/index.html b/latest/lagrangian/index.html index d112ff2..551d0cf 100644 --- a/latest/lagrangian/index.html +++ b/latest/lagrangian/index.html @@ -176,4 +176,4 @@ fig = lines(parent(sol.q[:,1]), parent(sol.q[:,2]); axis = (; xlabel = "x₁", ylabel = "x₂", title = "Particle moving in a square potential"), figure = (; size = (800,600), fontsize = 22))
┌ Warning: q₀ and q₁ in initial guess are identical!
-@ GeometricIntegrators.Integrators ~/.julia/packages/GeometricIntegrators/yNYjW/src/initial_guess/hermite.jl:45

+@ GeometricIntegrators.Integrators ~/.julia/packages/GeometricIntegrators/yNYjW/src/initial_guess/hermite.jl:45

diff --git a/latest/library/index.html b/latest/library/index.html index c15e130..b833e45 100644 --- a/latest/library/index.html +++ b/latest/library/index.html @@ -1,2 +1,2 @@ -Library · EulerLagrange.jl
+Library · EulerLagrange.jl
diff --git a/latest/objects.inv b/latest/objects.inv index 23b114d..c39836e 100644 --- a/latest/objects.inv +++ b/latest/objects.inv @@ -1,6 +1,6 @@ # Sphinx inventory version 2 # Project: EulerLagrange.jl -# Version: 0.3.6 +# Version: 0.3.7 # The remainder of this file is compressed using zlib. xRN0+VZT DWu`p"$ˉL 7k33;Yms"w 5ʕ$ޱԆh8UV `38`3"zRNY' 㔪/BN7`>;xmG!