diff --git a/latest/.documenter-siteinfo.json b/latest/.documenter-siteinfo.json index 076318e..4f7aa81 100644 --- a/latest/.documenter-siteinfo.json +++ b/latest/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-12T08:47:51","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-16T15:41:13","documenter_version":"1.4.0"}} \ No newline at end of file diff --git a/latest/caveats/index.html b/latest/caveats/index.html index f9a32eb..f0b2592 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 d99948e..5bca09c 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 71382df..b92ba9d 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 ecf6d88..053ea4b 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 551d0cf..b3a38dc 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 b833e45..770b817 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 c39836e..4bab1db 100644 --- a/latest/objects.inv +++ b/latest/objects.inv @@ -1,6 +1,6 @@ # Sphinx inventory version 2 # Project: EulerLagrange.jl -# Version: 0.3.7 +# Version: 0.3.8 # The remainder of this file is compressed using zlib. xRN0+VZT DWu`p"$ˉL 7k33;Yms"w 5ʕ$ޱԆh8UV `38`3"zRNY' 㔪/BN7`>;xmG!