More CIC
This commit is contained in:
parent
cef0fb3786
commit
0ad97c6e66
@ -425,6 +425,8 @@ def leanCic(float[:,:] particles, float L, int Resolution):
|
|||||||
cdef np.uint64_t i
|
cdef np.uint64_t i
|
||||||
cdef CICType *field
|
cdef CICType *field
|
||||||
cdef np.uint32_t dummyRes
|
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 = new CICFilter(Resolution, L)
|
||||||
cic.resetMesh()
|
cic.resetMesh()
|
||||||
@ -443,6 +445,9 @@ def leanCic(float[:,:] particles, float L, int Resolution):
|
|||||||
dummyRes = 0
|
dummyRes = 0
|
||||||
cic.getDensityField(field, dummyRes)
|
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
|
del cic
|
||||||
|
return out_field
|
||||||
|
Loading…
Reference in New Issue
Block a user