Sierra Toolkit Version of the Day
Mesh Entity Relationships

An seemingly simple relationship between two mesh entities has consequences for entity membership in parts and derived field relationships. More...

Collaboration diagram for Mesh Entity Relationships:

Classes

struct  stk::mesh::PartRelation
 A defined entity-relationship between parts. An internal class that should never need to be directly used within application code. More...

Typedefs

typedef int(* stk::mesh::relation_stencil_ptr )(unsigned from_type, unsigned to_type, unsigned identifier)
 A relation stencil maps entity relationships to ordinals.

Detailed Description

An seemingly simple relationship between two mesh entities has consequences for entity membership in parts and derived field relationships.

Entity Relation

An entity relation defines a directed relationship between two entities eA and eB. This relationship is directed from the higher ranking entity to the lower ranking entity.

  if ( eA.entity_type() > eB.entity_type() ) {
    // relationship is from eA to eB
  }

Each relationship has two attributes:

The identifier is local to the from entity of the relationship. For example, a relationship from an element entity to a node entity is given local identifier according to the element topology's local numbering system for nodes.

The kind attribute support and application-defined taxonomy of relationships. For example,

Relations

Each entity has a set of relations for which that entity is a member. Relations for which the entity is a from members or a to member are included.

Relation Stencil

An entity relation stencil is a mapping of a relation type to an integer value.

    i = stencil( from_entity_type , to_entity_type , identifer , kind );

If the returned integer value is non-negative then a relation of this type is in the domain of the map. Otherwise it is not.

An entity relation stencil is used to induce entity membership in parts and to induce field data pointer values from entity relations.

Part Membership

An entity is becomes a member of a mesh part explicility via the mesh bulk data change entity parts method, and when it membership is induced by its relationships.

Induced membership occurs as per the following simple type-based rule.

Induced membership may also occur as per the following stencil-based rule.

The negation holds for both of these induced membership rules:

  • In the type-based rule the entity_to cannot be a member of part unless the conditions of the type-based rule are satisfied.
  • In the stencil-based rule the entity_to cannot be a member of part_to unless the conditions of the stencil-based rule are satisfied.

Part Membership

A field relation is used to induce field data relationships between related mesh entities.

If the following field relation conditions are satisfied

  • Let field_from be a pointer-valued field to the scalar data type of the field_to non-pointer valued field.
  • Let ( field_from , stencil , field_to ) be a field relation.
  • Let ( entity_from , relation , entity_to ) be an entity relation.
  • If entity_from has field data for field_from, and if entity_to has field data for field_to, and
  • index = stencil( entity_from.entity_type() , entity_to.entity_type() , relation.identifier() , relation.kind() ), and
  • if 0 <= index < n where n is the length of the field data on entity_from
  • then following field data relationship is maintained.
        field_data( field_from , entity_from )[ index ] =
          field_data( field_to , entity_to )
    

Note that the non-negative values of the stencil map must be unique over the domain of the stencil.


Typedef Documentation

typedef int( * stk::mesh::relation_stencil_ptr)(unsigned from_type, unsigned to_type, unsigned identifier)

A relation stencil maps entity relationships to ordinals.

A relation stencil function is the inverse mapping of a contiguous span of non-negative integers to a template of entity relations. For example, a triangle-to-vertex relation stencil would map:

  • 0 = relation_stencil( Element , Node , 0 )
  • 1 = relation_stencil( Element , Node , 1 )
  • 2 = relation_stencil( Element , Node , 2 )

If the input entity relationship is within the stencil then a stencil function returns a non-negative integer; otherwise a stencil function returns a negative value.

Definition at line 149 of file Types.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines