Matching point = 3fm (same as Hartree.f)

This commit is contained in:
Nuwan Yapa 2026-04-02 14:28:42 -04:00
parent 4211227d6a
commit 3becb0860f
1 changed files with 4 additions and 4 deletions

View File

@ -55,13 +55,13 @@ end
init_BC() = [1.0, 1.0] # TODO: Why not [0.0, 1.0]?
"Solve the Dirac equation and return the wave function u(r)=[g(r), f(r)] where
divs is the number of mesh divisions so solution would be returned as a 2×(1+divs) matrix,
the other parameters are the same from dirac!(...)."
function solveNucleonWf(κ, p::Bool, E, s::system; normalize=true, algo=Vern9())
matching_point marks the partitioning position (between 0.0 and 1.0) for shooting method,
the solution would be returned as a 2×(1+divs) matrix."
function solveNucleonWf(κ, p::Bool, E, s::system; normalize=true, algo=Vern9(), matching_point=0.15)
(f1, f2) = optimized_dirac_potentials(p, s)
# partitioning
mid_idx = s.divs ÷ 2
mid_idx = s.divs * matching_point |> round |> Int
r_mid = rs(s)[mid_idx]
left_r = rs(s)[1:mid_idx]
right_r = rs(s)[mid_idx:end]