diff --git a/src/problems/sccnonlinearproblem.jl b/src/problems/sccnonlinearproblem.jl index d71124adde..171265eefc 100644 --- a/src/problems/sccnonlinearproblem.jl +++ b/src/problems/sccnonlinearproblem.jl @@ -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) diff --git a/test/scc_nonlinear_problem.jl b/test/scc_nonlinear_problem.jl index ee033104f0..56b1e4c269 100644 --- a/test/scc_nonlinear_problem.jl +++ b/test/scc_nonlinear_problem.jl @@ -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