|
IOSS 2.0
|
Holds metadata for bulk data associated with a GroupingEntity. More...
#include <Ioss_Field.h>
Public Types | |
| enum | BasicType { INVALID = -1 , REAL = 1 , DOUBLE = 1 , INTEGER = 4 , INT32 = 4 , INT64 = 8 , COMPLEX = 9 , STRING = 10 , CHARACTER = 11 } |
| The basic data type held in the field. More... | |
| enum class | InOut { INPUT , OUTPUT } |
| enum | RoleType { INTERNAL , MESH , ATTRIBUTE , MAP , COMMUNICATION , MESH_REDUCTION , INFORMATION = MESH_REDUCTION , REDUCTION , TRANSIENT } |
Public Member Functions | |
| Field () | |
| Create an empty field. | |
| Field (std::string name, BasicType type, const std::string &storage, RoleType role, size_t value_count=0, size_t index=0) | |
| Create a field. | |
| Field (std::string name, BasicType type, const std::string &storage, int copies, RoleType role, size_t value_count=0, size_t index=0) | |
| Create a field. | |
| Field (std::string name, BasicType type, const std::string &storage, const std::string &secondary, RoleType role, size_t value_count=0, size_t index=0) | |
| Create a field. | |
| Field (std::string name, BasicType type, const VariableType *storage, RoleType role, size_t value_count=0, size_t index=0) | |
| Create a field. | |
| IOSS_NODISCARD bool | operator< (const Field &other) const |
| IOSS_NODISCARD bool | operator== (const Ioss::Field &rhs) const |
| IOSS_NODISCARD bool | operator!= (const Ioss::Field &rhs) const |
| IOSS_NODISCARD bool | equal (const Ioss::Field &rhs) const |
| IOSS_NODISCARD bool | is_valid () const |
| IOSS_NODISCARD bool | is_invalid () const |
| IOSS_NODISCARD const std::string & | get_name () const |
| IOSS_NODISCARD std::string & | get_name () |
| IOSS_NODISCARD std::string | get_component_name (int component_index, InOut in_out, char suffix=1) const |
| Get name of the 'component_indexth` component (1-based) | |
| IOSS_NODISCARD int | get_component_count (InOut in_out) const |
| Field & | set_suffix_separator (char suffix_separator1, char suffix_separator2=2) |
| IOSS_NODISCARD char | get_suffix_separator (int index=0) const |
| Field & | set_suffices_uppercase (bool true_false) |
| IOSS_NODISCARD bool | get_suffices_uppercase () const |
| const Field & | set_zero_copy_enabled (bool true_false=true) const |
| IOSS_NODISCARD bool | zero_copy_enabled () const |
| IOSS_NODISCARD BasicType | get_type () const |
| Get the basic data type of the data held in the field. | |
| IOSS_NODISCARD const VariableType * | raw_storage () const |
| IOSS_NODISCARD const VariableType * | transformed_storage () const |
| IOSS_NODISCARD size_t | raw_count () const |
| Number of items in field. | |
| IOSS_NODISCARD size_t | transformed_count () const |
| Number of items in field after transforms have been applied. | |
| IOSS_NODISCARD size_t | get_size () const |
| data size (in bytes) required to hold entire field | |
| IOSS_NODISCARD size_t | get_basic_size () const |
| data size (in bytes) of the basic type | |
| IOSS_NODISCARD RoleType | get_role () const |
| Get the role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) of the data in the field. | |
| IOSS_NODISCARD size_t | get_index () const |
| const Field & | set_index (size_t index) const |
| Field & | set_index (size_t index) |
| void | reset_count (size_t new_count) |
| new number of items in field | |
| void | reset_type (BasicType new_type) |
| new type of items in field. | |
| size_t | verify (size_t data_size) const |
| void | check_type (BasicType the_type) const |
| IOSS_NODISCARD bool | is_type (BasicType the_type) const |
| IOSS_NODISCARD std::string | type_string () const |
| IOSS_NODISCARD std::string | role_string () const |
| bool | add_transform (Transform *my_transform) |
| bool | transform (void *data) |
| IOSS_NODISCARD bool | has_transform () const |
Static Public Member Functions | |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (char) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (double) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (int) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (unsigned int) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (int64_t) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (uint64_t) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (Complex) |
| static IOSS_NODISCARD Ioss::Field::BasicType | get_field_type (const std::string &) |
| static IOSS_NODISCARD std::string | type_string (BasicType type) |
| static IOSS_NODISCARD std::string | role_string (RoleType role) |
Private Member Functions | |
| bool | equal_ (const Ioss::Field &rhs, bool quiet) const |
Private Attributes | |
| std::string | name_ {} |
| size_t | rawCount_ {} |
| Count of items in field before transformation. | |
| size_t | transCount_ {} |
| Count of items in field after transformed. | |
| size_t | size_ {} |
| maximum data size (in bytes) required to hold entire field | |
| size_t | index_ {} |
| Optional flag that can be used by a client to indicate an ordering. | |
| BasicType | type_ {INVALID} |
| The basic type of the field (Integer, Real, String) | |
| RoleType | role_ {INTERNAL} |
| The role of the field. | |
| const VariableType * | rawStorage_ {nullptr} |
| Storage type of raw field. | |
| const VariableType * | transStorage_ {nullptr} |
| Storage type after transformation. | |
| std::vector< std::shared_ptr< Transform > > | transforms_ {} |
| char | suffixSeparator1_ {1} |
| Value = 1 means unset; use database default. | |
| char | suffixSeparator2_ {1} |
| Value = 1 means unset; use database default. | |
| bool | sufficesUppercase_ {false} |
| True if the suffices are uppercase on database... | |
| bool | zeroCopyable_ {false} |
| True if the field is zero-copyable. | |
Holds metadata for bulk data associated with a GroupingEntity.
|
strong |
| Enumerator | |
|---|---|
| INTERNAL | |
| MESH | A field which is used to define the basic geometry or topology of the model and is not normally transient in nature. Examples would be element connectivity or nodal coordinates. |
| ATTRIBUTE | A field which is used to define an attribute on an EntityBlock derived class. Examples would be thickness of the elements in a shell element block or the radius of particles in a particle element block. |
| MAP | A list of integers specifying some ordering or mapping of the entties. |
| COMMUNICATION | Related to parallel communication. |
| MESH_REDUCTION | A field which summarizes some non-transient data about an entity (
|
| INFORMATION | Same as MESH_REDUCTION |
| REDUCTION | A field which typically summarizes some transient data about an entity. The size of this field is typically not proportional to the number of entities in a GroupingEntity. An example would be average displacement over a group of nodes or the kinetic energy of a model. This data is also transient. |
| TRANSIENT | A field which is typically calculated at multiple steps or times in an analysis. These are typically "results" data. Examples would be nodal displacement or element stress. |
| Ioss::Field::Field | ( | ) |
Create an empty field.
| Ioss::Field::Field | ( | std::string | name, |
| BasicType | type, | ||
| const std::string & | storage, | ||
| RoleType | role, | ||
| size_t | value_count = 0, | ||
| size_t | index = 0 ) |
Create a field.
| [in] | name | The name of the field |
| [in] | type | The basic data type of data held in the field. |
| [in] | storage | The storage class of the data (ConstructedVariableType, CompositeVariableType, etc) |
| [in] | role | The category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc) |
| [in] | value_count | The number of items in the field. |
| [in] | index |
| Ioss::Field::Field | ( | std::string | name, |
| BasicType | type, | ||
| const std::string & | storage, | ||
| int | copies, | ||
| RoleType | role, | ||
| size_t | value_count = 0, | ||
| size_t | index = 0 ) |
Create a field.
| [in] | name | The name of the field |
| [in] | type | The basic data type of data held in the field. |
| [in] | storage | The storage class of the data (ConstructedVariableType, CompositeVariableType, etc) |
| [in] | copies | The number of variables to be combined in a CompositeVariableType field. |
| [in] | role | The category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc) |
| [in] | value_count | The number of items in the field. |
| [in] | index |
| Ioss::Field::Field | ( | std::string | name, |
| BasicType | type, | ||
| const std::string & | storage, | ||
| const std::string & | secondary, | ||
| RoleType | role, | ||
| size_t | value_count = 0, | ||
| size_t | index = 0 ) |
Create a field.
| [in] | name | The name of the field |
| [in] | type | The basic data type of data held in the field. |
| [in] | storage | The storage class of the data (ConstructedVariableType, CompositeVariableType, etc) |
| [in] | role | The category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc) |
| [in] | value_count | The number of items in the field. |
| [in] | index |
| Ioss::Field::Field | ( | std::string | name, |
| BasicType | type, | ||
| const VariableType * | storage, | ||
| RoleType | role, | ||
| size_t | value_count = 0, | ||
| size_t | index = 0 ) |
Create a field.
| [in] | name | The name of the field |
| [in] | type | The basic data type of data held in the field. |
| [in] | storage | The storage class of the data (ConstructedVariableType, CompositeVariableType, etc) |
| [in] | secondary | The secondary storage class of the data (typically "basis") [For a ComposedVariableType field] |
| [in] | role | The category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc) |
| [in] | value_count | The number of items in the field. |
| [in] | index |
| bool Ioss::Field::add_transform | ( | Transform * | my_transform | ) |
| void Ioss::Field::check_type | ( | BasicType | the_type | ) | const |
Verify that the type 'the_type' matches the field's type. throws exception if the types don't match.
| bool Ioss::Field::equal | ( | const Ioss::Field & | rhs | ) | const |
|
private |
| size_t Ioss::Field::get_basic_size | ( | ) | const |
data size (in bytes) of the basic type
| int Ioss::Field::get_component_count | ( | InOut | in_out | ) | const |
| std::string Ioss::Field::get_component_name | ( | int | component_index, |
| InOut | in_out, | ||
| char | suffix = 1 ) const |
Get name of the 'component_indexth` component (1-based)
| [in] | component_index | 1-based index of the component to be named |
| [in] | in_out | Is the field being read or written |
| [in] | suffix | optional suffix separator to be used if the separator on the field is set to '1' which means 'unset' |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
Get the role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) of the data in the field.
| size_t Ioss::Field::get_size | ( | ) | const |
data size (in bytes) required to hold entire field
|
inline |
|
inline |
|
inline |
Get the basic data type of the data held in the field.
|
inline |
|
inline |
|
inline |
|
inline |
| bool Ioss::Field::operator!= | ( | const Ioss::Field & | rhs | ) | const |
| IOSS_NODISCARD bool Ioss::Field::operator< | ( | const Field & | other | ) | const |
| bool Ioss::Field::operator== | ( | const Ioss::Field & | rhs | ) | const |
|
inline |
Number of items in field.
|
inline |
| void Ioss::Field::reset_count | ( | size_t | new_count | ) |
new number of items in field
| void Ioss::Field::reset_type | ( | BasicType | new_type | ) |
new type of items in field.
| std::string Ioss::Field::role_string | ( | ) | const |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
| const Ioss::Field & Ioss::Field::set_zero_copy_enabled | ( | bool | true_false = true | ) | const |
| bool Ioss::Field::transform | ( | void * | data | ) |
|
inline |
Number of items in field after transforms have been applied.
|
inline |
| std::string Ioss::Field::type_string | ( | ) | const |
|
static |
| size_t Ioss::Field::verify | ( | size_t | data_size | ) | const |
Verify that data_size is valid. Return value is the maximum number of entities to get ('RawCount') Throws runtime error if data_size too small.
|
inline |
|
mutableprivate |
Optional flag that can be used by a client to indicate an ordering.
|
private |
|
private |
Count of items in field before transformation.
|
private |
Storage type of raw field.
|
private |
maximum data size (in bytes) required to hold entire field
|
private |
True if the suffices are uppercase on database...
|
private |
Value = 1 means unset; use database default.
|
private |
Value = 1 means unset; use database default.
|
private |
Count of items in field after transformed.
|
private |
|
private |
Storage type after transformation.
|
mutableprivate |
True if the field is zero-copyable.