pencil.export.particles_to_vtk
Contains the class with the vtk data.
Classes
ParticlesVtk -- holds the vtk particle data and methods. |
Functions
|
Read the pVAR files from Pencil Code and write them as vtk files. |
Module Contents
- pencil.export.particles_to_vtk.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.
- class pencil.export.particles_to_vtk.ParticlesVtk
Bases:
objectParticlesVtk – holds the vtk particle data and methods.
Fill members with default values.
- ipars = 0
- vtk_grid_data = []
- ti = -1
- tf = -1
- binary = True
- destination = 'work.vtk'
- 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.
- write_to_vtk()
Write the grid data into vtk files.
call signature:
write_to_vtk(self)