#include <hdf5.h>Go to the source code of this file.
Classes | |
| struct | H5PartFile |
Defines | |
| #define | H5PART_READ 0x01 |
| #define | H5PART_WRITE 0x02 |
| #define | H5PartOpenFileSerial(x, y) H5PartOpenFile(x,y) |
| #define | H5PartResetView(f) H5PartSetView(f,-1,-1) |
| #define | H5PartHasView(f) ((f->viewstart<0||f->viewend<0)?0:1) |
Typedefs | |
| typedef H5PartFile | H5PartFile |
Functions | |
| H5PartFile * | H5PartOpenFile (const char *filename, unsigned flags) |
| int | H5PartFileIsValid (H5PartFile *f) |
| void | H5PartCloseFile (H5PartFile *f) |
| void | H5PartSetNumParticles (H5PartFile *f, long long nparticles) |
| int | H5PartWriteDataFloat64 (H5PartFile *f, char *name, double *array) |
| int | H5PartWriteDataInt64 (H5PartFile *f, char *name, long long *array) |
| void | H5PartSetStep (H5PartFile *f, int step) |
| int | H5PartGetNumSteps (H5PartFile *f) |
| int | H5PartGetNumDatasets (H5PartFile *f) |
| int | H5PartGetDatasetName (H5PartFile *f, int index, char *name, int maxlen) |
| long long | H5PartGetNumParticles (H5PartFile *f) |
| void | H5PartSetView (H5PartFile *f, long long start, long long end) |
| int | H5PartGetView (H5PartFile *f, long long *start, long long *end) |
| void | H5PartSetCanonicalView (H5PartFile *f) |
| int | H5PartReadDataFloat64 (H5PartFile *f, char *name, double *array) |
| int | H5PartReadDataInt64 (H5PartFile *f, char *name, long long *array) |
| int | H5PartReadParticleStep (H5PartFile *f, int step, double *x, double *y, double *z, double *px, double *py, double *pz, long long *id) |
| int | H5PartWriteStepAttrib (H5PartFile *f, char *name, hid_t type, void *attrib, int nelem) |
| int | H5PartWriteFileAttrib (H5PartFile *f, char *name, hid_t type, void *attrib, int nelem) |
| int | H5PartWriteAttrib (H5PartFile *f, char *name, hid_t type, void *attrib, int nelem) |
| int | H5PartWriteFileAttribString (H5PartFile *f, char *name, char *attrib) |
| int | H5PartWriteStepAttribString (H5PartFile *f, char *name, char *attrib) |
| int | H5PartGetNumStepAttribs (H5PartFile *f) |
| int | H5PartGetNumFileAttribs (H5PartFile *f) |
| void | H5PartGetStepAttribInfo (H5PartFile *f, int idx, char *name, size_t maxnamelen, hid_t *type, int *nelem) |
| void | H5PartGetFileAttribInfo (H5PartFile *f, int idx, char *name, size_t maxnamelen, hid_t *type, int *nelem) |
| int | H5PartReadStepAttrib (H5PartFile *f, char *name, void *data) |
| void | H5PartReadAttrib (H5PartFile *f, char *name, void *data) |
| int | H5PartReadFileAttrib (H5PartFile *f, char *name, void *data) |
| int | H5PartStashFile (H5PartFile *f, char *filename) |
| int | H5PartUnstashFile (H5PartFile *f, char *filename, char *outputpath) |
| int | H5PartGetNumStashFiles (H5PartFile *f) |
| int | H5PartFileGetStashFileName (H5PartFile *f, int nameindex, char *filename, int maxnamelen) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/struct H5PartFile: This is an essentially opaque datastructure that acts as the filehandle for all practical purposes. It is created by H5PartOpenFile<xx>() and destroyed by H5PartCloseFile(). |
|
|
H5PartCloseFile: closes an open file.
|
|
||||||||||||||||||||
|
|
|
|
H5PartFileIsValid: checks if a file was successfully opened.
|
|
||||||||||||||||||||
|
H5PartGetDatasetName: This reads the name of a datasetes specified by it's index.
|
|
||||||||||||||||||||||||||||
|
H5PartGetFileAttribInfo: gets the name, type and number of elements of a file attribute .
|
|
|
H5PartGetNumDatasets: This reads the number of datasetes that are stored at a particular time step.
|
|
|
H5PartGetNumFileAttribs: gets the number of attributes bound to the file.
|
|
|
H5PartGetNumParticles: This gets the number of particles that are stored in the current timestep. It will arbitrarily select a timestep if you haven't already set the timestep with H5PartSetStep().
|
|
|
H5PartGetNumStashFiles: returns the number of stashed files.
|
|
|
H5PartGetNumStepAttribs: gets the number of attributes bound to the current step. The step has to be set with H5PartSetStep().
|
|
|
H5PartGetNumSteps: This reads the number of datasteps that are currently stored in the datafile. (simple return of an int). It works for both reading and writing of files, but is probably only typically used when you are reading.
|
|
||||||||||||||||||||||||||||
|
H5PartGetStepAttribInfo: gets the name, type and number of elements of a step attribute .
|
|
||||||||||||||||
|
H5PartGetView: Allows you to query the current view. Start and End will be -1 if there is no current view established. Use H5PartHasView to see if the view is smaller than the total dataset.
|
|
||||||||||||
|
H5PartOpenFile: Opens file with specified filename. If you open with flag H5PART_WRITE, it will truncate any file with the specified filename and start writing to it. If you open with H5PART_READ, then it will open the file readonly. H5PartFile should be treated as an essentially opaque datastructure. It acts as the file handle, but internally it maintains several key state variables associated with the file.
|
|
||||||||||||||||
|
H5PartReadAttrib: reads a step attribute NOTE: it has been superseeded by H5PartReadStepAttrib.
|
|
||||||||||||||||
|
H5PartReadDataFloat64: This reads in an individual array from a particlar timestep. If you haven't selected a particular timestep, it will pick the current one.
|
|
||||||||||||||||
|
H5PartReadDataInt64: This reads in an individual array from a particlar timestep. If you haven't selected a particular timestep, it will pick the current one.
|
|
||||||||||||||||
|
H5PartReadFileAttrib: reads a file attribute
|
|
||||||||||||||||||||||||||||||||||||||||
|
H5PartReadParticleStep: This is the mongo read function that pulls in all of the data for a given timestep in one shot. It also takes the timestep as an argument and will call H5PartSetStep() internally so that you don't have to make that call separately. See also: H5PartReadArray() if you want to just read in one of the many arrays. |
|
||||||||||||||||
|
H5PartReadStepAttrib: reads a step attribute
|
|
|
H5SetCanonicalView: If it is too tedious to manually set the start and end coordinates for a view, the H5SetCanonicalView() will automatically select an appropriate domain decomposition of the data arrays for the degree of parallelism and set the "view" accordingly.
|
|
||||||||||||
|
H5PartSetNumParticles: This function's sole purpose is to prevent needless creation of new HDF5 DataSpace handles if the number of particles is invariant throughout the sim. That's its only reason for existence. After you call this subroutine, all subsequent operations will assume this number of particles will be written.
|
|
||||||||||||
|
H5PartSetStep: When writing data to a file the current time step must be set (even if there is only one). In a file with N time steps, the steps are numbered from 0 to N-1.
|
|
||||||||||||||||
|
H5SetView: For parallel I/O or for subsetting operations on the datafile, the H5SetView subroutine allows you to define a subset of the total particle dataset to read. The concept of "view" works for both serial and for parallel I/O. The "view" will remain in effect until a new view is set, or the number of particles in a dataset changes, or the view is "unset" by calling H5SetView(file,-1,-1); Before you set a view, the H5PartGetNumParticles will return the total number of particles in a file (even for the parallel reads). However, after you set a view, it will return the number of particles contained in the view. The range is inclusive (the start and the end index).
|
|
||||||||||||
|
NOTE: it's missing the read! H5PartStashFile: stash a file in the hdf5 file. If it does not exists a UserData and a Files group will be created. /param f A FileHandle opened by H5PartOpenFile() or H5PartOpenFileParallel(). /param filename A null-terminated string for the name of the filename. /return 1 on succes, 0 on failure. |
|
||||||||||||||||
|
H5PartUnstashFile: unstash a file in the hdf5 file. /param f A FileHandle opened by H5PartOpenFile() or H5PartOpenFileParallel(). /param filename A null-terminated string for the name of the filename. /param The path to the directory to create the file. /return 1 on succes, 0 on failure. |
|
||||||||||||||||||||||||
|
H5PartWriteAttr: writes a step attribute. Note: this call has been superseeded by H5PartWriteStepAttr.
|
|
||||||||||||||||
|
H5PartWriteDataFloat64: 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 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. The data is committed to disk before the routine returns. 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.
|
|
||||||||||||||||
|
H5PartWriteDataInt64: 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 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. The data is committed to disk before the routine returns. 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.
|
|
||||||||||||||||||||||||
|
H5PartWriteStepAttr: writes a string attribute bound to a step.
|
|
||||||||||||||||
|
H5PartWriteFileAttribString: writes a string attribute bound to a file.
|
|
||||||||||||||||||||||||
|
H5PartWriteStepAttrib: writes a step attribute.
|
|
||||||||||||||||
|
H5PartWriteStepAttrString: writes a string attribute bound to the current step.
|
1.4.4