From 365c65ee73449069149d24fd690ac76cb7f8870b Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Fri, 14 Feb 2025 18:34:16 -0500 Subject: [PATCH] Performance benchmarking --- system.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system.jl b/system.jl index 89d23ec..4b425ef 100644 --- a/system.jl +++ b/system.jl @@ -46,7 +46,7 @@ function solve_system(s::system, initial_dens=nothing, initial_flds=(zeros(1 + s E_total_previous = NaN while true - (Φ0s, W0s, B0s, A0s) = solveMesonWfs(ρ_sp, ρ_vp, ρ_sn, ρ_vn, s.r_max, s.divs, isnan(E_total_previous) ? 50 : 5; initial_sol = (Φ0s, W0s, B0s, A0s)) + @time "Meson fields" (Φ0s, W0s, B0s, A0s) = solveMesonWfs(ρ_sp, ρ_vp, ρ_sn, ρ_vn, s.r_max, s.divs, isnan(E_total_previous) ? 50 : 5; initial_sol = (Φ0s, W0s, B0s, A0s)) S_interp = linear_interpolation(rs(s), Φ0s) V_interp = linear_interpolation(rs(s), W0s) @@ -54,14 +54,14 @@ function solve_system(s::system, initial_dens=nothing, initial_flds=(zeros(1 + s A_interp = linear_interpolation(rs(s), A0s) # protons - κs_p, Es_p = findAllOrbitals(true, S_interp, V_interp, R_interp, A_interp, s.r_max) + @time "Proton spectrum" (κs_p, Es_p) = findAllOrbitals(true, S_interp, V_interp, R_interp, A_interp, s.r_max) occs_p = fillNucleons(s.Z, κs_p, Es_p) - (ρ_sp, ρ_vp) = calculateNucleonDensity(κs_p, Es_p, occs_p, true, S_interp, V_interp, R_interp, A_interp, s.r_max, s.divs) + @time "Proton densities" (ρ_sp, ρ_vp) = calculateNucleonDensity(κs_p, Es_p, occs_p, true, S_interp, V_interp, R_interp, A_interp, s.r_max, s.divs) # neutrons - κs_n, Es_n = findAllOrbitals(false, S_interp, V_interp, R_interp, A_interp, s.r_max) + @time "Neutron spectrum" (κs_n, Es_n) = findAllOrbitals(false, S_interp, V_interp, R_interp, A_interp, s.r_max) occs_n = fillNucleons(s.N, κs_n, Es_n) - (ρ_sn, ρ_vn) = calculateNucleonDensity(κs_n, Es_n, occs_n, false, S_interp, V_interp, R_interp, A_interp, s.r_max, s.divs) + @time "Neutron densities" (ρ_sn, ρ_vn) = calculateNucleonDensity(κs_n, Es_n, occs_n, false, S_interp, V_interp, R_interp, A_interp, s.r_max, s.divs) if monitor_plot for s in p.series_list