Skip to content

Commit

Permalink
Update core_tests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Nov 15, 2024
1 parent 358b5af commit 4c35749
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/SCCNonlinearSolve/test/core_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ end
u0 = zeros(2)
p = zeros(3)

function f1(du, u, (cache, p))
function f1(du, u, p)
du[1] = cos(u[2]) - u[1]
du[2] = sin(u[1] + u[2]) + u[2]
end
explicitfun1(cache, sols) = nothing
explicitfun1(p, sols) = nothing
prob1 = NonlinearProblem(
NonlinearFunction{true, SciMLBase.NoSpecialize}(f1), zeros(2), p)
sol1 = solve(prob1, NewtonRaphson())
Expand All @@ -36,7 +36,7 @@ end
du[2] = u[3]^2 + u[2]
du[3] = u[1]^2 + u[3]
end
explicitfun2(cache, sols) = nothing
explicitfun2(p, sols) = nothing
prob2 = NonlinearProblem(
NonlinearFunction{true, SciMLBase.NoSpecialize}(f2), zeros(3), p)
sol2 = solve(prob2, NewtonRaphson())
Expand All @@ -54,7 +54,7 @@ end
p[3] = sols[1][1] + 2.0sols[1][2] + 3.0sols[2][1] + 5.0sols[2][2] +
6.0sols[2][3]
end
explicitfun3(cache, [sol1, sol2])
explicitfun3(p, [sol1, sol2])
sol3 = solve(prob3, NewtonRaphson())
manualscc = [sol1; sol2; sol3]

Expand Down

0 comments on commit 4c35749

Please sign in to comment.