Fixed Green's matrix
This commit is contained in:
parent
4007f2eac2
commit
4801e9070d
|
|
@ -31,7 +31,7 @@ greensFunctionP(r, rp) = -rp^2 / (max(r, rp) + r_reg)
|
||||||
function solveKG(m, source, r_max)
|
function solveKG(m, source, r_max)
|
||||||
greensFunction = m == 0 ? greensFunctionP : (r, rp) -> greensFunctionKG(m / ħc, r, rp)
|
greensFunction = m == 0 ? greensFunctionP : (r, rp) -> greensFunctionKG(m / ħc, r, rp)
|
||||||
mesh = range(0, r_max; length=length(source))
|
mesh = range(0, r_max; length=length(source))
|
||||||
greenMat = greensFunction.(transpose(mesh), mesh)
|
greenMat = greensFunction.(mesh, transpose(mesh))
|
||||||
return greenMat * source
|
return greenMat * source
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue