Skip to content

Commit b6bd0c3

Browse files
committed
resintate setup workload
1 parent a635087 commit b6bd0c3

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/NonlinearSolveFirstOrder/src/NonlinearSolveFirstOrder.jl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ include("pseudo_transient.jl")
4040
include("poly_algs.jl")
4141
include("forward_diff.jl")
4242

43-
# @setup_workload begin
44-
# nonlinear_functions = (
45-
# (NonlinearFunction{false, NoSpecialize}((u, p) -> u .* u .- p), 0.1),
46-
# (NonlinearFunction{false, NoSpecialize}((u, p) -> u .* u .- p), [0.1]),
47-
# (NonlinearFunction{true, NoSpecialize}((du, u, p) -> du .= u .* u .- p), [0.1])
48-
# )
49-
50-
# nonlinear_problems = NonlinearProblem[]
51-
# for (fn, u0) in nonlinear_functions
52-
# push!(nonlinear_problems, NonlinearProblem(fn, u0, 2.0))
53-
# end
43+
@setup_workload begin
44+
nonlinear_functions = (
45+
(NonlinearFunction{false, NoSpecialize}((u, p) -> u .* u .- p), 0.1),
46+
(NonlinearFunction{false, NoSpecialize}((u, p) -> u .* u .- p), [0.1]),
47+
(NonlinearFunction{true, NoSpecialize}((du, u, p) -> du .= u .* u .- p), [0.1])
48+
)
49+
50+
nonlinear_problems = NonlinearProblem[]
51+
for (fn, u0) in nonlinear_functions
52+
push!(nonlinear_problems, NonlinearProblem(fn, u0, 2.0))
53+
end
5454

5555
nonlinear_functions = (
5656
(NonlinearFunction{false, NoSpecialize}((u, p) -> (u .^ 2 .- p)[1:1]), [0.1, 0.0]),
@@ -73,13 +73,13 @@ include("forward_diff.jl")
7373
)
7474
)
7575

76-
# nlls_problems = NonlinearLeastSquaresProblem[]
77-
# for (fn, u0) in nonlinear_functions
78-
# push!(nlls_problems, NonlinearLeastSquaresProblem(fn, u0, 2.0))
79-
# end
76+
nlls_problems = NonlinearLeastSquaresProblem[]
77+
for (fn, u0) in nonlinear_functions
78+
push!(nlls_problems, NonlinearLeastSquaresProblem(fn, u0, 2.0))
79+
end
8080

81-
# nlp_algs = [NewtonRaphson(), TrustRegion(), LevenbergMarquardt()]
82-
# nlls_algs = [GaussNewton(), TrustRegion(), LevenbergMarquardt()]
81+
nlp_algs = [NewtonRaphson(), TrustRegion(), LevenbergMarquardt()]
82+
nlls_algs = [GaussNewton(), TrustRegion(), LevenbergMarquardt()]
8383

8484
@compile_workload begin
8585
@sync begin

0 commit comments

Comments
 (0)