-
Notifications
You must be signed in to change notification settings - Fork 4
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
Error: no method matching value(Float64) #53
Comments
Found and fixed the bug. It's fixed in the main branch on my repo but not yet in the Julia code repository. Can't guarantee that it will fix your problem because the example you sent isn't executable. But pretty sure it will. If you send me an executable example I'll test it to make sure it works with your code. |
I just pushed the fix to the Julia Registry so you should be able to update to the latest version of FastDifferentiation, v 0.3.3, and your bug should be fixed. Let me know if this fixes the problem. If it does I'll close the issue. |
I'll let you know, probably wont be able to test until Monday though. If you want to test, taking the derivative of the phi_2 function w.r.t. that I think this should let you test: function phi_2(A, B, ϵ, σ, p, q, a, rᵢⱼ)
return A*ϵ*(B*((σ/rᵢⱼ)^p) - ((σ/rᵢⱼ)^q)) * exp(σ/(rᵢⱼ-(a*σ)))
end
vars = make_variables(:r, D)
r_norm = sqrt(sum(x -> x^2, vars))
pot2_symbolic = phi_2(1, 1, 2, 2, 4, 0, 1.2, r_norm)
H2_symbolic = hessian(pot2_symbolic, vars)
H2_exec = make_function(H2_symbolic, vars) |
I set D=10 (not sure what size variable vector you were using) and ran your code. It executes without errors. I'm going to close this issue. If you run into problems when you test it on Monday reopen the issue. |
I use D=3 this should be more than enough. Sorry for the late reply conference was busier than expected. The error is gone now. Thank you! |
Hello,
I'm trying to differentiate
pair_potential_nounits
:with:
and the code immediately breaks on the call to
pair_potential_nounits
with the error trace below. It looks like it has something to do with the exponents p and q (which have values 4 and 0 respectively). How can I get around this issue without hard coding p and q? Seems like it should be possible since I've differentiated a similar function all be it with a constant exponent.The text was updated successfully, but these errors were encountered: