Skip to content

Commit

Permalink
add a few missing methods for a patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 30, 2019
1 parent a4180ed commit 9c92817
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ModelingToolkit"
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
authors = ["Chris Rackauckas <[email protected]>"]
version = "1.1.1"
version = "1.1.2"

[deps]
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Expand Down
1 change: 1 addition & 0 deletions src/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Base.isequal(::Constant , ::Operation) = false
Base.show(io::IO, O::Operation) = print(io, convert(Expr, O))

# For inv
Base.convert(::Type{Operation}, x::Bool) = Operation(identity, Expression[Constant(x)])
Base.convert(::Type{Operation}, x::Number) = Operation(identity, Expression[Constant(x)])
Base.convert(::Type{Operation}, x::Operation) = x
Base.convert(::Type{Operation}, x::Expression) = Operation(identity, Expression[x])
Expand Down
2 changes: 1 addition & 1 deletion src/systems/diffeqs/diffeqsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Create an `ODEFunction` from the [`ODESystem`](@ref). The arguments `dvs` and `p
are used to set the order of the dependent variable and parameter vectors,
respectively.
"""
function DiffEqBase.ODEFunction{iip}(sys::ODESystem, dvs, ps;
function DiffEqBase.ODEFunction{iip}(sys::ODESystem, dvs = sys.dvs, ps = sys.ps;
version = nothing,
jac = false, Wfact = false) where {iip}
f_oop,f_iip = generate_function(sys, dvs, ps, Val{false})
Expand Down
2 changes: 2 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ function Base.convert(::Type{Expression}, ex::Expr)
end
Base.convert(::Type{Expression}, x::Expression) = x
Base.convert(::Type{Expression}, x::Number) = Constant(x)
Base.convert(::Type{Expression}, x::Bool) = Constant(x)
Expression(x::Bool) = Constant(x)

function build_expr(head::Symbol, args)
ex = Expr(head)
Expand Down

0 comments on commit 9c92817

Please sign in to comment.