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: 0 additions & 1 deletion src/problems/sccnonlinearproblem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ function SciMLBase.SCCNonlinearProblem{iip}(sys::System, op; eval_expression = f
_u0 = SymbolicUtils.Code.create_array(
typeof(u0), eltype(u0), Val(1), Val(length(vscc)), u0[vscc]...)
symbolic_idxs = findall(x -> symbolic_type(x) != NotSymbolic(), _u0)
explicitfuns[i](p, subprobs)
if f isa LinearFunction
_u0 = isempty(symbolic_idxs) ? _u0 : zeros(u0_eltype, length(_u0))
_u0 = u0_eltype.(_u0)
Expand Down
5 changes: 2 additions & 3 deletions test/scc_nonlinear_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,10 @@ end
0 ~ func(x[1], x[2]) * exp(x[3]) - x[4]^3 - 5
0 ~ func(x[1], x[2]) * exp(x[4]) - x[3]^3 - 4])
sccprob = SCCNonlinearProblem(sys, [])
# since explicitfuns are called during problem construction
@test val[] == 1
@test val[] == 0
sccsol = solve(sccprob, NewtonRaphson())
@test SciMLBase.successful_retcode(sccsol)
@test val[] == 2
@test val[] == 1
end

import ModelingToolkitStandardLibrary.Blocks as B
Expand Down
Loading