-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make TEQUILA autodifferentiable #51
Comments
@bclyons12 should I be running this in a specific directory? And is the sample data available? I also remember you mentioning this would be on a specific branch. Thanks! |
@mbolognaJH This case is just on the master branch of TEQUILA, so no specific branch. I thought the sample was in the repository, but it's not. You can find it here: |
For your reference, I've added ForwardDiff.jacobian(solve_from_bnd, bnd);
ERROR: MethodError: no method matching Float64(::ForwardDiff.Dual{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10})
Closest candidates are:
(::Type{T})(::Real, ::RoundingMode) where T<:AbstractFloat
@ Base rounding.jl:207
(::Type{T})(::T) where T<:Number
@ Core boot.jl:790
Float64(::IrrationalConstants.Sqrt2π)
@ IrrationalConstants ~/.julia/packages/IrrationalConstants/vp5v4/src/macro.jl:112
...
Stacktrace:
[1] convert(::Type{Float64}, x::ForwardDiff.Dual{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10})
@ Base ./number.jl:7
[2] setindex!(A::Matrix{Float64}, x::ForwardDiff.Dual{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10}, i1::Int64)
@ Base ./array.jl:1019
[3] setindex!
@ ./subarray.jl:353 [inlined]
[4] flat_coeffs!(flat::SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{…}, Int64}, true}, mxh::MXH{ForwardDiff.Dual{ForwardDiff.Tag{…}, Float64, 10}, Vector{ForwardDiff.Dual{…}}})
@ MillerExtendedHarmonic ~/.julia/dev/MillerExtendedHarmonic/src/MXH.jl:46
[5] Shot(N::Int64, M::Int64, boundary::MXH{…}; Raxis::ForwardDiff.Dual{…}, Zaxis::ForwardDiff.Dual{…}, P::Nothing, dP_dψ::FiniteElementHermite.FE_rep{…}, F_dF_dψ::FiniteElementHermite.FE_rep{…}, Jt_R::Nothing, Jt::Nothing, Pbnd::Float64, Fbnd::Float64, Ip_target::Nothing, approximate_psi::Bool)
@ TEQUILA ~/.julia/dev/TEQUILA/src/shot.jl:98
[6] solve_from_bnd(bnd::Vector{ForwardDiff.Dual{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10}})
@ Main ./REPL[9]:3
[7] chunk_mode_jacobian(f::typeof(solve_from_bnd), x::Vector{Float64}, cfg::ForwardDiff.JacobianConfig{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10, Vector{ForwardDiff.Dual{…}}})
@ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:183
[8] jacobian(f::Function, x::Vector{Float64}, cfg::ForwardDiff.JacobianConfig{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10, Vector{ForwardDiff.Dual{…}}}, ::Val{true})
@ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:0
[9] jacobian(f::Function, x::Vector{Float64}, cfg::ForwardDiff.JacobianConfig{ForwardDiff.Tag{typeof(solve_from_bnd), Float64}, Float64, 10, Vector{ForwardDiff.Dual{…}}})
@ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:19
[10] top-level scope
@ REPL[18]:1
Some type information was truncated. Use `show(err)` to see complete types. So my plan is to work on MillerExtendedHarmonic first. |
That makes sense @mbolognaJH |
I've pushed commits to MillerExtendedHarmonic and FiniteElementHermite and added a branch called Because FFTW.jl is not autodiff compatible, only There are two possible solutions:
I can continue future efforts in the new year. |
We'd like to get this code working
Currently,
jacobian
errors with the following, but I'm sure that's just the beginning:@orso82 @sjkelly may be interested
The text was updated successfully, but these errors were encountered: