Skip to content

Commit

Permalink
Merge pull request #30 from sathvikbhagavan/sb/ps
Browse files Browse the repository at this point in the history
refactor: parameters are vector of nums and not pairs
  • Loading branch information
ChrisRackauckas authored Jul 29, 2024
2 parents 8179cf8 + 044b72a commit 7fd15b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/discretization_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ function generate_system(disc_state::EquationState, s, u0, tspan, metadata,
alleqs = vcat(disc_state.eqs, unique(disc_state.bceqs))
alldepvarsdisc = vec(reduce(vcat, vec(unique(reduce(vcat, vec.(values(discvars)))))))

defaults = Dict(pdesys.ps === nothing || pdesys.ps === SciMLBase.NullParameters() ? u0 :
vcat(u0, pdesys.ps))
defaults = merge(ModelingToolkit.defaults(pdesys), Dict(u0))
ps = pdesys.ps === nothing || pdesys.ps === SciMLBase.NullParameters() ? Num[] :
first.(pdesys.ps)
pdesys.ps
# Finalize
# if haskey(metadata.disc.kwargs, :checks)
# checks = metadata.disc.kwargs[:checks]
Expand Down
3 changes: 0 additions & 3 deletions src/variable_map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ function VariableMap(pdesys, disc; replaced_vars = Dict())
if ps isa SciMLBase.NullParameters
ps = []
end
ps = map(ps) do p
safe_unwrap(p.first)
end
depvar_ops = get_ops(depvars)
# Get all dependent variables in the correct type
alldepvars = get_all_depvars([eqs; bcs], depvar_ops)
Expand Down

0 comments on commit 7fd15b8

Please sign in to comment.