H5Part  1.6.6
Functions
Readind and Writing Datasets
H5Part C API

Functions

h5part_int64_t H5PartWriteDataFloat32 (H5PartFile *f, const char *name, const h5part_float32_t *array)
h5part_int64_t H5PartWriteDataFloat64 (H5PartFile *f, const char *name, const h5part_float64_t *array)
h5part_int64_t H5PartWriteDataInt32 (H5PartFile *f, const char *name, const h5part_int32_t *array)
h5part_int64_t H5PartWriteDataInt64 (H5PartFile *f, const char *name, const h5part_int64_t *array)
h5part_int64_t H5PartReadDataFloat64 (H5PartFile *f, const char *name, h5part_float64_t *array)
h5part_int64_t H5PartReadDataFloat32 (H5PartFile *f, const char *name, h5part_float32_t *array)
h5part_int64_t H5PartReadDataInt64 (H5PartFile *f, const char *name, h5part_int64_t *array)
h5part_int64_t H5PartReadDataInt32 (H5PartFile *f, const char *name, h5part_int32_t *array)
h5part_int64_t H5PartReadParticleStep (H5PartFile *f, h5part_int64_t step, h5part_float64_t *x, h5part_float64_t *y, h5part_float64_t *z, h5part_float64_t *px, h5part_float64_t *py, h5part_float64_t *pz, h5part_int64_t *id)

Function Documentation

h5part_int64_t H5PartReadDataFloat32 ( H5PartFile *  f,
const char *  name,
h5part_float32_t *  array 
)

Read array of 32 bit floating point data from file.

When retrieving datasets from disk, you ask for them by name. There are no restrictions on naming of arrays, but it is useful to arrive at some common naming convention when sharing data with other groups.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate dataset with
[out]arrayArray of data
h5part_int64_t H5PartReadDataFloat64 ( H5PartFile *  f,
const char *  name,
h5part_float64_t *  array 
)

Read array of 64 bit floating point data from file.

When retrieving datasets from disk, you ask for them by name. There are no restrictions on naming of arrays, but it is useful to arrive at some common naming convention when sharing data with other groups.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate dataset with
[out]arrayArray of data
h5part_int64_t H5PartReadDataInt32 ( H5PartFile *  f,
const char *  name,
h5part_int32_t *  array 
)

Read array of 32 bit integer data from file.

When retrieving datasets from disk, you ask for them by name. There are no restrictions on naming of arrays, but it is useful to arrive at some common naming convention when sharing data with other groups.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate dataset with
[out]arrayArray of data
h5part_int64_t H5PartReadDataInt64 ( H5PartFile *  f,
const char *  name,
h5part_int64_t *  array 
)

Read array of 64 bit integer data from file.

When retrieving datasets from disk, you ask for them by name. There are no restrictions on naming of arrays, but it is useful to arrive at some common naming convention when sharing data with other groups.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate dataset with
[out]arrayArray of data
h5part_int64_t H5PartReadParticleStep ( H5PartFile *  f,
h5part_int64_t  step,
h5part_float64_t *  x,
h5part_float64_t *  y,
h5part_float64_t *  z,
h5part_float64_t *  px,
h5part_float64_t *  py,
h5part_float64_t *  pz,
h5part_int64_t *  id 
)

This is an aggregate read function that pulls in all of the data for a typical particle timestep in one shot. It also takes the timestep as an argument and will call H5PartSetStep internally.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]stepStep to read
[out]xBuffer for dataset named "x"
[out]yBuffer for dataset named "y"
[out]zBuffer for dataset named "z"
[out]pxBuffer for dataset named "px"
[out]pyBuffer for dataset named "py"
[out]pzBuffer for dataset named "pz"
[out]idBuffer for dataset named "id"
h5part_int64_t H5PartWriteDataFloat32 ( H5PartFile *  f,
const char *  name,
const h5part_float32_t *  array 
)

Write array of 32 bit floating point data to file.

After setting the number of particles with H5PartSetNumParticles() and the current timestep using H5PartSetStep(), you can start writing datasets into the file. Each dataset has a name associated with it (chosen by the user) in order to facilitate later retrieval. The name of the dataset is specified in the parameter name, which must be a null-terminated string.

There are no restrictions on naming of datasets, but it is useful to arrive at some common naming convention when sharing data with other groups.

The writing routines also implicitly store the datatype of the array so that the array can be reconstructed properly on other systems with incompatible type representations.

All data that is written after setting the timestep is associated with that timestep. While the number of particles can change for each timestep, you cannot change the number of particles in the middle of a given timestep.

The data is committed to disk before the routine returns.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate array with
[in]arrayArray to commit to disk
h5part_int64_t H5PartWriteDataFloat64 ( H5PartFile *  f,
const char *  name,
const h5part_float64_t *  array 
)

Write array of 64 bit floating point data to file.

After setting the number of particles with H5PartSetNumParticles() and the current timestep using H5PartSetStep(), you can start writing datasets into the file. Each dataset has a name associated with it (chosen by the user) in order to facilitate later retrieval. The name of the dataset is specified in the parameter name, which must be a null-terminated string.

There are no restrictions on naming of datasets, but it is useful to arrive at some common naming convention when sharing data with other groups.

The writing routines also implicitly store the datatype of the array so that the array can be reconstructed properly on other systems with incompatible type representations.

All data that is written after setting the timestep is associated with that timestep. While the number of particles can change for each timestep, you cannot change the number of particles in the middle of a given timestep.

The data is committed to disk before the routine returns.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate array with
[in]arrayArray to commit to disk
h5part_int64_t H5PartWriteDataInt32 ( H5PartFile *  f,
const char *  name,
const h5part_int32_t *  array 
)

Write array of 32 bit integer data to file.

After setting the number of particles with H5PartSetNumParticles() and the current timestep using H5PartSetStep(), you can start writing datasets into the file. Each dataset has a name associated with it (chosen by the user) in order to facilitate later retrieval. The name of the dataset is specified in the parameter name, which must be a null-terminated string.

There are no restrictions on naming of datasets, but it is useful to arrive at some common naming convention when sharing data with other groups.

The writing routines also implicitly store the datatype of the array so that the array can be reconstructed properly on other systems with incompatible type representations.

All data that is written after setting the timestep is associated with that timestep. While the number of particles can change for each timestep, you cannot change the number of particles in the middle of a given timestep.

The data is committed to disk before the routine returns.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate array with
[in]arrayArray to commit to disk
h5part_int64_t H5PartWriteDataInt64 ( H5PartFile *  f,
const char *  name,
const h5part_int64_t *  array 
)

Write array of 64 bit integer data to file.

After setting the number of particles with H5PartSetNumParticles() and the current timestep using H5PartSetStep(), you can start writing datasets into the file. Each dataset has a name associated with it (chosen by the user) in order to facilitate later retrieval. The name of the dataset is specified in the parameter name, which must be a null-terminated string.

There are no restrictions on naming of datasets, but it is useful to arrive at some common naming convention when sharing data with other groups.

The writing routines also implicitly store the datatype of the array so that the array can be reconstructed properly on other systems with incompatible type representations.

All data that is written after setting the timestep is associated with that timestep. While the number of particles can change for each timestep, you cannot change the number of particles in the middle of a given timestep.

The data is committed to disk before the routine returns.

Returns:
H5PART_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName to associate array with
[in]arrayArray to commit to disk