Sierra Toolkit Version of the Day
A defined entity-relationship between a field of a pointer type and the field that it should point to. An internal class that should never need to be directly used within application code. More...
|relation domain part |
|relation range part |
|relation stencil |
A defined entity-relationship between a field of a pointer type and the field that it should point to. An internal class that should never need to be directly used within application code.
index = (*m_function)( e1.entity_rank() , e2.entity_rank() , rel.identifier() , rel.kind() );
field_data(*m_root,e1)[index] == field_data(*m_target,e2)
A common use case is, given an element, process a certain field that is on its nodes. This can be done by iterating over the element's node relations and getting the field data off the nodes directly, but it can be cleaner and faster to set up a field relation instead. A field relation formally defines a relationship between a field on the element and a field on it's nodes (or some other lower-than-element entity rank). The API for setting up a field relation is in MetaData.hpp. See Field.hpp for a full discussion of Fields.
// Declare element field, ElementNodePointerField is a typedef from TopologyDimensions.hpp ElementNodePointerField elem_node_coord_field = meta.declare_field<ElementNodePointerField>("elem_node_coord_field");
// Add field restriction for nodal field put_field( coord_field, <node_rank>, <part> );
// Declare field relation! Stencil defines order in which nodal fields are accessed meta.declare_field_relation(elem_node_coord_field, fem::get_element_node_stencil(3), coord_field);
// Add field restriction for element field put_field( elem_node_coord_field, <elem_rank>, <part>);