Functions

Basic Operations dealing with semantic structures below the end-user API.

Functions

F5_API F5_TimeParameterF5BnewTimeParameter (void)
F5_API void F5deleteTimeParameter (F5_TimeParameter **)
F5_API int F5setTimeUnit (hid_t file_id, const F5_TimeParameter *)
F5_API int F5getTimeUnit (hid_t file_id, F5_TimeParameter *)
F5_API hid_t F5Bappend_timeslice (hid_t file_id, const F5_TimeParameter *time)
F5_API hid_t F5Bappend_slice (hid_t file_id, const double *time)
F5_API F5PathF5Binitialize_path (hid_t File_id)
F5_API hid_t F5BgetMostRecentSlice (double *t, hid_t FileID, const char **time_attrib_names)
F5_API hid_t F5BgetMostRecentFileSlice (double t, const char *filename)
F5_API hid_t F5BgetGridVertexData (hid_t SliceID, const char *gridname, const char *chartname, const char *fieldname)

Function Documentation

F5_API hid_t F5Bappend_slice ( hid_t  file_id,
const double *  time 
)

Get the HDF5 identifier for a given time slice. A new group is created in the file if none exists yet.

Parameters:
file_id HDF5 File identifier.
time The time is specified as a pointer, such that it may be NULL to indicate a static dataset.
Returns:
HDF5 identifier for the newly created or opened Time Slice group.
Todo:

Maybe move to another header.

Add consistency check on re-open of an existing group

F5_API hid_t F5Bappend_timeslice ( hid_t  file_id,
const F5_TimeParameter time 
)

Append a time slice in the given time unit. Only one time unit is allowed per file. If another time unit has already been defined in the file, the function will return without touching the file.

F5_API hid_t F5BgetGridVertexData ( hid_t  SliceID,
const char *  gridname,
const char *  chartname,
const char *  fieldname 
)

Get the GridVertexData for given grid-, chart- and fieldnames.

F5_API hid_t F5BgetMostRecentFileSlice ( double  t,
const char *  filename 
)

Get the MostRecentSlice out of a HDF5 file with the given name.

F5_API hid_t F5BgetMostRecentSlice ( double *  t,
hid_t  FileID,
const char **  time_attrib_names 
)

Get the next slice for given time attriute names.

Deprecated:
F5_API F5Path* F5Binitialize_path ( hid_t  File_id  ) 

Initialize an F5Path from a file for reading. The coordinate system is set to the default cartesian coordinates. No timeslice, grid, field etc. ID's are defined yet, these need to be filled in by iteration. This function is called internally by F5iterate_timeslices() for creating an F5Path object that is then modified to contain a valid group ID for each timeslice, grid, field, ... Currently, it is hard-coded for reading cartesian coordinates only. The preferred way is to employ iterators on reading files.

F5_API F5_TimeParameter* F5BnewTimeParameter ( void   ) 

Allocate a new F5_TimeParameter structure in memory. Actually, one could also pass a static structure, but using this function and F5deleteTimePArameter(), the call is safe even if the TimeParameter structure is changed in a future version of F5.

F5_API void F5deleteTimeParameter ( F5_TimeParameter **   ) 

Deallocate a F5_TimeParameter structure from memory. It needs to be passed a pointer to a pointer, whereby the pointer is set to zero on deallocation. So it is safe to call this function multiple times on the same pointer (just for experimental convenience!).

F5_API int F5getTimeUnit ( hid_t  file_id,
F5_TimeParameter  
)

Get the time unit information as specified in the file.

F5_API int F5setTimeUnit ( hid_t  file_id,
const F5_TimeParameter  
)

Set the time unit globally for the given file.

Returns:
Non-zero indicates that an incompatible time unit has already been set and was not overriden. The caller should take special care to write new data into a different file then.