Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Sep 11, 2023
1 parent eb3a6ff commit 78beabe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions src/NonlinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ import PrecompileTools

PrecompileTools.@compile_workload begin
for T in (Float32, Float64)
# prob = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))
prob = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))

# precompile_algs = if VERSION ≥ v"1.7"
# (NewtonRaphson(), TrustRegion(), LevenbergMarquardt())
# else
# (NewtonRaphson(),)
# end
precompile_algs = if VERSION v"1.7"
(NewtonRaphson(), TrustRegion(), LevenbergMarquardt())
else
(NewtonRaphson(),)
end

# for alg in precompile_algs
# solve(prob, alg, abstol = T(1e-2))
# end
for alg in precompile_algs
solve(prob, alg, abstol = T(1e-2))
end

prob = NonlinearProblem{true}((du, u, p) -> du[1] = u[1] * u[1] - p[1], T[0.1],
T[2])
# for alg in precompile_algs
# solve(prob, alg, abstol = T(1e-2))
# end
for alg in precompile_algs
solve(prob, alg, abstol = T(1e-2))
end
end
end

Expand Down
8 changes: 4 additions & 4 deletions test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ end
for options in list_of_options
local probN, sol, alg
alg = LevenbergMarquardt(damping_initial = options[1],
damping_increase_factor = options[2],
damping_decrease_factor = options[3],
finite_diff_step_geodesic = options[4], α_geodesic = options[5],
b_uphill = options[6], min_damping_D = options[7])
damping_increase_factor = options[2],
damping_decrease_factor = options[3],
finite_diff_step_geodesic = options[4], α_geodesic = options[5],
b_uphill = options[6], min_damping_D = options[7])

probN = NonlinearProblem{false}(quadratic_f, [1.0, 1.0], 2.0)
sol = solve(probN, alg, abstol = 1e-10)
Expand Down

0 comments on commit 78beabe

Please sign in to comment.