coexist.to_vtk#
- coexist.to_vtk(dirname, positions, *, times=None, velocities=None, radii=None, verbose=True)[source]#
Export particle positions and optionally times, velocities and radii to a folder dirname in the modern binary VTK format.
- Parameters:
- dirname
str
A path to the directory to save particle data to.
- positions(T,)
list
[(P
, 3)np.ndarray
] A list-like of particle locations at each timestep T; each list entry represents a single timestep and should contain a 2D NumPy array with columns formatted as [x, y, z] - each row represents a particle P.
- times(T,)
list
[float
], optional A list of times for each timestep given in positions.
- velocities(T,)
list
[(P
, 3)np.ndarray
], optional Same as positions, a list of T timesteps with each entry being a 2D NumPy array containing P rows and 3 columns [vx, vy, vz].
- radii(T,)
list
[(P,)np.ndarray
], optional A list of length T (for T timesteps) with each entry containing a 1D NumPy array containing the radii of the P particles.
- verbosebool,
default
True
Print extra information while saving.
- dirname