Pointwise Plugin SDK
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members

The unstructured element data class. More...

#include <CaeUnsElement.h>

+ Inheritance diagram for CaeUnsElementData:
+ Collaboration diagram for CaeUnsElementData:

Public Types

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,
  NumTypes = PWGM_ELEMTYPE_SIZE,
  LastType = NumTypes - 1,
  Invalid = NumTypes
}
 The valid element type id values. More...
 

Public Member Functions

 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...
 
 ~CaeUnsElementData ()
 Destructor. More...
 

Static Public Attributes

static const PWP_UINT32 MaxNumVerts = 8
 The maximum number of vertices per element. More...
 

Protected Member Functions

 CaeUnsElementData (const PWGM_ELEMDATA &ed, const PWGM_HELEMENT &he)
 Protected constructor used by the CaeUnsEnumElementData subclass. More...
 

Protected Attributes

PWGM_ENUMELEMDATA eed_
 The element data. More...
 

Detailed Description

The unstructured element data class.

The CaeUnsElementData class represents the data available for an unstructured grid model, block, or path element. This class's data is populated with a call to one of the overloaded CaeUnsElement::data() methods.

See also
CaeUnsElement::data(), CaeUnsEnumElementData, PWGM_ELEMDATA
Sample Usage:
CaeUnsBlock blk(model_);
while (blk.isValid()) {
std::cout << "block: " << blk.index() << std::endl;
CaeUnsElement elem(blk);
while (elem.isValid()) {
std::cout << " elem[" << elem.index() << "]:" << std::endl;
if (elem.data(ed)) {
std::cout << " type: " << ed.type() << std::endl;
std::cout << " vertCnt: " << ed.vertCount() << std::endl;
for (PWP_UINT32 ii = 0; ii < ed.vertCount(); ++ii) {
std::cout << " index[" << ii << "]:" << ed.indexAt(ii) << std::endl;
}
}
++elem;
}
++blk;
}

Definition at line 58 of file CaeUnsElement.h.

Member Enumeration Documentation

◆ ElementType

The valid element type id values.

These values are equal to the equivalent C-API PWGM_ENUM_ELEMTYPE type values.

The valid element id values are contiguous from 0 to LastType.

See also
type(), isOfType(), isValid()
Enumerator
Bar 

1D, linear grid

Hex 

3D, 6-sided (block) grid

Quad 

2D, 4-sided grid

Tri 

2D, 3-sided grid

Tet 

3D, 4-sided (tetrahedral) grid

Wedge 

3D, extruded, tri/quad grid

Pyramid 

3D, 5-sided, quad-based grid

Point 

0D, point grid

NumTypes 

The number of defined element types.

LastType 

The last element type id.

Invalid 

The "invalid" type id.

Definition at line 73 of file CaeUnsElement.h.

Constructor & Destructor Documentation

◆ CaeUnsElementData() [1/4]

CaeUnsElementData::CaeUnsElementData ( )
inline

Default constructor.

Constructs an invalid element data object.

See also
CaeUnsElement::data()

Definition at line 96 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, PWGM_ENUMELEMDATA::hBlkElement, PWGM_ELEMDATA::index, Invalid, MaxNumVerts, PWGM_ELEMDATA::type, PWGM_ELEMDATA::vert, and PWGM_ELEMDATA::vertCnt.

◆ CaeUnsElementData() [2/4]

CaeUnsElementData::CaeUnsElementData ( const CaeUnsElementData src)
inline

Copy constructor.

Definition at line 108 of file CaeUnsElement.h.

References eed_.

◆ CaeUnsElementData() [3/4]

CaeUnsElementData::CaeUnsElementData ( const PWGM_ELEMDATA ed)
inline

Cast/Copy constructor.

Definition at line 115 of file CaeUnsElement.h.

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

◆ ~CaeUnsElementData()

CaeUnsElementData::~CaeUnsElementData ( )
inline

Destructor.

Definition at line 123 of file CaeUnsElement.h.

◆ CaeUnsElementData() [4/4]

CaeUnsElementData::CaeUnsElementData ( const PWGM_ELEMDATA ed,
const PWGM_HELEMENT he 
)
inlineprotected

Protected constructor used by the CaeUnsEnumElementData subclass.

Definition at line 234 of file CaeUnsElement.h.

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

Member Function Documentation

◆ elementData() [1/2]

PWGM_ELEMDATA& CaeUnsElementData::elementData ( )
inline

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

Definition at line 185 of file CaeUnsElement.h.

References eed_, and PWGM_ENUMELEMDATA::elemData.

◆ elementData() [2/2]

const PWGM_ELEMDATA& CaeUnsElementData::elementData ( ) const
inline

Gets a const ref to the underlying PWGM_ELEMDATA struct.

Definition at line 192 of file CaeUnsElement.h.

References eed_, and PWGM_ENUMELEMDATA::elemData.

◆ indexAt()

PWP_UINT32 CaeUnsElementData::indexAt ( PWP_UINT32  ndx) const
inline

Gets the global index of ndx'th vertex.

Definition at line 154 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, and PWGM_ELEMDATA::index.

◆ isOfType() [1/2]

bool CaeUnsElementData::isOfType ( ElementType  type) const
inline

Returns true if element is of the specified ElementType.

Definition at line 170 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, PWGM_ELEMDATA::type, and type().

◆ isOfType() [2/2]

bool CaeUnsElementData::isOfType ( PWGM_ENUM_ELEMTYPE  type) const
inline

Returns true if element is of the specified PWGM_ENUM_ELEMTYPE.

Definition at line 162 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, PWGM_ELEMDATA::type, and type().

◆ isValid()

bool CaeUnsElementData::isValid ( ) const
inline

Returns true if element type is not Invalid.

Definition at line 178 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, Invalid, and PWGM_ELEMDATA::type.

◆ operator const PWGM_ELEMDATA &()

CaeUnsElementData::operator const PWGM_ELEMDATA & ( ) const
inline

Const PWGM_ELEMDATA casting operator.

Definition at line 225 of file CaeUnsElement.h.

References eed_, and PWGM_ENUMELEMDATA::elemData.

◆ operator PWGM_ELEMDATA &()

CaeUnsElementData::operator PWGM_ELEMDATA & ( )
inline

Non-const PWGM_ELEMDATA casting operator.

Definition at line 218 of file CaeUnsElement.h.

References eed_, and PWGM_ENUMELEMDATA::elemData.

◆ operator=() [1/2]

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

Assignment operator.

Definition at line 200 of file CaeUnsElement.h.

References eed_.

◆ operator=() [2/2]

CaeUnsElementData& CaeUnsElementData::operator= ( const PWGM_ELEMDATA ed)
inline

Assignment operator.

Definition at line 209 of file CaeUnsElement.h.

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

◆ type()

ElementType CaeUnsElementData::type ( ) const
inline

Gets the element type.

Definition at line 130 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, and PWGM_ELEMDATA::type.

Referenced by isOfType().

◆ vertAt()

PWGM_HVERTEX CaeUnsElementData::vertAt ( PWP_UINT32  ndx) const
inline

Gets the handle of ndx'th vertex.

Definition at line 146 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, and PWGM_ELEMDATA::vert.

◆ vertCount()

PWP_UINT32 CaeUnsElementData::vertCount ( ) const
inline

Gets the number of vertices in the element.

Definition at line 138 of file CaeUnsElement.h.

References eed_, PWGM_ENUMELEMDATA::elemData, and PWGM_ELEMDATA::vertCnt.

Member Data Documentation

◆ eed_

PWGM_ENUMELEMDATA CaeUnsElementData::eed_
protected

◆ MaxNumVerts

const PWP_UINT32 CaeUnsElementData::MaxNumVerts = 8
static

The maximum number of vertices per element.

Definition at line 62 of file CaeUnsElement.h.

Referenced by CaeUnsElementData().


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:154
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:130
CaeUnsElementData::vertCount
PWP_UINT32 vertCount() const
Gets the number of vertices in the element.
Definition: CaeUnsElement.h:138
CaeUnsElementData
The unstructured element data class.
Definition: CaeUnsElement.h:58
CaeUnsElement
The unstructured element class.
Definition: CaeUnsElement.h:443