Pointwise Plugin SDK
|
The structured block class. More...
#include <CaeStrBlock.h>
Public Member Functions | |
CaeStrBlock () | |
Default constructor. More... | |
CaeStrBlock (const CaeBlock &src) | |
CaeBlock constructor. More... | |
CaeStrBlock (const CaeStrBlock &src) | |
Copy constructor. More... | |
CaeStrBlock (const CaeStrGridModel &model, PWP_UINT32 ndx=0) | |
Model and block index constructor. More... | |
CaeStrBlock (PWGM_HBLOCK block) | |
Block handle constructor. More... | |
bool | data (PWGM_BLOCKDATA &data) const |
Gets information about the block. More... | |
CaeStrGridModel | model () const |
Gets the structured grid model of which this block is a member. More... | |
bool | ndxVertData (PWGM_INDEX3 ndx3, PWGM_VERTDATA &data) const |
Get the block's vertex data at the given index location. More... | |
bool | size (PWGM_STR_SIZE &size) const |
Gets the structured ijk size of the block's vertices. More... | |
virtual | ~CaeStrBlock () |
Destructor. More... | |
![]() | |
bool | condition (PWGM_CONDDATA &condData) const |
Gets the block's condition data. More... | |
bool | data (PWGM_BLOCKDATA &data) |
Get the block data. More... | |
PWP_UINT32 | index () const |
Get a block's index. More... | |
bool | isValid () const |
Determines a block's validity. More... | |
CaeBlock & | moveFirst (PWGM_HGRIDMODEL model) |
Rebinds an instance to the first block in a model. More... | |
CaeBlock & | moveNext () |
Rebinds an instance to the next block in a model. More... | |
CaeBlock & | movePrev () |
Rebinds an instance to the previous block in a model. More... | |
CaeBlock & | moveTo (PWGM_HGRIDMODEL model, PWP_UINT32 ndx) |
Rebinds an instance to a specific model block. More... | |
operator PWGM_HBLOCK () const | |
The PWGM_HBLOCK cast operator. More... | |
CaeBlock & | operator++ () |
Prefix increment to the next block in a model. More... | |
CaeBlock | operator++ (int) |
Postfix increment to the next block in a model. More... | |
CaeBlock & | operator-- () |
Prefix decrement to the previous block in a model. More... | |
CaeBlock | operator-- (int) |
Postfix decrement to the previous block in a model. More... | |
CaeBlock & | operator= (const CaeBlock &rhs) |
Assignment operator. More... | |
CaeBlock & | operator= (PWGM_HBLOCK block) |
Assignment operator. More... | |
bool | operator== (const CaeBlock &rhs) const |
Compares two CaeBlock instances for equality. More... | |
bool | setExportName (const char *name) |
Set the name used to identify the block or group of blocks in the exported grid. More... | |
![]() | |
PWP_UINT32 | connectionCount () const |
Get the number of connections in the group. More... | |
PWGM_HCNXN | enumConnections (PWP_UINT32 ndx) const |
Get an connection in the group. More... | |
PWGM_HCNXN | firstConnection () const |
Get the first connection in the group. More... | |
virtual | ~CaeStrConnectionGroup () |
Destructor. More... | |
![]() | |
PWP_UINT32 | boundaryCount () const |
Get the number of boundaries in the group. More... | |
PWGM_HBNDRY | enumBoundaries (PWP_UINT32 ndx) const |
Get a boundary in the group. More... | |
PWGM_HBNDRY | firstBoundary () const |
Get the first boundary in the group. More... | |
virtual | ~CaeStrBoundaryGroup () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
CaeBlock () | |
Default constructor. More... | |
CaeBlock (const CaeBlock &src) | |
Copy constructor. More... | |
CaeBlock (PWGM_HBLOCK block) | |
Block handle constructor. More... | |
CaeBlock (PWGM_HGRIDMODEL model, PWP_UINT32 ndx=0) | |
Model and block index constructor. More... | |
~CaeBlock () | |
Destructor. More... | |
![]() | |
virtual PWP_UINT32 | connectionCountImpl () const =0 |
Get the number of connections in the group. More... | |
virtual PWGM_HCNXN | enumConnectionsImpl (PWP_UINT32 ndx) const =0 |
Get a connection in the group. More... | |
![]() | |
virtual PWP_UINT32 | boundaryCountImpl () const =0 |
Get the number of boundaries in the group. More... | |
virtual PWGM_HBNDRY | enumBoundariesImpl (PWP_UINT32 ndx) const =0 |
Get a boundary in the group. More... | |
![]() | |
PWGM_HBLOCK | block_ |
The bound PWGM_HBLOCK. More... | |
The structured block class.
The CaeStrBlock class represents a collection of structured ijk vertices, boundaries and connections. The grid model blocks are indexed from 0 to CaeGridModel::blockCount() - 1.
For 3D grid models, block elements are 3D hexahedrons. For 2D grid models, block elements are 2D (not necessarily planar) QUAD elements. The element connectivity is implicit in the ijk layout of the vertices.
A CaeStrBlock object is aware of its relative position in the grid model. As a result, a given block object can be moved (iterated) to its previous or next neighbor block. It can also be moved to the first block or to a block at a given index. After being moved, a CaeStrBlock object will return information about the grid block at its current position.
The following snippets are extracted from the structured XML sample plugin (CaeStrXMLCPP).
During the execution of the CaeStrXMLCPP::write()
method, the CaeStrXMLCPP plugin writes the grid model blocks with a call to its CaeStrXMLCPP::writeBlocks()
method. First, it writes an XML <blocks>
tag. Then it moves through the blocks one by one and calls the CaeStrXMLCPP::writeBlock()
method. Finally, a closing </blocks>
tag is written.
CaeStrXMLCPP::writeBlock()
writes an XML <block>
tag. Next, the block's vertices, connections and boundaries are exported with calls to CaeStrXMLCPP::writeBlkVertices(), CaeStrXMLCPP::writeBlkConnections() and CaeStrXMLCPP::writeBlkBoundaries(). Finally, a closing </block>
tag is written.
CaeStrXMLCPP::writeBlkVertices()
gets the block's ijk size, and then loops through the vertices calling CaeStrXMLCPP::writeVertexData() for each ijk vertex.
CaeStrXMLCPP::writeVertexData()
writes a self-closed XML <vertex
/> tag.
For CaeStrXMLCPP::writeBlkConnections()
usage see CaeStrConnection.
For CaeStrXMLCPP::writeBlkBoundaries()
usage see CaeStrBoundary.
Definition at line 71 of file CaeStrBlock.h.
|
inline |
Default constructor.
Constructs an invalid block.
Definition at line 81 of file CaeStrBlock.h.
|
inline |
Block handle constructor.
Constructs a structured block object bound to the specified block.
block | The block handle to bind. |
Definition at line 89 of file CaeStrBlock.h.
|
inline |
Copy constructor.
Binds this block to the same block as src.
src | A block instance. |
Definition at line 97 of file CaeStrBlock.h.
|
inline |
CaeBlock constructor.
Binds this block to the same block as src.
src | A base block instance. |
Definition at line 105 of file CaeStrBlock.h.
|
inline |
Model and block index constructor.
Constructs a structured block object bound to the block at the specified index.
model | The structured grid model. |
ndx | The block's index. |
Definition at line 115 of file CaeStrBlock.h.
|
inlinevirtual |
Destructor.
Definition at line 120 of file CaeStrBlock.h.
|
inline |
Gets information about the block.
data | The block information data buffer. |
Definition at line 141 of file CaeStrBlock.h.
References CaeBlock::block_, and PwBlock().
Referenced by ndxVertData().
|
inline |
Gets the structured grid model of which this block is a member.
Definition at line 124 of file CaeStrBlock.h.
References CaeBlock::block_, and PWGM_HBLOCK_MODEL.
|
inline |
Get the block's vertex data at the given index location.
ndx3 | The ijk index. |
data | The vertex data buffer. |
Definition at line 177 of file CaeStrBlock.h.
References CaeBlock::block_, data(), and PwBlkNdxVertData().
|
inline |
Gets the structured ijk size of the block's vertices.
size | The block vertex size. |
Definition at line 158 of file CaeStrBlock.h.
References CaeBlock::block_, and PwBlkSize().