Skip to content

Commit

Permalink
Update ext/CatalystHomotopyContinuationExtension/homotopy_continuatio…
Browse files Browse the repository at this point in the history
…n_extension.jl

Co-authored-by: Sam Isaacson <[email protected]>
  • Loading branch information
TorkelE and isaacsas authored Oct 3, 2023
1 parent f70bca6 commit 242380d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ end

# If u0s are not given while conservation laws are present, throws an error.
function conservationlaw_errorcheck(rs, pre_varmap)
vars_with_vals = union(first.(pre_varmap), keys(ModelingToolkit.defaults(rs)))
vars_with_vals = Set(p[1] for p in pre_varpmap)
union!(vars_with_vals, keys(ModelingToolkit.defaults(rs))
isempty(intersect(species(rs), vars_with_vals)) || return
isempty(conservedequations(rs)) && return
error("The system have conservation laws but no initial conditions were provided. Please provide initial conditions.")
Expand Down

0 comments on commit 242380d

Please sign in to comment.