Pointwise Plugin SDK
|
The unstructured block class. More...
#include <CaeUnsBlock.h>
Public Member Functions | |
CaeUnsBlock () | |
Default constructor. More... | |
CaeUnsBlock (const CaeBlock &src) | |
CaeBlock constructor. More... | |
CaeUnsBlock (const CaeUnsBlock &src) | |
Copy constructor. More... | |
CaeUnsBlock (const CaeUnsGridModel &model, PWP_UINT32 ndx=0) | |
Model and block index constructor. More... | |
CaeUnsBlock (PWGM_HBLOCK block) | |
Block handle constructor. More... | |
CaeUnsGridModel | model () const |
Gets the unstructured grid model of which this block is a member. More... | |
virtual | ~CaeUnsBlock () |
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 | elementCount (PWGM_ELEMCOUNTS *pDetails=0) const |
Get the number of elements in the group. More... | |
PWGM_HELEMENT | enumElements (PWP_UINT32 ndx) const |
Get an element in the group. More... | |
PWGM_HELEMENT | firstElement () const |
Get the first element in the group. More... | |
virtual | ~CaeUnsElementGroup () |
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 | elementCountImpl (PWGM_ELEMCOUNTS *pDetails) const =0 |
Get the number of elements in the group. More... | |
virtual PWGM_HELEMENT | enumElementsImpl (PWP_UINT32 ndx) const =0 |
Get an element in the group. More... | |
![]() | |
PWGM_HBLOCK | block_ |
The bound PWGM_HBLOCK. More... | |
The unstructured block class.
The CaeUnsBlock class represents a collection of unstructured grid model elements sharing a common volume condition. The grid model blocks are indexed from 0 to CaeGridModel::blockCount() - 1.
For 3D grid models, block elements are 3D polyhedrons. Currently, only 8-point HEX, 6-point WEDGE (PRISM), 5-point PYRAMID and 4-point TET elements are supported. See Cell Connectivity.
For 2D grid models, block elements are 2D (not necessarily planar) polygons. Currently, only 3-point TRI and 4-point QUAD elements are supported.
A CaeUnsBlock 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 CaeUnsBlock object will return information about the grid block at its current position.
The following snippets are extracted from the unstructured XML sample plugin (CaeUnsXMLCPP).
During the execution of the CaeUnsXMLCPP::write()
method, the CaeUnsXMLCPP plugin writes the grid model blocks with a call to its CaeUnsXMLCPP::writeBlocks()
method. First, it writes an XML <blocks>
tag. Then it moves through the blocks one by one and calls the CaeUnsXMLCPP::writeBlock()
method. Finally, a closing </blocks>
tag is written.
CaeUnsXMLCPP::writeBlock()
writes an XML <block>
tag. Next, the block condition data is written with a call to CaeUnsXMLCPP::writeCondData()
. If only boundary conditions are being exported, the progress is incremented. Otherwise, the block's element data is exported. Finally, a closing </block>
tag is written.
CaeUnsXMLCPP::writeElemData()
writes a self-closed XML <element
/> tag.
Definition at line 68 of file CaeUnsBlock.h.
|
inline |
Default constructor.
Constructs an invalid block.
Definition at line 77 of file CaeUnsBlock.h.
|
inline |
Block handle constructor.
Constructs an unstructured block object bound to the specified block.
block | The block handle to bind. |
Definition at line 85 of file CaeUnsBlock.h.
|
inline |
Copy constructor.
Binds this block to the same block as src.
src | A block instance. |
Definition at line 93 of file CaeUnsBlock.h.
|
inline |
CaeBlock constructor.
Binds this block to the same block as src.
src | A base block instance. |
Definition at line 101 of file CaeUnsBlock.h.
|
inline |
Model and block index constructor.
Constructs an unstructured block object bound to the block at the specified index.
model | The unstructured grid model. |
ndx | The block's index. |
Definition at line 111 of file CaeUnsBlock.h.
|
inlinevirtual |
Destructor.
Definition at line 116 of file CaeUnsBlock.h.
|
inline |
Gets the unstructured grid model of which this block is a member.
Definition at line 120 of file CaeUnsBlock.h.
References CaeBlock::block_, and PWGM_HBLOCK_MODEL.