Boundary condition are located on groups of faces in a CFX results
file. Accessing boundary condition locations within the current zone
(see cfxExportZoneSet) is performed by making calls to the
following functions. It should be noted that the boundary condition
location information is not loaded into the Export API until either cfxExportBoundaryList
(see cfxExportBoundaryList)
or cfxExportBoundaryGet
(see cfxExportBoundaryGet) are called. This reduces memory overheads in
the API by not allocating space until required. When access to regions
in the current zone are no longer required a call to cfxExportBoundaryFree
(see cfxExportBoundaryFree) should be made to deallocate any
internal storage.
int cfxExportBoundaryCount ()
Query the number of boundary conditions defined in the current zone.
The function returns the number of boundary conditions in the current zone.
const char *cfxExportBoundaryName (const int bcidx)
Query the name of the boundary condition in the current zone
identified by bcidx
.
The function returns the name of the boundary condition or NULL
if the bcidx
supplied is out
of range.
The pointer returned points to static storage, which will be
overwritten by the next call to cfxExportBoundaryName
.
Note: The following routines use bcidx
,
which must lie between 1 and cfxExportBoundaryCount()
and use index which must lie between 1 and cfxExportBoundarySize
(bcidx, type).
const char *cfxExportBoundaryType (const int bcidx)
Query the type (for example, Inlet, Outlet, and so on) of the
boundary condition in the current zone identified by bcidx
.
The function returns the type of the boundary condition or NULL
if the bcidx
supplied is out
of range.
The pointer returned points to static storage, which will be
overwritten by the next call to cfxExportBoundaryType
.
int cfxExportBoundarySize (const int bcidx, const int type)
Query the number of faces (if type is cfxREG_FACES
) or nodes (if type is cfxREG_NODES
)
defined in the boundary condition identified by bcidx
in the current zone.
The function returns the number of faces or nodes or 0 if either bcidx
is out of range or type
is
invalid.
int *cfxExportBoundaryList (const int bcidx, const int type)
Query the faces (if type is cfxREG_FACES
) or nodes (if type is cfxREG_NODES
)
that define a boundary condition.
This function returns a pointer to an array of node ids or face
ids that define the location of the boundary condition identified
by bcidx
or NULL
if bcidx
is out of range or the type is not recognized. If
type is specified as cfxREG_FACES
, the
returned ids will represent faces. The element number and local element
face number may be extracted from each face id returned by using the
macros cfxELEMNUM
and cfxFACENUM
respectively. The node numbers for the face may be obtained by calling cfxExportFaceNodes
. For details, see cfxExportFaceNodes.
The returned pointer points to static data that should be destroyed
using cfxExportBoundaryFree
. Subsequent calls
to cfxExportBoundaryList
will overwrite the array.
int cfxExportBoundaryGet (const int bcidx, const int type, const int index, int *id)
Query the index'th face (type is cfxREG_FACES
) or index'th node (type is cfxREG_NODES
) that defines the boundary condition location indexed by bcidx
in the current zone. If bcidx
is out of range or type is not recognized or index
is out of range (not between 1 and cfxExportBoundarySize
), 0 is returned. Otherwise id
will contain
the identifier of the appropriate node or face defining the boundary
condition location and the function will return index
.If type is specified as cfxREG_FACES
, the returned id
will represent the identity
of a face. The element number and local element face number may be
extracted from the id
by using the macros cfxELEMNUM
and cfxFACENUM
respectively.