9 #ifndef stk_mesh_base_FieldBase_hpp 10 #define stk_mesh_base_FieldBase_hpp 16 #include <Shards_Array.hpp> 18 #include <stk_util/util/SimpleArrayOps.hpp> 19 #include <stk_util/util/CSet.hpp> 21 #include <stk_mesh/base/Types.hpp> 22 #include <stk_mesh/base/DataTraits.hpp> 24 #include <stk_mesh/base/FieldState.hpp> 26 #include <stk_mesh/base/FieldRestriction.hpp> 27 #include <stk_mesh/baseImpl/FieldBaseImpl.hpp> 32 class UnitTestFieldImpl;
36 class FieldRepository;
66 const std::string &
name()
const {
return m_impl.name() ; }
70 {
return m_impl.type_is<Type>(); }
75 const DataTraits &
data_traits()
const {
return m_impl.data_traits() ; }
86 unsigned rank()
const {
return m_impl.rank(); }
93 {
return m_impl.dimension_tags() ; }
106 const A *
attribute()
const {
return m_impl.attribute<A>(); }
117 return m_impl.restrictions();
121 return m_impl.selector_restrictions();
134 return m_impl.field_state(fstate);
137 const void* get_initial_value()
const {
return m_impl.get_initial_value(); }
139 void* get_initial_value() {
return m_impl.get_initial_value(); }
141 unsigned get_initial_value_num_bytes()
const {
return m_impl.get_initial_value_num_bytes(); }
148 MetaData & meta_data()
const {
return m_impl.meta_data(); }
150 friend class ::stk_classic::mesh::MetaData ;
151 friend class ::stk_classic::mesh::impl::FieldRepository ;
152 friend class ::stk_classic::mesh::impl::FieldBaseImpl ;
155 friend class ::stk_classic::mesh::UnitTestFieldImpl ;
159 unsigned arg_ordinal ,
160 const std::string & arg_name ,
161 const DataTraits & arg_traits ,
163 const shards::ArrayDimTag *
const * arg_dim_tags,
164 unsigned arg_number_of_states ,
174 arg_number_of_states,
182 impl::FieldBaseImpl m_impl;
191 std::ostream & operator << ( std::ostream & ,
const FieldBase & );
194 std::ostream &
print( std::ostream & ,
195 const char *
const ,
const FieldBase & );
200 #endif //stk_mesh_base_FieldBase_hpp unsigned number_of_states() const
Number of states of this field.
std::ostream & print(std::ostream &os, const std::string &indent, const Bucket &bucket)
Print the parts and entities of this bucket.
Field base class with an anonymous data type and anonymous multi-dimension.
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...
unsigned rank() const
Multi-dimensional array rank of this field, which is zero for a scalar field.
const RestrictionVector & restrictions() const
Vector of field restriction which is volatile until the owning meta data manager is committed...
MetaData & mesh_meta_data() const
The meta data manager that owns this field.
An application-defined subset of a problem domain.
const std::string & name() const
Application-defined text name of this field.
const shards::ArrayDimTag *const * dimension_tags() const
Multi-dimensional array dimension tags of this field.
unsigned mesh_meta_data_ordinal() const
Internally generated ordinal of this field that is unique within the owning meta data manager...
unsigned max_size(EntityRank entity_rank) const
Maximum field data allocation size declared for this field for the given entity rank.
const A * attribute() const
Query attribute that has been attached to this field.
FieldState state() const
FieldState of this field.
bool type_is() const
Query if the type is Type.
EntityRank entity_rank(const EntityKey &key)
Given an entity key, return an entity type (rank).
FieldRestrictionVector RestrictionVector
A fields' restrictions are maintained in a std::vector.
const DataTraits & data_traits() const
Return the data traits for this field's type.
FieldState
Enumeration of states for multi-state fields.