Skip to content

Commit

Permalink
increase coverage more
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Feb 22, 2024
1 parent 2479430 commit ae7cde8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ function processes_to_mtkmodel(_processes, _default = [];
sys = type(eqs, independent; name)
return sys
end
# version without given processes
function processes_to_mtkmodel(; kwargs...)
return processes_to_mtkmodel(collect(values(default_processes())); kwargs...)
end

function expand_multi_processes(procs::Vector)
# Expand vectors of processes or ODESystems
Expand Down
16 changes: 16 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ using OrdinaryDiffEq

@test ufs[1] [319] atol = 1
@test ufs[2] [245] atol = 1

# vector of processes
processes = [
[TanhProcess(α, T, 0.7, 0.289, 10.0, 274.5),
TanhProcess(ε, T, 0.5, 0.41, 2.0, 288.0),],
HeatBalance()
]

sys = processes_to_mtkmodel(processes)
@test sys isa ODESystem
@test length(unknowns(sys)) == 3

sys = structural_simplify(sys)
@test length(unknowns(sys)) == 1
@test has_variable(equations(sys), T)

end

@testset "add missing processes" begin
Expand Down

0 comments on commit ae7cde8

Please sign in to comment.