def hartree(l, nrdr, beta, N, vr): """Calculates radial Coulomb integral. The following integral is calculated:: ^ n (r')Y (r') ^ / _ l lm v (r)Y (r) = |dr' --------------, l lm / _ _ |r - r'| where input and output arrays `nrdr` and `vr`:: dr n (r) r -- and v (r) r, l dg l are defined on radial grids as:: beta g r = ------, g = 0, 1, ..., N - 1. N - g """ assert is_contiguous(nrdr, float) assert is_contiguous(vr, float) assert nrdr.shape == vr.shape and len(vr.shape) == 1 return _gpaw.hartree(l, nrdr, beta, N, vr)
def hartree(l, nrdr, r, vr): """Calculates radial Coulomb integral. The following integral is calculated:: ^ n (r')Y (r') ^ / _ l lm v (r)Y (r) = |dr' --------------, l lm / _ _ |r - r'| where input and output arrays `nrdr` and `vr`:: dr n (r) r -- and v (r) r. l dg l """ assert is_contiguous(nrdr, float) assert is_contiguous(r, float) assert is_contiguous(vr, float) assert nrdr.shape == vr.shape and len(vr.shape) == 1 assert len(r.shape) == 1 assert len(r) >= len(vr) return _gpaw.hartree(l, nrdr, r, vr)