IOSS 2.0
Loading...
Searching...
No Matches
Ioss::Field Class Reference

Holds metadata for bulk data associated with a GroupingEntity. More...

#include <Ioss_Field.h>

Collaboration diagram for Ioss::Field:
[legend]

Public Types

enum  BasicType {
  INVALID = -1 , REAL = 1 , DOUBLE = 1 , INTEGER = 4 ,
  INT32 = 4 , INT64 = 8 , COMPLEX , STRING ,
  CHARACTER
}
 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 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
 
Fieldset_suffix_separator (char suffix_separator)
 
IOSS_NODISCARD char get_suffix_separator () const
 
Fieldset_suffices_uppercase (bool true_false)
 
IOSS_NODISCARD bool get_suffices_uppercase () const
 
const Fieldset_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 VariableTyperaw_storage () const
 
IOSS_NODISCARD const VariableTypetransformed_storage () const
 
IOSS_NODISCARD size_t raw_count () const
 
IOSS_NODISCARD size_t transformed_count () const
 
IOSS_NODISCARD size_t get_size () const
 
IOSS_NODISCARD size_t get_basic_size () const
 
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 Fieldset_index (size_t index) const
 
Fieldset_index (size_t index)
 
void reset_count (size_t new_count)
 
void reset_type (BasicType new_type)
 
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_ {}
 
size_t transCount_ {}
 
size_t size_ {}
 
size_t index_ {}
 
BasicType type_ {INVALID}
 
RoleType role_ {INTERNAL}
 
const VariableTyperawStorage_ {nullptr}
 
const VariableTypetransStorage_ {nullptr}
 
std::vector< Transform * > transforms_ {}
 
char suffixSeparator_ {1}
 
bool sufficesUppercase_ {false}
 
bool zeroCopyable_ {false}
 

Detailed Description

Holds metadata for bulk data associated with a GroupingEntity.

Member Enumeration Documentation

◆ BasicType

The basic data type held in the field.

Enumerator
INVALID 
REAL 
DOUBLE 
INTEGER 
INT32 
INT64 
COMPLEX 
STRING 
CHARACTER 

◆ InOut

enum class Ioss::Field::InOut
strong
Enumerator
INPUT 
OUTPUT 

◆ RoleType

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 
COMMUNICATION 
MESH_REDUCTION 

A field which summarizes some non-transient data about an entity (

See also
REDUCTION). This could be an offset applied to an element block, or the units system of a model or the name of the solid model which this entity is modelling...
INFORMATION 
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.

Constructor & Destructor Documentation

◆ Field() [1/4]

Ioss::Field::Field ( )

Create an empty field.

◆ Field() [2/4]

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.

Parameters
[in]nameThe name of the field
[in]typeThe basic data type of data held in the field.
[in]storageThe storage class of the data (ConstructedVariableType, CompositeVariableType, etc)
[in]roleThe category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc)
[in]value_countThe number of items in the field.
[in]index

◆ Field() [3/4]

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.

Parameters
[in]nameThe name of the field
[in]typeThe basic data type of data held in the field.
[in]storageThe storage class of the data (ConstructedVariableType, CompositeVariableType, etc)
[in]copiesThe number of variables to be combined in a CompositeVariableType field.
[in]roleThe category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc)
[in]value_countThe number of items in the field.
[in]index

◆ Field() [4/4]

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.

Parameters
[in]nameThe name of the field
[in]typeThe basic data type of data held in the field.
[in]storageThe storage class of the data (ConstructedVariableType, CompositeVariableType, etc)
[in]roleThe category of information held in the field (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc)
[in]value_countThe number of items in the field.
[in]index

Member Function Documentation

◆ add_transform()

bool Ioss::Field::add_transform ( Transform * my_transform)

◆ check_type()

void Ioss::Field::check_type ( BasicType the_type) const

◆ equal()

bool Ioss::Field::equal ( const Ioss::Field & rhs) const

◆ equal_()

bool Ioss::Field::equal_ ( const Ioss::Field & rhs,
bool quiet ) const
private

◆ get_basic_size()

size_t Ioss::Field::get_basic_size ( ) const

◆ get_component_count()

int Ioss::Field::get_component_count ( InOut in_out) const

◆ get_component_name()

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)

Parameters
[in]component_index1-based index of the component to be named
[in]in_outIs the field being read or written
[in]suffixoptional suffix separator to be used if the separator on the field is set to '1' which means 'unset'
Returns
name of the specified component

◆ get_field_type() [1/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( char )
inlinestatic

◆ get_field_type() [2/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( Complex )
inlinestatic

◆ get_field_type() [3/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( const std::string & )
inlinestatic

◆ get_field_type() [4/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( double )
inlinestatic

◆ get_field_type() [5/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( int )
inlinestatic

◆ get_field_type() [6/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( int64_t )
inlinestatic

◆ get_field_type() [7/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( uint64_t )
inlinestatic

◆ get_field_type() [8/8]

static IOSS_NODISCARD Ioss::Field::BasicType Ioss::Field::get_field_type ( unsigned int )
inlinestatic

◆ get_index()

IOSS_NODISCARD size_t Ioss::Field::get_index ( ) const
inline

◆ get_name() [1/2]

IOSS_NODISCARD std::string & Ioss::Field::get_name ( )
inline

◆ get_name() [2/2]

IOSS_NODISCARD const std::string & Ioss::Field::get_name ( ) const
inline

◆ get_role()

IOSS_NODISCARD RoleType Ioss::Field::get_role ( ) const
inline

Get the role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) of the data in the field.

Returns
The RoleType of the data in the field.

◆ get_size()

size_t Ioss::Field::get_size ( ) const

◆ get_suffices_uppercase()

IOSS_NODISCARD bool Ioss::Field::get_suffices_uppercase ( ) const
inline

◆ get_suffix_separator()

IOSS_NODISCARD char Ioss::Field::get_suffix_separator ( ) const
inline

◆ get_type()

IOSS_NODISCARD BasicType Ioss::Field::get_type ( ) const
inline

Get the basic data type of the data held in the field.

Returns
the basic data type of the data held in the field.

◆ has_transform()

IOSS_NODISCARD bool Ioss::Field::has_transform ( ) const
inline

◆ is_invalid()

IOSS_NODISCARD bool Ioss::Field::is_invalid ( ) const
inline

◆ is_type()

IOSS_NODISCARD bool Ioss::Field::is_type ( BasicType the_type) const
inline

◆ is_valid()

IOSS_NODISCARD bool Ioss::Field::is_valid ( ) const
inline

◆ operator!=()

bool Ioss::Field::operator!= ( const Ioss::Field & rhs) const

◆ operator<()

IOSS_NODISCARD bool Ioss::Field::operator< ( const Field & other) const

◆ operator==()

bool Ioss::Field::operator== ( const Ioss::Field & rhs) const

◆ raw_count()

IOSS_NODISCARD size_t Ioss::Field::raw_count ( ) const
inline

◆ raw_storage()

IOSS_NODISCARD const VariableType * Ioss::Field::raw_storage ( ) const
inline

◆ reset_count()

void Ioss::Field::reset_count ( size_t new_count)

◆ reset_type()

void Ioss::Field::reset_type ( BasicType new_type)

◆ role_string() [1/2]

std::string Ioss::Field::role_string ( ) const

◆ role_string() [2/2]

std::string Ioss::Field::role_string ( RoleType role)
static

◆ set_index() [1/2]

Field & Ioss::Field::set_index ( size_t index)
inline

◆ set_index() [2/2]

const Field & Ioss::Field::set_index ( size_t index) const
inline

◆ set_suffices_uppercase()

Field & Ioss::Field::set_suffices_uppercase ( bool true_false)
inline

◆ set_suffix_separator()

Field & Ioss::Field::set_suffix_separator ( char suffix_separator)
inline

◆ set_zero_copy_enabled()

const Ioss::Field & Ioss::Field::set_zero_copy_enabled ( bool true_false = true) const

◆ transform()

bool Ioss::Field::transform ( void * data)

◆ transformed_count()

IOSS_NODISCARD size_t Ioss::Field::transformed_count ( ) const
inline

◆ transformed_storage()

IOSS_NODISCARD const VariableType * Ioss::Field::transformed_storage ( ) const
inline

◆ type_string() [1/2]

std::string Ioss::Field::type_string ( ) const

◆ type_string() [2/2]

std::string Ioss::Field::type_string ( BasicType type)
static

◆ verify()

size_t Ioss::Field::verify ( size_t data_size) const

◆ zero_copy_enabled()

IOSS_NODISCARD bool Ioss::Field::zero_copy_enabled ( ) const
inline

Member Data Documentation

◆ index_

size_t Ioss::Field::index_ {}
mutableprivate

◆ name_

std::string Ioss::Field::name_ {}
private

◆ rawCount_

size_t Ioss::Field::rawCount_ {}
private

◆ rawStorage_

const VariableType* Ioss::Field::rawStorage_ {nullptr}
private

◆ role_

RoleType Ioss::Field::role_ {INTERNAL}
private

◆ size_

size_t Ioss::Field::size_ {}
private

◆ sufficesUppercase_

bool Ioss::Field::sufficesUppercase_ {false}
private

◆ suffixSeparator_

char Ioss::Field::suffixSeparator_ {1}
private

◆ transCount_

size_t Ioss::Field::transCount_ {}
private

◆ transforms_

std::vector<Transform *> Ioss::Field::transforms_ {}
private

◆ transStorage_

const VariableType* Ioss::Field::transStorage_ {nullptr}
private

◆ type_

BasicType Ioss::Field::type_ {INVALID}
private

◆ zeroCopyable_

bool Ioss::Field::zeroCopyable_ {false}
mutableprivate

The documentation for this class was generated from the following files: