IOSS  2.0
Ioss_Region.h
Go to the documentation of this file.
1 // Copyright(C) 1999-2017 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // * Redistributions in binary form must reproduce the above
13 // copyright notice, this list of conditions and the following
14 // disclaimer in the documentation and/or other materials provided
15 // with the distribution.
16 //
17 // * Neither the name of NTESS nor the names of its
18 // contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 #ifndef IOSS_Ioss_Region_h
34 #define IOSS_Ioss_Region_h
35 
36 #include <Ioss_CoordinateFrame.h> // for CoordinateFrame
37 #include <Ioss_DatabaseIO.h> // for DatabaseIO
38 #include <Ioss_EntityType.h> // for EntityType, etc
39 #include <Ioss_GroupingEntity.h> // for GroupingEntity
40 #include <Ioss_MeshType.h>
41 #include <Ioss_Property.h> // for Property
42 #include <Ioss_State.h> // for State
43 #include <cstddef> // for size_t, nullptr
44 #include <cstdint> // for int64_t
45 #include <functional> // for less
46 #include <iosfwd> // for ostream
47 #include <map> // for map, map<>::value_compare
48 #include <string> // for string, operator<
49 #include <utility> // for pair
50 #include <vector> // for vector
51 namespace Ioss {
52  class CommSet;
53  class EdgeBlock;
54  class EdgeSet;
55  class ElementBlock;
56  class ElementSet;
57  class FaceBlock;
58  class FaceSet;
59  class Field;
60  class NodeBlock;
61  class NodeSet;
62  class SideBlock;
63  class SideSet;
64  class StructuredBlock;
65 } // namespace Ioss
66 // Needed for node_global_to_local inline function.
67 
68 namespace Ioss {
69 
70  class CoordinateFrame;
71 
72  using NodeBlockContainer = std::vector<NodeBlock *>;
73  using EdgeBlockContainer = std::vector<EdgeBlock *>;
74  using FaceBlockContainer = std::vector<FaceBlock *>;
75  using ElementBlockContainer = std::vector<ElementBlock *>;
76 
77  using NodeSetContainer = std::vector<NodeSet *>;
78  using EdgeSetContainer = std::vector<EdgeSet *>;
79  using FaceSetContainer = std::vector<FaceSet *>;
80  using ElementSetContainer = std::vector<ElementSet *>;
81 
82  using SideSetContainer = std::vector<SideSet *>;
83  using StructuredBlockContainer = std::vector<StructuredBlock *>;
84  using CommSetContainer = std::vector<CommSet *>;
85  using StateTimeContainer = std::vector<double>;
86 
87  using CoordinateFrameContainer = std::vector<CoordinateFrame>;
88 
89  using AliasMap = std::map<std::string, std::string, std::less<std::string>>;
90 
91  /** \brief A grouping entity that contains other grouping entities.
92  *
93  * Maintains a list of NodeBlocks, ElementBlocks, NodeLists, CommLists and Surfaces.
94  * [Similar to the "Composite Pattern" in Design Patterns] All interface to
95  * GroupingEntities is through the Region class; clients of the IO subsystem have no direct
96  * access to the underlying GroupingEntities (other than the Region).
97  */
98  class Region : public GroupingEntity
99  {
100  public:
101  explicit Region(DatabaseIO *iodatabase = nullptr, const std::string &my_name = "");
102 
103  ~Region() override;
104 
105  std::string type_string() const override { return "Region"; }
106  std::string short_type_string() const override { return "region"; }
107  EntityType type() const override { return REGION; }
108 
109  MeshType mesh_type() const;
110  const std::string mesh_type_string() const;
111  bool node_major() const;
112 
113  void output_summary(std::ostream &strm, bool do_transient = true);
114 
115  bool supports_field_type(Ioss::EntityType fld_type) const;
116 
117  // Helper function...
118  int64_t node_global_to_local(int64_t global, bool must_exist = true) const;
119 
120  bool begin_mode(State new_state);
121  bool end_mode(State current_state);
122 
123  // Add a new state at this time, return state number
124  virtual int add_state(double time);
125 
126  // Get time corresponding to specified state
127 
128  virtual double get_state_time(int state = -1) const;
129  int get_current_state() const;
130  double begin_state(int state);
131  double end_state(int state);
132 
133  /** \brief Determine whether the metadata defining the model (nontransient,
134  * geometry, and toploloty) has been set.
135  *
136  * \returns True if the metadata defining the model has been set.
137  */
138  bool model_defined() const { return modelDefined; }
139 
140  /** \brief Determine whether the metadata related to the transient
141  * data has been set.
142  *
143  * \returns True if the metadata related to the transient data has been set.
144  */
145  bool transient_defined() const { return transientDefined; }
146 
147  // Return a pair consisting of the step (1-based) corresponding to
148  // the maximum time on the database and the corresponding maximum
149  // time value. Note that this may not necessarily be the last step
150  // on the database if cycle and overlay are being used.
151  std::pair<int, double> get_max_time() const;
152 
153  // Return a pair consisting of the step (1-based) corresponding to
154  // the minimum time on the database and the corresponding minimum
155  // time value. Note that this may not necessarily be the first step
156  // on the database if cycle and overlay are being used.
157  std::pair<int, double> get_min_time() const;
158 
159  // Functions for an output region...
160  bool add(NodeBlock *node_block);
161  bool add(EdgeBlock *edge_block);
162  bool add(FaceBlock *face_block);
163  bool add(ElementBlock *element_block);
164  bool add(SideSet *sideset);
165  bool add(NodeSet *nodeset);
166  bool add(EdgeSet *edgeset);
167  bool add(FaceSet *faceset);
168  bool add(ElementSet *elementset);
169  bool add(CommSet *commset);
170  bool add(StructuredBlock *structured_block);
171  bool add(const CoordinateFrame &frame);
172 
173  const NodeBlockContainer & get_node_blocks() const;
174  const EdgeBlockContainer & get_edge_blocks() const;
175  const FaceBlockContainer & get_face_blocks() const;
177  const SideSetContainer & get_sidesets() const;
178  const NodeSetContainer & get_nodesets() const;
179  const EdgeSetContainer & get_edgesets() const;
180  const FaceSetContainer & get_facesets() const;
181  const ElementSetContainer & get_elementsets() const;
182  const CommSetContainer & get_commsets() const;
185 
186  // Retrieve the Grouping Entity with the specified name.
187  // Returns nullptr if the entity does not exist
188  GroupingEntity * get_entity(const std::string &my_name, EntityType io_type) const;
189  GroupingEntity * get_entity(const std::string &my_name) const;
190  NodeBlock * get_node_block(const std::string &my_name) const;
191  EdgeBlock * get_edge_block(const std::string &my_name) const;
192  FaceBlock * get_face_block(const std::string &my_name) const;
193  ElementBlock * get_element_block(const std::string &my_name) const;
194  SideSet * get_sideset(const std::string &my_name) const;
195  SideBlock * get_sideblock(const std::string &my_name) const;
196  NodeSet * get_nodeset(const std::string &my_name) const;
197  EdgeSet * get_edgeset(const std::string &my_name) const;
198  FaceSet * get_faceset(const std::string &my_name) const;
199  ElementSet * get_elementset(const std::string &my_name) const;
200  CommSet * get_commset(const std::string &my_name) const;
201  StructuredBlock *get_structured_block(const std::string &my_name) const;
202 
203  const CoordinateFrame &get_coordinate_frame(int64_t id) const;
204 
205  // Add the name 'alias' as an alias for the database entity with the
206  // name 'db_name'. Returns true if alias added; false if problems
207  // adding alias.
208  bool add_alias(const std::string &db_name, const std::string &alias);
209  bool add_alias(const GroupingEntity *ge);
210  std::string get_alias(const std::string &alias) const;
211  std::string get_alias__(const std::string &alias) const; // Not locked by mutex
212 
213  const AliasMap &get_alias_map() const;
214 
215  /// Get a map containing all aliases defined for the entity with basename 'name'
216  int get_aliases(const std::string &my_name, std::vector<std::string> &aliases) const;
217 
218  // This routine transfers all relavant aliases from the 'this'
219  // region and applies them to the 'to' file.
220  void transfer_mesh_aliases(Region *to) const;
221 
222  // Ensure that the 'this' region has the same ids and names as the 'from' region.
223  void synchronize_id_and_name(const Region *from, bool sync_attribute_field_names = false);
224 
225  // Returns true if the passed in name refers to a known Entity
226  // defined on this region. If true, then 'type' (if non-nullptr) is
227  // filled in with the type of the entity; if false, then type (if
228  // non-nullptr) is set to 'INVALID' This function is defined to
229  // consolidate several distinct implementations of this code in
230  // client code. Because of this, the 'type' used in the client
231  // code is repeated here instead of something more generic.
232  bool is_valid_io_entity(const std::string &my_name, unsigned int io_type,
233  std::string *my_type = nullptr) const;
234 
235  // Retrieve the element block that contains the specified element
236  // The 'local_id' is the local database id (1-based), not the global id.
237  // returns nullptr if no element block contains this element (local_id <= 0
238  // or greater than number of elements in database)
239  ElementBlock *get_element_block(size_t local_id) const;
240 
241  // Retrieve the structured block that contains the specified node
242  // The 'global_offset' is the global offset (0-based)
243  // returns nullptr if no structured block contains this node (local_id <= 0
244  // or greater than number of cell-nodes in database)
245  StructuredBlock *get_structured_block(size_t global_offset) const;
246 
247  // Handle implicit properties -- These are calcuated from data stored
248  // in the grouping entity instead of having an explicit value assigned.
249  // An example would be 'element_block_count' for a region.
250  Property get_implicit_property(const std::string &my_name) const override;
251 
252  const std::vector<std::string> &get_information_records() const;
253  void add_information_records(const std::vector<std::string> &info);
254  void add_information_record(const std::string &info);
255 
256  const std::vector<std::string> &get_qa_records() const;
257  void add_qa_record(const std::string &code, const std::string &code_qa,
258  const std::string &date = "", const std::string &time = "");
259 
260  protected:
261  int64_t internal_get_field_data(const Field &field, void *data,
262  size_t data_size) const override;
263 
264  int64_t internal_put_field_data(const Field &field, void *data,
265  size_t data_size) const override;
266 
267  private:
268  // Add the name 'alias' as an alias for the database entity with the
269  // name 'db_name'. Returns true if alias added; false if problems
270  // adding alias. Not protected by mutex -- call internally only.
271  bool add_alias__(const std::string &db_name, const std::string &alias);
272  bool add_alias__(const GroupingEntity *ge);
273 
274  bool begin_mode__(State new_state);
275  bool end_mode__(State current_state);
276 
277  void delete_database() override;
278 
279  AliasMap aliases_; ///< Stores alias mappings
280 
281  // Containers for all grouping entities
286 
291 
297 
299  mutable int stateCount;
302  };
303 } // namespace Ioss
304 
305 /** \brief Get the index (1-based) of the currently-active state.
306  *
307  * \returns The index.
308  */
309 inline int Ioss::Region::get_current_state() const { return currentState; }
310 
312 {
313  return static_cast<unsigned int>((get_database()->entity_field_support() & fld_type) != 0u) != 0u;
314 }
315 
316 inline int64_t Ioss::Region::node_global_to_local(int64_t global, bool must_exist) const
317 {
318  return get_database()->node_global_to_local(global, must_exist);
319 }
320 
321 /** \brief Get all information records (informative strings) for the region's database.
322  *
323  * \returns The informative strings.
324  */
325 inline const std::vector<std::string> &Ioss::Region::get_information_records() const
326 {
327  IOSS_FUNC_ENTER(m_);
329 }
330 
331 /** \brief Add multiple information records (informative strings) to the region's database.
332  *
333  * \param[in] info The strings to add.
334  */
335 inline void Ioss::Region::add_information_records(const std::vector<std::string> &info)
336 {
337  IOSS_FUNC_ENTER(m_);
338  return get_database()->add_information_records(info);
339 }
340 
341 /** \brief Add an information record (an informative string) to the region's database.
342  *
343  * \param[in] info The string to add.
344  */ inline void
345 Ioss::Region::add_information_record(const std::string &info)
346 {
347  IOSS_FUNC_ENTER(m_);
348  return get_database()->add_information_record(info);
349 }
350 
351 /** \brief Add a QA record, which consists of 4 strings, to the region's database
352  *
353  * The 4 function parameters correspond to the 4 QA record strings.
354  *
355  * \param[in] code A descriptive code name, such as the application that modified the database.
356  * \param[in] code_qa A descriptive string, such as the version of the application that modified
357  * the database.
358  * \param[in] date A relevant date, such as the date the database was modified.
359  * \param[in] time A relevant time, such as the time the database was modified.
360  */
361 inline void Ioss::Region::add_qa_record(const std::string &code, const std::string &code_qa,
362  const std::string &date, const std::string &time)
363 {
364  IOSS_FUNC_ENTER(m_);
365  return get_database()->add_qa_record(code, code_qa, date, time);
366 }
367 
368 /** \brief Get all QA records, each of which consists of 4 strings, from the region's database.
369  *
370  * The 4 strings that make up a database QA record are:
371  *
372  * 1. A descriptive code name, such as the application that modified the database.
373  *
374  * 2. A descriptive string, such as the version of the application that modified the database.
375  *
376  * 3. A relevant date, such as the date the database was modified.
377  *
378  * 4. A relevant time, such as the time the database was modified.
379  *
380  * \returns All QA records in a single vector. Every 4 consecutive elements of the
381  * vector make up a single QA record.
382  */
383 inline const std::vector<std::string> &Ioss::Region::get_qa_records() const
384 {
385  IOSS_FUNC_ENTER(m_);
386  return get_database()->get_qa_records();
387 }
388 
389 #endif
Definition: Ioss_EntityType.h:52
bool modelDefined
Definition: Ioss_Region.h:300
const std::vector< std::string > & get_information_records() const
Get all information records (informative strings) for the region&#39;s database.
Definition: Ioss_Region.h:325
double end_state(int state)
End a state (moment in time).
Definition: Ioss_Region.C:908
const NodeSetContainer & get_nodesets() const
Get all the region&#39;s NodeSet objects.
Definition: Ioss_Region.C:1303
A named value that has a known type.
Definition: Ioss_Property.h:47
SideSet * get_sideset(const std::string &my_name) const
Get the side set with the given name.
Definition: Ioss_Region.C:1699
int currentState
Definition: Ioss_Region.h:298
StateTimeContainer stateTimes
Definition: Ioss_Region.h:296
SideBlock * get_sideblock(const std::string &my_name) const
Get the side block with the given name.
Definition: Ioss_Region.C:1720
int64_t node_global_to_local(int64_t global, bool must_exist) const
Get the local (process-specific) node number corresponding to a global node number.
Definition: Ioss_DatabaseIO.h:115
virtual unsigned entity_field_support() const =0
bool begin_mode(State new_state)
Set the Region and the associated DatabaseIO to the given State.
Definition: Ioss_Region.C:530
The main namespace for the Ioss library.
Definition: Iocgns_DatabaseIO.h:50
std::vector< CoordinateFrame > CoordinateFrameContainer
Definition: Ioex_Utils.h:52
StructuredBlock * get_structured_block(const std::string &my_name) const
Get the structured block with the given name.
Definition: Ioss_Region.C:1678
An input or output Database.
Definition: Ioss_DatabaseIO.h:80
std::vector< FaceSet * > FaceSetContainer
Definition: Ioss_Region.h:79
bool end_mode(State current_state)
Return the Region and the associated DatabaseIO to STATE_CLOSED.
Definition: Ioss_Region.C:592
const AliasMap & get_alias_map() const
Get all original name / alias pairs for the region.
Definition: Ioss_Region.C:1476
std::map< std::string, std::string, std::less< std::string > > AliasMap
Definition: Ioss_Region.h:89
std::vector< NodeBlock * > NodeBlockContainer
Definition: Ioss_Region.h:72
CoordinateFrameContainer coordinateFrames
Definition: Ioss_Region.h:294
A collection of nodes.
Definition: Ioss_NodeSet.h:53
virtual int add_state(double time)
Add a state for a specified time.
Definition: Ioss_Region.C:694
A collection of element faces with the same topology.
Definition: Ioss_FaceBlock.h:53
A collection of element faces.
Definition: Ioss_FaceSet.h:54
Base class for all &#39;grouping&#39; entities. The following derived classes are typical: ...
Definition: Ioss_GroupingEntity.h:93
ElementSetContainer elementSets
Definition: Ioss_Region.h:290
double begin_state(int state)
Begin a state (moment in time).
Definition: Ioss_Region.C:859
std::vector< StructuredBlock * > StructuredBlockContainer
Definition: Ioss_Region.h:83
void transfer_mesh_aliases(Region *to) const
Transfer all relevant aliases from this region to another region.
Definition: Ioss_Region.C:2124
int64_t node_global_to_local(int64_t global, bool must_exist=true) const
Definition: Ioss_Region.h:316
A collection of element edges.
Definition: Ioss_EdgeSet.h:54
NodeBlock * get_node_block(const std::string &my_name) const
Get the node block with the given name.
Definition: Ioss_Region.C:1594
FaceBlockContainer faceBlocks
Definition: Ioss_Region.h:284
A collection of element sides having the same topology.
Definition: Ioss_SideBlock.h:61
bool end_mode__(State current_state)
Definition: Ioss_Region.C:598
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:1864
const EdgeBlockContainer & get_edge_blocks() const
Get all the region&#39;s EdgeBlock objects.
Definition: Ioss_Region.C:1273
CommSet * get_commset(const std::string &my_name) const
Get the comm set with the given name.
Definition: Ioss_Region.C:1822
const std::vector< std::string > & get_information_records() const
Get all information records (informative strings) for the database.
Definition: Ioss_DatabaseIO.h:306
void add_information_record(const std::string &info)
Add an information record (an informative string) to the database.
Definition: Ioss_DatabaseIO.C:525
EdgeBlock * get_edge_block(const std::string &my_name) const
Get the edge block with the given name.
Definition: Ioss_Region.C:1615
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 ha...
Definition: Ioss_Region.C:1994
EdgeBlockContainer edgeBlocks
Definition: Ioss_Region.h:283
State
Access states for a database.
Definition: Ioss_State.h:42
MeshType mesh_type() const
Definition: Ioss_Region.C:395
int64_t internal_put_field_data(const Field &field, void *data, size_t data_size) const override
Definition: Ioss_Region.C:2115
bool transient_defined() const
Determine whether the metadata related to the transient data has been set.
Definition: Ioss_Region.h:145
A collection of elements having the same topology.
Definition: Ioss_ElementBlock.h:48
std::vector< EdgeSet * > EdgeSetContainer
Definition: Ioss_Region.h:78
AliasMap aliases_
Stores alias mappings.
Definition: Ioss_Region.h:279
A structured zone – i,j,k.
Definition: Ioss_StructuredBlock.h:98
A collection of elements.
Definition: Ioss_ElementSet.h:54
EdgeSetContainer edgeSets
Definition: Ioss_Region.h:288
std::vector< CommSet * > CommSetContainer
Definition: Ioss_Region.h:84
int get_current_state() const
Get the index (1-based) of the currently-active state.
Definition: Ioss_Region.h:309
bool add_alias__(const std::string &db_name, const std::string &alias)
Definition: Ioss_Region.C:1404
std::string get_alias__(const std::string &alias) const
Definition: Ioss_Region.C:1440
~Region() override
Definition: Ioss_Region.C:332
std::vector< double > StateTimeContainer
Definition: Ioss_Region.h:85
bool supports_field_type(Ioss::EntityType fld_type) const
Definition: Ioss_Region.h:311
std::vector< EdgeBlock * > EdgeBlockContainer
Definition: Ioss_Region.h:73
std::vector< NodeSet * > NodeSetContainer
Definition: Ioss_Region.h:77
SideSetContainer sideSets
Definition: Ioss_Region.h:292
const StructuredBlockContainer & get_structured_blocks() const
Get all the region&#39;s StructuredBlock objects.
Definition: Ioss_Region.C:1291
void add_information_records(const std::vector< std::string > &info)
Add multiple information records (informative strings) to the region&#39;s database.
Definition: Ioss_Region.h:335
int64_t internal_get_field_data(const Field &field, void *data, size_t data_size) const override
Definition: Ioss_Region.C:2110
bool begin_mode__(State new_state)
Definition: Ioss_Region.C:536
bool transientDefined
Definition: Ioss_Region.h:301
const CoordinateFrame & get_coordinate_frame(int64_t id) const
Get the coordinate frame with the given id.
Definition: Ioss_Region.C:1843
StructuredBlockContainer structuredBlocks
Definition: Ioss_Region.h:295
A collection of all nodes in the region.
Definition: Ioss_NodeBlock.h:53
const CommSetContainer & get_commsets() const
Get all the region&#39;s CommSet objects.
Definition: Ioss_Region.C:1327
const ElementBlockContainer & get_element_blocks() const
Get all the region&#39;s ElementBlock objects.
Definition: Ioss_Region.C:1285
const FaceSetContainer & get_facesets() const
Get all the region&#39;s FaceSet objects.
Definition: Ioss_Region.C:1315
CommSetContainer commSets
Definition: Ioss_Region.h:293
const ElementSetContainer & get_elementsets() const
Get all the region&#39;s ElementSet objects.
Definition: Ioss_Region.C:1321
EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition: Ioss_Region.h:107
const EdgeSetContainer & get_edgesets() const
Get all the region&#39;s EdgeSet objects.
Definition: Ioss_Region.C:1309
ElementBlockContainer elementBlocks
Definition: Ioss_Region.h:285
const std::string mesh_type_string() const
Definition: Ioss_Region.C:410
const CoordinateFrameContainer & get_coordinate_frames() const
Get all the region&#39;s CoordinateFrame objects.
Definition: Ioss_Region.C:1333
bool model_defined() const
Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been se...
Definition: Ioss_Region.h:138
void add_information_record(const std::string &info)
Add an information record (an informative string) to the region&#39;s database.
Definition: Ioss_Region.h:345
Definition: Ioss_CommSet.h:51
FaceSetContainer faceSets
Definition: Ioss_Region.h:289
const FaceBlockContainer & get_face_blocks() const
Get all the region&#39;s FaceBlock objects.
Definition: Ioss_Region.C:1279
FaceSet * get_faceset(const std::string &my_name) const
Get the face set with the given name.
Definition: Ioss_Region.C:1780
int stateCount
Definition: Ioss_Region.h:299
NodeSetContainer nodeSets
Definition: Ioss_Region.h:287
void output_summary(std::ostream &strm, bool do_transient=true)
Print a summary of entities in the region.
Definition: Ioss_Region.C:427
FaceBlock * get_face_block(const std::string &my_name) const
Get the face block with the given name.
Definition: Ioss_Region.C:1636
bool node_major() const
Definition: Ioss_Region.C:393
A grouping entity that contains other grouping entities.
Definition: Ioss_Region.h:98
std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition: Ioss_Region.h:106
void add_information_records(const std::vector< std::string > &info)
Add multiple information records (informative strings) to the database.
Definition: Ioss_DatabaseIO.C:515
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 &#39;name&#39;.
Definition: Ioss_Region.C:1458
NodeSet * get_nodeset(const std::string &my_name) const
Get the node set with the given name.
Definition: Ioss_Region.C:1738
ElementSet * get_elementset(const std::string &my_name) const
Get the element set with the given name.
Definition: Ioss_Region.C:1801
DatabaseIO * get_database() const
Definition: Ioss_GroupingEntity.C:111
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&#39;s database.
Definition: Ioss_Region.h:361
ElementBlock * get_element_block(const std::string &my_name) const
Get the element block with the given name.
Definition: Ioss_Region.C:1657
A collection of element sides.
Definition: Ioss_SideSet.h:59
void delete_database() override
Definition: Ioss_Region.C:391
Holds metadata for bulk data associated with a GroupingEntity.
Definition: Ioss_Field.h:47
bool add(NodeBlock *node_block)
Add a node block to the region.
Definition: Ioss_Region.C:986
std::vector< SideSet * > SideSetContainer
Definition: Ioss_Region.h:82
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:795
const SideSetContainer & get_sidesets() const
Get all the region&#39;s SideSet objects.
Definition: Ioss_Region.C:1297
MeshType
The mesh type – structured, unstructured, hybrid (future), or unknown.
Definition: Ioss_MeshType.h:39
const NodeBlockContainer & get_node_blocks() const
Get all the region&#39;s NodeBlock objects.
Definition: Ioss_Region.C:1267
std::vector< ElementBlock * > ElementBlockContainer
Definition: Ioss_Region.h:75
#define IOSS_FUNC_ENTER(m)
Definition: Ioss_CodeTypes.h:114
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:2177
Definition: Ioss_CoordinateFrame.h:42
EdgeSet * get_edgeset(const std::string &my_name) const
Get the edge set with the given name.
Definition: Ioss_Region.C:1759
EntityType
The particular type of GroupingEntity.
Definition: Ioss_EntityType.h:39
std::vector< FaceBlock * > FaceBlockContainer
Definition: Ioss_Region.h:74
Region(DatabaseIO *iodatabase=nullptr, const std::string &my_name="")
Constructor reads in all metadata from disk.
Definition: Ioss_Region.C:290
std::string type_string() const override
Get the name of the particular type of entity.
Definition: Ioss_Region.h:105
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:743
std::string get_alias(const std::string &alias) const
Get the original name for an alias.
Definition: Ioss_Region.C:1434
std::vector< char > data
Definition: Ioss_Utils.C:78
A collection of element edges with the same topology.
Definition: Ioss_EdgeBlock.h:53
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:828
NodeBlockContainer nodeBlocks
Definition: Ioss_Region.h:282
std::vector< ElementSet * > ElementSetContainer
Definition: Ioss_Region.h:80
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 database.
Definition: Ioss_DatabaseIO.C:540
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:1398
GroupingEntity * get_entity(const std::string &my_name, EntityType io_type) const
Get an entity of a known EntityType.
Definition: Ioss_Region.C:1484
const std::vector< std::string > & get_qa_records() const
Get all QA records, each of which consists of 4 strings, from the database.
Definition: Ioss_DatabaseIO.h:327
const std::vector< std::string > & get_qa_records() const
Get all QA records, each of which consists of 4 strings, from the region&#39;s database.
Definition: Ioss_Region.h:383