@@ -360,7 +360,7 @@ println("\nNorm of the shooting function: ‖s‖ = ", norm(s), "\n")
360360# NonlinearSolve resolution
361361nle_new!(s, ξ, p) = shoot!(s, ξ[1:3], ξ[4], ξ[5], ξ[6], ξ[7])
362362prob_nls = NonlinearProblem(nle_new!, ξ)
363- sol_nls = solve(prob_nls, NewtonRaphson() ; show_trace=Val(true))
363+ sol_nls = solve(prob_nls; show_trace=Val(true))
364364
365365ξ_nls = sol_nls.u
366366p0_nls = ξ_nls[1:3]
@@ -373,18 +373,22 @@ s = similar(ξ_nls, 7)
373373shoot!(s, p0_nls, t1, t2, t3, tf)
374374
375375println("\nNonlinearSolve results :")
376- @show ξ_nls
376+ println("p0 = ", p0_nls)
377+ println("t1 = ", t1)
378+ println("t2 = ", t2)
379+ println("t3 = ", t3)
380+ println("tf = ", tf)
377381@show norm(s)
378382```
379383
380384Lets benchmark these two resolution to compare their performances.
381385
382386``` @example main-goddard
383- @benchmark fsolve(nle!, jnle!, ξ, show_trace=false)
387+ @benchmark fsolve(nle!, jnle!, ξ, show_trace=false) #MINPACK
384388```
385389
386390``` @example main-goddard
387- @benchmark solve(prob_nls, NewtonRaphson() ; show_trace=Val(false)) #NonlinearSolve
391+ @benchmark solve(prob_nls; show_trace=Val(false)) #NonlinearSolve
388392```
389393
390394## [ Plot of the solution] (@id tutorial-goddard-plot)
0 commit comments