Volumes are groups of elements in a CFX results file. Accessing
volumes within the current zone (see cfxExportZoneSet) is
performed by making calls to the following functions. It should be
noted that the volume definitions for a zone are not loaded into the
Export API until either cfxExportVolumeList
(see cfxExportVolumeList) or cfxExportVolumeGet
(see cfxExportVolumeGet) are called. This reduces memory overheads in
the API by not allocating space until required.
When access to volume information in the current zone is no
longer required a call to cfxExportVolumeFree
(see cfxExportVolumeFree) should be made to deallocate any
internal storage.
int cfxExportVolumeCount ()
Query the number of volumes defined in the current zone.
int cfxExportVolumeSize (int volnum, int type)
Query the number of nodes (if type is cfxVOL_NODES
) or number of elements (if type is cfxVOL_ELEMS
) defining the volume indexed by volnum
in the
current zone. The return value will be 0 if volnum
is out of range or type is invalid.
char *cfxExportVolumeName (int volnum)
Query the name of the volume in the current zone indexed by volnum
. Returns NULL
if the volnum
is out of range.
Note: The returned pointer points to internal storage, which
will be overwritten by the next call to cfxExportVolumeName
.
int *cfxExportVolumeList (int volnum, int type)
Query the nodes (type is cfxVOL_NODES
) or elements (cfxVOL_ELEMS
) that define
a volume.
This function returns a pointer to an array of node ids or element
ids that define the volume identified by volnum
or NULL
if the volume number is out of range
or the type is not recognized.
int cfxExportVolumeGet (int volnum, int type, int index, int *id)
Query the [index]th element (type is cfxVOL_ELEM
) or [index]th node (type is cfxVOL_NODE
) that defines a volume volnum
in the current
zone.
If volnum is out of range or type is not recognized or index is out of range, 0 is returned.
Otherwise id
will contain the id of the
appropriate node or element in defining the volume and the function
will return index
.