Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/OrdinaryDiffEqNonlinearSolve/Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name = "OrdinaryDiffEqNonlinearSolve"
uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>", "Yingbo Ma <mayingbo5@gmail.com>"]
version = "2.3.0"
version = "2.3.2"

[deps]
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
Expand Down Expand Up @@ -50,6 +51,7 @@ DiffEqDevTools = {path = "../DiffEqDevTools"}
SciMLTesting = "2.1"
Pkg = "1"
NonlinearSolve = "4.20.3"
NonlinearSolveBase = "2.34.1"
ForwardDiff = "1.3.3"
Test = "<0.0.1, 1"
FastBroadcast = "1.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import PreallocationTools: DiffCache, get_tmp
using SimpleNonlinearSolve: SimpleTrustRegion, SimpleGaussNewton
using NonlinearSolve: FastShortcutNonlinearPolyalg, FastShortcutNLLSPolyalg, NewtonRaphson,
HomotopySweep, step!
# The operator Jacobian path is implemented in NonlinearSolveBase and needs its own floor.
import NonlinearSolveBase
using MuladdMacro: @muladd
using FastBroadcast: @..
import FastClosures: @closure
Expand Down
5 changes: 4 additions & 1 deletion lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ function initialize!(
SciMLBase.remake(cache.prob; u0 = copy(z), p = nlp_params)
end
cache.prob = new_prob
cache.cache = init(new_prob, cache.cache.alg)
cache.cache = init(
new_prob, cache.cache.alg;
verbose = integrator.opts.verbose.nonlinear_verbosity
)
else
SciMLBase.reinit!(cache.cache, z, p = nlp_params)
end
Expand Down
16 changes: 16 additions & 0 deletions test/InterfaceIII/verbosity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,5 +428,21 @@ using NonlinearSolve: NonlinearVerbosity
@test integrator.cache.nlsolver.cache.cache.verbose == NonlinearVerbosity(SciMLLogging.Detailed())
end

@testset "Resize preserves Detailed NonlinearVerbosity" begin
resize_prob = ODEProblem((du, u, p, t) -> du .= u, [1.0], (0.0, 1.0))
verbose = DEVerbosity(nonlinear_verbosity = SciMLLogging.Detailed())
integrator = init(
resize_prob, ImplicitEuler(nlsolve = NonlinearSolveAlg());
verbose, dt = 0.1
)
expected = NonlinearVerbosity(SciMLLogging.Detailed())
@test integrator.cache.nlsolver.cache.cache.verbose == expected

resize!(integrator, 2)
step!(integrator)

@test integrator.cache.nlsolver.cache.cache.verbose == expected
end

end
end
Loading