FreeMat

- Main Page
- Related Pages

vtkPCosmoReader

Section: Visualization Toolkit Parallel Classes

# Usage

vtkPCosmoReader creates a vtkUnstructuredGrid from a binary cosmology file. The file contains fields for: x_position, x_velocity (float) y_position, y_velocity (float) z-position, z_velocity (float) mass (float) identification tag (integer)

If the file contains particle information x,y,z is the location of the particle in simulation space with a velocity vector and a mass which will be the same for all particles.

To create an instance of class vtkPCosmoReader, simply invoke its constructor as follows

      obj = vtkPCosmoReader

# Methods

The class vtkPCosmoReader has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkPCosmoReader class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkPCosmoReader = obj.NewInstance ()`
- `vtkPCosmoReader = obj.SafeDownCast (vtkObject o)`
- `obj.SetFileName (string )` - Specify the name of the cosmology particle binary file to read
- `string = obj.GetFileName ()` - Specify the name of the cosmology particle binary file to read
- `obj.SetRL (float )` - Specify the physical box dimensions size (rL) (default 91)
- `float = obj.GetRL ()` - Specify the physical box dimensions size (rL) (default 91)
- `obj.SetOverlap (float )` - Specify the ghost cell spacing (edge boundary of box) (default 5)
- `float = obj.GetOverlap ()` - Specify the ghost cell spacing (edge boundary of box) (default 5)
- `obj.SetReadMode (int )` - Set the read mode (0 = one-to-one, 1 = default, round-robin)
- `int = obj.GetReadMode ()` - Set the read mode (0 = one-to-one, 1 = default, round-robin)
- `obj.SetCosmoFormat (int )` - Set the filetype to Gadget or Cosmo read mode (0 = Gadget, 1 = default, Cosmo)
- `int = obj.GetCosmoFormat ()` - Set the filetype to Gadget or Cosmo read mode (0 = Gadget, 1 = default, Cosmo)
- `vtkMultiProcessController = obj.GetController ()` - Set the communicator object for interprocess communication
- `obj.SetController (vtkMultiProcessController )` - Set the communicator object for interprocess communication