IOSS 2.0

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Ioss::Region Class Reference

A grouping entity that contains other grouping entities. More...

`#include <Ioss_Region.h>`

Inheritance diagram for Ioss::Region:
[legend]
Collaboration diagram for Ioss::Region:
[legend]

## Public Member Functions
| Region (DatabaseIO *iodatabase=nullptr, const std::string &my_name="")
| Constructor reads in all metadata from disk. More...
| ~Region () override
std::string | type_string () const override
| Get the name of the particular type of entity. More...
std::string | short_type_string () const override
| Get a short name of the particular type of entity. More...
std::string | contains_string () const override
| What does this entity contain. More...
EntityType | type () const override
| Get the EntityType, which indicates the particular type of GroupingEntity this is. More...
MeshType | mesh_type () const
const std::string | mesh_type_string () const
bool | node_major () const
void | output_summary (std::ostream &strm, bool do_transient=true)
| Print a summary of entities in the region. More...
bool | supports_field_type (Ioss::EntityType fld_type) const
int64_t | node_global_to_local (int64_t global, bool must_exist=true) const
bool | begin_mode (State new_state)
| Set the Region and the associated DatabaseIO to the given State. More...
bool | end_mode (State current_state)
| Return the Region and the associated DatabaseIO to STATE_CLOSED. More...
virtual int | add_state (double time)
virtual int | add_state__ (double time)
| Add a state for a specified time. More...
virtual double | get_state_time (int state=-1) const
| Get the time corresponding to the specified state or the currently active state. More...
int | get_current_state () const
| Get the index (1-based) of the currently-active state. More...
double | begin_state (int state)
| Begin a state (moment in time). More...
double | end_state (int state)
| End a state (moment in time). More...
bool | model_defined () const
| Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been set. More...
bool | transient_defined () const
| Determine whether the metadata related to the transient data has been set. More...
std::pair< int, double > | get_max_time () const
| Get the maximum time step index (1-based) and time for the region. More...
std::pair< int, double > | get_min_time () const
| Get the minimum time step index (1-based) and time for the region. More...
bool | add (NodeBlock *node_block)
| Add a node block to the region. More...
bool | add (EdgeBlock *edge_block)
| Add an edge block to the region. More...
bool | add (FaceBlock *face_block)
| Add a face block to the region. More...
bool | add (ElementBlock *element_block)
| Add an element block to the region. More...
bool | add (SideSet *sideset)
| Add a side set to the region. More...
bool | add (NodeSet *nodeset)
| Add a node set to the region. More...
bool | add (EdgeSet *edgeset)
| Add an edge set to the region. More...
bool | add (FaceSet *faceset)
| Add a face set to the region. More...
bool | add (ElementSet *elementset)
| Add an element set to the region. More...
bool | add (CommSet *commset)
| Add a comm set to the region. More...
bool | add (StructuredBlock *structured_block)
| Add a structured block to the region. More...
bool | add (const CoordinateFrame &frame)
| Add a coordinate frame to the region. More...
const NodeBlockContainer & | get_node_blocks () const
| Get all the region's NodeBlock objects. More...
const EdgeBlockContainer & | get_edge_blocks () const
| Get all the region's EdgeBlock objects. More...
const FaceBlockContainer & | get_face_blocks () const
| Get all the region's FaceBlock objects. More...
const ElementBlockContainer & | get_element_blocks () const
| Get all the region's ElementBlock objects. More...
const SideSetContainer & | get_sidesets () const
| Get all the region's SideSet objects. More...
const NodeSetContainer & | get_nodesets () const
| Get all the region's NodeSet objects. More...
const EdgeSetContainer & | get_edgesets () const
| Get all the region's EdgeSet objects. More...
const FaceSetContainer & | get_facesets () const
| Get all the region's FaceSet objects. More...
const ElementSetContainer & | get_elementsets () const
| Get all the region's ElementSet objects. More...
const CommSetContainer & | get_commsets () const
| Get all the region's CommSet objects. More...
const StructuredBlockContainer & | get_structured_blocks () const
| Get all the region's StructuredBlock objects. More...
const CoordinateFrameContainer & | get_coordinate_frames () const
| Get all the region's CoordinateFrame objects. More...
GroupingEntity * | get_entity (const std::string &my_name, EntityType io_type) const
| Get an entity of a known EntityType. More...
GroupingEntity * | get_entity (const std::string &my_name) const
| Get an entity of a unknown EntityType. More...
NodeBlock * | get_node_block (const std::string &my_name) const
| Get the node block with the given name. More...
EdgeBlock * | get_edge_block (const std::string &my_name) const
| Get the edge block with the given name. More...
FaceBlock * | get_face_block (const std::string &my_name) const
| Get the face block with the given name. More...
ElementBlock * | get_element_block (const std::string &my_name) const
| Get the element block with the given name. More...
SideSet * | get_sideset (const std::string &my_name) const
| Get the side set with the given name. More...
SideBlock * | get_sideblock (const std::string &my_name) const
| Get the side block with the given name. More...
NodeSet * | get_nodeset (const std::string &my_name) const
| Get the node set with the given name. More...
EdgeSet * | get_edgeset (const std::string &my_name) const
| Get the edge set with the given name. More...
FaceSet * | get_faceset (const std::string &my_name) const
| Get the face set with the given name. More...
ElementSet * | get_elementset (const std::string &my_name) const
| Get the element set with the given name. More...
CommSet * | get_commset (const std::string &my_name) const
| Get the comm set with the given name. More...
StructuredBlock * | get_structured_block (const std::string &my_name) const
| Get the structured block with the given name. More...
const CoordinateFrame & | get_coordinate_frame (int64_t id) const
| Get the coordinate frame with the given id. More...
bool | add_alias (const std::string &db_name, const std::string &alias)
| Add an alias for a name in a region. More...
bool | add_alias (const GroupingEntity *ge)
| Add a grouping entity's name as an alias for itself. More...
std::string | get_alias (const std::string &alias) const
| Get the original name for an alias. More...
std::string | get_alias__ (const std::string &alias) const
const AliasMap & | get_alias_map () const
| Get all original name / alias pairs for the region. More...
int | get_aliases (const std::string &my_name, std::vector< std::string > &aliases) const
| Get a map containing all aliases defined for the entity with basename 'name'. More...
void | transfer_mesh_aliases (Region *to) const
| Transfer all relevant aliases from this region to another region. More...
void | synchronize_id_and_name (const Region *from, bool sync_attribute_field_names=false)
| Ensure that the restart and results files have the same ids. More...
bool | is_valid_io_entity (const std::string &my_name, unsigned int io_type, std::string *my_type=nullptr) const
| Determine whether the entity with the given name and type exists. More...
ElementBlock * | get_element_block (size_t local_id) const
| Get the element block containing a specified element. More...
StructuredBlock * | get_structured_block (size_t global_offset) const
| Get the structured block containing a specified global-offset-node. More...
Property | get_implicit_property (const std::string &my_name) const override
| Get an implicit property – These are calcuated from data stored in the grouping entity instead of having an explicit value assigned. More...
const std::vector< std::string > & | get_information_records () const
| Get all information records (informative strings) for the region's database. More...
void | add_information_records (const std::vector< std::string > &info)
| Add multiple information records (informative strings) to the region's database. More...
void | add_information_record (const std::string &info)
| Add an information record (an informative string) to the region's database. More...
const std::vector< std::string > & | get_qa_records () const
| Get all QA records, each of which consists of 4 strings, from the region's database. More...
void | add_qa_record (const std::string &code, const std::string &code_qa, const std::string &date="", const std::string &time="")
| Add a QA record, which consists of 4 strings, to the region's database. More...
Public Member Functions inherited from Ioss::GroupingEntity
| GroupingEntity ()=default
| GroupingEntity (DatabaseIO *io_database, const std::string &my_name, int64_t entity_count)
| Base class constructor adds "name" and "entity_count" properties to the entity. More...
| GroupingEntity (const GroupingEntity &)=delete
GroupingEntity & | operator= (const GroupingEntity &)=delete
virtual | ~GroupingEntity ()
State | get_state () const
| Get the current Ioss::State of the entity. More...
DatabaseIO * | get_database () const
void | set_database (DatabaseIO *io_database)
const std::string & | name () const
| Get name of entity. More...
void | set_name (const std::string &new_name)
| Set the name of the entity. More...
std::string | generic_name () const
| Get a generated name based on the type of the entity and the id. More...
bool | is_alias (const std::string &my_name) const
virtual void | block_membership (std::vector< std::string > &)
| Get list of blocks that the entities in this GroupingEntity "touch". More...
std::string | get_filename () const
| Get the file name associated with the database containing this entity. More...
void | property_add (const Property &new_prop)
| Add a property to the entity's property manager. More...
void | property_erase (const std::string &property_name)
| Remove a property from the entity's property manager. More...
bool | property_exists (const std::string &property_name) const
| Checks if a property exists in the entity's property manager. More...
Property | get_property (const std::string &property_name) const
| Get the Property from the property manager associated with the entity. More...
int | property_describe (NameList *names) const
| Get the names of all properties in the property manager for this entity. More...
size_t | property_count () const
| Get the number of properties defined in the property manager for this entity. More...
void | property_update (const std::string &property, int64_t value) const
void | property_update (const std::string &property, const std::string &value) const
void | field_add (const Field &new_field)
| Add a field to the entity's field manager. More...
void | field_erase (const std::string &field_name)
| Remove a field from the entity's field manager. More...
bool | field_exists (const std::string &field_name) const
| Checks if a field with a given name exists in the entity's field manager. More...
Field | get_field (const std::string &field_name) const
| Get a field from the entity's field manager. More...
const Field & | get_fieldref (const std::string &field_name) const
| Get a reference to a field from the entity's field manager. More...
int | field_describe (NameList *names) const
| Get the names of all fields in the entity's field manager. More...
int | field_describe (Field::RoleType role, NameList *names) const
| Get the names of all fields of a specified RoleType in the entity's field manager. More...
size_t | field_count () const
| Get the number of fields in the entity's field manager. More...
size_t | field_count (Field::RoleType role) const
| Get the number of fields with the given role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) in the entity's field manager. More...
int | get_field_data (const std::string &field_name, void *data, size_t data_size) const
| Read field data from the database file into memory using a pointer. More...
int | put_field_data (const std::string &field_name, void *data, size_t data_size) const
| Write field data from memory into the database file using a pointer. More...
template<typename T >
int | get_field_data (const std::string &field_name, std::vector< T > &data) const
| Read type 'T' field data from the database file into memory using a std::vector. More...
template<typename T >
int | put_field_data (const std::string &field_name, const std::vector< T > &data) const
| Write type 'T' field data from memory into the database file using a std::vector. More...
template<typename T >
int | put_field_data (const std::string &field_name, std::vector< T > &data) const
Ioss::Field::BasicType | field_int_type () const
unsigned int | hash () const
int64_t | entity_count () const

## Protected Member Functions
int64_t | internal_get_field_data (const Field &field, void *data, size_t data_size=0) const override
int64_t | internal_put_field_data (const Field &field, void *data, size_t data_size=0) const override
Protected Member Functions inherited from Ioss::GroupingEntity
void | count_attributes () const
bool | set_state (State new_state)
void | really_delete_database ()

## Private Member Functions
bool | add_alias__ (const std::string &db_name, const std::string &alias)
bool | add_alias__ (const GroupingEntity *ge)
bool | begin_mode__ (State new_state)
bool | end_mode__ (State current_state)
void | delete_database () override

## Private Attributes
AliasMap | aliases_
| Stores alias mappings. More...
NodeBlockContainer | nodeBlocks
EdgeBlockContainer | edgeBlocks
FaceBlockContainer | faceBlocks
ElementBlockContainer | elementBlocks
NodeSetContainer | nodeSets
EdgeSetContainer | edgeSets
FaceSetContainer | faceSets
ElementSetContainer | elementSets
SideSetContainer | sideSets
CommSetContainer | commSets
CoordinateFrameContainer | coordinateFrames
StructuredBlockContainer | structuredBlocks
StateTimeContainer | stateTimes
int | currentState
int | stateCount
bool | modelDefined
bool | transientDefined

## Additional Inherited Members
Protected Attributes inherited from Ioss::GroupingEntity
PropertyManager | properties
FieldManager | fields
int64_t | entityCount = 0

## Detailed Description

A grouping entity that contains other grouping entities.

Maintains a list of NodeBlocks, ElementBlocks, NodeLists, CommLists and Surfaces. [Similar to the "Composite Pattern" in Design Patterns] All interface to GroupingEntities is through the Region class; clients of the IO subsystem have no direct access to the underlying GroupingEntities (other than the Region).

## Constructor & Destructor Documentation

## ◆ Region()

Ioss::Region::Region | ( | DatabaseIO * | iodatabase = `nullptr`,
|  | const std::string & | my_name = `""`
| ) |  |
| explicit

Constructor reads in all metadata from disk.

This constructor connects this region to the database, opens the underlying file, reads all the metadata in the file into Region and its subentities, and closes the underlying file. Region properties, such as spatial_dimension, element_block_count, element_count, etc, are also added to the Region's property manager.

Parameters

  [in] | iodatabase | The name of the database associated with the Region.
  [in] | my_name | The name of the Region.

## ◆ ~Region()

Ioss::Region::~Region | ( |  | ) |
| override

## Member Function Documentation

## ◆ add() [1/12]

bool Ioss::Region::add | ( | NodeBlock * | node_block | ) |

Add a node block to the region.

Parameters

  [in] | node_block | The node block to add

Returns
  True if successful.

## ◆ add() [2/12]

bool Ioss::Region::add | ( | EdgeBlock * | edge_block | ) |

Add an edge block to the region.

Parameters

  [in] | edge_block | The edge block to add

Returns
  True if successful.

## ◆ add() [3/12]

bool Ioss::Region::add | ( | FaceBlock * | face_block | ) |

Add a face block to the region.

Parameters

  [in] | face_block | The face block to add

Returns
  True if successful.

## ◆ add() [4/12]

bool Ioss::Region::add | ( | ElementBlock * | element_block | ) |

Add an element block to the region.

Parameters

  [in] | element_block | The element block to add

Returns
  True if successful.

## ◆ add() [5/12]

bool Ioss::Region::add | ( | SideSet * | sideset | ) |

Add a side set to the region.

Parameters

  [in] | sideset | The side set to add

Returns
  True if successful.

## ◆ add() [6/12]

bool Ioss::Region::add | ( | NodeSet * | nodeset | ) |

Add a node set to the region.

Parameters

  [in] | nodeset | The node set to add

Returns
  True if successful.

## ◆ add() [7/12]

bool Ioss::Region::add | ( | EdgeSet * | edgeset | ) |

Add an edge set to the region.

Parameters

  [in] | edgeset | The edge set to add

Returns
  True if successful.

## ◆ add() [8/12]

bool Ioss::Region::add | ( | FaceSet * | faceset | ) |

Add a face set to the region.

Parameters

  [in] | faceset | The face set to add

Returns
  True if successful.

## ◆ add() [9/12]

bool Ioss::Region::add | ( | ElementSet * | elementset | ) |

Add an element set to the region.

Parameters

  [in] | elementset | The element set to add

Returns
  True if successful.

## ◆ add() [10/12]

bool Ioss::Region::add | ( | CommSet * | commset | ) |

Add a comm set to the region.

Parameters

  [in] | commset | The comm set to add

Returns
  True if successful.

## ◆ add() [11/12]

bool Ioss::Region::add | ( | StructuredBlock * | structured_block | ) |

Add a structured block to the region.

Parameters

  [in] | structured_block | The structured block to add

Returns
  True if successful.

## ◆ add() [12/12]

bool Ioss::Region::add | ( | const CoordinateFrame & | frame | ) |

Add a coordinate frame to the region.

Parameters

  [in] | frame | The coordinate frame to add

Returns
  True if successful.

## ◆ add_alias() [1/2]

bool Ioss::Region::add_alias | ( | const std::string & | db_name,
|  | const std::string & | alias
| ) |  |

Add an alias for a name in a region.

For use with the USTRING type in Sierra, create an uppercase version of all aliases...

Parameters

  [in] | db_name | The original name.
  [in] | alias | the alias

Returns
  True if successful

## ◆ add_alias() [2/2]

bool Ioss::Region::add_alias | ( | const GroupingEntity * | ge | ) |

Add a grouping entity's name as an alias for itself.

Parameters

  [in] | ge | The grouping entity.

Returns
  True if successful

## ◆ add_alias__() [1/2]

bool Ioss::Region::add_alias__ | ( | const std::string & | db_name,
|  | const std::string & | alias
| ) |  |
| private

## ◆ add_alias__() [2/2]

bool Ioss::Region::add_alias__ | ( | const GroupingEntity * | ge | ) |
| private

## ◆ add_information_record()

void Ioss::Region::add_information_record | ( | const std::string & | info | ) |
| inline

Add an information record (an informative string) to the region's database.

Parameters

  [in] | info | The string to add.

## ◆ add_information_records()

void Ioss::Region::add_information_records | ( | const std::vector< std::string > & | info | ) |
| inline

Add multiple information records (informative strings) to the region's database.

Parameters

  [in] | info | The strings to add.

## ◆ add_qa_record()

void Ioss::Region::add_qa_record | ( | const std::string & | code,
|  | const std::string & | code_qa,
|  | const std::string & | date = `""`,
|  | const std::string & | time = `""`
| ) |  |
| inline

Add a QA record, which consists of 4 strings, to the region's database.

The 4 function parameters correspond to the 4 QA record strings.

Parameters

  [in] | code | A descriptive code name, such as the application that modified the database.
  [in] | code_qa | A descriptive string, such as the version of the application that modified the database.
  [in] | date | A relevant date, such as the date the database was modified.
  [in] | time | A relevant time, such as the time the database was modified.

## ◆ add_state()

virtual int Ioss::Region::add_state | ( | double | time | ) |
| inline virtual

## ◆ add_state__()

int Ioss::Region::add_state__ | ( | double | time | ) |
| virtual

Add a state for a specified time.

The states in the region will be 1-based.

Parameters

  [in] | time | The time at the new state.

Returns
  The state index (1-based).

## ◆ begin_mode()

bool Ioss::Region::begin_mode | ( | State | new_state | ) |

Set the Region and the associated DatabaseIO to the given State.

All transitions must begin from the 'STATE_CLOSED' state or be to the 'STATE_CLOSED' state (There are no nested begin/end pairs at this time.)

Parameters

  [in] | new_state | The new State to which the Region and DatabaseIO should be set.

Returns
  True if successful.

## ◆ begin_mode__()

bool Ioss::Region::begin_mode__ | ( | State | new_state | ) |
| private

## ◆ begin_state()

double Ioss::Region::begin_state | ( | int | state | ) |

Begin a state (moment in time).

Parameters

  [in] | state | The state index (1-based).

Returns
  The time of this state.

## ◆ contains_string()

std::string Ioss::Region::contains_string | ( |  | ) | const
| inline override virtual

What does this entity contain.

Returns
  The name of the thing this entitiy contains.

Implements Ioss::GroupingEntity.

## ◆ delete_database()

void Ioss::Region::delete_database | ( |  | ) |
| override private virtual

Reimplemented from Ioss::GroupingEntity.

## ◆ end_mode()

bool Ioss::Region::end_mode | ( | State | current_state | ) |

Return the Region and the associated DatabaseIO to STATE_CLOSED.

Parameters

  [in] | current_state | The State to end.

Returns
  True if successful.

## ◆ end_mode__()

bool Ioss::Region::end_mode__ | ( | State | current_state | ) |
| private

## ◆ end_state()

double Ioss::Region::end_state | ( | int | state | ) |

End a state (moment in time).

Parameters

  [in] | state | The state index (1-based).

Returns
  The time of this state.

## ◆ get_alias()

std::string Ioss::Region::get_alias | ( | const std::string & | alias | ) | const

Get the original name for an alias.

Parameters

  [in] | alias | The alias name.

Returns
  The original name.

## ◆ get_alias__()

std::string Ioss::Region::get_alias__ | ( | const std::string & | alias | ) | const

## ◆ get_alias_map()

const AliasMap & Ioss::Region::get_alias_map | ( |  | ) | const

Get all original name / alias pairs for the region.

Returns
  All original name / alias pairs for the region.

## ◆ get_aliases()

int Ioss::Region::get_aliases | ( | const std::string & | my_name,
|  | std::vector< std::string > & | aliases
| ) |  | const

Get a map containing all aliases defined for the entity with basename 'name'.

Get all aliases for a name in the region.

Parameters

  [in] | my_name | The original name.
  [in,out] | aliases | On input, any vector of strings. On output, all aliases for my_name are appended.

Returns
  The number of aliases that were appended.

## ◆ get_commset()

CommSet * Ioss::Region::get_commset | ( | const std::string & | my_name | ) | const

Get the comm set with the given name.

Parameters

  [in] | my_name | The name of the comm set to get.

Returns
  The comm set, or nullptr if not found.

## ◆ get_commsets()

const CommSetContainer & Ioss::Region::get_commsets | ( |  | ) | const

Get all the region's CommSet objects.

Returns
  A vector of all the region's CommSet objects.

## ◆ get_coordinate_frame()

const CoordinateFrame & Ioss::Region::get_coordinate_frame | ( | int64_t | id | ) | const

Get the coordinate frame with the given id.

Parameters

  [in] | id | The id of the coordinate frame to get.

Returns
  The coordinate frame, or nullptr if not found.

## ◆ get_coordinate_frames()

const CoordinateFrameContainer & Ioss::Region::get_coordinate_frames | ( |  | ) | const

Get all the region's CoordinateFrame objects.

Returns
  A vector of all the region's CoordinateFrame objects.

## ◆ get_current_state()

int Ioss::Region::get_current_state | ( |  | ) | const
| inline

Get the index (1-based) of the currently-active state.

Returns
  The index.

## ◆ get_edge_block()

EdgeBlock * Ioss::Region::get_edge_block | ( | const std::string & | my_name | ) | const

Get the edge block with the given name.

Parameters

  [in] | my_name | The name of the edge block to get.

Returns
  The edge block, or nullptr if not found.

## ◆ get_edge_blocks()

const EdgeBlockContainer & Ioss::Region::get_edge_blocks | ( |  | ) | const

Get all the region's EdgeBlock objects.

Returns
  A vector of all the region's EdgeBlock objects.

## ◆ get_edgeset()

EdgeSet * Ioss::Region::get_edgeset | ( | const std::string & | my_name | ) | const

Get the edge set with the given name.

Parameters

  [in] | my_name | The name of the edge set to get.

Returns
  The edge set, or nullptr if not found.

## ◆ get_edgesets()

const EdgeSetContainer & Ioss::Region::get_edgesets | ( |  | ) | const

Get all the region's EdgeSet objects.

Returns
  A vector of all the region's EdgeSet objects.

## ◆ get_element_block() [1/2]

ElementBlock * Ioss::Region::get_element_block | ( | const std::string & | my_name | ) | const

Get the element block with the given name.

Parameters

  [in] | my_name | The name of the element block to get.

Returns
  The element block, or nullptr if not found.

## ◆ get_element_block() [2/2]

ElementBlock * Ioss::Region::get_element_block | ( | size_t | local_id | ) | const

Get the element block containing a specified element.

Parameters

  [in] | local_id | The local database id (1-based), not the global id.

Returns
  The element block, or nullptr if no element block contains this element (local_id <= 0 or greater than number of elements in database)

## ◆ get_element_blocks()

const ElementBlockContainer & Ioss::Region::get_element_blocks | ( |  | ) | const

Get all the region's ElementBlock objects.

Returns
  A vector of all the region's ElementBlock objects.

## ◆ get_elementset()

ElementSet * Ioss::Region::get_elementset | ( | const std::string & | my_name | ) | const

Get the element set with the given name.

Parameters

  [in] | my_name | The name of the element set to get.

Returns
  The element set, or nullptr if not found.

## ◆ get_elementsets()

const ElementSetContainer & Ioss::Region::get_elementsets | ( |  | ) | const

Get all the region's ElementSet objects.

Returns
  A vector of all the region's ElementSet objects.

## ◆ get_entity() [1/2]

GroupingEntity * Ioss::Region::get_entity | ( | const std::string & | my_name,
|  | EntityType | io_type
| ) |  | const

Get an entity of a known EntityType.

Parameters

  [in] | my_name | The name of the entity to get
  [in] | io_type | The known type of the entity.

Returns
  The entity with the given name of the given type, or nullptr if not found.

## ◆ get_entity() [2/2]

GroupingEntity * Ioss::Region::get_entity | ( | const std::string & | my_name | ) | const

Get an entity of a unknown EntityType.

Searches for an entity with the given name in a fixed order of entity types. First NODEBLOCK entities are searched. Then ELEMENTBLOCK entities, etc.

Parameters

  [in] | my_name | The name of the entity to get

Returns
  The entity with the given name, or nullptr if not found.

## ◆ get_face_block()

FaceBlock * Ioss::Region::get_face_block | ( | const std::string & | my_name | ) | const

Get the face block with the given name.

Parameters

  [in] | my_name | The name of the face block to get.

Returns
  The face block, or nullptr if not found.

## ◆ get_face_blocks()

const FaceBlockContainer & Ioss::Region::get_face_blocks | ( |  | ) | const

Get all the region's FaceBlock objects.

Returns
  A vector of all the region's FaceBlock objects.

## ◆ get_faceset()

FaceSet * Ioss::Region::get_faceset | ( | const std::string & | my_name | ) | const

Get the face set with the given name.

Parameters

  [in] | my_name | The name of the face set to get.

Returns
  The face set, or nullptr if not found.

## ◆ get_facesets()

const FaceSetContainer & Ioss::Region::get_facesets | ( |  | ) | const

Get all the region's FaceSet objects.

Returns
  A vector of all the region's FaceSet objects.

## ◆ get_implicit_property()

Property Ioss::Region::get_implicit_property | ( | const std::string & | my_name | ) | const
| override virtual

Get an implicit property – These are calcuated from data stored in the grouping entity instead of having an explicit value assigned.

An example would be 'element_block_count' for a region.

Parameters

  [in] | my_name | The property name.

Returns
  The property.

Implements Ioss::GroupingEntity.

## ◆ get_information_records()

const std::vector< std::string > & Ioss::Region::get_information_records | ( |  | ) | const
| inline

Get all information records (informative strings) for the region's database.

Returns
  The informative strings.

## ◆ get_max_time()

std::pair< int, double > Ioss::Region::get_max_time | ( |  | ) | const

Get the maximum time step index (1-based) and time for the region.

Returns
  A pair consisting of the step (1-based) corresponding to the maximum time on the database and the corresponding maximum time value. Note that this may not necessarily be the last step on the database if cycle and overlay are being used.

## ◆ get_min_time()

std::pair< int, double > Ioss::Region::get_min_time | ( |  | ) | const

Get the minimum time step index (1-based) and time for the region.

Returns
  A pair consisting of the step (1-based) corresponding to the minimum time on the database and the corresponding minimum time value. Note that this may not necessarily be the first step on the database if cycle and overlay are being used.

## ◆ get_node_block()

NodeBlock * Ioss::Region::get_node_block | ( | const std::string & | my_name | ) | const

Get the node block with the given name.

Parameters

  [in] | my_name | The name of the node block to get.

Returns
  The node block, or nullptr if not found.

## ◆ get_node_blocks()

const NodeBlockContainer & Ioss::Region::get_node_blocks | ( |  | ) | const

Get all the region's NodeBlock objects.

Returns
  A vector of all the region's NodeBlock objects.

## ◆ get_nodeset()

NodeSet * Ioss::Region::get_nodeset | ( | const std::string & | my_name | ) | const

Get the node set with the given name.

Parameters

  [in] | my_name | The name of the node set to get.

Returns
  The node set, or nullptr if not found.

## ◆ get_nodesets()

const NodeSetContainer & Ioss::Region::get_nodesets | ( |  | ) | const

Get all the region's NodeSet objects.

Returns
  A vector of all the region's NodeSet objects.

## ◆ get_qa_records()

const std::vector< std::string > & Ioss::Region::get_qa_records | ( |  | ) | const
| inline

Get all QA records, each of which consists of 4 strings, from the region's database.

The 4 strings that make up a database QA record are:

1. A descriptive code name, such as the application that modified the database.
2. A descriptive string, such as the version of the application that modified the database.
3. A relevant date, such as the date the database was modified.
4. A relevant time, such as the time the database was modified.

Returns
  All QA records in a single vector. Every 4 consecutive elements of the vector make up a single QA record.

## ◆ get_sideblock()

SideBlock * Ioss::Region::get_sideblock | ( | const std::string & | my_name | ) | const

Get the side block with the given name.

Parameters

  [in] | my_name | The name of the side block to get.

Returns
  The side block, or nullptr if not found.

## ◆ get_sideset()

SideSet * Ioss::Region::get_sideset | ( | const std::string & | my_name | ) | const

Get the side set with the given name.

Parameters

  [in] | my_name | The name of the side set to get.

Returns
  The side set, or nullptr if not found.

## ◆ get_sidesets()

const SideSetContainer & Ioss::Region::get_sidesets | ( |  | ) | const

Get all the region's SideSet objects.

Returns
  A vector of all the region's SideSet objects.

## ◆ get_state_time()

double Ioss::Region::get_state_time | ( | int | state = `-1` | ) | const
| virtual

Get the time corresponding to the specified state or the currently active state.

Parameters

  [in] | state | The state index (1-based) or -1 for the currently active state.

Returns
  The time at the specified state or the currently active state.

## ◆ get_structured_block() [1/2]

StructuredBlock * Ioss::Region::get_structured_block | ( | const std::string & | my_name | ) | const

Get the structured block with the given name.

Parameters

  [in] | my_name | The name of the structured block to get.

Returns
  The structured block, or nullptr if not found.

## ◆ get_structured_block() [2/2]

StructuredBlock * Ioss::Region::get_structured_block | ( | size_t | global_offset | ) | const

Get the structured block containing a specified global-offset-node.

Parameters

  [in] | global_offset | The offset of cell-nodes for all blocks; 0-based.

Returns
  The structured block, or nullptr if no structured block contains this node (local_id <= 0 or greater than number of cell-nodes in database)

## ◆ get_structured_blocks()

const StructuredBlockContainer & Ioss::Region::get_structured_blocks | ( |  | ) | const

Get all the region's StructuredBlock objects.

Returns
  A vector of all the region's StructuredBlock objects.

## ◆ internal_get_field_data()

int64_t Ioss::Region::internal_get_field_data | ( | const Field & | field,
|  | void * | data,
|  | size_t | data_size = `0`
| ) |  | const
| override protected virtual

Implements Ioss::GroupingEntity.

## ◆ internal_put_field_data()

int64_t Ioss::Region::internal_put_field_data | ( | const Field & | field,
|  | void * | data,
|  | size_t | data_size = `0`
| ) |  | const
| override protected virtual

Implements Ioss::GroupingEntity.

## ◆ is_valid_io_entity()

bool Ioss::Region::is_valid_io_entity | ( | const std::string & | my_name,
|  | unsigned int | io_type,
|  | std::string * | my_type = `nullptr`
| ) |  | const

Determine whether the entity with the given name and type exists.

Parameters

  [in] | my_name | The name of the entity to search for.
  [in] | io_type | The type of the entity.
  [out] | my_type | A string representing the type if the entity is found. "INVALID" if the entity is not found or the type is invalid.

Returns
  True if the type is valid and the entity is found.

## ◆ mesh_type()

MeshType Ioss::Region::mesh_type | ( |  | ) | const

## ◆ mesh_type_string()

const std::string Ioss::Region::mesh_type_string | ( |  | ) | const

## ◆ model_defined()

bool Ioss::Region::model_defined | ( |  | ) | const
| inline

Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been set.

Returns
  True if the metadata defining the model has been set.

## ◆ node_global_to_local()

int64_t Ioss::Region::node_global_to_local | ( | int64_t | global,
|  | bool | must_exist = `true`
| ) |  | const
| inline

## ◆ node_major()

bool Ioss::Region::node_major | ( |  | ) | const

## ◆ output_summary()

void Ioss::Region::output_summary | ( | std::ostream & | strm,
|  | bool | do_transient = `true`
| ) |  |

Print a summary of entities in the region.

Parameters

  [in,out] | strm | The output stream to use for printing.
  [in] | do_transient | deprecated and ignored

## ◆ short_type_string()

std::string Ioss::Region::short_type_string | ( |  | ) | const
| inline override virtual

Get a short name of the particular type of entity.

Returns
  The short name of the particular type of entity.

Implements Ioss::GroupingEntity.

## ◆ supports_field_type()

bool Ioss::Region::supports_field_type | ( | Ioss::EntityType | fld_type | ) | const
| inline

## ◆ synchronize_id_and_name()

void Ioss::Region::synchronize_id_and_name | ( | const Region * | from,
|  | bool | sync_attribute_field_names = `false`
| ) |  |

Ensure that the restart and results files have the same ids.

There is very little connection between an input (mesh) database and an output (results/restart) database. Basically, the entity names are the same between the two files. This works fine in the case that an input database has 'generated' entity names of the form 'block_10' or 'surface_32' since then the output database can de-generate or decode the name and infer that the block should have an id of 10 and the surface an id of 32.

However, if alias or other renaming happens, then the output block may have a name of the form 'fireset' and the underlying database cannot infer that the id of the block should be 10. Instead, it sets the id to an arbitrary number (1,2,...). This is annoying in the case of the results file since there is no correspondence between the mesh numbering and the results numbering. In the case of the restart output file, it can be disastrous since when the file is used to restart the analysis, there is no match between the mesh blocks and those found on the restart file and the restart fails.

So... We need to somehow ensure that the restart (and results) files have the same ids. To do this, we do the following:

1. The mesh database will set the property 'id' on input.
2. The results/restart files will have a 'name' based on either the true name or an alias name. Whichever, that alias will appear on the mesh database also, so we can query the mesh database aliases to get the entity.
3. Once we have the entity, we can query the 'id' property and add the same 'id' property to the results/restart database.
4. Also set the 'name' property to the base 'name' on the output file.
5. Note that a property may already exist and must be removed before the 'correct' value is set.

## ◆ transfer_mesh_aliases()

void Ioss::Region::transfer_mesh_aliases | ( | Region * | to | ) | const

Transfer all relevant aliases from this region to another region.

Parameters

  [in] | to | The region to which the aliases are to be transferred.

## ◆ transient_defined()

bool Ioss::Region::transient_defined | ( |  | ) | const
| inline

Determine whether the metadata related to the transient data has been set.

Returns
  True if the metadata related to the transient data has been set.

## ◆ type()

EntityType Ioss::Region::type | ( |  | ) | const
| inline override virtual

Get the EntityType, which indicates the particular type of GroupingEntity this is.

Returns
  The particular EntityType of this GroupingEntity.

Implements Ioss::GroupingEntity.

## ◆ type_string()

std::string Ioss::Region::type_string | ( |  | ) | const
| inline override virtual

Get the name of the particular type of entity.

Returns
  The name of the particular type of entity.

Implements Ioss::GroupingEntity.

## Member Data Documentation

## ◆ aliases_

AliasMap Ioss::Region::aliases_
| private

Stores alias mappings.

## ◆ commSets

CommSetContainer Ioss::Region::commSets
| private

## ◆ coordinateFrames

CoordinateFrameContainer Ioss::Region::coordinateFrames
| private

## ◆ currentState

int Ioss::Region::currentState
| private

## ◆ edgeBlocks

EdgeBlockContainer Ioss::Region::edgeBlocks
| private

## ◆ edgeSets

EdgeSetContainer Ioss::Region::edgeSets
| private

## ◆ elementBlocks

ElementBlockContainer Ioss::Region::elementBlocks
| private

## ◆ elementSets

ElementSetContainer Ioss::Region::elementSets
| private

## ◆ faceBlocks

FaceBlockContainer Ioss::Region::faceBlocks
| private

## ◆ faceSets

FaceSetContainer Ioss::Region::faceSets
| private

## ◆ modelDefined

bool Ioss::Region::modelDefined
| private

## ◆ nodeBlocks

NodeBlockContainer Ioss::Region::nodeBlocks
| private

## ◆ nodeSets

NodeSetContainer Ioss::Region::nodeSets
| private

## ◆ sideSets

SideSetContainer Ioss::Region::sideSets
| private

## ◆ stateCount

int Ioss::Region::stateCount
| mutable private

## ◆ stateTimes

StateTimeContainer Ioss::Region::stateTimes
| mutable private

## ◆ structuredBlocks

StructuredBlockContainer Ioss::Region::structuredBlocks
| private

## ◆ transientDefined

bool Ioss::Region::transientDefined
| private

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

- src/Ioss_Region.h
- src/Ioss_Region.C