-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ForwardDiff with complex numbers ode sometimes results in NaN derivatives #861
Comments
Interesting, why does that make a difference? |
https://juliadiff.org/ForwardDiff.jl/v0.10.2/user/advanced.html#Fixing-NaN/Inf-Issues-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found a small issue with ForwardDiff on complex numbers ode #860
The Dual of time in the ode function has NaN values. Meaning, in the ode function
(u,p,t) -> ...
t
is Dual with derivativeNaN
Maybe a problem with the promotion of
tspan
? affecting the initialdt
value ?Example;
This does not show up in other cases, such as;
if the initial difference is small; e.g.,
Ht(u,p,t) = (H0*u)*sin(p*t)
other random initial state;
u0 = randn(ComplexF64,2)
real initial state
u0 = [1.0, 0.0]
use some finite
dt
inODEProblem(...; dt=1)
Also nan safe mode for ForwardDiff solve this.
The text was updated successfully, but these errors were encountered: