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
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ end
if integrator.opts.adaptive
reltol = integrator.opts.reltol
else
reltol = eps(eltype(dz))
reltol = eps(real(one(eltype(dz))))
end

if is_always_new(nlsolver) || (iter == 1 && new_W)
Expand Down
6 changes: 6 additions & 0 deletions lib/StochasticDiffEq/test/complex_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ end
@test eltype(sol.u[end]) == ComplexF64
end

for alg in (ImplicitEM(autodiff = AutoFiniteDiff()), ISSEM(autodiff = AutoFiniteDiff()))
sol = solve(prob, alg; adaptive = false, dt = 0.01)
@test eltype(sol.t) == Float64
@test eltype(sol.u[end]) == ComplexF64
end

# currently broken
for alg in implicit_autodiff
@test_throws OrdinaryDiffEqDifferentiation.FirstAutodiffJacError solve(prob, alg)
Expand Down
Loading