Fixed Green's matrix

This commit is contained in:
Nuwan Yapa 2025-01-28 18:50:22 -05:00
parent 4007f2eac2
commit 4801e9070d
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ greensFunctionP(r, rp) = -rp^2 / (max(r, rp) + r_reg)
function solveKG(m, source, r_max)
greensFunction = m == 0 ? greensFunctionP : (r, rp) -> greensFunctionKG(m / ħc, r, rp)
mesh = range(0, r_max; length=length(source))
greenMat = greensFunction.(transpose(mesh), mesh)
greenMat = greensFunction.(mesh, transpose(mesh))
return greenMat * source
end