File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,30 @@ function as_diffeq_array(vt::Vector{VectorTemplate}, t)
4444 return DiffEqArray (typeof (TupleOfArraysWrapper (vt))[], t, (1 , 1 ))
4545end
4646
47- function get_root_indp (indp)
48- if hasmethod (symbolic_container, Tuple{typeof (indp)}) &&
49- (sc = symbolic_container (indp)) != = indp
50- return get_root_indp (sc)
47+ function get_root_indp (prob:: AbstractSciMLProblem )
48+ 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
5158 end
52- return indp
59+ end
60+
61+ function get_root_indp (prob:: LinearProblem )
62+ get_root_indp (prob. f)
63+ end
64+
65+ get_root_indp (prob:: AbstractJumpProblem ) = get_root_indp (prob. prob)
66+
67+ get_root_indp (x) = x
68+
69+ function get_root_indp (f:: SymbolicLinearInterface )
70+ get_root_indp (f. sys)
5371end
5472
5573# Everything from this point on is public API
You can’t perform that action at this time.
0 commit comments