Skip to content
4 changes: 3 additions & 1 deletion lib/NonlinearSolveFirstOrder/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ end

function InternalAPI.reinit_self!(
cache::GeneralizedFirstOrderAlgorithmCache, args...; p = cache.p, u0 = cache.u,
alias_u0::Bool = false, maxiters = 1000, maxtime = nothing, kwargs...
alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false,
maxiters = hasproperty(cache, :maxiters) ? cache.maxiters : 1000,
maxtime = hasproperty(cache, :maxtime) ? cache.maxtime : nothing, kwargs...
)
Utils.reinit_common!(cache, u0, p, alias_u0)

Expand Down
4 changes: 3 additions & 1 deletion lib/NonlinearSolveQuasiNewton/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ end

function InternalAPI.reinit_self!(
cache::QuasiNewtonCache, args...; p = cache.p, u0 = cache.u,
alias_u0::Bool = false, maxiters = 1000, maxtime = nothing, kwargs...
alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false,
maxiters = hasproperty(cache, :maxiters) ? cache.maxiters : 1000,
maxtime = hasproperty(cache, :maxtime) ? cache.maxtime : nothing, kwargs...
)
Utils.reinit_common!(cache, u0, p, alias_u0)

Expand Down
4 changes: 3 additions & 1 deletion lib/NonlinearSolveSpectralMethods/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ end

function InternalAPI.reinit_self!(
cache::GeneralizedDFSaneCache, args...; p = cache.p, u0 = cache.u,
alias_u0::Bool = false, maxiters = 1000, maxtime = nothing, kwargs...
alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false,
maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000,
maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs...
)
Utils.reinit_common!(cache, u0, p, alias_u0)
T = eltype(u0)
Expand Down
Loading