slimgroup / JUDI.jl

Julia Devito inversion.
https://slimgroup.github.io/JUDI.jl
MIT License
94 stars 29 forks source link

fwi_2D_small_overthrust_lbfgs.jl software papers example #255

Open scott314159 opened 1 month ago

scott314159 commented 1 month ago

I tried to run fwi_2D_small_overthrust_lbfgs.jl and got the following error: ############################################################# ERROR: LoadError: MethodError: no method matching optimize(::Opt, ::PhysicalParameter{Float32, 2})

Closest candidates are: optimize(::Opt, ::AbstractVector{<:Real}) @ NLopt ~/.julia/packages/NLopt/w0c7n/src/NLopt.jl:634 ###############################################

I the issue seems to come from line 66: (minf, minx, ret) = optimize(opt, copy(model0.m))

I found a different example which has optimize syntax: (minf, minx, ret) = optimize(opt, vec(model0.m.data))

Which seems to work but I am not sure if this is the appropriate fix.

mloubout commented 1 month ago

vec(model0.m.data)). is fine yes, looks like some type mismatch that is now popping up with the PhysicalParameter