Renaming
This commit is contained in:
parent
7822c0f168
commit
77dcd1da7a
|
|
@ -27,7 +27,7 @@ end
|
|||
divs is the number of mesh divisions so solution would be returned as a 2×(1+divs) matrix,
|
||||
shooting method divides the interval into two partitions at r_max/2, ensuring convergence at both r=0 and r=r_max,
|
||||
the other parameters are the same from dirac!(...)."
|
||||
function solveDiracWf(κ, p, E, Φ0, W0, B0, A0, r_max, divs; shooting=true, normalize=true)
|
||||
function solveNucleonWf(κ, p, E, Φ0, W0, B0, A0, r_max, divs; shooting=true, normalize=true)
|
||||
saveat = r_max / divs
|
||||
|
||||
if shooting
|
||||
|
|
@ -124,7 +124,7 @@ function calculateNucleonDensity(N, p, Φ0, W0, B0, A0, r_max, divs, E_min=0, E_
|
|||
ρr2 = zeros(2, divs + 1) # ρ×r² values
|
||||
|
||||
for (κ, E, occ) in zip(κs, Es, occs)
|
||||
wf = solveDiracWf(κ, p, E, Φ0, W0, B0, A0, r_max, divs; shooting=true, normalize=true)
|
||||
wf = solveNucleonWf(κ, p, E, Φ0, W0, B0, A0, r_max, divs; shooting=true, normalize=true)
|
||||
wf2 = wf .* wf
|
||||
ρr2 += (occ / (4 * pi)) * wf2 # 2j+1 factor is accounted in the occupancy number
|
||||
end
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
using DelimitedFiles, Interpolations, Plots
|
||||
include("../dirac.jl")
|
||||
include("../nucleons.jl")
|
||||
|
||||
# test data generated from Hartree.f
|
||||
# format: x S(x) V(x) R(x) A(x)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
using DelimitedFiles, Interpolations, Plots
|
||||
include("../dirac.jl")
|
||||
include("../nucleons.jl")
|
||||
|
||||
# test data generated from Hartree.f
|
||||
# format: x S(x) V(x) R(x) A(x)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
using DelimitedFiles, Interpolations, Plots
|
||||
include("../dirac.jl")
|
||||
include("../nucleons.jl")
|
||||
|
||||
# test data generated from Hartree.f
|
||||
# format: x S(x) V(x) R(x) A(x)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
using DelimitedFiles, Interpolations, Plots
|
||||
include("../dirac.jl")
|
||||
include("../nucleons.jl")
|
||||
|
||||
# test data generated from Hartree.f
|
||||
# format: x S(x) V(x) R(x) A(x)
|
||||
|
|
@ -25,7 +25,7 @@ groundE = findEs(κ, p, S_interp, V_interp, R_interp, A_interp, r_max, E_min, E_
|
|||
println("ground state E = $groundE")
|
||||
|
||||
divs = 400
|
||||
wf = solveDiracWf(κ, p, groundE, S_interp, V_interp, R_interp, A_interp, r_max, divs)
|
||||
wf = solveNucleonWf(κ, p, groundE, S_interp, V_interp, R_interp, A_interp, r_max, divs)
|
||||
rs = range(0, r_max, length=divs+1)
|
||||
gs = wf[1, :]
|
||||
fs = wf[2, :]
|
||||
Loading…
Reference in New Issue