File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lib/SCCNonlinearSolve/test Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
22
u0 = zeros (2 )
23
23
p = zeros (3 )
24
24
25
- function f1 (du, u, (cache, p) )
25
+ function f1 (du, u, p )
26
26
du[1 ] = cos (u[2 ]) - u[1 ]
27
27
du[2 ] = sin (u[1 ] + u[2 ]) + u[2 ]
28
28
end
29
- explicitfun1 (cache , sols) = nothing
29
+ explicitfun1 (p , sols) = nothing
30
30
prob1 = NonlinearProblem (
31
31
NonlinearFunction {true, SciMLBase.NoSpecialize} (f1), zeros (2 ), p)
32
32
sol1 = solve (prob1, NewtonRaphson ())
36
36
du[2 ] = u[3 ]^ 2 + u[2 ]
37
37
du[3 ] = u[1 ]^ 2 + u[3 ]
38
38
end
39
- explicitfun2 (cache , sols) = nothing
39
+ explicitfun2 (p , sols) = nothing
40
40
prob2 = NonlinearProblem (
41
41
NonlinearFunction {true, SciMLBase.NoSpecialize} (f2), zeros (3 ), p)
42
42
sol2 = solve (prob2, NewtonRaphson ())
54
54
p[3 ] = sols[1 ][1 ] + 2.0 sols[1 ][2 ] + 3.0 sols[2 ][1 ] + 5.0 sols[2 ][2 ] +
55
55
6.0 sols[2 ][3 ]
56
56
end
57
- explicitfun3 (cache , [sol1, sol2])
57
+ explicitfun3 (p , [sol1, sol2])
58
58
sol3 = solve (prob3, NewtonRaphson ())
59
59
manualscc = [sol1; sol2; sol3]
60
60
You can’t perform that action at this time.
0 commit comments