Skip to content
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

Check leaky Terminals #1856

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions core/src/callback.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,25 @@
end
end
end

for (inflow_edge, outflow_edge) in zip(p.state_inflow_edge, p.state_outflow_edge)
from_flow = inflow_edge.edge[1]
to_flow = outflow_edge.edge[2]
if from_flow.type == NodeType.Basin
flow = flow_update_on_edge(integrator, inflow_edge.edge)
if to_flow.type == NodeType.Terminal && flow < 0 && to_flow.value != 0
@warn "Unsupported inflow type $(to_flow.type) #$(to_flow.value) with flow $flow"
end
end

if to_flow.type == NodeType.Basin
flow = flow_update_on_edge(integrator, outflow_edge.edge)
if from_flow.type == NodeType.Terminal && flow > 0 && from_flow.value != 0
@warn "Unsupported outflow type $(from_flow.type) #$(from_flow.value) with flow $flow"

Check warning on line 158 in core/src/callback.jl

View check run for this annotation

Codecov / codecov/patch

core/src/callback.jl#L158

Added line #L158 was not covered by tests
end
end
end

return nothing
end

Expand Down