Pointwise Plugin SDK
|
The unstructured patch class. More...
#include <CaeUnsPatch.h>
Public Member Functions | |
CaeUnsPatch () | |
Default constructor. More... | |
CaeUnsPatch (const CaeUnsGridModel &model, PWP_UINT32 ndx=0) | |
Model and patch index constructor. More... | |
CaeUnsPatch (const CaeUnsPatch &src) | |
Copy constructor. More... | |
CaeUnsPatch (PWGM_HDOMAIN domain) | |
Domain handle constructor. More... | |
bool | condition (PWGM_CONDDATA &data) const |
Get the patch's condition data. More... | |
PWP_UINT32 | index () const |
Get the patch's index. More... | |
bool | isValid () const |
Determines a patch's validity. More... | |
CaeUnsGridModel | model () const |
Gets the unstructured grid model of which this patch is a member. More... | |
CaeUnsPatch & | moveFirst (const CaeUnsGridModel &model) |
Rebinds an instance to the first patch in a model. More... | |
CaeUnsPatch & | moveNext () |
Rebinds an instance to the next patch in a model. More... | |
CaeUnsPatch & | movePrev () |
Rebinds an instance to the previous patch in a model. More... | |
CaeUnsPatch & | moveTo (const CaeUnsGridModel &model, PWP_UINT32 ndx) |
Rebinds an instance to a specific model patch. More... | |
operator PWGM_HDOMAIN () const | |
The PWGM_HDOMAIN cast operator. More... | |
CaeUnsPatch & | operator++ () |
Prefix increment to the next patch in a model. More... | |
CaeUnsPatch | operator++ (int) |
Postfix increment to the next patch in a model. More... | |
CaeUnsPatch & | operator-- () |
Prefix decrement to the previous patch in a model. More... | |
CaeUnsPatch | operator-- (int) |
Postfix decrement to the previous patch in a model. More... | |
CaeUnsPatch & | operator= (const CaeUnsPatch &rhs) |
Assignment operator. More... | |
CaeUnsPatch & | operator= (PWGM_HDOMAIN domain) |
Assignment operator. More... | |
virtual | ~CaeUnsPatch () |
Destructor. 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... | |
Protected Attributes | |
PWGM_HDOMAIN | h_ |
The bound PWGM_HDOMAIN. More... | |
Additional Inherited Members | |
![]() | |
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... | |
The unstructured patch class.
The CaeUnsPatch class represents a collection of unstructured grid model elements sharing a common boundary condition. The grid model patches are indexed from 0 to CaeUnsGridModel::patchCount() - 1.
For 3D grid models, patch elements are 2D (not necessarily planar) polygons. Currently, only 3-point TRI and 4-point QUAD elements are supported. However, if the grid model contains hex blocks with collapsed faces, it is possible that 2-point BAR elements will be encountered. Typically, BAR elements can be skipped during export.
For 2D grid models, patch elements are 1D bars (2 points). However, if the grid model contains quad blocks with collapsed edges, it is possible that 1-point POINT elements will be encountered. Typically, POINT elements can be skipped during export.
A CaeUnsPatch object is aware of its relative position in the grid model. As a result, a given patch object can be moved (iterated) to its previous or next neighbor patch. It can also be moved to the first patch or to a patch at a given index. After being moved, a patch will return information about the patch 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 patches with a call to its CaeUnsXMLCPP::writePatches()
method. First, it writes an XML <patches>
tag. Then it moves through the patches one by one and calls the CaeUnsXMLCPP::writePatch()
method. Finally, a closing </patches>
tag is written.
CaeUnsXMLCPP::writePatch()
writes an XML <patch>
tag. Next, the patch condition data is written with a call to CaeUnsXMLCPP::writeCondData()
. If only boundary conditions are being exported, the progress is incremented. Otherwise, the patch's element data is exported. Finally, a closing </patch>
tag is written.
CaeUnsXMLCPP::writeElemData()
writes a self-closed XML <element
/> tag.
Definition at line 69 of file CaeUnsPatch.h.
|
inline |
Default constructor.
Constructs an invalid patch.
Definition at line 78 of file CaeUnsPatch.h.
References h_.
|
inline |
Domain handle constructor.
Constructs an unstructured patch object bound to the specified domain.
domain | The domain handle to bind. |
Definition at line 87 of file CaeUnsPatch.h.
|
inline |
Copy constructor.
Binds this patch to the same patch as src.
src | A patch instance. |
Definition at line 95 of file CaeUnsPatch.h.
References h_.
|
inline |
Model and patch index constructor.
Constructs an unstructured patch object bound to the patch at the specified index.
model | The unstructured grid model. |
ndx | The patch's index. |
Definition at line 106 of file CaeUnsPatch.h.
|
inlinevirtual |
Destructor.
Definition at line 111 of file CaeUnsPatch.h.
|
inline |
Get the patch's condition data.
Definition at line 140 of file CaeUnsPatch.h.
References h_, and PwDomCondition().
|
inline |
Get the patch's index.
Definition at line 123 of file CaeUnsPatch.h.
References h_, and PWGM_HDOMAIN_ID.
Referenced by moveNext(), and movePrev().
|
inline |
Determines a patch's validity.
Definition at line 146 of file CaeUnsPatch.h.
References h_, and PWGM_HDOMAIN_ISVALID.
|
inline |
Gets the unstructured grid model of which this patch is a member.
Definition at line 115 of file CaeUnsPatch.h.
References h_, and PWGM_HDOMAIN_H.
Referenced by CaeUnsPatch(), moveFirst(), and moveTo().
|
inline |
Rebinds an instance to the first patch in a model.
model | The unstructured grid model. |
Definition at line 192 of file CaeUnsPatch.h.
|
inline |
Rebinds an instance to the next patch in a model.
Definition at line 202 of file CaeUnsPatch.h.
References h_, index(), moveTo(), and PWGM_HDOMAIN_H.
Referenced by operator++().
|
inline |
Rebinds an instance to the previous patch in a model.
Definition at line 236 of file CaeUnsPatch.h.
References h_, index(), moveTo(), and PWGM_HDOMAIN_H.
Referenced by operator--().
|
inline |
Rebinds an instance to a specific model patch.
model | The unstructured grid model. |
ndx | The patch's index. |
Definition at line 180 of file CaeUnsPatch.h.
References h_, model(), and PwModEnumDomains().
Referenced by CaeUnsPatch(), moveFirst(), moveNext(), and movePrev().
|
inline |
|
inline |
Prefix increment to the next patch in a model.
Definition at line 214 of file CaeUnsPatch.h.
References moveNext().
Referenced by operator++().
|
inline |
Postfix increment to the next patch in a model.
Definition at line 224 of file CaeUnsPatch.h.
References operator++().
|
inline |
Prefix decrement to the previous patch in a model.
Definition at line 248 of file CaeUnsPatch.h.
References movePrev().
Referenced by operator--().
|
inline |
Postfix decrement to the previous patch in a model.
Definition at line 258 of file CaeUnsPatch.h.
References operator--().
|
inline |
Assignment operator.
Rebind this instance to the same patch as rhs.
rhs | A patch instance. |
Definition at line 156 of file CaeUnsPatch.h.
References h_.
|
inline |
Assignment operator.
Rebind this instance to the specified domain handle.
domain | The domain handle. |
Definition at line 167 of file CaeUnsPatch.h.
References h_.
|
protected |
The bound PWGM_HDOMAIN.
Definition at line 283 of file CaeUnsPatch.h.
Referenced by CaeUnsPatch(), condition(), index(), isValid(), model(), moveNext(), movePrev(), moveTo(), operator PWGM_HDOMAIN(), and operator=().