We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_root_indp
1 parent f173f15 commit ecc69beCopy full SHA for ecc69be
src/solutions/save_idxs.jl
@@ -45,7 +45,17 @@ function as_diffeq_array(vt::Vector{VectorTemplate}, t)
45
end
46
47
function get_root_indp(prob::AbstractSciMLProblem)
48
- prob.f.sys
+ get_root_indp(prob.f)
49
+end
50
+
51
+function get_root_indp(f::T) where {T <: AbstractSciMLFunction}
52
+ if hasfield(T, :sys)
53
+ return f.sys
54
+ elseif hasfield(T, :f) && f.f isa AbstractSciMLFunction
55
+ return get_root_indp(f.f)
56
+ else
57
+ return nothing
58
+ end
59
60
61
function get_root_indp(prob::LinearProblem)
0 commit comments