IOSS 2.0
|
A grouping entity that contains other grouping entities. More...
#include <Ioss_Region.h>
Public Member Functions | |
Region (DatabaseIO *iodatabase=nullptr, const std::string &my_name="") | |
Constructor reads in all metadata from disk. | |
~Region () override | |
IOSS_NODISCARD std::string | type_string () const override |
Get the name of the particular type of entity. | |
IOSS_NODISCARD std::string | short_type_string () const override |
Get a short name of the particular type of entity. | |
IOSS_NODISCARD std::string | contains_string () const override |
What does this entity contain. | |
IOSS_NODISCARD EntityType | type () const override |
Get the EntityType, which indicates the particular type of GroupingEntity this is. | |
IOSS_NODISCARD MeshType | mesh_type () const |
IOSS_NODISCARD std::string | mesh_type_string () const |
IOSS_NODISCARD bool | node_major () const |
void | output_summary (std::ostream &strm, bool do_transient=true) const |
Print a summary of entities in the region. | |
IOSS_NODISCARD bool | supports_field_type (Ioss::EntityType fld_type) const |
IOSS_NODISCARD 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. | |
bool | end_mode (State current_state) |
Return the Region and the associated DatabaseIO to STATE_CLOSED. | |
virtual int | add_state (double time) |
virtual int | add_state_nl (double time) |
Add a state for a specified time. | |
virtual IOSS_NODISCARD double | get_state_time (int state=-1) const |
Get the time corresponding to the specified state or the currently active state. | |
IOSS_NODISCARD int | get_current_state () const |
Get the index (1-based) of the currently-active state. | |
double | begin_state (int state) |
Begin a state (moment in time). | |
double | end_state (int state) |
End a state (moment in time). | |
IOSS_NODISCARD bool | model_defined () const |
Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been set. | |
IOSS_NODISCARD bool | transient_defined () const |
Determine whether the metadata related to the transient data has been set. | |
void | erase_fields (Field::RoleType role) |
Remove all fields of the specified role from all entities in the region. | |
IOSS_NODISCARD std::pair< int, double > | get_max_time () const |
Get the maximum time step index (1-based) and time for the region. | |
IOSS_NODISCARD std::tuple< std::string, int, double > | get_db_max_time () const |
IOSS_NODISCARD std::pair< int, double > | get_min_time () const |
Get the minimum time step index (1-based) and time for the region. | |
IOSS_NODISCARD std::tuple< std::string, int, double > | get_db_min_time () const |
bool | add (NodeBlock *node_block) |
Add a node block to the region. | |
bool | add (EdgeBlock *edge_block) |
Add an edge block to the region. | |
bool | add (FaceBlock *face_block) |
Add a face block to the region. | |
bool | add (ElementBlock *element_block) |
Add an element block to the region. | |
bool | add (SideSet *sideset) |
Add a side set to the region. | |
bool | add (NodeSet *nodeset) |
Add a node set to the region. | |
bool | add (EdgeSet *edgeset) |
Add an edge set to the region. | |
bool | add (FaceSet *faceset) |
Add a face set to the region. | |
bool | add (ElementSet *elementset) |
Add an element set to the region. | |
bool | add (CommSet *commset) |
Add a comm set to the region. | |
bool | add (StructuredBlock *structured_block) |
Add a structured block to the region. | |
bool | add (Assembly *assembly) |
Add an assembly to the region. | |
bool | add (Blob *blob) |
Add an blob to the region. | |
bool | add (const CoordinateFrame &frame) |
Add a coordinate frame to the region. | |
bool | remove (Assembly *removal) |
Remove an assembly to the region. | |
IOSS_NODISCARD const NodeBlockContainer & | get_node_blocks () const |
Get all the region's NodeBlock objects. | |
IOSS_NODISCARD const EdgeBlockContainer & | get_edge_blocks () const |
Get all the region's EdgeBlock objects. | |
IOSS_NODISCARD const FaceBlockContainer & | get_face_blocks () const |
Get all the region's FaceBlock objects. | |
IOSS_NODISCARD const ElementBlockContainer & | get_element_blocks () const |
Get all the region's ElementBlock objects. | |
IOSS_NODISCARD const SideSetContainer & | get_sidesets () const |
Get all the region's SideSet objects. | |
IOSS_NODISCARD const NodeSetContainer & | get_nodesets () const |
Get all the region's NodeSet objects. | |
IOSS_NODISCARD const EdgeSetContainer & | get_edgesets () const |
Get all the region's EdgeSet objects. | |
IOSS_NODISCARD const FaceSetContainer & | get_facesets () const |
Get all the region's FaceSet objects. | |
IOSS_NODISCARD const ElementSetContainer & | get_elementsets () const |
Get all the region's ElementSet objects. | |
IOSS_NODISCARD const CommSetContainer & | get_commsets () const |
Get all the region's CommSet objects. | |
IOSS_NODISCARD const StructuredBlockContainer & | get_structured_blocks () const |
Get all the region's StructuredBlock objects. | |
IOSS_NODISCARD const AssemblyContainer & | get_assemblies () const |
Get all the region's Assembly objects. | |
IOSS_NODISCARD const BlobContainer & | get_blobs () const |
Get all the region's Blob objects. | |
IOSS_NODISCARD const CoordinateFrameContainer & | get_coordinate_frames () const |
Get all the region's CoordinateFrame objects. | |
IOSS_NODISCARD GroupingEntity * | get_entity (const std::string &my_name, EntityType io_type) const |
Get an entity of a known EntityType. | |
IOSS_NODISCARD GroupingEntity * | get_entity (const std::string &my_name) const |
Get an entity of a unknown EntityType. | |
IOSS_NODISCARD NodeBlock * | get_node_block (const std::string &my_name) const |
Get the node block with the given name. | |
IOSS_NODISCARD EdgeBlock * | get_edge_block (const std::string &my_name) const |
Get the edge block with the given name. | |
IOSS_NODISCARD FaceBlock * | get_face_block (const std::string &my_name) const |
Get the face block with the given name. | |
IOSS_NODISCARD ElementBlock * | get_element_block (const std::string &my_name) const |
Get the element block with the given name. | |
IOSS_NODISCARD SideSet * | get_sideset (const std::string &my_name) const |
Get the side set with the given name. | |
IOSS_NODISCARD SideBlock * | get_sideblock (const std::string &my_name) const |
Get the side block with the given name. | |
IOSS_NODISCARD NodeSet * | get_nodeset (const std::string &my_name) const |
Get the node set with the given name. | |
IOSS_NODISCARD EdgeSet * | get_edgeset (const std::string &my_name) const |
Get the edge set with the given name. | |
IOSS_NODISCARD FaceSet * | get_faceset (const std::string &my_name) const |
Get the face set with the given name. | |
IOSS_NODISCARD ElementSet * | get_elementset (const std::string &my_name) const |
Get the element set with the given name. | |
IOSS_NODISCARD CommSet * | get_commset (const std::string &my_name) const |
Get the comm set with the given name. | |
IOSS_NODISCARD StructuredBlock * | get_structured_block (const std::string &my_name) const |
Get the structured block with the given name. | |
IOSS_NODISCARD Assembly * | get_assembly (const std::string &my_name) const |
Get the assembly with the given name. | |
IOSS_NODISCARD Blob * | get_blob (const std::string &my_name) const |
Get the blob with the given name. | |
IOSS_NODISCARD GroupingEntity * | get_entity (int64_t id, EntityType io_type) const |
Get an entity of a known EntityType and specified id. | |
IOSS_NODISCARD const CoordinateFrame & | get_coordinate_frame (int64_t id) const |
Get the coordinate frame with the given id. | |
bool | add_alias (const std::string &db_name, const std::string &alias, EntityType type) |
Add an alias for a name in a region. | |
bool | add_alias (const std::string &db_name, const std::string &alias) |
bool | add_alias (const GroupingEntity *ge) |
Add a grouping entity's name as an alias for itself. | |
IOSS_NODISCARD std::string | get_alias (const std::string &alias, EntityType type) const |
Get the original name for an alias. | |
IOSS_NODISCARD std::string | get_alias_nl (const std::string &alias, EntityType type) const |
IOSS_NODISCARD const AliasMap & | get_alias_map (EntityType entity_type) const |
Get all original name / alias pairs for the region. | |
int | get_aliases (const std::string &my_name, EntityType type, Ioss::NameList &aliases) const |
Get a map containing all aliases defined for the entity with basename 'my_name'. | |
void | transfer_mesh_aliases (Region *to) const |
Transfer all relevant aliases from this region to another region. | |
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. | |
IOSS_NODISCARD 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. | |
void | check_for_duplicate_names (const Ioss::GroupingEntity *entity) const |
IOSS_NODISCARD ElementBlock * | get_element_block (size_t local_id) const |
Get the element block containing a specified element. | |
IOSS_NODISCARD StructuredBlock * | get_structured_block (size_t global_offset) const |
Get the structured block containing a specified global-offset-node. | |
IOSS_NODISCARD Property | get_implicit_property (const std::string &my_name) const override |
Get an implicit property – These are calculated from data stored in the grouping entity instead of having an explicit value assigned. | |
IOSS_NODISCARD const Ioss::NameList & | get_information_records () const |
Get all information records (informative strings) for the region's database. | |
void | add_information_records (const Ioss::NameList &info) |
Add multiple information records (informative strings) to the region's database. | |
void | add_information_record (const std::string &info) |
Add an information record (an informative string) to the region's database. | |
IOSS_NODISCARD const Ioss::NameList & | get_qa_records () const |
Get all QA records, each of which consists of 4 strings, from the region's database. | |
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. | |
template<typename T , typename U > | |
std::vector< size_t > | get_entity_field_data (const std::string &field_name, const std::vector< T * > &entity_container, std::vector< U > &field_data) const |
void | register_mesh_modification_observer (std::shared_ptr< DynamicTopologyObserver > observer) |
IOSS_NODISCARD std::shared_ptr< DynamicTopologyObserver > | get_mesh_modification_observer () const |
void | reset_topology_modification () |
void | set_topology_modification (unsigned int type) |
IOSS_NODISCARD unsigned int | get_topology_modification () const |
void | start_new_output_database_entry (int steps=0) |
void | set_topology_change_count (unsigned int new_count) |
IOSS_NODISCARD unsigned int | get_topology_change_count () const |
void | set_file_cyclic_count (unsigned int new_count) |
IOSS_NODISCARD unsigned int | get_file_cyclic_count () const |
void | set_if_database_exists_behavior (IfDatabaseExistsBehavior if_exists) |
IOSS_NODISCARD IfDatabaseExistsBehavior | get_if_database_exists_behavior () const |
IOSS_NODISCARD bool | model_is_written () const |
IOSS_NODISCARD bool | transient_is_written () const |
IOSS_NODISCARD bool | load_internal_change_set_mesh (const std::string &set_name) |
IOSS_NODISCARD bool | load_internal_change_set_mesh (const int set_index) |
IOSS_NODISCARD std::tuple< std::string, int, double > | locate_db_state (double targetTime) const |
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. | |
GroupingEntity (const GroupingEntity &other) | |
GroupingEntity & | operator= (const GroupingEntity &rhs)=delete |
virtual | ~GroupingEntity () |
IOSS_NODISCARD State | get_state () const |
Get the current Ioss::State of the entity. | |
IOSS_NODISCARD DatabaseIO * | get_database () const |
void | set_database (DatabaseIO *io_database) |
void | reset_database (DatabaseIO *io_database) |
virtual IOSS_NODISCARD const GroupingEntity * | contained_in () const |
IOSS_NODISCARD const std::string & | name () const |
Get name of entity. | |
void | set_name (const std::string &new_name) |
Set the name of the entity. | |
IOSS_NODISCARD std::string | generic_name () const |
Get a generated name based on the type of the entity and the id. | |
IOSS_NODISCARD bool | is_alias (const std::string &my_name) const |
virtual void | block_membership (Ioss::NameList &) |
Get list of blocks that the entities in this GroupingEntity "touch". | |
IOSS_NODISCARD std::string | get_filename () const |
Get the file name associated with the database containing this entity. | |
void | property_add (const Property &new_prop) |
Add a property to the entity's property manager. | |
void | property_erase (const std::string &property_name) |
Remove a property from the entity's property manager. | |
IOSS_NODISCARD bool | property_exists (const std::string &property_name) const |
Checks if a property exists in the entity's property manager. | |
IOSS_NODISCARD Property | get_property (const std::string &property_name) const |
Get the Property from the property manager associated with the entity. | |
IOSS_NODISCARD int64_t | get_optional_property (const std::string &property, int64_t optional_value) const |
IOSS_NODISCARD std::string | get_optional_property (const std::string &property_name, const std::string &optional_value) const |
IOSS_NODISCARD NameList | property_describe () const |
Get the names of all properties in the property manager for this entity. | |
int | property_describe (NameList *names) const |
Get the names of all properties in the property manager for this entity. | |
IOSS_NODISCARD NameList | property_describe (Ioss::Property::Origin origin) const |
int | property_describe (Ioss::Property::Origin origin, NameList *names) const |
IOSS_NODISCARD size_t | property_count () const |
Get the number of properties defined in the property manager for this entity. | |
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 (Field new_field) |
Add a field to the entity's field manager. | |
void | field_erase (const std::string &field_name) |
Remove a field from the entity's field manager. | |
void | field_erase (Field::RoleType role) |
Remove all fields of type role from the entity's field manager. | |
IOSS_NODISCARD bool | field_exists (const std::string &field_name) const |
Checks if a field with a given name exists in the entity's field manager. | |
IOSS_NODISCARD Field | get_field (const std::string &field_name) const |
Get a field from the entity's field manager. | |
IOSS_NODISCARD const Field & | get_fieldref (const std::string &field_name) const |
Get a reference to a field from the entity's field manager. | |
int | field_describe (NameList *names) const |
Get the names of all fields in the entity's field manager. | |
IOSS_NODISCARD NameList | field_describe () const |
Get the names of all fields in the entity's field manager. | |
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. | |
IOSS_NODISCARD NameList | field_describe (Field::RoleType role) const |
Get the names of all fields of a specified RoleType in the entity's field manager. | |
IOSS_NODISCARD size_t | field_count () const |
Get the number of fields in the entity's field manager. | |
IOSS_NODISCARD 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. | |
IOSS_NODISCARD bool | check_for_duplicate (const Ioss::Field &new_field) const |
int64_t | 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. | |
int64_t | 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. | |
int64_t | get_field_data (const std::string &field_name, void **data, size_t *data_size) const |
template<typename T > | |
int64_t | 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. | |
template<typename T > | |
int64_t | 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. | |
template<typename T > | |
int64_t | put_field_data (const std::string &field_name, std::vector< T > &data) const |
IOSS_NODISCARD Ioss::Field::BasicType | field_int_type () const |
IOSS_NODISCARD unsigned int | hash () const |
IOSS_NODISCARD int64_t | entity_count () const |
IOSS_NODISCARD bool | operator!= (const GroupingEntity &rhs) const |
IOSS_NODISCARD bool | operator== (const GroupingEntity &rhs) const |
IOSS_NODISCARD bool | equal (const GroupingEntity &rhs) const |
Protected Member Functions | |
std::string | get_internal_change_set_name () const |
void | update_dynamic_topology () |
void | clone_and_replace_output_database (int steps=0) |
void | add_output_database_change_set (int steps=0, bool force_addition=false) |
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 |
int64_t | internal_get_zc_field_data (const Field &field, void **data, size_t *data_size) const override |
Protected Member Functions inherited from Ioss::GroupingEntity | |
void | count_attributes () const |
bool | set_state (State new_state) |
void | really_delete_database () |
IOSS_NODISCARD bool | equal_ (const GroupingEntity &rhs, bool quiet) const |
Private Member Functions | |
template<typename T > | |
std::vector< size_t > | internal_get_entity_field_data (const std::string &field_name, const std::vector< T * > &entity_container, void *data, size_t data_size=0) const |
bool | add_alias_nl (const std::string &db_name, const std::string &alias, EntityType type) |
bool | add_alias_nl (const GroupingEntity *ge) |
bool | begin_mode_nl (State new_state) |
bool | end_mode_nl (State current_state) |
void | delete_database () override |
void | reset_region () |
Additional Inherited Members | |
Protected Attributes inherited from Ioss::GroupingEntity | |
PropertyManager | properties |
FieldManager | fields |
int64_t | entityCount = 0 |
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).
|
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.
|
override |
bool Ioss::Region::add | ( | Assembly * | assembly | ) |
Add an assembly to the region.
[in] | assembly | The assembly to add |
bool Ioss::Region::add | ( | Blob * | blob | ) |
Add an blob to the region.
[in] | blob | The blob to add |
bool Ioss::Region::add | ( | CommSet * | commset | ) |
Add a comm set to the region.
[in] | commset | The comm set to add |
bool Ioss::Region::add | ( | const CoordinateFrame & | frame | ) |
Add a coordinate frame to the region.
[in] | frame | The coordinate frame to add |
bool Ioss::Region::add | ( | EdgeBlock * | edge_block | ) |
Add an edge block to the region.
[in] | edge_block | The edge block to add |
bool Ioss::Region::add | ( | EdgeSet * | edgeset | ) |
Add an edge set to the region.
[in] | edgeset | The edge set to add |
bool Ioss::Region::add | ( | ElementBlock * | element_block | ) |
Add an element block to the region.
[in] | element_block | The element block to add |
bool Ioss::Region::add | ( | ElementSet * | elementset | ) |
Add an element set to the region.
[in] | elementset | The element set to add |
bool Ioss::Region::add | ( | FaceBlock * | face_block | ) |
Add a face block to the region.
[in] | face_block | The face block to add |
bool Ioss::Region::add | ( | FaceSet * | faceset | ) |
Add a face set to the region.
[in] | faceset | The face set to add |
bool Ioss::Region::add | ( | NodeBlock * | node_block | ) |
Add a node block to the region.
[in] | node_block | The node block to add |
bool Ioss::Region::add | ( | NodeSet * | nodeset | ) |
Add a node set to the region.
[in] | nodeset | The node set to add |
bool Ioss::Region::add | ( | SideSet * | sideset | ) |
Add a side set to the region.
[in] | sideset | The side set to add |
bool Ioss::Region::add | ( | StructuredBlock * | structured_block | ) |
Add a structured block to the region.
[in] | structured_block | The structured block to add |
bool Ioss::Region::add_alias | ( | const GroupingEntity * | ge | ) |
Add a grouping entity's name as an alias for itself.
[in] | ge | The grouping entity. |
bool Ioss::Region::add_alias | ( | const std::string & | db_name, |
const std::string & | alias ) |
bool Ioss::Region::add_alias | ( | const std::string & | db_name, |
const std::string & | alias, | ||
EntityType | type ) |
Add an alias for a name in a region.
For use with the USTRING type in Sierra, create an uppercase version of all aliases...
[in] | db_name | The original name. |
[in] | alias | the alias |
[in] | type | the entity type |
|
private |
|
private |
|
inline |
Add an information record (an informative string) to the region's database.
[in] | info | The string to add. |
|
inline |
Add multiple information records (informative strings) to the region's database.
[in] | info | The strings to add. |
|
protected |
|
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.
[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. |
|
inlinevirtual |
|
virtual |
Add a state for a specified time.
The states in the region will be 1-based.
[in] | time | The time at the new state. |
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.)
[in] | new_state | The new State to which the Region and DatabaseIO should be set. |
|
private |
double Ioss::Region::begin_state | ( | int | state | ) |
Begin a state (moment in time).
[in] | state | The state index (1-based). |
void Ioss::Region::check_for_duplicate_names | ( | const Ioss::GroupingEntity * | entity | ) | const |
|
protected |
|
inlineoverridevirtual |
What does this entity contain.
Implements Ioss::GroupingEntity.
|
overrideprivatevirtual |
Reimplemented from Ioss::GroupingEntity.
bool Ioss::Region::end_mode | ( | State | current_state | ) |
Return the Region and the associated DatabaseIO to STATE_CLOSED.
[in] | current_state | The State to end. |
|
private |
double Ioss::Region::end_state | ( | int | state | ) |
End a state (moment in time).
[in] | state | The state index (1-based). |
void Ioss::Region::erase_fields | ( | Field::RoleType | role | ) |
Remove all fields of the specified role
from all entities in the region.
std::string Ioss::Region::get_alias | ( | const std::string & | alias, |
EntityType | type ) const |
Get the original name for an alias.
[in] | alias | The alias name. |
[in] | type | the entity type |
const AliasMap & Ioss::Region::get_alias_map | ( | EntityType | type | ) | const |
Get all original name / alias pairs for the region.
std::string Ioss::Region::get_alias_nl | ( | const std::string & | alias, |
EntityType | type ) const |
int Ioss::Region::get_aliases | ( | const std::string & | my_name, |
EntityType | type, | ||
Ioss::NameList & | aliases ) const |
Get a map containing all aliases defined for the entity with basename 'my_name'.
Get all aliases for a name in the region.
[in] | my_name | The original name. |
[in] | type | the entity type |
[in,out] | aliases | On input, any vector of strings. On output, all aliases for my_name are appended. |
const AssemblyContainer & Ioss::Region::get_assemblies | ( | ) | const |
Assembly * Ioss::Region::get_assembly | ( | const std::string & | my_name | ) | const |
Get the assembly with the given name.
[in] | my_name | The name of the assembly to get. |
Blob * Ioss::Region::get_blob | ( | const std::string & | my_name | ) | const |
Get the blob with the given name.
[in] | my_name | The name of the blob to get. |
const BlobContainer & Ioss::Region::get_blobs | ( | ) | const |
CommSet * Ioss::Region::get_commset | ( | const std::string & | my_name | ) | const |
Get the comm set with the given name.
[in] | my_name | The name of the comm set to get. |
const CommSetContainer & Ioss::Region::get_commsets | ( | ) | const |
const CoordinateFrame & Ioss::Region::get_coordinate_frame | ( | int64_t | id | ) | const |
Get the coordinate frame with the given id.
[in] | id | The id of the coordinate frame to get. |
const CoordinateFrameContainer & Ioss::Region::get_coordinate_frames | ( | ) | const |
Get all the region's CoordinateFrame objects.
|
inline |
Get the index (1-based) of the currently-active state.
std::tuple< std::string, int, double > Ioss::Region::get_db_max_time | ( | ) | const |
std::tuple< std::string, int, double > Ioss::Region::get_db_min_time | ( | ) | const |
EdgeBlock * Ioss::Region::get_edge_block | ( | const std::string & | my_name | ) | const |
Get the edge block with the given name.
[in] | my_name | The name of the edge block to get. |
const EdgeBlockContainer & Ioss::Region::get_edge_blocks | ( | ) | const |
EdgeSet * Ioss::Region::get_edgeset | ( | const std::string & | my_name | ) | const |
Get the edge set with the given name.
[in] | my_name | The name of the edge set to get. |
const EdgeSetContainer & Ioss::Region::get_edgesets | ( | ) | const |
ElementBlock * Ioss::Region::get_element_block | ( | const std::string & | my_name | ) | const |
Get the element block with the given name.
[in] | my_name | The name of the element block to get. |
ElementBlock * Ioss::Region::get_element_block | ( | size_t | local_id | ) | const |
Get the element block containing a specified element.
[in] | local_id | The local database id (1-based), not the global id. |
const ElementBlockContainer & Ioss::Region::get_element_blocks | ( | ) | const |
Get all the region's ElementBlock objects.
ElementSet * Ioss::Region::get_elementset | ( | const std::string & | my_name | ) | const |
Get the element set with the given name.
[in] | my_name | The name of the element set to get. |
const ElementSetContainer & Ioss::Region::get_elementsets | ( | ) | const |
Get all the region's ElementSet objects.
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.
[in] | my_name | The name of the entity to get |
GroupingEntity * Ioss::Region::get_entity | ( | const std::string & | my_name, |
EntityType | io_type ) const |
Get an entity of a known EntityType.
[in] | my_name | The name of the entity to get |
[in] | io_type | The known type of the entity. |
GroupingEntity * Ioss::Region::get_entity | ( | int64_t | id, |
EntityType | io_type ) const |
Get an entity of a known EntityType and specified id.
[in] | id | The id of the entity to get |
[in] | io_type | The known type of the entity. |
std::vector< size_t > Ioss::Region::get_entity_field_data | ( | const std::string & | field_name, |
const std::vector< T * > & | entity_container, | ||
std::vector< U > & | field_data ) const |
FaceBlock * Ioss::Region::get_face_block | ( | const std::string & | my_name | ) | const |
Get the face block with the given name.
[in] | my_name | The name of the face block to get. |
const FaceBlockContainer & Ioss::Region::get_face_blocks | ( | ) | const |
FaceSet * Ioss::Region::get_faceset | ( | const std::string & | my_name | ) | const |
Get the face set with the given name.
[in] | my_name | The name of the face set to get. |
const FaceSetContainer & Ioss::Region::get_facesets | ( | ) | const |
|
inline |
|
inline |
|
overridevirtual |
Get an implicit property – These are calculated from data stored in the grouping entity instead of having an explicit value assigned.
An example would be 'element_block_count' for a region.
[in] | my_name | The property name. |
Implements Ioss::GroupingEntity.
|
inline |
Get all information records (informative strings) for the region's database.
|
protected |
std::pair< int, double > Ioss::Region::get_max_time | ( | ) | const |
Get the maximum time step index (1-based) and time for the region.
|
inline |
std::pair< int, double > Ioss::Region::get_min_time | ( | ) | const |
Get the minimum time step index (1-based) and time for the region.
NodeBlock * Ioss::Region::get_node_block | ( | const std::string & | my_name | ) | const |
Get the node block with the given name.
[in] | my_name | The name of the node block to get. |
const NodeBlockContainer & Ioss::Region::get_node_blocks | ( | ) | const |
NodeSet * Ioss::Region::get_nodeset | ( | const std::string & | my_name | ) | const |
Get the node set with the given name.
[in] | my_name | The name of the node set to get. |
const NodeSetContainer & Ioss::Region::get_nodesets | ( | ) | 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:
SideBlock * Ioss::Region::get_sideblock | ( | const std::string & | my_name | ) | const |
Get the side block with the given name.
[in] | my_name | The name of the side block to get. |
SideSet * Ioss::Region::get_sideset | ( | const std::string & | my_name | ) | const |
Get the side set with the given name.
[in] | my_name | The name of the side set to get. |
const SideSetContainer & Ioss::Region::get_sidesets | ( | ) | const |
|
virtual |
Get the time corresponding to the specified state or the currently active state.
[in] | state | The state index (1-based) or -1 for the currently active state. |
StructuredBlock * Ioss::Region::get_structured_block | ( | const std::string & | my_name | ) | const |
Get the structured block with the given name.
[in] | my_name | The name of the structured block to get. |
StructuredBlock * Ioss::Region::get_structured_block | ( | size_t | global_offset | ) | const |
Get the structured block containing a specified global-offset-node.
[in] | global_offset | The offset of cell-nodes for all blocks; 0-based. |
const StructuredBlockContainer & Ioss::Region::get_structured_blocks | ( | ) | const |
Get all the region's StructuredBlock objects.
|
inline |
unsigned int Ioss::Region::get_topology_modification | ( | ) | const |
|
private |
|
overrideprotectedvirtual |
Implements Ioss::GroupingEntity.
|
overrideprotectedvirtual |
Implements Ioss::GroupingEntity.
|
overrideprotectedvirtual |
Implements Ioss::GroupingEntity.
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.
[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. |
bool Ioss::Region::load_internal_change_set_mesh | ( | const int | set_index | ) |
bool Ioss::Region::load_internal_change_set_mesh | ( | const std::string & | set_name | ) |
std::tuple< std::string, int, double > Ioss::Region::locate_db_state | ( | double | targetTime | ) | const |
MeshType Ioss::Region::mesh_type | ( | ) | const |
std::string Ioss::Region::mesh_type_string | ( | ) | const |
|
inline |
Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been set.
|
inline |
|
inline |
bool Ioss::Region::node_major | ( | ) | const |
void Ioss::Region::output_summary | ( | std::ostream & | strm, |
bool | do_transient = true ) const |
Print a summary of entities in the region.
[in,out] | strm | The output stream to use for printing. |
[in] | do_transient | deprecated and ignored |
void Ioss::Region::register_mesh_modification_observer | ( | std::shared_ptr< DynamicTopologyObserver > | observer | ) |
bool Ioss::Region::remove | ( | Assembly * | removal | ) |
Remove an assembly to the region.
[in] | removal | The assembly to remove |
Checks other assemblies for uses of this assembly and removes if from their member lists.
|
private |
void Ioss::Region::reset_topology_modification | ( | ) |
|
inline |
|
inline |
|
inline |
void Ioss::Region::set_topology_modification | ( | unsigned int | type | ) |
|
inlineoverridevirtual |
Get a short name of the particular type of entity.
Implements Ioss::GroupingEntity.
void Ioss::Region::start_new_output_database_entry | ( | int | steps = 0 | ) |
|
inline |
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:
void Ioss::Region::transfer_mesh_aliases | ( | Region * | to | ) | const |
Transfer all relevant aliases from this region to another region.
[in] | to | The region to which the aliases are to be transferred. |
|
inline |
Determine whether the metadata related to the transient data has been set.
|
inline |
|
inlineoverridevirtual |
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Implements Ioss::GroupingEntity.
|
inlineoverridevirtual |
Get the name of the particular type of entity.
Implements Ioss::GroupingEntity.
|
protected |
|
mutableprivate |
Stores alias mappings.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Used to track number of topology changes.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
For cycling file-A, file-B, file-C, ..., File-A, typically restart only.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |