This commit is contained in:
Guilhem Lavaux 2014-06-12 22:18:50 +02:00
parent cef0fb3786
commit 0ad97c6e66

View File

@ -425,6 +425,8 @@ def leanCic(float[:,:] particles, float L, int Resolution):
cdef np.uint64_t i
cdef CICType *field
cdef np.uint32_t dummyRes
cdef np.ndarray[np.float64_t, ndim=3] out_field
cdef np.uint64_t j
cic = new CICFilter(Resolution, L)
cic.resetMesh()
@ -443,6 +445,9 @@ def leanCic(float[:,:] particles, float L, int Resolution):
dummyRes = 0
cic.getDensityField(field, dummyRes)
out_field = np.empty((dummyRes, dummyRes, dummyRes), dtype=np.float64)
for j in xrange(out_field.size):
out_field[j] = field[j]
del cic
return out_field