@@ -26,7 +26,7 @@ isJcurrent(nlsolver::AbstractNLSolver, integrator) = integrator.t == nlsolver.ca
2626isfirstcall (nlsolver:: AbstractNLSolver ) = nlsolver. cache. firstcall
2727isfirststage (nlsolver:: AbstractNLSolver ) = nlsolver. cache. firststage
2828setfirststage! (nlsolver:: AbstractNLSolver , val:: Bool ) = setfirststage! (nlsolver. cache, val)
29- function setfirststage! (nlcache:: Union{NLNewtonCache, NLNewtonConstantCache} , val:: Bool )
29+ function setfirststage! (nlcache:: Union{NLNewtonCache, NLNewtonConstantCache, NonlinearSolveCache } , val:: Bool )
3030 (nlcache. firststage = val)
3131end
3232setfirststage! (:: Any , val:: Bool ) = nothing
@@ -37,9 +37,9 @@ getnfails(nlsolver::AbstractNLSolver) = nlsolver.nfails
3737
3838set_new_W! (nlsolver:: AbstractNLSolver , val:: Bool ):: Bool = set_new_W! (nlsolver. cache, val)
3939set_new_W! (nlcache:: Union{NLNewtonCache, NLNewtonConstantCache, NonlinearSolveCache} , val:: Bool ):: Bool = nlcache. new_W = val
40+ set_new_W! (nlcache:: AbstractNLSolverCache , val:: Bool ):: Bool = nothing
4041get_new_W! (nlsolver:: AbstractNLSolver ):: Bool = get_new_W! (nlsolver. cache)
41- get_new_W! (nlcache:: Union{NLNewtonCache, NLNewtonConstantCache, NonlinearSolveCache} ):: Bool = nlcache. new_W
42- get_new_W! (:: AbstractNLSolverCache ):: Bool = true
42+ get_new_W! (:: AbstractNLSolverCache ):: Bool = nlcache. new_W
4343
4444get_W (nlsolver:: AbstractNLSolver ) = get_W (nlsolver. cache)
4545get_W (nlcache:: Union{NLNewtonCache, NLNewtonConstantCache} ) = nlcache. W
@@ -243,7 +243,8 @@ function build_nlsolver(
243243 NonlinearProblem (NonlinearFunction {true} (nlf), ztmp, nlp_params)
244244 end
245245 cache = init (prob, nlalg. alg)
246- nlcache = NonlinearSolveCache (ustep, tstep, k, atmp, invγdt, prob, cache, true )
246+ nlcache = NonlinearSolveCache (ustep, tstep, k, atmp, prob, cache,
247+ true , true , true , tType (dt), invγdt, tType (nlalg. new_W_dt_cutoff), t)
247248 else
248249 nlcache = NLNewtonCache (ustep, tstep, k, atmp, dz, J, W, true ,
249250 true , true , tType (dt), du1, uf, jac_config,
@@ -330,8 +331,8 @@ function build_nlsolver(
330331 end
331332 prob = NonlinearProblem (NonlinearFunction {false} (nlf), copy (ztmp), nlp_params)
332333 cache = init (prob, nlalg. alg)
333- nlcache = NonlinearSolveCache (
334- nothing , tstep, nothing , nothing , invγdt, prob, cache, true )
334+ nlcache = NonlinearSolveCache (nothing , tstep, nothing , nothing , prob, cache,
335+ true , true , true , tType (dt) , invγdt, tType (nlalg . new_W_dt_cutoff), t )
335336 else
336337 nlcache = NLNewtonConstantCache (tstep, J, W, true , true , true , tType (dt), uf,
337338 invγdt, tType (nlalg. new_W_dt_cutoff), t)
0 commit comments