Add a cell to hold the particle set

This commit is contained in:
Guilhem Lavaux 2016-06-09 14:43:17 +02:00
parent 04ad4ff266
commit 905c2ff2b4

View File

@ -17,8 +17,11 @@ class ProgrammableParticleLoad(object):
vv.SetData(ns.numpy_to_vtk(np.ascontiguousarray(particles.astype(np.float64)), deep=1))
vv.SetDataTypeToDouble()
out.Allocate(1,1)
out.SetPoints(vv)
out.InsertNextCell(vtk.VTK_VERTEX, particles.shape[0], range(particles.shape[0]))
@staticmethod
def request_information(source):
pass