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
Solution handling for ComponentArrays
: how to extract a variable by name?
#957
Comments
Doesn't |
That would be a nice interface. Unfortunately it does not work: julia> sol(t).x
ERROR: type DiffEqArray has no field x
Stacktrace:
[1] getproperty(x::RecursiveArrayTools.DiffEqArray{…}, f::Symbol)
@ Base ./Base.jl:37
[2] top-level scope
@ REPL[15]:1
Some type information was truncated. Use `show(err)` to see complete types.
|
We would need to forward the getproperty on DiffEqArray. That does seem possible. @AayushSabharwal |
How about a
The extension allows us to support |
👍 That sounds like a better option. |
ComponentArrays.jl
is very helpful to handle states and parameters and works well with DifferentialEquations (e.g. plots are automatically labeled #617).Unfortunaly, it seem we lack a good interface to extract variables from solutions objects. Something like
sol(t, idxs=:x)
orsol(t, idxs=[:x, :y])
would feel very natural but is currently not implemented:The text was updated successfully, but these errors were encountered: