Skip to content

Commit e98307c

Browse files
committed
more fixes
1 parent af4fe17 commit e98307c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/domains.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ struct VarDomainPairing
44
variables
55
domain::AbstractDomain
66
end
7-
Base.:(variable::ModelingToolkit.Operation,domain::AbstractDomain) = VarDomainPairing(variable,domain)
8-
Base.:(variables::NTuple{N,ModelingToolkit.Operation},domain::AbstractDomain) where N = VarDomainPairing(variables,domain)
7+
Base.:(variable::ModelingToolkit.Num,domain::AbstractDomain) = VarDomainPairing(value(variable),domain)
8+
Base.:(variables::NTuple{N,ModelingToolkit.Num},domain::AbstractDomain) where N = VarDomainPairing(value.(variables),domain)
99

1010
## Specific Domains
1111

src/systems/diffeqs/odesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function ODESystem(eqs, iv=nothing; kwargs...)
128128
push!(algeeq, eq)
129129
else
130130
diffvar = first(var_from_nested_derivative(eq.lhs))
131-
iv == iv_from_nested_derivative(eq.lhs) || throw(ArgumentError("An ODESystem can only have one independent variable."))
131+
isequal(iv, iv_from_nested_derivative(eq.lhs)) || throw(ArgumentError("An ODESystem can only have one independent variable."))
132132
diffvar in diffvars && throw(ArgumentError("The differential variable $diffvar is not unique in the system of equations."))
133133
push!(diffvars, diffvar)
134134
push!(diffeq, eq)

src/variables.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function _construct_var(var_name, type, call_args)
143143
expr = if call_args === nothing
144144
:($Num($Sym{$type}($(Meta.quot(var_name)))))
145145
elseif !isempty(call_args) && call_args[end] == :..
146-
:($Num($Sym{$FnType{Tuple{Any}, $type}}($(Meta.quot(var_name))))) # XXX: using Num as output
146+
:($Num($Sym{$FnType{Tuple, $type}}($(Meta.quot(var_name))))) # XXX: using Num as output
147147
else
148148
:($Num($Sym{$FnType{NTuple{$(length(call_args)), Any}, $type}}($(Meta.quot(var_name)))($(map(x->:($value($x)), call_args)...))))
149149
end

0 commit comments

Comments
 (0)