Pointwise Plugin SDK
Public Member Functions | Private Attributes | List of all members

The unstructured element class. More...

#include <CaeUnsElement.h>

+ Collaboration diagram for CaeUnsElement:

Public Member Functions

 CaeUnsElement ()
 Default constructor. More...
 
 CaeUnsElement (const CaeUnsElement &src)
 Copy constructor. More...
 
 CaeUnsElement (const CaeUnsElementGroup &group, PWP_UINT32 ndx=0)
 Group and element index constructor. More...
 
bool data (CaeUnsElementData &data) const
 Get the element's connectivity data. More...
 
bool data (CaeUnsEnumElementData &data) const
 Get the element's connectivity data. More...
 
bool data (PWGM_ELEMDATA &data) const
 Get the element's connectivity data. More...
 
bool data (PWGM_ENUMELEMDATA &data) const
 Get the element's connectivity data. More...
 
PWP_UINT32 index () const
 Get the element's index. More...
 
bool isValid () const
 Determines an element's validity. More...
 
CaeUnsGridModel model () const
 Gets the unstructured grid model of which this element is a member. More...
 
CaeUnsElementmoveFirst (const CaeUnsElementGroup &group)
 Rebinds an instance to the first element in an element group. More...
 
CaeUnsElementmoveNext ()
 Rebinds an instance to the next element in an element group. More...
 
CaeUnsElementmovePrev ()
 Rebinds an instance to the previous element in an element group. More...
 
CaeUnsElementmoveTo (const CaeUnsElementGroup &group, PWP_UINT32 ndx)
 Rebinds an instance to a specific model element. More...
 
 operator PWGM_HELEMENT () const
 The PWGM_HELEMENT cast operator. More...
 
bool operator!= (const CaeUnsElement &rhs) const
 Compares two CaeUnsElement instances for inequality. More...
 
CaeUnsElementoperator++ ()
 Prefix increment to the next element in an element group. More...
 
CaeUnsElement operator++ (int)
 Postfix increment to the next element in an element group. More...
 
CaeUnsElementoperator-- ()
 Prefix decrement to the previous element in an element group. More...
 
CaeUnsElement operator-- (int)
 Postfix decrement to the previous element in an element group. More...
 
bool operator< (const CaeUnsElement &rhs) const
 Compares the relative order of two CaeUnsElement instances. More...
 
CaeUnsElementoperator= (const CaeUnsElement &rhs)
 Assignment operator. More...
 
bool operator== (const CaeUnsElement &rhs) const
 Compares two CaeUnsElement instances for equality. More...
 
bool operator> (const PWGM_HELEMENT &rhs)
 Compares the relative order of two CaeUnsElement instances. More...
 
virtual ~CaeUnsElement ()
 Destructor. More...
 

Private Attributes

const CaeUnsElementGroupgroup_
 The owning element group. More...
 
PWGM_HELEMENT h_
 The bound PWGM_HELEMENT. More...
 

Detailed Description

The unstructured element class.

The CaeUnsElement class represents a single unstructured grid model element. The elements are indexed starting from 0 to CaeUnsElementGroup::elementCount() - 1.

Currently, only 8-point HEX, 6-point WEDGE (PRISM), 5-point PYRAMID and 4-point TET 3D elements are supported. See Cell Connectivity. In addition, only 3-point TRI and 4-point QUAD 2D elements are supported.

A CaeUnsElement object is aware of its relative position in its element group. As a result, a given element object can be moved (iterated) to its previous or next neighbor element. It can also be moved to the first element or to a element at a given index. After being moved, a CaeUnsElement object will return information about the grid element at its current position.

Sample Usage:

See CaeUnsBlock and CaeUnsPatch for usage.

Definition at line 544 of file CaeUnsElement.h.

Constructor & Destructor Documentation

◆ CaeUnsElement() [1/3]

CaeUnsElement::CaeUnsElement ( )
inline

Default constructor.

Constructs an invalid element.

Note
The element can be made valid using moveTo() or moveFirst().
See also
moveTo(), moveFirst(), moveNext(), movePrev()

Definition at line 553 of file CaeUnsElement.h.

References h_.

◆ CaeUnsElement() [2/3]

CaeUnsElement::CaeUnsElement ( const CaeUnsElementGroup group,
PWP_UINT32  ndx = 0 
)
inline

Group and element index constructor.

Constructs an unstructured element object bound to the element at the specified index.

Parameters
groupThe owning unstructured element group.
ndxThe element's index within the group.
See also
CaeUnsGridModel, CaeUnsBlock, CaeUnsPatch

Definition at line 565 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, and h_.

◆ CaeUnsElement() [3/3]

CaeUnsElement::CaeUnsElement ( const CaeUnsElement src)
inline

Copy constructor.

Binds this element to the same element as src.

Parameters
srcAn element instance.

Definition at line 575 of file CaeUnsElement.h.

References group_, and h_.

◆ ~CaeUnsElement()

virtual CaeUnsElement::~CaeUnsElement ( )
inlinevirtual

Destructor.

Definition at line 581 of file CaeUnsElement.h.

Member Function Documentation

◆ data() [1/4]

bool CaeUnsElement::data ( CaeUnsElementData data) const
inline

Get the element's connectivity data.

Parameters
dataThe CaeUnsElementData object.
Returns
true if successful.

Definition at line 611 of file CaeUnsElement.h.

References data(), h_, and PwElemDataMod().

◆ data() [2/4]

bool CaeUnsElement::data ( CaeUnsEnumElementData data) const
inline

Get the element's connectivity data.

Parameters
dataThe CaeUnsEnumElementData object.
Returns
true if successful.

Definition at line 629 of file CaeUnsElement.h.

References data(), h_, and PwElemDataModEnum().

◆ data() [3/4]

bool CaeUnsElement::data ( PWGM_ELEMDATA data) const
inline

Get the element's connectivity data.

Parameters
dataThe PWGM_ELEMDATA buffer.
Returns
true if successful.

Definition at line 602 of file CaeUnsElement.h.

References h_, and PwElemDataMod().

Referenced by data().

◆ data() [4/4]

bool CaeUnsElement::data ( PWGM_ENUMELEMDATA data) const
inline

Get the element's connectivity data.

Parameters
dataThe PWGM_ENUMELEMDATA buffer.
Returns
true if successful.

Definition at line 620 of file CaeUnsElement.h.

References data(), h_, and PwElemDataModEnum().

◆ index()

PWP_UINT32 CaeUnsElement::index ( ) const
inline

Get the element's index.

Returns
The element's index in the group's index space.

Definition at line 593 of file CaeUnsElement.h.

References h_, and PWGM_HELEMENT_ID.

Referenced by moveNext(), movePrev(), operator++(), and operator--().

◆ isValid()

bool CaeUnsElement::isValid ( ) const
inline

Determines an element's validity.

Returns
true if the element is valid.

Definition at line 635 of file CaeUnsElement.h.

References h_, and PWGM_HELEMENT_ISVALID.

◆ model()

CaeUnsGridModel CaeUnsElement::model ( ) const
inline

Gets the unstructured grid model of which this element is a member.

Definition at line 585 of file CaeUnsElement.h.

References h_, and PWGM_HELEMENT_MODEL.

◆ moveFirst()

CaeUnsElement& CaeUnsElement::moveFirst ( const CaeUnsElementGroup group)
inline

Rebinds an instance to the first element in an element group.

Parameters
groupThe owning unstructured element group.
Returns
A self reference.
Note
Equivalent to calling moveTo(model, 0).
See also
moveTo(), movePrev(), moveNext(), isValid(), CaeUnsGridModel, CaeUnsBlock, CaeUnsPatch

Definition at line 674 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, and h_.

◆ moveNext()

CaeUnsElement& CaeUnsElement::moveNext ( )
inline

Rebinds an instance to the next element in an element group.

Returns
A self reference.
Note
If already on the last element, the element will become invalid.
See also
moveTo(), moveFirst(), movePrev(), isValid()

Definition at line 686 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, h_, and index().

◆ movePrev()

CaeUnsElement& CaeUnsElement::movePrev ( )
inline

Rebinds an instance to the previous element in an element group.

Returns
A self reference.
Note
If already on the first element, the element will become invalid.
See also
moveTo(), moveFirst(), movePrev(), moveNext(), isValid()

Definition at line 727 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, h_, and index().

◆ moveTo()

CaeUnsElement& CaeUnsElement::moveTo ( const CaeUnsElementGroup group,
PWP_UINT32  ndx 
)
inline

Rebinds an instance to a specific model element.

Parameters
groupThe owning unstructured element group.
ndxThe element's index.
Returns
A self reference.
Note
If ndx is not a valid index, the element will become invalid.
See also
moveFirst(), movePrev(), moveNext(), isValid(), CaeUnsGridModel, CaeUnsBlock, CaeUnsPatch

Definition at line 660 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, and h_.

◆ operator PWGM_HELEMENT()

CaeUnsElement::operator PWGM_HELEMENT ( ) const
inline

The PWGM_HELEMENT cast operator.

Definition at line 809 of file CaeUnsElement.h.

References h_.

◆ operator!=()

bool CaeUnsElement::operator!= ( const CaeUnsElement rhs) const
inline

Compares two CaeUnsElement instances for inequality.

Returns
true if each instance is bound to a different grid element or only one of the elements is invalid.

Definition at line 781 of file CaeUnsElement.h.

◆ operator++() [1/2]

CaeUnsElement& CaeUnsElement::operator++ ( )
inline

Prefix increment to the next element in an element group.

Returns
A self reference.
Note
Equivalent to calling moveNext().
If already on the last element, the element will become invalid.
See also
moveTo(), moveFirst(), movePrev(), isValid()

Definition at line 700 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, h_, and index().

◆ operator++() [2/2]

CaeUnsElement CaeUnsElement::operator++ ( int  )
inline

Postfix increment to the next element in an element group.

Returns
A copy of the element before it was moved.
Note
If already on the last element, the element will become invalid.
See also
moveTo(), moveFirst(), movePrev(), moveNext(), isValid()

Definition at line 713 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, h_, and index().

◆ operator--() [1/2]

CaeUnsElement& CaeUnsElement::operator-- ( )
inline

Prefix decrement to the previous element in an element group.

Returns
A self reference.
Note
Equivalent to calling movePrev().
If already on the first element, the element will become invalid.
See also
moveTo(), moveFirst(), movePrev(), moveNext(), isValid()

Definition at line 741 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, h_, and index().

◆ operator--() [2/2]

CaeUnsElement CaeUnsElement::operator-- ( int  )
inline

Postfix decrement to the previous element in an element group.

Returns
A copy of the element before it was moved.
Note
If already on the first element, the element will become invalid.
See also
moveTo(), moveFirst(), movePrev(), moveNext(), isValid()

Definition at line 754 of file CaeUnsElement.h.

References CaeUnsElementGroup::enumElements(), group_, h_, and index().

◆ operator<()

bool CaeUnsElement::operator< ( const CaeUnsElement rhs) const
inline

Compares the relative order of two CaeUnsElement instances.

Returns
true if *this is ordered less than rhs.

Definition at line 789 of file CaeUnsElement.h.

References group_, and h_.

◆ operator=()

CaeUnsElement& CaeUnsElement::operator= ( const CaeUnsElement rhs)
inline

Assignment operator.

Rebind this instance to the same element as rhs.

Parameters
rhsAn element instance.
Returns
A self reference.

Definition at line 645 of file CaeUnsElement.h.

References group_, and h_.

◆ operator==()

bool CaeUnsElement::operator== ( const CaeUnsElement rhs) const
inline

Compares two CaeUnsElement instances for equality.

Returns
true if both instances are bound to the same grid element or both elements are invalid.

Definition at line 772 of file CaeUnsElement.h.

References group_, and h_.

◆ operator>()

bool CaeUnsElement::operator> ( const PWGM_HELEMENT rhs)
inline

Compares the relative order of two CaeUnsElement instances.

Returns
true if *this is ordered greater than rhs.

Definition at line 803 of file CaeUnsElement.h.

Member Data Documentation

◆ group_

const CaeUnsElementGroup* CaeUnsElement::group_
private

The owning element group.

Definition at line 815 of file CaeUnsElement.h.

Referenced by CaeUnsElement(), moveFirst(), moveNext(), movePrev(), moveTo(), operator++(), operator--(), operator<(), operator=(), and operator==().

◆ h_

PWGM_HELEMENT CaeUnsElement::h_
private

The documentation for this class was generated from the following file: