Skip to content

Commit 8a1b979

Browse files
committed
imports
1 parent 9423b59 commit 8a1b979

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lib/BracketingNonlinearSolve/src/BracketingNonlinearSolve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using PrecompileTools: @compile_workload, @setup_workload
55
using Reexport: @reexport
66

77
using CommonSolve: CommonSolve, solve
8-
using NonlinearSolveBase: NonlinearSolveBase, AbstractNonlinearSolveAlgorithm, NonlinearVerbosity
8+
using NonlinearSolveBase: NonlinearSolveBase, AbstractNonlinearSolveAlgorithm, NonlinearVerbosity, @SciMLMessage, Verbosity
99
using SciMLBase: SciMLBase, IntervalNonlinearProblem, ReturnCode
1010

1111
abstract type AbstractBracketingAlgorithm <: AbstractNonlinearSolveAlgorithm end

src/NonlinearSolve.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using DiffEqBase: DiffEqBase # Needed for `init` / `solve` dispatches
1212
using LinearAlgebra: LinearAlgebra
1313
using LineSearch: BackTracking
1414
using NonlinearSolveBase: NonlinearSolveBase, AbstractNonlinearSolveAlgorithm,
15-
NonlinearSolvePolyAlgorithm, pickchunksize
15+
NonlinearSolvePolyAlgorithm, pickchunksize, NonlinearVerbosity
1616

1717
using SciMLBase: SciMLBase, ReturnCode, AbstractNonlinearProblem,
1818
NonlinearFunction,
@@ -90,16 +90,17 @@ include("forward_diff.jl")
9090
push!(nlls_problems, NonlinearLeastSquaresProblem(fn, u0, 2.0))
9191
end
9292

93+
nlp_algs = [NewtonRaphson(), TrustRegion(), LevenbergMarquardt()]
94+
nlls_algs = [GaussNewton(), TrustRegion(), LevenbergMarquardt()]
95+
9396
@compile_workload begin
9497
@sync begin
95-
for prob in nonlinear_problems
96-
Threads.@spawn CommonSolve.solve(
97-
)
98+
for prob in nonlinear_problems, alg in nlp_algs
99+
Threads.@spawn CommonSolve.solve(prob, alg; abstol = 1e-2, verbose = NonlinearVerbosity())
98100
end
99101

100-
for prob in nlls_problems
101-
Threads.@spawn CommonSolve.solve(
102-
)
102+
for prob in nlls_problems, alg in nlls_algs
103+
Threads.@spawn CommonSolve.solve(prob, alg; abstol = 1e-2, verbose = NonlinearVerbosity())
103104
end
104105
end
105106
end

0 commit comments

Comments
 (0)