File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,10 @@ function SciMLBase.__init(
202202 linesearch_ad = alg. forward_ad === nothing ?
203203 (alg. reverse_ad === nothing ? alg. jacobian_ad :
204204 alg. reverse_ad) : alg. forward_ad
205+ if linesearch_ad != = nothing && iip && ! DI. check_inplace (linesearch_ad)
206+ @warn " $(linesearch_ad) doesn't support in-place problems."
207+ linesearch_ad = nothing
208+ end
205209 linesearch_ad = get_concrete_forward_ad (
206210 linesearch_ad, prob, False; check_forward_mode = false )
207211 linesearch_cache = init (
Original file line number Diff line number Diff line change 1212
1313 prob = NonlinearProblem (linear_f, u0)
1414
15- SOLVERS = (NewtonRaphson (), LevenbergMarquardt (; linsolve = QRFactorization ()),
16- LevenbergMarquardt (; linsolve = KrylovJL_GMRES ()), PseudoTransient (),
17- Klement (), Broyden (; linesearch = LiFukushimaLineSearch ()),
15+ SOLVERS = (
16+ NewtonRaphson (),
17+ LevenbergMarquardt (; linsolve = QRFactorization ()),
18+ LevenbergMarquardt (; linsolve = KrylovJL_GMRES ()),
19+ PseudoTransient (),
20+ Klement (),
21+ Broyden (; linesearch = LiFukushimaLineSearch ()),
1822 LimitedMemoryBroyden (; threshold = 2 , linesearch = LiFukushimaLineSearch ()),
19- DFSane (), TrustRegion (; linsolve = QRFactorization ()),
23+ DFSane (),
24+ TrustRegion (; linsolve = QRFactorization ()),
2025 TrustRegion (; linsolve = KrylovJL_GMRES (), concrete_jac = true ), # Needed if Zygote not loaded
21- nothing )
26+ nothing
27+ )
2228
2329 @testset " [IIP] GPU Solvers" begin
2430 for alg in SOLVERS
You can’t perform that action at this time.
0 commit comments