Sierra Toolkit
Version of the Day
|
Field with defined data type and multi-dimensions (if any) More...
#include <Field.hpp>
Public Member Functions | |
Field & | field_of_state (FieldState input_state) const |
Query this field for a given field state. | |
![]() | |
MetaData & | mesh_meta_data () const |
The meta data manager that owns this field. | |
unsigned | mesh_meta_data_ordinal () const |
Internally generated ordinal of this field that is unique within the owning meta data manager. | |
const std::string & | name () const |
Application-defined text name of this field. | |
template<class Type > | |
bool | type_is () const |
Query if the type is Type. | |
const DataTraits & | data_traits () const |
Return the data traits for this field's type. | |
unsigned | number_of_states () const |
Number of states of this field. | |
FieldState | state () const |
FieldState of this field. | |
unsigned | rank () const |
Multi-dimensional array rank of this field, which is zero for a scalar field. | |
const shards::ArrayDimTag *const * | dimension_tags () const |
Multi-dimensional array dimension tags of this field. | |
unsigned | max_size (EntityRank entity_rank) const |
Maximum field data allocation size declared for this field for the given entity rank. | |
template<class A > | |
const A * | attribute () const |
Query attribute that has been attached to this field. | |
const RestrictionVector & | restrictions () const |
Vector of field restriction which is volatile until the owning meta data manager is committed. | |
const RestrictionVector & | selector_restrictions () const |
const Restriction & | restriction (unsigned entity_rank, const Part &part) const |
Query a field restriction, result is volatile until the owning meta data manager is committed. | |
FieldBase * | field_state (FieldState fstate) const |
const void * | get_initial_value () const |
void * | get_initial_value () |
unsigned | get_initial_value_num_bytes () const |
Additional Inherited Members | |
![]() | |
typedef FieldRestriction | Restriction |
typedef FieldRestrictionVector | RestrictionVector |
A fields' restrictions are maintained in a std::vector. | |
Field with defined data type and multi-dimensions (if any)
Conceptually, a field describes computational data that is associated with mesh entities. The data is not related to connectivity or mesh structure; rather, it is used to track some property (like velocity) that is relevant to the problem being solved.
A field specification has three components
Field restrictions: Defines the set of entities that have a field and the dimensions of the field (maximum of 7 dimensions). FieldRestrictions are applied to Parts and entities pick up the field by being placed in the associated part. Also, FieldRestrictions allow the same Field to be applied to different ranks of entities. E.g., you could apply a velocity Field to both Faces and Edges through two different FieldRestrictions for each of the different ranks. Also, FieldRestrictions can apply a nodal field to all nodes in an element ranked part. This depends on the concept of induced part membership since you can't put a node directly in an element ranked part, but any nodes reachable through downward relations from elements that are in the part will be induced into the part and therefore pick up the field. This allows you to specify special nodal fields for different element types.
The public API for declaring field restrictions is in MetaData.hpp; we strongly recommend using the put_field free functions to create your field restrictions. A field may have many restrictions, but the restrictions have to be compatible with each other; restrictions can overlap if an entity is a member of two parts A,B and you declare restrictions for a field for both A and B. If such a situation arises, the dimensionality of both restrictions must be identical.
Items of interest
Field-related API
TODO Describe relationship with Buckets