Sierra Toolkit Version of the Day
stk::mesh::EntityKey Union Reference

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

#include <EntityKey.hpp>

List of all members.

Public Types

enum  { rank_digits = 8 }
typedef uint64_t raw_key_type

Public Member Functions

 ~EntityKey ()
 EntityKey ()
 EntityKey (const EntityKey &rhs)
EntityKeyoperator= (const EntityKey &rhs)
 EntityKey (EntityRank entity_rank, raw_key_type entity_id)
raw_key_type id () const
EntityRank rank () const
EntityRank 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

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_rank and entity_id which are restricted to lie in a sub-range of what can be represented by the EntityRank 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_rank(key) < meta_data.entity_rank_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 63 of file base/EntityKey.hpp.

The documentation for this union was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines