Skip to content

Commit

Permalink
Disable computation of second-order vector field for Lagrangian systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
michakraus committed Apr 16, 2024
1 parent 04856f8 commit ef810d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lagrangian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct LagrangianSystem

equs_subs = substitute_lagrangian_variables(equs, x, ẋ, v)
equs_subs = merge(equs_subs, (
a = inv(equs_subs.M) * (equs_subs.f - equs_subs.N * V),
# a = inv(equs_subs.M) * (equs_subs.f - equs_subs.N * V),
ϕ = P .- equs_subs.ϑ,
ψ = F .- equs_subs.g,
# σ = _simplify(inv(equs_subs.ω), dosimplify),
Expand All @@ -86,7 +86,7 @@ struct LagrangianSystem
code = (
L = substitute_parameters(build_function(equs_subs.L, t, X, V, params...; nanmath = false), params),
EL = substitute_parameters(build_function(equs_subs.EL, t, X, V, params...; nanmath = false)[2], params),
a = substitute_parameters(build_function(equs_subs.a, t, X, V, params...; nanmath = false)[2], params),
# a = substitute_parameters(build_function(equs_subs.a, t, X, V, params...; nanmath = false)[2], params),
f = substitute_parameters(build_function(equs_subs.f, t, X, V, params...; nanmath = false)[2], params),
g = substitute_parameters(build_function(equs_subs.g, t, X, Λ, V, params...; nanmath = false)[2], params),
p = substitute_parameters(build_function(equs_subs.ϑ, t, X, V, params...; nanmath = false)[1], params),
Expand Down
2 changes: 1 addition & 1 deletion test/lagrangian_particle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ for k in (:L, :EL, :f, :g, :ϑ, :θ, :ω, :Ω, :ϕ, :ψ, :M, :N)
@test k keys(EulerLagrange.equations(lag_sys))
end

for k in (:L, :EL, :a, :f, :g, :p, , , , , , , :M)#, :P
for k in (:L, :EL, :f, :g, :p, , , , , , , :M)# :a, :P
@test k keys(EulerLagrange.functions(lag_sys))
end

Expand Down

0 comments on commit ef810d8

Please sign in to comment.