Pointwise Plugin SDK
Public Member Functions | List of all members

The model unstructured element data class. More...

#include <CaeUnsElement.h>

+ Inheritance diagram for CaeUnsEnumElementData:
+ Collaboration diagram for CaeUnsEnumElementData:

Public Member Functions

PWGM_HELEMENTblockElement ()
 Gets a non-const ref to the owning block's element handle. More...
 
const PWGM_HELEMENTblockElement () const
 Gets a const ref to the owning block's element handle. More...
 
PWP_UINT32 blockId () const
 Gets the id (index) of the element's owning block. More...
 
 CaeUnsEnumElementData ()
 Default constructor. More...
 
 CaeUnsEnumElementData (const CaeUnsEnumElementData &src)
 Copy constructor. More...
 
 CaeUnsEnumElementData (const PWGM_ENUMELEMDATA &eed)
 Cast/Copy constructor. More...
 
PWGM_ENUMELEMDATAenumElementData ()
 Gets a non-const ref to the underlying PWGM_ENUMELEMDATA struct. More...
 
const PWGM_ENUMELEMDATAenumElementData () const
 Gets a const ref to the underlying PWGM_ENUMELEMDATA struct. More...
 
 operator const PWGM_ENUMELEMDATA & () const
 Const PWGM_ENUMELEMDATA casting operator. More...
 
 operator const PWGM_HELEMENT & () const
 Const PWGM_HELEMENT casting operator. More...
 
 operator PWGM_ENUMELEMDATA & ()
 Non-const PWGM_ENUMELEMDATA casting operator. More...
 
 operator PWGM_HELEMENT & ()
 Non-const PWGM_HELEMENT casting operator. More...
 
CaeUnsEnumElementDataoperator= (const CaeUnsEnumElementData &src)
 Assignment operator. More...
 
CaeUnsEnumElementDataoperator= (const PWGM_ENUMELEMDATA &eed)
 Assignment operator. More...
 
 ~CaeUnsEnumElementData ()
 Destructor. More...
 
- Public Member Functions inherited from CaeUnsElementData
 CaeUnsElementData ()
 Default constructor. More...
 
 CaeUnsElementData (const CaeUnsElementData &src)
 Copy constructor. More...
 
 CaeUnsElementData (const PWGM_ELEMDATA &ed)
 Cast/Copy constructor. More...
 
PWGM_ELEMDATAelementData ()
 Gets a non-const ref to the underlying PWGM_ELEMDATA struct. More...
 
const PWGM_ELEMDATAelementData () const
 Gets a const ref to the underlying PWGM_ELEMDATA struct. More...
 
PWP_UINT32 indexAt (PWP_UINT32 ndx) const
 Gets the global index of ndx'th vertex. More...
 
bool isOfType (ElementType type) const
 Returns true if element is of the specified ElementType. More...
 
bool isOfType (PWGM_ENUM_ELEMTYPE type) const
 Returns true if element is of the specified PWGM_ENUM_ELEMTYPE. More...
 
bool isValid () const
 Returns true if element type is not Invalid. More...
 
 operator const PWGM_ELEMDATA & () const
 Const PWGM_ELEMDATA casting operator. More...
 
 operator PWGM_ELEMDATA & ()
 Non-const PWGM_ELEMDATA casting operator. More...
 
CaeUnsElementDataoperator= (const CaeUnsElementData &src)
 Assignment operator. More...
 
CaeUnsElementDataoperator= (const PWGM_ELEMDATA &ed)
 Assignment operator. More...
 
ElementType type () const
 Gets the element type. More...
 
PWGM_HVERTEX vertAt (PWP_UINT32 ndx) const
 Gets the handle of ndx'th vertex. More...
 
PWP_UINT32 vertCount () const
 Gets the number of vertices in the element. More...
 
template<typename FTOR >
void walkPolyhedronFaces (const FTOR &f)
 If element is a polyhedron, functor f is invoked once for each face of the element. This call does nothing if element is not a polyhedron. More...
 
 ~CaeUnsElementData ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from CaeUnsElementData
enum  ElementType {
  Bar = PWGM_ELEMTYPE_BAR,
  Hex = PWGM_ELEMTYPE_HEX,
  Quad = PWGM_ELEMTYPE_QUAD,
  Tri = PWGM_ELEMTYPE_TRI,
  Tet = PWGM_ELEMTYPE_TET,
  Wedge = PWGM_ELEMTYPE_WEDGE,
  Pyramid = PWGM_ELEMTYPE_PYRAMID,
  Point = PWGM_ELEMTYPE_POINT,
  Polyhedron = PWGM_ELEMTYPE_POLYH,
  Polygon = PWGM_ELEMTYPE_POLYG,
  NumTypes = PWGM_ELEMTYPE_SIZE,
  LastType = NumTypes - 1,
  Invalid = NumTypes
}
 The valid element type id values. More...
 
- Static Public Member Functions inherited from CaeUnsElementData
template<typename FTOR >
static void walkPolyhedronFaces (const PWGM_POLYELEMDATA &ped, const FTOR &f)
 Invokes functor f once for each polygon face of the polyhedron ped. More...
 
- Static Public Attributes inherited from CaeUnsElementData
static const PWP_UINT32 MaxNumVerts = 8
 The maximum number of vertices per element. More...
 
- Protected Member Functions inherited from CaeUnsElementData
 CaeUnsElementData (const PWGM_ELEMDATA &ed, const PWGM_HELEMENT &he)
 Protected constructor used by the CaeUnsEnumElementData subclass. More...
 
- Protected Attributes inherited from CaeUnsElementData
PWGM_ENUMELEMDATA eed_
 The element data. More...
 

Detailed Description

The model unstructured element data class.

The CaeUnsEnumElementData class represents the data available for an unstructured grid model element. This class's data is populated with a call to one of the overloaded CaeUnsElement::data() methods. Grid model element indices are consistent with the owner/neighbor cell indices returned by the CaeFaceStreamHandler interface.

This class is equivalent to CaeUnsElementData with the addition of information about the block that owns this element.

See also
CaeUnsElement::data(), CaeUnsElementData, PWGM_ENUMELEMDATA, CaeFaceStreamHandler::streamFace(), PWGM_FACESTREAM_DATA
Sample Usage:
// Iterate all elements in model_ grouped by VC.
model_.appendEnumElementOrder(PWGM_ELEMORDER_VC);
CaeUnsElement elem(model_);
while (elem.isValid()) {
std::cout << "element: " << elem.index() << std::endl;
if (elem.data(eed)) {
std::cout << "block: " << eed.blockId() << std::endl;
std::cout << "type: " << eed.type() << std::endl;
std::cout << "vertCnt: " << eed.vertCount() << std::endl;
for (PWP_UINT32 ii = 0; ii < eed.vertCount(); ++ii) {
std::cout << " index[" << ii << "]:" << eed.indexAt(ii) << std::endl;
}
}
++elem;
}

Definition at line 388 of file CaeUnsElement.h.

Constructor & Destructor Documentation

◆ CaeUnsEnumElementData() [1/3]

CaeUnsEnumElementData::CaeUnsEnumElementData ( )
inline

Default constructor.

Constructs an invalid element data object.

See also
CaeUnsElement::data()

Definition at line 396 of file CaeUnsElement.h.

◆ CaeUnsEnumElementData() [2/3]

CaeUnsEnumElementData::CaeUnsEnumElementData ( const CaeUnsEnumElementData src)
inline

Copy constructor.

Definition at line 403 of file CaeUnsElement.h.

◆ CaeUnsEnumElementData() [3/3]

CaeUnsEnumElementData::CaeUnsEnumElementData ( const PWGM_ENUMELEMDATA eed)
inline

Cast/Copy constructor.

Definition at line 410 of file CaeUnsElement.h.

◆ ~CaeUnsEnumElementData()

CaeUnsEnumElementData::~CaeUnsEnumElementData ( )
inline

Destructor.

Definition at line 417 of file CaeUnsElement.h.

Member Function Documentation

◆ blockElement() [1/2]

PWGM_HELEMENT& CaeUnsEnumElementData::blockElement ( )
inline

Gets a non-const ref to the owning block's element handle.

Definition at line 454 of file CaeUnsElement.h.

References CaeUnsElementData::eed_, and PWGM_ENUMELEMDATA::hBlkElement.

◆ blockElement() [2/2]

const PWGM_HELEMENT& CaeUnsEnumElementData::blockElement ( ) const
inline

Gets a const ref to the owning block's element handle.

Definition at line 461 of file CaeUnsElement.h.

References CaeUnsElementData::eed_, and PWGM_ENUMELEMDATA::hBlkElement.

◆ blockId()

PWP_UINT32 CaeUnsEnumElementData::blockId ( ) const
inline

Gets the id (index) of the element's owning block.

This index can be used to construct an unstructured block object.

See also
CaeUnsBlock
Sample Usage:
CaeUnsElement elem(model_);
while (elem.isValid()) {
CaeUnsBlock blk(model_, elem.blockId());
// blk is now valid
++elem;
}

Definition at line 481 of file CaeUnsElement.h.

References CaeUnsElementData::eed_, PWGM_ENUMELEMDATA::hBlkElement, and PWGM_HELEMENT_PID.

◆ enumElementData() [1/2]

PWGM_ENUMELEMDATA& CaeUnsEnumElementData::enumElementData ( )
inline

Gets a non-const ref to the underlying PWGM_ENUMELEMDATA struct.

Definition at line 440 of file CaeUnsElement.h.

References CaeUnsElementData::eed_.

◆ enumElementData() [2/2]

const PWGM_ENUMELEMDATA& CaeUnsEnumElementData::enumElementData ( ) const
inline

Gets a const ref to the underlying PWGM_ENUMELEMDATA struct.

Definition at line 447 of file CaeUnsElement.h.

References CaeUnsElementData::eed_.

◆ operator const PWGM_ENUMELEMDATA &()

CaeUnsEnumElementData::operator const PWGM_ENUMELEMDATA & ( ) const
inline

Const PWGM_ENUMELEMDATA casting operator.

Definition at line 495 of file CaeUnsElement.h.

References CaeUnsElementData::eed_.

◆ operator const PWGM_HELEMENT &()

CaeUnsEnumElementData::operator const PWGM_HELEMENT & ( ) const
inline

Const PWGM_HELEMENT casting operator.

Definition at line 509 of file CaeUnsElement.h.

References CaeUnsElementData::eed_, and PWGM_ENUMELEMDATA::hBlkElement.

◆ operator PWGM_ENUMELEMDATA &()

CaeUnsEnumElementData::operator PWGM_ENUMELEMDATA & ( )
inline

Non-const PWGM_ENUMELEMDATA casting operator.

Definition at line 488 of file CaeUnsElement.h.

References CaeUnsElementData::eed_.

◆ operator PWGM_HELEMENT &()

CaeUnsEnumElementData::operator PWGM_HELEMENT & ( )
inline

Non-const PWGM_HELEMENT casting operator.

Definition at line 502 of file CaeUnsElement.h.

References CaeUnsElementData::eed_, and PWGM_ENUMELEMDATA::hBlkElement.

◆ operator=() [1/2]

CaeUnsEnumElementData& CaeUnsEnumElementData::operator= ( const CaeUnsEnumElementData src)
inline

Assignment operator.

Definition at line 423 of file CaeUnsElement.h.

References CaeUnsElementData::eed_.

◆ operator=() [2/2]

CaeUnsEnumElementData& CaeUnsEnumElementData::operator= ( const PWGM_ENUMELEMDATA eed)
inline

Assignment operator.

Definition at line 432 of file CaeUnsElement.h.

References CaeUnsElementData::eed_.


The documentation for this class was generated from the following file:
CaeUnsBlock
The unstructured block class.
Definition: CaeUnsBlock.h:68
CaeUnsElementData::indexAt
PWP_UINT32 indexAt(PWP_UINT32 ndx) const
Gets the global index of ndx'th vertex.
Definition: CaeUnsElement.h:157
PWP_UINT32
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
CaeUnsElementData::type
ElementType type() const
Gets the element type.
Definition: CaeUnsElement.h:133
CaeUnsElementData::vertCount
PWP_UINT32 vertCount() const
Gets the number of vertices in the element.
Definition: CaeUnsElement.h:141
CaeUnsEnumElementData
The model unstructured element data class.
Definition: CaeUnsElement.h:388
CaeUnsElement
The unstructured element class.
Definition: CaeUnsElement.h:544
CaeUnsEnumElementData::blockId
PWP_UINT32 blockId() const
Gets the id (index) of the element's owning block.
Definition: CaeUnsElement.h:481
PWGM_ELEMORDER_VC
@ PWGM_ELEMORDER_VC
Order by VC id.
Definition: apiGridModel.h:713