Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jan 5, 2024
1 parent 71cc9f6 commit 6f9df05
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/systems/connectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ end

function generate_connection_equations_and_stream_connections(csets::AbstractVector{
<:ConnectionSet,
})
})
eqs = Equation[]
stream_connections = ConnectionSet[]

Expand Down
14 changes: 9 additions & 5 deletions src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,8 @@ function DiffEqBase.ODEProblem{iip, specialize}(sys::AbstractODESystem, u0map =
check_length = true,
kwargs...) where {iip, specialize}
has_difference = any(isdifferenceeq, equations(sys))
has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
has_difference &&

Check warning on line 895 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L895

Added line #L895 was not covered by tests
error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
f, u0, p = process_DEProblem(ODEFunction{iip, specialize}, sys, u0map, parammap;
t = tspan !== nothing ? tspan[1] : tspan,
check_length, kwargs...)
Expand Down Expand Up @@ -955,7 +956,8 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan
parammap = DiffEqBase.NullParameters();
check_length = true, kwargs...) where {iip}
has_difference = any(isdifferenceeq, equations(sys))
has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
has_difference &&

Check warning on line 959 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L959

Added line #L959 was not covered by tests
error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
f, du0, u0, p = process_DEProblem(DAEFunction{iip}, sys, u0map, parammap;
implicit_dae = true, du0map = du0map, check_length,
kwargs...)
Expand All @@ -965,7 +967,7 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan
kwargs = filter_kwargs(kwargs)

DAEProblem{iip}(f, du0, u0, tspan, p; differential_vars = differential_vars,

Check warning on line 969 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L969

Added line #L969 was not covered by tests
kwargs...)
kwargs...)
end

function generate_history(sys::AbstractODESystem, u0; kwargs...)
Expand All @@ -982,7 +984,8 @@ function DiffEqBase.DDEProblem{iip}(sys::AbstractODESystem, u0map = [],
check_length = true,
kwargs...) where {iip}
has_difference = any(isdifferenceeq, equations(sys))
has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
has_difference &&

Check warning on line 987 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L987

Added line #L987 was not covered by tests
error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
f, u0, p = process_DEProblem(DDEFunction{iip}, sys, u0map, parammap;
t = tspan !== nothing ? tspan[1] : tspan,
symbolic_u0 = true,
Expand Down Expand Up @@ -1035,7 +1038,8 @@ function DiffEqBase.SDDEProblem{iip}(sys::AbstractODESystem, u0map = [],
sparsenoise = nothing,
kwargs...) where {iip}
has_difference = any(isdifferenceeq, equations(sys))
has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
has_difference &&

Check warning on line 1041 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L1041

Added line #L1041 was not covered by tests
error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.")
f, u0, p = process_DEProblem(SDDEFunction{iip}, sys, u0map, parammap;
t = tspan !== nothing ? tspan[1] : tspan,
symbolic_u0 = true,
Expand Down
2 changes: 1 addition & 1 deletion src/systems/jumps/jumpsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function (ratemap::JumpSysMajParamMapper{
U,
V,
W,
})(params) where {U <: AbstractArray,
})(params) where {U <: AbstractArray,
V <: AbstractArray, W}
updateparams!(ratemap, params)
[convert(W, value(substitute(paramexpr, ratemap.subdict)))
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Throw error when difference/derivative operation occurs in the R.H.S.
"""
@noinline function throw_invalid_operator(opvar, eq, op::Type)
if op === Difference
error("The Difference operator is deprecated, use ShiftIndex instead")
error("The Difference operator is deprecated, use ShiftIndex instead")

Check warning on line 261 in src/utils.jl

View check run for this annotation

Codecov / codecov/patch

src/utils.jl#L261

Added line #L261 was not covered by tests
elseif op === Differential
optext = "derivative"
end
Expand Down

0 comments on commit 6f9df05

Please sign in to comment.