XMDF
2.2
|
When an API function is called that fills in an array, the array must already be allocated. The path used in all of these functions is the path to the geometric path folder.
These functions are used to store the properties and attributes of a geometric path group. Anyone using this API to read the geometric path group will have to know this in order to properly allocate their arrays.
The function xfCreateGeometricPath group creates the location in the HDF5 file to store the geometric path group. This function requires a GUID because we use GUIDs to match datasets to spatial objects. The NullLoc argument must be an array of size 3 and is used to define the fill value for NULL particles. If the number of nodes/particles increases in the time range, newly created nodes are added to all times steps, including previously stored timesteps. Since these particles didn’t exist at these time values, their location will for timesteps before they became active will be stored as the NullLoc.
The function xfWriteParticleTimestep is used to write all of the particle information for a single timestep. The function first checks to determine if the number of particles (nPaths) has not changed (it can be increased by not decreased). If the number of particles has increased, the function will extend the HDF5 dataset and fill in the previous timesteps for these elements with the Nullvalue. The timestep dimension is then extended by one. Lastly, the data for the new locations are stored in the HDF5 dataset. In C, the Locs array is a single dimensional double array which represents the x, y, and z values for all of the particles (the array is size number of particles * 3). The x values are stored in indices 0, 3, 6, etc. Likewise the y values are stored in indices 1, 4, 7, etc. and z in 2, 5, 8, etc. In FORTRAN the Locs array is a double dimensional array 3 x nParticles.
These functions are provided to read the properties and attributes of a geometric path group.
Particle path locations can be read for a multiple indicies at a specific time or for a specific particle at multiple times. In each case the Locs array must already be allocated to the correct size.