Performance benchmarking

This commit is contained in:
Nuwan Yapa 2025-02-14 18:34:16 -05:00
parent 3e6c28ef17
commit 365c65ee73
1 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ function solve_system(s::system, initial_dens=nothing, initial_flds=(zeros(1 + s
E_total_previous = NaN E_total_previous = NaN
while true 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) S_interp = linear_interpolation(rs(s), Φ0s)
V_interp = linear_interpolation(rs(s), W0s) 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) A_interp = linear_interpolation(rs(s), A0s)
# protons # 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) 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 # 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) 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 if monitor_plot
for s in p.series_list for s in p.series_list