Go to the documentation of this file.
7 #ifndef IOSS_Ioss_Region_h
8 #define IOSS_Ioss_Region_h
40 class StructuredBlock;
46 class CoordinateFrame;
68 using AliasMap = std::map<std::string, std::string, std::less<std::string>>;
80 explicit Region(
DatabaseIO *iodatabase =
nullptr,
const std::string &my_name =
"");
93 void output_summary(std::ostream &strm,
bool do_transient =
true)
const;
206 bool add_alias(
const std::string &db_name,
const std::string &alias);
208 std::string
get_alias(
const std::string &alias)
const;
209 std::string
get_alias__(
const std::string &alias)
const;
214 int get_aliases(
const std::string &my_name, std::vector<std::string> &aliases)
const;
231 std::string *my_type =
nullptr)
const;
255 void add_qa_record(
const std::string &code,
const std::string &code_qa,
256 const std::string &date =
"",
const std::string &time =
"");
260 size_t data_size = 0)
const override;
263 size_t data_size = 0)
const override;
269 bool add_alias__(
const std::string &db_name,
const std::string &alias);
313 return static_cast<unsigned int>((get_database()->entity_field_support() & fld_type) != 0u) != 0u;
318 return get_database()->node_global_to_local(global, must_exist);
328 return get_database()->get_information_records();
338 return get_database()->add_information_records(info);
348 return get_database()->add_information_record(info);
362 const std::string &date,
const std::string &time)
365 return get_database()->add_qa_record(code, code_qa, date, time);
386 return get_database()->get_qa_records();
std::vector< SideSet * > SideSetContainer
Definition: Ioss_Region.h:61
EdgeSetContainer edgeSets
Definition: Ioss_Region.h:286
bool transientDefined
Definition: Ioss_Region.h:301
AssemblyContainer assemblies
Definition: Ioss_Region.h:294
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.
Definition: Ioss_Region.C:2160
int64_t node_global_to_local(int64_t global, bool must_exist=true) const
Definition: Ioss_Region.h:316
MeshType
The mesh type – structured, unstructured, hybrid (future), or unknown.
Definition: Ioss_MeshType.h:13
StructuredBlock * get_structured_block(const std::string &my_name) const
Get the structured block with the given name.
Definition: Ioss_Region.C:1974
Holds metadata for bulk data associated with a GroupingEntity.
Definition: Ioss_Field.h:22
bool remove(Assembly *removal)
Remove an assembly to the region.
Definition: Ioss_Region.C:1099
int currentState
Definition: Ioss_Region.h:298
void transfer_mesh_aliases(Region *to) const
Transfer all relevant aliases from this region to another region.
Definition: Ioss_Region.C:2443
std::vector< double > StateTimeContainer
Definition: Ioss_Region.h:64
bool modelDefined
Definition: Ioss_Region.h:300
Assembly * get_assembly(const std::string &my_name) const
Get the assembly with the given name.
Definition: Ioss_Region.C:1848
const NodeSetContainer & get_nodesets() const
Get all the region's NodeSet objects.
Definition: Ioss_Region.C:1491
bool add_alias(const std::string &db_name, const std::string &alias)
Add an alias for a name in a region.
Definition: Ioss_Region.C:1586
A homogeneous collection of other GroupingEntities.
Definition: Ioss_Assembly.h:28
EdgeBlockContainer edgeBlocks
Definition: Ioss_Region.h:281
ElementSet * get_elementset(const std::string &my_name) const
Get the element set with the given name.
Definition: Ioss_Region.C:2097
A homogeneous collection of other GroupingEntities.
Definition: Ioss_Blob.h:28
NodeBlock * get_node_block(const std::string &my_name) const
Get the node block with the given name.
Definition: Ioss_Region.C:1890
ElementBlockContainer elementBlocks
Definition: Ioss_Region.h:283
std::vector< Ioss::Assembly * > AssemblyContainer
Definition: Ioss_Region.h:48
std::string get_alias__(const std::string &alias) const
Definition: Ioss_Region.C:1630
std::string type_string() const override
Get the name of the particular type of entity.
Definition: Ioss_Region.h:84
virtual double get_state_time(int state=-1) const
Get the time corresponding to the specified state or the currently active state.
Definition: Ioss_Region.C:826
BlobContainer blobs
Definition: Ioss_Region.h:295
double end_state(int state)
End a state (moment in time).
Definition: Ioss_Region.C:994
#define IOSS_FUNC_ENTER(m)
Definition: Ioss_CodeTypes.h:100
ElementSetContainer elementSets
Definition: Ioss_Region.h:288
const EdgeSetContainer & get_edgesets() const
Get all the region's EdgeSet objects.
Definition: Ioss_Region.C:1497
bool begin_mode__(State new_state)
Definition: Ioss_Region.C:627
A collection of element edges with the same topology.
Definition: Ioss_EdgeBlock.h:28
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:40
void add_information_records(const std::vector< std::string > &info)
Add multiple information records (informative strings) to the region's database.
Definition: Ioss_Region.h:335
const CoordinateFrame & get_coordinate_frame(int64_t id) const
Get the coordinate frame with the given id.
Definition: Ioss_Region.C:2139
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.
Definition: Ioss_Region.h:361
StructuredBlockContainer structuredBlocks
Definition: Ioss_Region.h:293
State
Access states for a database.
Definition: Ioss_State.h:16
const FaceSetContainer & get_facesets() const
Get all the region's FaceSet objects.
Definition: Ioss_Region.C:1503
bool end_mode__(State current_state)
Definition: Ioss_Region.C:675
A grouping entity that contains other grouping entities.
Definition: Ioss_Region.h:78
NodeSet * get_nodeset(const std::string &my_name) const
Get the node set with the given name.
Definition: Ioss_Region.C:2034
std::map< std::string, std::string, std::less< std::string > > AliasMap
Definition: Ioss_Region.h:68
double begin_state(int state)
Begin a state (moment in time).
Definition: Ioss_Region.C:942
std::pair< int, double > get_max_time() const
Get the maximum time step index (1-based) and time for the region.
Definition: Ioss_Region.C:878
int stateCount
Definition: Ioss_Region.h:299
NodeSetContainer nodeSets
Definition: Ioss_Region.h:285
std::vector< NodeBlock * > NodeBlockContainer
Definition: Ioss_Region.h:51
A collection of nodes.
Definition: Ioss_NodeSet.h:28
std::vector< FaceBlock * > FaceBlockContainer
Definition: Ioss_Region.h:53
A collection of element faces.
Definition: Ioss_FaceSet.h:29
A structured zone – i,j,k.
Definition: Ioss_StructuredBlock.h:78
void add_information_record(const std::string &info)
Add an information record (an informative string) to the region's database.
Definition: Ioss_Region.h:345
A collection of element edges.
Definition: Ioss_EdgeSet.h:29
A collection of elements.
Definition: Ioss_ElementSet.h:29
const FaceBlockContainer & get_face_blocks() const
Get all the region's FaceBlock objects.
Definition: Ioss_Region.C:1467
SideSetContainer sideSets
Definition: Ioss_Region.h:290
std::vector< StructuredBlock * > StructuredBlockContainer
Definition: Ioss_Region.h:62
SideSet * get_sideset(const std::string &my_name) const
Get the side set with the given name.
Definition: Ioss_Region.C:1995
int64_t internal_put_field_data(const Field &field, void *data, size_t data_size=0) const override
Definition: Ioss_Region.C:2434
EntityType
The particular type of GroupingEntity.
Definition: Ioss_EntityType.h:13
Definition: Ioss_CommSet.h:26
Definition: Ioss_CoordinateFrame.h:17
bool begin_mode(State new_state)
Set the Region and the associated DatabaseIO to the given State.
Definition: Ioss_Region.C:602
NodeBlockContainer nodeBlocks
Definition: Ioss_Region.h:280
ElementBlock * get_element_block(const std::string &my_name) const
Get the element block with the given name.
Definition: Ioss_Region.C:1953
const CommSetContainer & get_commsets() const
Get all the region's CommSet objects.
Definition: Ioss_Region.C:1515
Region(DatabaseIO *iodatabase=nullptr, const std::string &my_name="")
Constructor reads in all metadata from disk.
Definition: Ioss_Region.C:332
std::vector< ElementBlock * > ElementBlockContainer
Definition: Ioss_Region.h:54
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'.
Definition: Ioss_Region.C:1648
A collection of element faces with the same topology.
Definition: Ioss_FaceBlock.h:28
bool node_major() const
Definition: Ioss_Region.C:445
~Region() override
Definition: Ioss_Region.C:376
@ REGION
Definition: Ioss_EntityType.h:26
An input or output Database.
Definition: Ioss_DatabaseIO.h:59
int64_t internal_get_field_data(const Field &field, void *data, size_t data_size=0) const override
Definition: Ioss_Region.C:2429
const std::vector< std::string > & get_information_records() const
Get all information records (informative strings) for the region's database.
Definition: Ioss_Region.h:325
std::vector< Ioss::Blob * > BlobContainer
Definition: Ioss_Region.h:49
const BlobContainer & get_blobs() const
Get all the region's Blob objects.
Definition: Ioss_Region.C:1449
bool add(NodeBlock *node_block)
Add a node block to the region.
Definition: Ioss_Region.C:1074
std::pair< int, double > get_min_time() const
Get the minimum time step index (1-based) and time for the region.
Definition: Ioss_Region.C:911
std::vector< NodeSet * > NodeSetContainer
Definition: Ioss_Region.h:56
std::vector< CoordinateFrame > CoordinateFrameContainer
Definition: Ioex_Utils.h:26
A collection of element sides having the same topology.
Definition: Ioss_SideBlock.h:34
std::string contains_string() const override
What does this entity contain.
Definition: Ioss_Region.h:86
SideBlock * get_sideblock(const std::string &my_name) const
Get the side block with the given name.
Definition: Ioss_Region.C:2016
const AssemblyContainer & get_assemblies() const
Get all the region's Assembly objects.
Definition: Ioss_Region.C:1443
const NodeBlockContainer & get_node_blocks() const
Get all the region's NodeBlock objects.
Definition: Ioss_Region.C:1455
EdgeBlock * get_edge_block(const std::string &my_name) const
Get the edge block with the given name.
Definition: Ioss_Region.C:1911
Blob * get_blob(const std::string &my_name) const
Get the blob with the given name.
Definition: Ioss_Region.C:1869
std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition: Ioss_Region.h:85
bool model_defined() const
Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been se...
Definition: Ioss_Region.h:123
StateTimeContainer stateTimes
Definition: Ioss_Region.h:296
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.
Definition: Ioss_Region.h:383
const CoordinateFrameContainer & get_coordinate_frames() const
Get all the region's CoordinateFrame objects.
Definition: Ioss_Region.C:1521
AliasMap aliases_
Stores alias mappings.
Definition: Ioss_Region.h:277
CoordinateFrameContainer coordinateFrames
Definition: Ioss_Region.h:292
const std::string mesh_type_string() const
Definition: Ioss_Region.C:462
A collection of elements having the same topology.
Definition: Ioss_ElementBlock.h:23
bool transient_defined() const
Determine whether the metadata related to the transient data has been set.
Definition: Ioss_Region.h:130
EdgeSet * get_edgeset(const std::string &my_name) const
Get the edge set with the given name.
Definition: Ioss_Region.C:2055
const EdgeBlockContainer & get_edge_blocks() const
Get all the region's EdgeBlock objects.
Definition: Ioss_Region.C:1461
bool end_mode(State current_state)
Return the Region and the associated DatabaseIO to STATE_CLOSED.
Definition: Ioss_Region.C:669
virtual int add_state__(double time)
Add a state for a specified time.
Definition: Ioss_Region.C:779
std::vector< EdgeSet * > EdgeSetContainer
Definition: Ioss_Region.h:57
FaceBlock * get_face_block(const std::string &my_name) const
Get the face block with the given name.
Definition: Ioss_Region.C:1932
std::vector< CommSet * > CommSetContainer
Definition: Ioss_Region.h:63
FaceSet * get_faceset(const std::string &my_name) const
Get the face set with the given name.
Definition: Ioss_Region.C:2076
std::vector< char > data
Definition: cth_pressure_map.C:48
GroupingEntity * get_entity(const std::string &my_name, EntityType io_type) const
Get an entity of a known EntityType.
Definition: Ioss_Region.C:1674
void output_summary(std::ostream &strm, bool do_transient=true) const
Print a summary of entities in the region.
Definition: Ioss_Region.C:479
virtual int add_state(double time)
Definition: Ioss_Region.h:104
const ElementSetContainer & get_elementsets() const
Get all the region's ElementSet objects.
Definition: Ioss_Region.C:1509
A collection of all nodes in the region.
Definition: Ioss_NodeBlock.h:28
std::vector< EdgeBlock * > EdgeBlockContainer
Definition: Ioss_Region.h:52
const AliasMap & get_alias_map() const
Get all original name / alias pairs for the region.
Definition: Ioss_Region.C:1666
FaceBlockContainer faceBlocks
Definition: Ioss_Region.h:282
std::vector< FaceSet * > FaceSetContainer
Definition: Ioss_Region.h:58
bool supports_field_type(Ioss::EntityType fld_type) const
Definition: Ioss_Region.h:311
CommSetContainer commSets
Definition: Ioss_Region.h:291
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 hav...
Definition: Ioss_Region.C:2305
const ElementBlockContainer & get_element_blocks() const
Get all the region's ElementBlock objects.
Definition: Ioss_Region.C:1473
const SideSetContainer & get_sidesets() const
Get all the region's SideSet objects.
Definition: Ioss_Region.C:1485
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.
Definition: Ioss_Region.C:2496
std::vector< ElementSet * > ElementSetContainer
Definition: Ioss_Region.h:59
A named value that has a known type.
Definition: Ioss_Property.h:24
bool add_alias__(const std::string &db_name, const std::string &alias)
Definition: Ioss_Region.C:1592
const StructuredBlockContainer & get_structured_blocks() const
Get all the region's StructuredBlock objects.
Definition: Ioss_Region.C:1479
void delete_database() override
Definition: Ioss_Region.C:443
A collection of element sides.
Definition: Ioss_SideSet.h:28
Base class for all 'grouping' entities. The following derived classes are typical:
Definition: Ioss_GroupingEntity.h:68
EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition: Ioss_Region.h:87
CommSet * get_commset(const std::string &my_name) const
Get the comm set with the given name.
Definition: Ioss_Region.C:2118
FaceSetContainer faceSets
Definition: Ioss_Region.h:287
MeshType mesh_type() const
Definition: Ioss_Region.C:447
int get_current_state() const
Get the index (1-based) of the currently-active state.
Definition: Ioss_Region.h:309
std::string get_alias(const std::string &alias) const
Get the original name for an alias.
Definition: Ioss_Region.C:1624