Skip to content

Commit

Permalink
bump SU + format
Browse files Browse the repository at this point in the history
  • Loading branch information
pogudingleb committed Dec 19, 2024
1 parent 1dd5383 commit b3d2d43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PrecompileTools = "1.2"
Primes = "0.5"
Random = "1.10, 1.11"
SpecialFunctions = "2"
SymbolicUtils = "3.2"
SymbolicUtils = "3.7"
Symbolics = "6.16"
Test = "1.10, 1.11"
TestSetExtensions = "2"
Expand Down
11 changes: 5 additions & 6 deletions test/differentiate_output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function diff_sol_Lie_derivatives(ode::ODE, params, ic, inputs, prec::Int)
push!(
result[y][v],
eval_at_dict(
derivative(Lie_derivatives[y][j], str_to_var("$v", new_ring)),
derivative(Lie_derivatives[y][j], switch_ring(v, new_ring)),
eval_point,
),
)
Expand Down Expand Up @@ -212,6 +212,7 @@ end
),
)

t = copy(test_cases)
varnames = vcat(
["x_$i" for i in 1:3],
["p_$i" for i in 1:3],
Expand Down Expand Up @@ -280,14 +281,12 @@ end
),
:ic => Dict(vars[i] => F(rand(1:50)) for i in 1:2),
:param_vals => Dict(vars[i + 2] => F(rand(1:50)) for i in 1:2),
:inputs => Dict(vars[5] => [F(rand(-30:30)) for i in 1:4]),
:inputs => Dict(vars[5] => [F(rand(-30:30)) for i in 1:5]),
:prec => 5,
),
)



for case in test_cases
for case in t
ode, prec = case[:ODE], case[:prec]
@time sol1 =
differentiate_output(ode, case[:param_vals], case[:ic], case[:inputs], prec)
Expand All @@ -296,7 +295,7 @@ end
for y in ode.y_vars
for v in vcat(ode.x_vars, ode.parameters)
@test sol2[y][v] == [
base_ring(ode.poly_ring)(coeff(sol1[y][v], j) * factorial(j)) for
base_ring(ode.poly_ring)(coeff(sol1[y][v], j) * facrorial(j)) for
j in 0:(prec - 1)
]
end
Expand Down

0 comments on commit b3d2d43

Please sign in to comment.