Skip to content

Commit 96db62c

Browse files
committed
imports
1 parent 5e740a2 commit 96db62c

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,
@@ -89,16 +89,17 @@ include("forward_diff.jl")
8989
push!(nlls_problems, NonlinearLeastSquaresProblem(fn, u0, 2.0))
9090
end
9191

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

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

0 commit comments

Comments
 (0)