stk::mesh::EntityKey Union Reference
[Sierra Toolkit Mesh]

#include <EntityKey.hpp>

List of all members.

Detailed Description

Integer type for the entity keys, which is an encoding of the entity type and entity identifier.

This type is used to fully order entities and entity pointers in numerous containers. Ordering is first by type and second by identifier. Values of this type are frequently compared for ordering and equality, and are frequently communicated between parallel processes. Thus the motivation for this type to be a "plain old data" type.

Notes on construction and validity:

EntityKey takes constructor arguments entity_type and entity_id which are restricted to lie in a sub-range of what can be represented by the EntityType and EntityId types. The sub-range allowed by EntityKey is dictated by the amount of space used to store the internal encoding of those values (described further in the comments for the EntityKey constructor below).

The function entity_key_valid attempts to determine that the key was not created by some erroneous operation such as assignment from a smaller type like a 32-bit int.

Note that an instance of stk::mesh may place further restrictions on a 'valid' key, such as requiring that 0 <= entity_type(key) < meta_data.entity_type_count().

Typically stk::mesh does not take EntityKeys as input. A user of stk::mesh would (for instance) request that an Entity be created by specifying an entity-type and entity-id as input. The resulting Entity would then hold a mesh-created EntityKey that could be queried. Thus stk::mesh can control the validity of EntityKeys associated with the mesh.

Definition at line 60 of file base/EntityKey.hpp.

Public Types

typedef uint64_t raw_key_type
 rank_digits = 8
enum  { rank_digits = 8 }

Public Member Functions

 ~EntityKey ()
 EntityKey ()
 Default constructor.
 EntityKey (const EntityKey &rhs)
EntityKeyoperator= (const EntityKey &rhs)
 EntityKey (unsigned entity_rank, raw_key_type entity_id)
raw_key_type id () const
unsigned rank () const
unsigned type () const
bool operator== (const EntityKey &rhs) const
bool operator!= (const EntityKey &rhs) const
bool operator< (const EntityKey &rhs) const
bool operator> (const EntityKey &rhs) const
bool operator<= (const EntityKey &rhs) const
bool operator>= (const EntityKey &rhs) const
 EntityKey (const raw_key_type *const value)
raw_key_type raw_key () const

The documentation for this union was generated from the following files:
Generated on Tue Jul 13 09:27:33 2010 for Sierra Toolkit by  doxygen 1.4.7