3.4.4. Node Routines

Accessing nodes within the current zone (see cfxExportZoneSet) is performed by making calls to the following functions.

It should be noted that the nodes for a zone are not loaded into the Export API until either cfxExportNodeList (see cfxExportNodeList) or cfxExportNodeGet (see cfxExportNodeGet) are called. This reduces memory overheads in the API by not allocating space until required.

When access to nodes in the current zone is no longer required, a call to cfxExportNodeFree (see cfxExportNodeFree) should be made to deallocate any internal storage.

3.4.4.1. cfxExportNodeCount

int cfxExportNodeCount () 

Query the number of nodes defined in the current zone.

3.4.4.2. cfxExportNodeList

cfxNode *cfxExportNodeList ()

Return a pointer to an array of cfxNode elements (see cfxnode) containing the coordinate values of each node in the current zone. The first node in the zone is the first element of the array, the second is the second and so on.

The memory allocated to represent this information should be deallocated using cfxExportNodeFree (see cfxExportNodeFree) when no longer required.

3.4.4.3. cfxExportNodeGet

int cfxExportNodeGet (int nodeid, double *x, double *y, double *z)

Query the coordinates of a specific node in the current zone.

The index (nodeid) is specified between 1 and the number of nodes returned by cfxExportNodeCount (see cfxExportNodeCount). If the value of nodeid is out of range the return value is 0 otherwise it is nodeid.

3.4.4.4. cfxExportNodeFree

void cfxExportNodeFree ()

Deallocate any internal storage allocated by the Export API after calls to cfxExportNodeList (see cfxExportNodeList) and cfxExportNodeGet (see cfxExportNodeGet) have been made in the current zone.

3.4.4.5. cfxExportNodeUnits

const char* cfxExportNodeUnits()

Return a character string that represents the units associated with the mesh, for example, m.