From f508770b064d11c4644942968a61865ba30e8cbb Mon Sep 17 00:00:00 2001 From: Christopher Tessum Date: Mon, 4 Nov 2024 01:34:37 -0600 Subject: [PATCH] Bug Fix --- src/coupled_system_utils.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coupled_system_utils.jl b/src/coupled_system_utils.jl index eb323580..0a37ad18 100644 --- a/src/coupled_system_utils.jl +++ b/src/coupled_system_utils.jl @@ -108,6 +108,9 @@ function get_needed_vars(original_sys::ODESystem, simplified_sys) allst = unknowns(original_sys) simpst = unknowns(simplified_sys) stidx = [only(findall(isequal(s), allst)) for s in simpst] + if length(stidx) == 0 + return [] + end idx = collect(Graphs.DFSIterator(g, stidx)) unknowns(original_sys)[idx] end