From ad2b0449ba87965db7fde9c79f2818cb152bb0f2 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Fri, 21 Jun 2024 14:52:23 -0400 Subject: [PATCH] Optimization --- dirac.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dirac.jl b/dirac.jl index b3f41ec..4e84fc9 100644 --- a/dirac.jl +++ b/dirac.jl @@ -28,8 +28,8 @@ end the other parameters are the same from dirac!(...)." function boundaryValue(κ, p, E, Φ0, W0, B0, A0, r_max) prob = ODEProblem(dirac!, [0, 1], (0, r_max)) - sol = solve(prob, RK4(), p=(κ, p, E, Φ0, W0, B0, A0)) - return sol(r_max)[1] + sol = solve(prob, RK4(), p=(κ, p, E, Φ0, W0, B0, A0), saveat=[r_max], save_idxs=[1]) + return sol[1, 1] end "Find all bound energies between E_min (=0) and E_max (=mass) where