pencil.export.particles_to_vtk ============================== .. py:module:: pencil.export.particles_to_vtk .. autoapi-nested-parse:: Contains the class with the vtk data. Classes ------- .. autoapisummary:: pencil.export.particles_to_vtk.ParticlesVtk Functions --------- .. autoapisummary:: pencil.export.particles_to_vtk.particles_to_vtk Module Contents --------------- .. py:function:: particles_to_vtk(var_file='pvar.dat', datadir='data', proc=-1, destination='particles.vtk', ti=-1, tf=-1, binary=True) Read the pVAR files from Pencil Code and write them as vtk files. call signature: particles_to_vtk(var_file='pvar.dat', datadir='data', proc=-1, destination='particles.vtk', ti=-1, tf=-1, binary=True) Keyword arguments: *var_file*: Name of the PVAR file. *datadir*: Directory where the data is stored. *proc*: Processor to be read. If -1 read all and assemble to one array. *destination*: Destination file (only if ti, tf > 0). *ti*: Initial time index for animation. *tf*: Final time index for animation. *binary*: Determines if binary or clear text data for the vtk files. .. py:class:: ParticlesVtk Bases: :py:obj:`object` ParticlesVtk -- holds the vtk particle data and methods. Fill members with default values. .. py:attribute:: ipars :value: 0 .. py:attribute:: vtk_grid_data :value: [] .. py:attribute:: ti :value: -1 .. py:attribute:: tf :value: -1 .. py:attribute:: binary :value: True .. py:attribute:: destination :value: 'work.vtk' .. py:method:: convert_to_vtk(pvar_list) Convert particle data into vtk format and return the vtk objects. call signature: convert_to_vtk(self, pvar_list) Keyword arguments: *pvar_list*: List of particle objects. .. py:method:: write_to_vtk() Write the grid data into vtk files. call signature: write_to_vtk(self)