Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/ModelingToolkitBase/src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ PrecompileTools.@compile_workload begin
v = [p]
isempty(v)
# mtkcompile(sys)
ODEProblem(mtkcompile(System([ModelingToolkitBase.D_nounits(x) ~ 2x + 1], ModelingToolkitBase.t_nounits; name = :a)), [x => 1], (0.0, 1.0))
end

precompile(Tuple{typeof(SymbolicUtils.isequal_somescalar), Float64, Float64})
Expand Down
7 changes: 5 additions & 2 deletions lib/ModelingToolkitBase/src/systems/problem_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ struct GetUpdatedU0{GG, GIU}
end

function GetUpdatedU0(sys::AbstractSystem, initprob::SciMLBase.AbstractNonlinearProblem, op::AbstractDict)
@nospecialize initprob
dvs = unknowns(sys)
eqs = equations(sys)
guessvars = trues(length(dvs))
Expand Down Expand Up @@ -1959,7 +1960,8 @@ end

Construct SciMLFunction `T` with positional arguments `args` and keywords `kwargs`.
"""
function maybe_codegen_scimlfn(::Type{Val{false}}, T, args::NamedTuple; kwargs...)
function maybe_codegen_scimlfn(::Type{Val{false}}, ::Type{T}, args::NamedTuple; kwargs...) where {T}
@nospecialize args kwargs
return T(args...; kwargs...)
end

Expand All @@ -1978,7 +1980,8 @@ end

Construct SciMLProblem `T` with positional arguments `args` and keywords `kwargs`.
"""
function maybe_codegen_scimlproblem(::Type{Val{false}}, T, args::NamedTuple; kwargs...)
function maybe_codegen_scimlproblem(::Type{Val{false}}, ::Type{T}, args::NamedTuple; kwargs...) where {T}
@nospecialize args kwargs
# Call `remake` so it runs initialization if it is trivial
# Use `@invokelatest` to avoid world-age issues with `eval_expression = true`
return @invokelatest remake(T(args...; kwargs...))
Expand Down
Loading