Pointwise Plugin SDK
Functions
Unstructured Grid Export Functions
+ Collaboration diagram for Unstructured Grid Export Functions:

Functions

PWP_UINT32 PwBlkElementCount (PWGM_HBLOCK block, PWGM_ELEMCOUNTS *pCounts)
 Get the number of block elements. More...
 
PWGM_HELEMENT PwBlkEnumElements (PWGM_HBLOCK block, PWP_UINT32 ndx)
 Sequentially enumerate the block elements. More...
 
PWP_BOOL PwBlkNdxElemDataMod (const PWGM_HBLOCK block, const PWP_UINT32 ndx, PWGM_ELEMDATA *pElemData)
 Get the block element data relative to the model's index space. More...
 
PWP_BOOL PwDomCondition (PWGM_HDOMAIN domain, PWGM_CONDDATA *pCondData)
 Get the domain condition data. More...
 
PWP_UINT32 PwDomElementCount (PWGM_HDOMAIN domain, PWGM_ELEMCOUNTS *pCounts)
 Get the number of domain elements. More...
 
PWGM_HELEMENT PwDomEnumElements (PWGM_HDOMAIN domain, PWP_UINT32 ndx)
 Sequentially enumerate the domain elements. More...
 
PWP_BOOL PwDomNdxElemDataMod (const PWGM_HDOMAIN domain, const PWP_UINT32 ndx, PWGM_ELEMDATA *pElemData)
 Get the domain element data relative to the model's index space. More...
 
PWP_BOOL PwElemDataCastToPoly (const PWGM_ELEMDATA *eData, PWGM_POLYELEMDATA *polyData)
 Cast a PWGM_ELEMDATA to a PWGM_POLYELEMDATA. More...
 
PWP_BOOL PwElemDataMod (PWGM_HELEMENT element, PWGM_ELEMDATA *pElemData)
 Get the element data relative to the model's index space. More...
 
PWP_BOOL PwElemDataModEnum (PWGM_HELEMENT element, PWGM_ENUMELEMDATA *pElemData)
 Get the enumerated element data relative to the model's index space. More...
 
const char * PwElemTypeToText (PWGM_ENUM_ELEMTYPE type)
 Maps a PWGM_ENUM_ELEMTYPE value to a human readable string. More...
 
const char * PwFaceOrderToText (PWGM_ENUM_FACEORDER faceOrder)
 Maps a PWGM_ENUM_FACEORDER value to a human readable string. More...
 
PWP_BOOL PwModAppendEnumElementOrder (PWGM_HGRIDMODEL model, PWGM_ENUM_ELEMORDER order)
 Append an element order to the enumElements() ordering sequence. More...
 
PWP_BOOL PwModCustomIndexSchemeReady (PWGM_HGRIDMODEL model, PWGM_INDEXMAPPERCB cb, void *cbData)
 Notifys the Pointwise export framework that the custom, unstructured index map is ready. More...
 
PWP_VOID PwModDefaultEnumElementOrder (PWGM_HGRIDMODEL model)
 Reset the enumElements() ordering sequence to the default (none). More...
 
PWP_UINT32 PwModDomainCount (PWGM_HGRIDMODEL model)
 Get the number of domain elements in the model. More...
 
PWGM_HDOMAIN PwModEnumDomains (PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
 Sequentially enumerate the model domain elements. More...
 
PWP_UINT32 PwModEnumElementCount (PWGM_HGRIDMODEL model, PWGM_ELEMCOUNTS *pCounts)
 Get the number of enumerated model block elements. More...
 
PWGM_HELEMENT PwModEnumElements (PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
 Sequentially enumerate the model's block elements. More...
 
PWGM_HVERTEX PwModEnumVertices (PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
 Sequentially enumerate the model vertex elements. More...
 
PWP_UINT32 PwModNdxBlkElementCount (const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_ELEMCOUNTS *pCounts)
 Get the number of elements in a block. More...
 
PWP_BOOL PwModNdxDomCondition (const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_CONDDATA *pCondData)
 Sequentially enumerate the domain condition data. More...
 
PWP_BOOL PwModNdxElemDataMod (const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_ELEMDATA *pElemData)
 Sequentially enumerate the model's block element data. More...
 
PWP_BOOL PwModNdxElemDataModEnum (const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_ENUMELEMDATA *pElemData)
 Sequentially enumerate the model's block element data. More...
 
PWP_BOOL PwModNdxVertDataMod (const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_VERTDATA *pVertData)
 Sequentially enumerate the vertex data relative to the model's index space. More...
 
PWP_BOOL PwModStreamBoundaryFacesOnly (const PWGM_HGRIDMODEL model, PWGM_BEGINSTREAMCB beginCB, PWGM_FACESTREAMCB faceCB, PWGM_ENDSTREAMCB endCB, void *userData)
 Stream the grid model's boundary faces to callback functions. More...
 
PWP_BOOL PwModStreamFaces (PWGM_HGRIDMODEL model, PWGM_ENUM_FACEORDER order, PWGM_BEGINSTREAMCB beginCB, PWGM_FACESTREAMCB faceCB, PWGM_ENDSTREAMCB endCB, void *userData)
 Stream the grid model's faces to a callback function in the specified order. More...
 
PWP_BOOL PwModStreamFacesAnyOrder (const PWGM_HGRIDMODEL model, PWGM_BEGINSTREAMCB beginCB, PWGM_FACESTREAMCB faceCB, PWGM_ENDSTREAMCB endCB, void *userData)
 Stream all the grid model's faces to callback functions in an unspecified order. It is possible that the specific order may change from one software release to the next. More...
 
PWP_UINT32 PwModVertexCount (PWGM_HGRIDMODEL model)
 Get the number of model vertex elements. More...
 
PWP_BOOL PwVertDataMod (PWGM_HVERTEX vertex, PWGM_VERTDATA *pVertData)
 Get the vertex data relative to the model's index space. More...
 
PWP_BOOL PwVertIndexMod (PWGM_HVERTEX vertex, PWP_UINT32 *pIndex)
 Get the vertex index relative to the model's index space. More...
 
PWP_BOOL PwVertXyzVal (PWGM_HVERTEX vertex, PWGM_ENUM_XYZ which, PWGM_XYZVAL *pVal)
 Get a vertex's x, y, or z component value. More...
 

Detailed Description

These functions are ONLY used to access unstructured grid models.

Function Documentation

◆ PwBlkElementCount()

PWP_UINT32 PwBlkElementCount ( PWGM_HBLOCK  block,
PWGM_ELEMCOUNTS pCounts 
)

Get the number of block elements.

Parameters
blockA block handle.
pCountsA PWGM_ELEMCOUNTS buffer. May be nullptr.
Returns
The total number of elements

Definition at line 309 of file apiGridModel.cxx.

References PWGM_HBLOCK_ISVALID.

Referenced by PwModNdxBlkElementCount().

◆ PwBlkEnumElements()

PWGM_HELEMENT PwBlkEnumElements ( PWGM_HBLOCK  block,
PWP_UINT32  ndx 
)

Sequentially enumerate the block elements.

Parameters
blockA block handle.
ndxThe element index < PwBlkElementCount().
Returns
The element handle.
See also
PwBlkElementCount(), PwElemDataMod()
Sample usage:
PWGM_ELEMDATA ElemData;
PWP_UINT32 ndx = 0;
PWGM_HELEMENT hElem = PwBlkEnumElements(block, ndx);
while (PWGM_HELEMENT_ISVALID(hElem)) {
if (PwElemDataMod(hElem, &ElemData)) {
// ...etc...
}
hElem = PwBlkEnumElements(block, ++ndx);
}

Definition at line 317 of file apiGridModel.cxx.

References PWGM_HBLOCK_ISVALID.

Referenced by PwBlkNdxElemDataMod().

◆ PwBlkNdxElemDataMod()

PWP_BOOL PwBlkNdxElemDataMod ( const PWGM_HBLOCK  block,
const PWP_UINT32  ndx,
PWGM_ELEMDATA pElemData 
)
inline

Get the block element data relative to the model's index space.

Parameters
blockA block handle.
ndxThe element index < PwBlkElementCount().
pElemDataPointer to a PWGM_ELEMDATA buffer.
Returns
PWP_TRUE on success
See also
PwElemDataMod(), PwBlkEnumElements()
Sample usage:
PWP_UINT32 ndx = 0;
while (PwBlkNdxElemDataMod(block, ndx++, &eData)) {
// ...etc...
}
Equivalent to:
PwElemDataMod(PwBlkEnumElements(block, ndx), pElemData);

Definition at line 2253 of file apiGridModel.h.

References PwBlkEnumElements(), and PwElemDataMod().

◆ PwDomCondition()

PWP_BOOL PwDomCondition ( PWGM_HDOMAIN  domain,
PWGM_CONDDATA pCondData 
)

Get the domain condition data.

Parameters
domainA domain handle.
pCondDataPointer to a PWGM_CONDDATA buffer.
Returns
PWP_TRUE on success

Definition at line 341 of file apiGridModel.cxx.

References PWGM_HDOMAIN_ISVALID, and PWP_FALSE.

Referenced by CaeUnsPatch::condition(), and PwModNdxDomCondition().

◆ PwDomElementCount()

PWP_UINT32 PwDomElementCount ( PWGM_HDOMAIN  domain,
PWGM_ELEMCOUNTS pCounts 
)

Get the number of domain elements.

Parameters
domainA domain handle.
pCountsA PWGM_ELEMCOUNTS buffer. May be nullptr.
Returns
The total number of elements

Definition at line 325 of file apiGridModel.cxx.

References PWGM_HDOMAIN_ISVALID.

◆ PwDomEnumElements()

PWGM_HELEMENT PwDomEnumElements ( PWGM_HDOMAIN  domain,
PWP_UINT32  ndx 
)

Sequentially enumerate the domain elements.

Parameters
domainA domain handle.
ndxThe element index < PwDomElementCount().
Returns
The element handle.
See also
PwDomElementCount()

Definition at line 333 of file apiGridModel.cxx.

References PWGM_HDOMAIN_ISVALID.

Referenced by PwDomNdxElemDataMod().

◆ PwDomNdxElemDataMod()

PWP_BOOL PwDomNdxElemDataMod ( const PWGM_HDOMAIN  domain,
const PWP_UINT32  ndx,
PWGM_ELEMDATA pElemData 
)
inline

Get the domain element data relative to the model's index space.

Parameters
domainA domain handle.
ndxThe element index < PwDomElementCount().
pElemDataPointer to a PWGM_ELEMDATA buffer.
Returns
PWP_TRUE on success
See also
PwElemDataMod(), PwBlkEnumElements()
Sample usage:
PWP_UINT32 ndx = 0;
while (PwDomNdxElemDataMod(domain, ndx++, &eData)) {
// ...etc...
}
Equivalent to:
PwElemDataMod(PwDomEnumElements(domain, ndx), pElemData);

Definition at line 2290 of file apiGridModel.h.

References PwDomEnumElements(), and PwElemDataMod().

◆ PwElemDataCastToPoly()

PWP_BOOL PwElemDataCastToPoly ( const PWGM_ELEMDATA eData,
PWGM_POLYELEMDATA polyData 
)

Cast a PWGM_ELEMDATA to a PWGM_POLYELEMDATA.

Parameters
eDataPWGM_ELEMTYPE_POLYH or PWGM_ELEMTYPE_POLYG element connectivity obtained from PwElemDataMod() or PwElemDataModEnum().
polyDataPointer to a PWGM_POLYELEMDATA buffer. See notes below for IMPORTANT information about polyData's lifetime.
Returns
PWP_TRUE on success
Note
It is an error if eData->type is not PWGM_ELEMTYPE_POLYH or PWGM_ELEMTYPE_POLYG.

Poly element checking is only needed if the plugin enables poly elements in rtCaepInitItems.h<tt>.

The pointers (indices, offsets, and faceIndices) and other values in this struct are only valid until the next call to PwElemDataMod() or PwElemDataModEnum(). If you need the data to persist, you must copy the data referenced by these pointers to local storage.

Sample usage:
PWGM_ELEMDATA elemData;
PWP_UINT32 ndx = 0;
std::vector<PWP_UINT64> locTopo;
while (PwModNdxElemDataMod(model, ndx++, &elemData)) {
if (PwElemDataCastToPoly(&elemData, &polyData)) {
// elemData is a poly
// make local copy of poly topology into a single vector<>
locTopo.resize(0);
locTopo.reserve(1 + polyData.vertCnt + 1 + polyData.numFaces +
1 + polyData.numFaceIndices);
locTopo.push_back(polyData.vertCnt);
locTopo.insert(locTopo.end(), polyData.indices,
polyData.indices + polyData.vertCnt);
locTopo.push_back(polyData.numFaces);
locTopo.insert(locTopo.end(), polyData.offsets,
polyData.offsets + polyData.numFaces);
locTopo.push_back(polyData.numFaceIndices);
locTopo.insert(locTopo.end(), polyData.faceIndices,
polyData.faceIndices + polyData.numFaceIndices);
}
else {
// canonical element
}
}
Sample usage:
PWGM_ENUMELEMDATA enumElemData;
PWP_UINT32 ndx = 0;
while (PwModNdxElemDataModEnum(model, ndx++, &elemData)) {
if (PwElemDataCastToPoly(&enumElemData.elemData, &polyData)) {
// elemData is a poly
}
else {
// canonical element
}
}

Definition at line 395 of file apiGridModel.cxx.

References PWGM_POLYELEMDATA::faceIndices, PWGM_ELEMDATA::index, PWGM_POLYELEMDATA::indices, PWGM_POLYELEMDATA::numFaceIndices, PWGM_POLYELEMDATA::numFaces, PWGM_POLYELEMDATA::offsets, PWGM_ELEMTYPE_POLYH, PWGM_ELEMDATA::type, PWGM_POLYELEMDATA::type, and PWGM_POLYELEMDATA::vertCnt.

Referenced by CaeUnsElementData::walkPolyhedronFaces().

◆ PwElemDataMod()

PWP_BOOL PwElemDataMod ( PWGM_HELEMENT  element,
PWGM_ELEMDATA pElemData 
)

Get the element data relative to the model's index space.

Parameters
elementA element handle.
pElemDataPointer to a PWGM_ELEMDATA buffer.
Returns
PWP_TRUE on success

Definition at line 377 of file apiGridModel.cxx.

References PWGM_HELEMENT_ISVALID, and PWP_FALSE.

Referenced by CaeUnsElement::data(), PwBlkNdxElemDataMod(), PwDomNdxElemDataMod(), and PwModNdxElemDataMod().

◆ PwElemDataModEnum()

PWP_BOOL PwElemDataModEnum ( PWGM_HELEMENT  element,
PWGM_ENUMELEMDATA pElemData 
)

Get the enumerated element data relative to the model's index space.

Parameters
elementA model element handle obtained from PwModEnumElements().
pElemDataPointer to a PWGM_ENUMELEMDATA buffer.
Returns
PWP_TRUE on success

Definition at line 386 of file apiGridModel.cxx.

References PWGM_HELEMENT_ISVALID, and PWP_FALSE.

Referenced by CaeUnsElement::data(), and PwModNdxElemDataModEnum().

◆ PwElemTypeToText()

const char* PwElemTypeToText ( PWGM_ENUM_ELEMTYPE  type)

Maps a PWGM_ENUM_ELEMTYPE value to a human readable string.

Parameters
typeA PWGM_ENUM_ELEMTYPE value.
Returns
A human readable string. If type is invalid, "!Invalid" is returned.

Definition at line 445 of file apiGridModel.cxx.

References PWGM_ELEMTYPE_BAR, PWGM_ELEMTYPE_HEX, PWGM_ELEMTYPE_POINT, PWGM_ELEMTYPE_PYRAMID, PWGM_ELEMTYPE_QUAD, PWGM_ELEMTYPE_TET, PWGM_ELEMTYPE_TRI, and PWGM_ELEMTYPE_WEDGE.

Referenced by CaeUnsGridModel::elemTypeStr().

◆ PwFaceOrderToText()

const char* PwFaceOrderToText ( PWGM_ENUM_FACEORDER  faceOrder)

Maps a PWGM_ENUM_FACEORDER value to a human readable string.

Parameters
faceOrderA PWGM_ENUM_FACEORDER value.
Returns
A human readable string. If faceOrder is invalid, "!Invalid" is returned.

Definition at line 424 of file apiGridModel.cxx.

References PWGM_FACEORDER_BCGROUPSFIRST, PWGM_FACEORDER_BCGROUPSLAST, PWGM_FACEORDER_BCGROUPSONLY, PWGM_FACEORDER_BCGROUPSONLY_BYVC, PWGM_FACEORDER_BOUNDARYFIRST, PWGM_FACEORDER_BOUNDARYONLY, PWGM_FACEORDER_DONTCARE, PWGM_FACEORDER_INTERIORFIRST, PWGM_FACEORDER_INTERIORONLY, and PWGM_FACEORDER_VCGROUPSBCLAST.

Referenced by CaeUnsGridModel::faceOrderStr().

◆ PwModAppendEnumElementOrder()

PWP_BOOL PwModAppendEnumElementOrder ( PWGM_HGRIDMODEL  model,
PWGM_ENUM_ELEMORDER  order 
)

Append an element order to the enumElements() ordering sequence.

Parameters
modelThe grid model handle.
orderThe first/next element order in the enumeration sequence.
Returns
PWP_TRUE on success. PWP_FALSE if a duplicate or invalid order is appended.
Note
If a sequence is defined, the elements returned by enumElements() will be consecutivly grouped in the specified order. By default, no ordering is used (elements are not consecutive by type).
You are not required to append all possible element types. Any "missing" types will be exported at the end of the enumeration in an unspecified order.
Due to processing overhead, element ordering should only be used if it is required by a given export format (or for debugging). The ordering should be set before any calls to the enumElements() or streamFaces() functions.
The ordering should be set before any calls to the enumElements() or streamFaces() functions. If the ordering is changed, data returned by calls to enumElements() or streamFaces() prior to the change will not be consistent with data returned after the change.
See also
PwModEnumElementCount(), PwModEnumElements(), PwModDefaultEnumElementOrder()
Sample usage:
// Since they are not explicitly appended, the PWGM_ELEMORDER_TET and
// PWGM_ELEMORDER_PYRAMID elements will enumerate last in an unspecified
// order.
PWGM_ELEMDATA ElemData;
PWGM_ENUMELEMDATA EnumElemData;
PWP_UINT32 ndx = 0;
PWGM_HELEMENT hElem = PwModEnumElements(model, ndx);
while (PWGM_HELEMENT_ISVALID(hElem)) {
// get basic element connectivity information
if (PwElemDataMod(hElem, &ElemData)) {
// ...etc...
}
// get detailed element ownership and connectivity information
if (PwElemDataModEnum(hElem, &EnumElemData)) {
// ...etc...
}
hElem = PwModEnumElements(model, ++ndx);
}
// reset the enumeration ordering to the default (none). This call is not
// really needed. Just here for example.

Definition at line 293 of file apiGridModel.cxx.

Referenced by CaeUnsGridModel::appendEnumElementOrder(), and PwModDefaultEnumElementOrder().

◆ PwModCustomIndexSchemeReady()

PWP_BOOL PwModCustomIndexSchemeReady ( PWGM_HGRIDMODEL  model,
PWGM_INDEXMAPPERCB  cb,
void *  cbData 
)

Notifys the Pointwise export framework that the custom, unstructured index map is ready.

Parameters
modelThe grid model handle.
cbThe Custom IndexScheme mapper callback function.
cbDataThe data passed to cb

This is only needed if IndexScheme is set to Custom in runtimeCreate().

After the mesh data has been succesfully exported, but before returning from runtimeWrite(), the plugin must call PwModCustomIndexSchemeReady() to notify the Pointwise export framework that the custom index map is ready.

While in this call, the Pointwise export framework invokes the PWGM_INDEXMAPPERCB callback as needed to map vertex indices.

The vertex map is no longer needed by the Pointwise export framework after this call returns. The plugin may free any vertex map resources.

Returns
PWP_TRUE on success

Definition at line 258 of file apiGridModel.cxx.

References PWP_FALSE.

Referenced by CaeUnsGridModel::customIndexSchemeReady().

◆ PwModDefaultEnumElementOrder()

PWP_VOID PwModDefaultEnumElementOrder ( PWGM_HGRIDMODEL  model)

Reset the enumElements() ordering sequence to the default (none).

Parameters
modelThe grid model handle.
Returns
nothing.
See also
PwModEnumElementCount(), PwModEnumElements(), PwModAppendEnumElementOrder()
Sample usage:
See sample usage for PwModAppendEnumElementOrder()

Definition at line 301 of file apiGridModel.cxx.

References PwModAppendEnumElementOrder().

Referenced by CaeUnsGridModel::defaultEnumElementOrder().

◆ PwModDomainCount()

PWP_UINT32 PwModDomainCount ( PWGM_HGRIDMODEL  model)

Get the number of domain elements in the model.

Parameters
modelThe grid model handle.

Definition at line 226 of file apiGridModel.cxx.

Referenced by CaeUnsGridModel::patchCount().

◆ PwModEnumDomains()

PWGM_HDOMAIN PwModEnumDomains ( PWGM_HGRIDMODEL  model,
PWP_UINT32  ndx 
)

Sequentially enumerate the model domain elements.

Parameters
modelThe grid model handle.
ndxThe domain index < PwModDomainCount().
See also
PwModDomainCount()
Sample usage:
PWP_UINT32 eTotCnt;
PWP_UINT32 ndx = 0;
PWGM_HDOMAIN hDom = PwModEnumDomains(model, ndx);
while (PWGM_HDOMAIN_ISVALID(hDom)) {
eTotCnt = PwDomElementCount(hDom, &eCounts);
// ...etc...
hDom = PwModEnumDomains(model, ++ndx);
}
Note
Domain elements are oriented to the interior of the block.
Connection elements are oriented to their source connection domain. This is done so that blocks with local coordinate indices have a 1:1 point match across block connections.
If a particular CAE plugin uses a different orientation model, the plugin will need to manipulate the data during export.
For 3D Grids
Elements are TRIS and QUADS. The element normals (right-hand rule) point to the block interior.
For 2D Grids
Elements are BARS. The block interior is to the "left" while walking the block's "up" side. Up is defined by the block's local normal (right-hand rule).
2D Element Orientation

Definition at line 234 of file apiGridModel.cxx.

Referenced by CaeUnsPatch::moveTo(), and PwModNdxDomCondition().

◆ PwModEnumElementCount()

PWP_UINT32 PwModEnumElementCount ( PWGM_HGRIDMODEL  model,
PWGM_ELEMCOUNTS pCounts 
)

Get the number of enumerated model block elements.

Parameters
modelThe grid model handle.
pCountsA PWGM_ELEMCOUNTS buffer. May be nullptr.
Returns
The total number of elements

Definition at line 277 of file apiGridModel.cxx.

◆ PwModEnumElements()

PWGM_HELEMENT PwModEnumElements ( PWGM_HGRIDMODEL  model,
PWP_UINT32  ndx 
)

Sequentially enumerate the model's block elements.

Parameters
modelThe grid model handle.
ndxThe enumerated model element index < PwModEnumElementCount().
Returns
The model element handle.
See also
PwModEnumElementCount(), PwElemDataMod(), PwElemDataModEnum()
Sample usage:
See sample usage for PwModAppendEnumElementOrder()

Definition at line 285 of file apiGridModel.cxx.

Referenced by PwModNdxElemDataMod(), and PwModNdxElemDataModEnum().

◆ PwModEnumVertices()

PWGM_HVERTEX PwModEnumVertices ( PWGM_HGRIDMODEL  model,
PWP_UINT32  ndx 
)

Sequentially enumerate the model vertex elements.

Parameters
modelThe grid model handle.
ndxThe vertex index < PwModVertexCount().
See also
PwModVertexCount(), PwVertDataMod(), PwVertIndexMod(), PwModNdxVertDataMod()
Sample usage:
PWGM_VERTDATA VertData;
PWP_UINT32 ndx = 0;
PWGM_HVERTEX hVert = PwModEnumVertices(model, ndx);
while (PwVertDataMod(hVert, &VertData)) {
// ...etc...
hVert = PwModEnumVertices(model, ++ndx);
}

Definition at line 242 of file apiGridModel.cxx.

Referenced by CaeUnsVertex::moveTo(), and PwModNdxVertDataMod().

◆ PwModNdxBlkElementCount()

PWP_UINT32 PwModNdxBlkElementCount ( const PWGM_HGRIDMODEL  model,
const PWP_UINT32  ndx,
PWGM_ELEMCOUNTS pCounts 
)
inline

Get the number of elements in a block.

Parameters
modelThe grid model handle.
ndxThe block index < PwModBlockCount().
pCountsA PWGM_ELEMCOUNTS buffer. May be nullptr.
See also
PwBlkElementCount(), PwModEnumBlocks()
Sample usage:
PWGM_ELEMCOUNTS ecDetails;
const PWP_UINT32 Cnt = PwModBlockCount(rti.model);
for (PWP_UINT32 ndx = 0; ndx < Cnt; ++ndx) {
const PWP_UINT32 BlkElemCnt = PwModNdxBlkElementCount(model, ndx++, &ecDetails);
// ...etc...
}
Equivalent to:
PwBlkElementCount(PwModEnumBlocks(model, ndx), pCounts));

Definition at line 2014 of file apiGridModel.h.

References PwBlkElementCount(), and PwModEnumBlocks().

◆ PwModNdxDomCondition()

PWP_BOOL PwModNdxDomCondition ( const PWGM_HGRIDMODEL  model,
const PWP_UINT32  ndx,
PWGM_CONDDATA pCondData 
)
inline

Sequentially enumerate the domain condition data.

Parameters
modelThe grid model handle.
ndxThe domain index < PwModDomainCount().
pCondDataPointer to a PWGM_CONDDATA buffer.
Returns
PWP_TRUE on success
Equivalent to:
PwDomCondition(PwModEnumDomains(model, ndx), pCondData);

Definition at line 2113 of file apiGridModel.h.

References PwDomCondition(), and PwModEnumDomains().

◆ PwModNdxElemDataMod()

PWP_BOOL PwModNdxElemDataMod ( const PWGM_HGRIDMODEL  model,
const PWP_UINT32  ndx,
PWGM_ELEMDATA pElemData 
)
inline

Sequentially enumerate the model's block element data.

Parameters
modelThe grid model handle.
ndxThe enumerated model element index < PwModEnumElementCount().
pElemDataPointer to a PWGM_ELEMDATA buffer.
Returns
The model element handle.
See also
PwModEnumElementCount(), PwElemDataMod(), PwElemDataModEnum(), PwModNdxElemDataModEnum()
Sample usage:
PWP_UINT32 ndx = 0;
while (PwModNdxElemDataMod(model, ndx++, &eData)) {
// ...etc...
}
Equivalent to:
PwElemDataMod(PwModEnumElements(model, ndx), pElemData);

Definition at line 2328 of file apiGridModel.h.

References PwElemDataMod(), and PwModEnumElements().

◆ PwModNdxElemDataModEnum()

PWP_BOOL PwModNdxElemDataModEnum ( const PWGM_HGRIDMODEL  model,
const PWP_UINT32  ndx,
PWGM_ENUMELEMDATA pElemData 
)
inline

Sequentially enumerate the model's block element data.

Parameters
modelThe grid model handle.
ndxThe enumerated model element index < PwModEnumElementCount().
pElemDataPointer to a PWGM_ENUMELEMDATA buffer.
Returns
The model element handle.
See also
PwModEnumElementCount(), PwElemDataMod(), PwElemDataModEnum(), PwModNdxElemDataMod()
Sample usage:
PWP_UINT32 ndx = 0;
while (PwModNdxElemDataModEnum(model, ndx++, &eData)) {
// ...etc...
}
Equivalent to:
PwElemDataModEnum(PwModEnumElements(model, ndx), pElemData);

Definition at line 2380 of file apiGridModel.h.

References PwElemDataModEnum(), and PwModEnumElements().

◆ PwModNdxVertDataMod()

PWP_BOOL PwModNdxVertDataMod ( const PWGM_HGRIDMODEL  model,
const PWP_UINT32  ndx,
PWGM_VERTDATA pVertData 
)
inline

Sequentially enumerate the vertex data relative to the model's index space.

Parameters
modelThe grid model handle.
ndxThe vertex index < PwModVertexCount().
pVertDataPointer to a PWGM_VERTDATA buffer.
Returns
PWP_TRUE on success
See also
PwModEnumVertices()
Sample usage:
PWGM_VERTDATA VertData;
PWP_UINT32 ndx = 0;
while (PwModNdxVertDataMod(model, ndx++, &VertData)) {
// ...etc...
}
Equivalent to:
PwVertDataMod(PwModEnumVertices(model, ndx), pVertData);

Definition at line 2167 of file apiGridModel.h.

References PwModEnumVertices(), and PwVertDataMod().

◆ PwModStreamBoundaryFacesOnly()

PWP_BOOL PwModStreamBoundaryFacesOnly ( const PWGM_HGRIDMODEL  model,
PWGM_BEGINSTREAMCB  beginCB,
PWGM_FACESTREAMCB  faceCB,
PWGM_ENDSTREAMCB  endCB,
void *  userData 
)
inline

Stream the grid model's boundary faces to callback functions.

Parameters
modelThe grid model handle.
beginCBThis callback is invoked by stream once before any cell faces are streamed. This callback should return a non-zero value to continue processing.
faceCBThis callback is invoked by stream once for every cell face in the grid model. This callback should return a non-zero value to continue processing.
endCBThis callback is invoked by stream once after all cell faces are streamed. This callback should return a non-zero value to indicate success.
userDataThis optional ptr is passed to the callback functions through the userData member of the PWGM_BEGINSTREAM_DATA, PWGM_FACESTREAM_DATA, and PWGM_ENDSTREAM_DATA structures. Typically, userData points to export state information such as pRti. userData can be set to NULL.
Returns
PWP_TRUE on success
See also
PwModStreamFaces(), PWGM_ENUM_FACEORDER
Equivalent to:

Definition at line 1845 of file apiGridModel.h.

References beginCB(), endCB(), faceCB(), PWGM_FACEORDER_BOUNDARYONLY, and PwModStreamFaces().

◆ PwModStreamFaces()

PWP_BOOL PwModStreamFaces ( PWGM_HGRIDMODEL  model,
PWGM_ENUM_FACEORDER  order,
PWGM_BEGINSTREAMCB  beginCB,
PWGM_FACESTREAMCB  faceCB,
PWGM_ENDSTREAMCB  endCB,
void *  userData 
)

Stream the grid model's faces to a callback function in the specified order.

Parameters
modelThe grid model handle.
orderThe face streaming order.
beginCBThis callback is invoked by stream once before any cell faces are streamed. This callback should return a non-zero value to continue processing.
faceCBThis callback is invoked by stream once for every cell face in the grid model. This callback should return a non-zero value to continue processing.
endCBThis callback is invoked by stream once after all cell faces are streamed. This callback should return a non-zero value to indicate success.
userDataThis optional ptr is passed to the callback functions through the userData member of the PWGM_BEGINSTREAM_DATA, PWGM_FACESTREAM_DATA, and PWGM_ENDSTREAM_DATA structures. Typically, userData points to export state information such as pRti. userData can be set to NULL.
Returns
PWP_TRUE on success
Sample usage:
{
CAEP_RTITEM *pRti = (CAEP_RTITEM*)data->userData; // recover pointer
// prepare to receive the face stream
return PWP_TRUE;
}
{
CAEP_RTITEM *pRti = (CAEP_RTITEM*)data->userData; // recover pointer
// handle the face information
return PWP_TRUE;
}
{
CAEP_RTITEM *pRti = (CAEP_RTITEM*)data->userData; // recover pointer
// cleanup after streaming
return PWP_TRUE;
}
const CAEP_WRITEINFO *pWriteInfo)
{
// Faces will be streamed to faceCB in an unspecified order
// Passing pRti as the userData pointer
PwModStreamFaces(model, faceOrder, beginCB, faceCB, endCB, pRti);
}

Definition at line 266 of file apiGridModel.cxx.

References beginCB(), endCB(), faceCB(), and PWP_FALSE.

Referenced by PwModStreamBoundaryFacesOnly(), PwModStreamFacesAnyOrder(), and CaeUnsGridModel::streamFaces().

◆ PwModStreamFacesAnyOrder()

PWP_BOOL PwModStreamFacesAnyOrder ( const PWGM_HGRIDMODEL  model,
PWGM_BEGINSTREAMCB  beginCB,
PWGM_FACESTREAMCB  faceCB,
PWGM_ENDSTREAMCB  endCB,
void *  userData 
)
inline

Stream all the grid model's faces to callback functions in an unspecified order. It is possible that the specific order may change from one software release to the next.

Parameters
modelThe grid model handle.
beginCBThis callback is invoked by stream once before any cell faces are streamed. This callback should return a non-zero value to continue processing.
faceCBThis callback is invoked by stream once for every cell face in the grid model. This callback should return a non-zero value to continue processing.
endCBThis callback is invoked by stream once after all cell faces are streamed. This callback should return a non-zero value to indicate success.
userDataThis optional ptr is passed to the callback functions through the userData member of the PWGM_BEGINSTREAM_DATA, PWGM_FACESTREAM_DATA, and PWGM_ENDSTREAM_DATA structures. Typically, userData points to export state information such as pRti. userData can be set to NULL.
Returns
PWP_TRUE on success
See also
PwModStreamFaces(), PWGM_ENUM_FACEORDER
Equivalent to:

Definition at line 1800 of file apiGridModel.h.

References beginCB(), endCB(), faceCB(), PWGM_FACEORDER_DONTCARE, and PwModStreamFaces().

◆ PwModVertexCount()

PWP_UINT32 PwModVertexCount ( PWGM_HGRIDMODEL  model)

Get the number of model vertex elements.

Parameters
modelThe grid model handle.
Returns
The total number of vertex elements.

Definition at line 250 of file apiGridModel.cxx.

Referenced by CaeUnsGridModel::vertexCount().

◆ PwVertDataMod()

PWP_BOOL PwVertDataMod ( PWGM_HVERTEX  vertex,
PWGM_VERTDATA pVertData 
)

Get the vertex data relative to the model's index space.

Parameters
vertexA vertex handle.
pVertDataPointer to a PWGM_VERTDATA buffer.
Returns
PWP_TRUE on success
See also
PwModEnumVertices()

Definition at line 350 of file apiGridModel.cxx.

References PWGM_HVERTEX_ISVALID, and PWP_FALSE.

Referenced by CaeUnsVertex::dataMod(), and PwModNdxVertDataMod().

◆ PwVertIndexMod()

PWP_BOOL PwVertIndexMod ( PWGM_HVERTEX  vertex,
PWP_UINT32 pIndex 
)

Get the vertex index relative to the model's index space.

Parameters
vertexA vertex handle.
pIndexPointer to a PWP_UINT32 value.
Returns
PWP_TRUE on success
See also
PwModEnumVertices()

Definition at line 359 of file apiGridModel.cxx.

References PWGM_HVERTEX_ISVALID, and PWP_FALSE.

Referenced by CaeUnsVertex::indexMod().

◆ PwVertXyzVal()

PWP_BOOL PwVertXyzVal ( PWGM_HVERTEX  vertex,
PWGM_ENUM_XYZ  which,
PWGM_XYZVAL pVal 
)

Get a vertex's x, y, or z component value.

Parameters
vertexA vertex handle.
whichThe XYZ component id to retrieve.
pValPointer to a PWGM_XYZVAL value.
Returns
PWP_TRUE on success
See also
PwModEnumVertices()

Definition at line 368 of file apiGridModel.cxx.

References PWGM_HVERTEX_ISVALID, and PWP_FALSE.

Referenced by CaeUnsVertex::xyzVal().

faceCB
static PWP_UINT32 faceCB(PWGM_FACESTREAM_DATA *data)
Definition: CaeUnsGridModel.cxx:63
PWGM_ENDSTREAM_DATA::userData
void * userData
The PwModStreamFaces user data ptr.
Definition: apiGridModel.h:1173
PWGM_HELEMENT
Grid element handle declaration.
Definition: apiGridModel.h:427
PwElemDataModEnum
PWP_BOOL PwElemDataModEnum(PWGM_HELEMENT element, PWGM_ENUMELEMDATA *pEnumElemData)
Get the enumerated element data relative to the model's index space.
Definition: apiGridModel.cxx:386
PWGM_BEGINSTREAM_DATA::userData
void * userData
The PwModStreamFaces user data ptr.
Definition: apiGridModel.h:1091
PwModEnumVertices
PWGM_HVERTEX PwModEnumVertices(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model vertex elements.
Definition: apiGridModel.cxx:242
PwBlkNdxElemDataMod
PWP_BOOL PwBlkNdxElemDataMod(const PWGM_HBLOCK block, const PWP_UINT32 ndx, PWGM_ELEMDATA *pElemData)
Get the block element data relative to the model's index space.
Definition: apiGridModel.h:2253
PwDomElementCount
PWP_UINT32 PwDomElementCount(PWGM_HDOMAIN domain, PWGM_ELEMCOUNTS *pCounts)
Get the number of domain elements.
Definition: apiGridModel.cxx:325
PwModEnumDomains
PWGM_HDOMAIN PwModEnumDomains(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model domain elements.
Definition: apiGridModel.cxx:234
PWGM_ELEMORDER_WEDGE
@ PWGM_ELEMORDER_WEDGE
Order by 3D, extruded, tri/quad grid element.
Definition: apiGridModel.h:709
PWP_UINT32
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
CAEP_RTITEM
The data representing a CAE exporter instance.
Definition: apiCAEPUtils.h:124
PWGM_HDOMAIN
An opaque handle to a grid domain element.
Definition: apiGridModel.h:372
PWGM_ENUMELEMDATA::elemData
PWGM_ELEMDATA elemData
Element descriptor data.
Definition: apiGridModel.h:750
PwBlkEnumElements
PWGM_HELEMENT PwBlkEnumElements(PWGM_HBLOCK block, PWP_UINT32 ndx)
Sequentially enumerate the block elements.
Definition: apiGridModel.cxx:317
PWGM_FACEORDER_DONTCARE
@ PWGM_FACEORDER_DONTCARE
all cell faces in any order
Definition: apiGridModel.h:1060
PwElemDataCastToPoly
PWP_BOOL PwElemDataCastToPoly(const PWGM_ELEMDATA *eData, PWGM_POLYELEMDATA *polyData)
Cast a PWGM_ELEMDATA to a PWGM_POLYELEMDATA.
Definition: apiGridModel.cxx:395
PWGM_HDOMAIN_ISVALID
#define PWGM_HDOMAIN_ISVALID(h)
returns non-zero value if handle is valid
Definition: apiGridModel.h:374
PWGM_HGRIDMODEL
An opaque handle to a grid model.
Definition: apiGridModel.h:326
PWGM_POLYELEMDATA::numFaces
PWP_UINT64 numFaces
Definition: apiGridModel.h:763
PwModDefaultEnumElementOrder
PWP_VOID PwModDefaultEnumElementOrder(PWGM_HGRIDMODEL model)
Reset the enumElements() ordering sequence to the default (none).
Definition: apiGridModel.cxx:301
PWGM_POLYELEMDATA::vertCnt
PWP_UINT64 vertCnt
Definition: apiGridModel.h:761
endCB
static PWP_UINT32 endCB(PWGM_ENDSTREAM_DATA *data)
Definition: CaeUnsGridModel.cxx:71
PWGM_ELEMDATA
Element descriptor data type.
Definition: apiGridModel.h:737
PwBlkElementCount
PWP_UINT32 PwBlkElementCount(PWGM_HBLOCK block, PWGM_ELEMCOUNTS *pCounts)
Get the number of block elements.
Definition: apiGridModel.cxx:309
PwElemDataMod
PWP_BOOL PwElemDataMod(PWGM_HELEMENT element, PWGM_ELEMDATA *pElemData)
Get the element data relative to the model's index space.
Definition: apiGridModel.cxx:377
PwDomEnumElements
PWGM_HELEMENT PwDomEnumElements(PWGM_HDOMAIN domain, PWP_UINT32 ndx)
Sequentially enumerate the domain elements.
Definition: apiGridModel.cxx:333
PwModBlockCount
PWP_UINT32 PwModBlockCount(PWGM_HGRIDMODEL model)
Get the number of block elements in the model.
Definition: apiGridModel.cxx:83
PWGM_POLYELEMDATA::faceIndices
const PWP_UINT64 * faceIndices
Definition: apiGridModel.h:766
PwDomCondition
PWP_BOOL PwDomCondition(PWGM_HDOMAIN domain, PWGM_CONDDATA *pCondData)
Get the domain condition data.
Definition: apiGridModel.cxx:341
PWGM_VERTDATA
Vertex descriptor data type.
Definition: apiGridModel.h:607
PWGM_ELEMCOUNTS
Element count information.
Definition: apiGridModel.h:774
PwModNdxElemDataModEnum
PWP_BOOL PwModNdxElemDataModEnum(const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_ENUMELEMDATA *pElemData)
Sequentially enumerate the model's block element data.
Definition: apiGridModel.h:2380
PWGM_POLYELEMDATA::numFaceIndices
PWP_UINT64 numFaceIndices
Definition: apiGridModel.h:765
PWGM_BEGINSTREAM_DATA
Data passed to a PWGM_BEGINSTREAMCB callback function.
Definition: apiGridModel.h:1084
PWGM_FACEORDER_BOUNDARYONLY
@ PWGM_FACEORDER_BOUNDARYONLY
only boundary cell faces
Definition: apiGridModel.h:1063
PWGM_FACESTREAM_DATA::userData
void * userData
The PwModStreamFaces user data ptr.
Definition: apiGridModel.h:1157
PWGM_POLYELEMDATA::indices
const PWP_UINT64 * indices
Definition: apiGridModel.h:762
PwModEnumElements
PWGM_HELEMENT PwModEnumElements(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model's block elements.
Definition: apiGridModel.cxx:285
PWP_BOOL
int PWP_BOOL
logical value
Definition: apiPWP.h:303
PwVertDataMod
PWP_BOOL PwVertDataMod(PWGM_HVERTEX vertex, PWGM_VERTDATA *pVertData)
Get the vertex data relative to the model's index space.
Definition: apiGridModel.cxx:350
PwModNdxElemDataMod
PWP_BOOL PwModNdxElemDataMod(const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_ELEMDATA *pElemData)
Sequentially enumerate the model's block element data.
Definition: apiGridModel.h:2328
CAEP_WRITEINFO
CAE export write control information.
Definition: apiCAEP.h:184
PWGM_ENDSTREAM_DATA
Data passed to a PWGM_ENDSTREAMCB callback function.
Definition: apiGridModel.h:1170
PWP_TRUE
#define PWP_TRUE
PWP_BOOL logical "true" value.
Definition: apiPWP.h:309
PWGM_FACESTREAM_DATA
Data passed to a PWGM_FACESTREAMCB callback function.
Definition: apiGridModel.h:1133
PwModEnumBlocks
PWGM_HBLOCK PwModEnumBlocks(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model block elements.
Definition: apiGridModel.cxx:91
PwModStreamFaces
PWP_BOOL PwModStreamFaces(PWGM_HGRIDMODEL model, PWGM_ENUM_FACEORDER order, PWGM_BEGINSTREAMCB beginCB, PWGM_FACESTREAMCB faceCB, PWGM_ENDSTREAMCB endCB, void *userData)
Stream the grid model's faces to a callback function in the specified order.
Definition: apiGridModel.cxx:266
PwModNdxVertDataMod
PWP_BOOL PwModNdxVertDataMod(const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_VERTDATA *pVertData)
Sequentially enumerate the vertex data relative to the model's index space.
Definition: apiGridModel.h:2167
PWGM_HVERTEX
An opaque handle to a grid vertex element.
Definition: apiGridModel.h:398
PwModAppendEnumElementOrder
PWP_BOOL PwModAppendEnumElementOrder(PWGM_HGRIDMODEL model, PWGM_ENUM_ELEMORDER order)
Append an element order to the enumElements() ordering sequence.
Definition: apiGridModel.cxx:293
PWGM_POLYELEMDATA
Polygon or polyhedron element descriptor data type.
Definition: apiGridModel.h:759
beginCB
static PWP_UINT32 beginCB(PWGM_BEGINSTREAM_DATA *data)
Definition: CaeUnsGridModel.cxx:55
PWGM_ELEMORDER_HEX
@ PWGM_ELEMORDER_HEX
Order by 3D, 6-sided (block) grid element.
Definition: apiGridModel.h:701
PWGM_ENUM_FACEORDER
PWGM_ENUM_FACEORDER
The orderings supported by face streaming.
Definition: apiGridModel.h:1059
PWGM_POLYELEMDATA::offsets
const PWP_UINT64 * offsets
Definition: apiGridModel.h:764
PWGM_ENUMELEMDATA
Enumerated model element descriptor data type.
Definition: apiGridModel.h:749
PwModNdxBlkElementCount
PWP_UINT32 PwModNdxBlkElementCount(const PWGM_HGRIDMODEL model, const PWP_UINT32 ndx, PWGM_ELEMCOUNTS *pCounts)
Get the number of elements in a block.
Definition: apiGridModel.h:2014
PwDomNdxElemDataMod
PWP_BOOL PwDomNdxElemDataMod(const PWGM_HDOMAIN domain, const PWP_UINT32 ndx, PWGM_ELEMDATA *pElemData)
Get the domain element data relative to the model's index space.
Definition: apiGridModel.h:2290
runtimeWrite
PWP_BOOL runtimeWrite(CAEP_RTITEM *pRti, PWGM_HGRIDMODEL model, const CAEP_WRITEINFO *pWriteInfo)
Definition: cppstr/runtimeWrite.cxx:27
PWGM_HELEMENT_ISVALID
#define PWGM_HELEMENT_ISVALID(h)
returns non-zero value if handle is valid
Definition: apiGridModel.h:429