IOSS 2.0
Loading...
Searching...
No Matches
Ioss_Region.h
Go to the documentation of this file.
1// Copyright(C) 1999-2024 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// See packages/seacas/LICENSE for details
6
7#pragma once
8
9#include "Ioss_CoordinateFrame.h" // for CoordinateFrame
10#include "Ioss_DatabaseIO.h" // for DatabaseIO
11#include "Ioss_EntityType.h" // for EntityType, etc
12#include "Ioss_Field.h"
13#include "Ioss_GroupingEntity.h" // for GroupingEntity
14#include "Ioss_MeshType.h"
15#include "Ioss_Property.h" // for Property
16#include "Ioss_State.h" // for State
17#include <assert.h>
18#include <cstddef> // for size_t, nullptr
19#include <cstdint> // for int64_t
20
21#include "Ioss_CodeTypes.h"
22#include "Ioss_Utils.h"
23#include "Ioss_VariableType.h"
24#include "ioss_export.h"
25#if !defined BUILT_IN_SIERRA
26#include <fmt/ostream.h>
27#endif
28#include <functional> // for less
29#include <iosfwd> // for ostream
30#include <map> // for map, map<>::value_compare
31#include <sstream>
32#include <string> // for string, operator<
33#include <utility> // for pair
34#include <vector> // for vector
35
36namespace Ioss {
37 class Assembly;
38 class Blob;
39 class CommSet;
40 class EdgeBlock;
41 class EdgeSet;
42 class ElementBlock;
43 class ElementSet;
44 class FaceBlock;
45 class FaceSet;
46 class Field;
47 class NodeBlock;
48 class NodeSet;
49 class SideBlock;
50 class SideSet;
51 class StructuredBlock;
52} // namespace Ioss
53// Needed for node_global_to_local inline function.
54
55namespace Ioss {
56
57 class CoordinateFrame;
58 enum class MeshType;
59
60 using AssemblyContainer = std::vector<Ioss::Assembly *>;
61 using BlobContainer = std::vector<Ioss::Blob *>;
62
63 using NodeBlockContainer = std::vector<NodeBlock *>;
64 using EdgeBlockContainer = std::vector<EdgeBlock *>;
65 using FaceBlockContainer = std::vector<FaceBlock *>;
66 using ElementBlockContainer = std::vector<ElementBlock *>;
67
68 using NodeSetContainer = std::vector<NodeSet *>;
69 using EdgeSetContainer = std::vector<EdgeSet *>;
70 using FaceSetContainer = std::vector<FaceSet *>;
71 using ElementSetContainer = std::vector<ElementSet *>;
72
73 using SideSetContainer = std::vector<SideSet *>;
74 using StructuredBlockContainer = std::vector<StructuredBlock *>;
75 using CommSetContainer = std::vector<CommSet *>;
76 using StateTimeContainer = std::vector<double>;
77
78 using CoordinateFrameContainer = std::vector<CoordinateFrame>;
79
80 using AliasMap = std::map<std::string, std::string, std::less<>>;
81
82 /** \brief A grouping entity that contains other grouping entities.
83 *
84 * Maintains a list of NodeBlocks, ElementBlocks, NodeLists, CommLists and Surfaces.
85 * [Similar to the "Composite Pattern" in Design Patterns] All interface to
86 * GroupingEntities is through the Region class; clients of the IO subsystem have no direct
87 * access to the underlying GroupingEntities (other than the Region).
88 */
89 class IOSS_EXPORT Region : public GroupingEntity
90 {
91 public:
92 explicit Region(DatabaseIO *iodatabase = nullptr, const std::string &my_name = "");
93
94 ~Region() override;
95
96 IOSS_NODISCARD std::string type_string() const override { return "Region"; }
97 IOSS_NODISCARD std::string short_type_string() const override { return "region"; }
98 IOSS_NODISCARD std::string contains_string() const override { return "Entities"; }
99 IOSS_NODISCARD EntityType type() const override { return REGION; }
100
101 IOSS_NODISCARD MeshType mesh_type() const;
102 IOSS_NODISCARD std::string mesh_type_string() const;
103 IOSS_NODISCARD bool node_major() const;
104
105 void output_summary(std::ostream &strm, bool do_transient = true) const;
106
107 IOSS_NODISCARD bool supports_field_type(Ioss::EntityType fld_type) const;
108
109 // Helper function...
110 IOSS_NODISCARD int64_t node_global_to_local(int64_t global, bool must_exist = true) const;
111
112 bool begin_mode(State new_state);
113 bool end_mode(State current_state);
114
115 // Add a new state at this time, return state number
116 virtual int add_state(double time)
117 {
118 IOSS_FUNC_ENTER(m_);
119 return add_state_nl(time);
120 }
121 virtual int add_state_nl(double time);
122
123 // Get time corresponding to specified state
124
125 IOSS_NODISCARD virtual double get_state_time(int state = -1) const;
126 IOSS_NODISCARD int get_current_state() const;
127 double begin_state(int state);
128 double end_state(int state);
129
130 /** \brief Determine whether the metadata defining the model (nontransient,
131 * geometry, and toploloty) has been set.
132 *
133 * \returns True if the metadata defining the model has been set.
134 */
135 IOSS_NODISCARD bool model_defined() const { return modelDefined; }
136
137 /** \brief Determine whether the metadata related to the transient
138 * data has been set.
139 *
140 * \returns True if the metadata related to the transient data has been set.
141 */
142 IOSS_NODISCARD bool transient_defined() const { return transientDefined; }
143
144 /** \brief Remove all fields of the specified `role` from all entities in the region
145 */
146 void erase_fields(Field::RoleType role);
147
148 // Return a pair consisting of the step (1-based) corresponding to
149 // the maximum time on the database and the corresponding maximum
150 // time value. Note that this may not necessarily be the last step
151 // on the database if cycle and overlay are being used.
152 IOSS_NODISCARD std::pair<int, double> get_max_time() const;
153
154 // Return a pair consisting of the step (1-based) corresponding to
155 // the minimum time on the database and the corresponding minimum
156 // time value. Note that this may not necessarily be the first step
157 // on the database if cycle and overlay are being used.
158 IOSS_NODISCARD std::pair<int, double> get_min_time() const;
159
160 // Functions for an output region...
161 bool add(NodeBlock *node_block);
162 bool add(EdgeBlock *edge_block);
163 bool add(FaceBlock *face_block);
164 bool add(ElementBlock *element_block);
165 bool add(SideSet *sideset);
166 bool add(NodeSet *nodeset);
167 bool add(EdgeSet *edgeset);
168 bool add(FaceSet *faceset);
169 bool add(ElementSet *elementset);
170 bool add(CommSet *commset);
171 bool add(StructuredBlock *structured_block);
172 bool add(Assembly *assembly);
173 bool add(Blob *blob);
174 bool add(const CoordinateFrame &frame);
175
176 // Special purpose...
177 bool remove(Assembly *removal);
178
179 IOSS_NODISCARD const NodeBlockContainer &get_node_blocks() const;
180 IOSS_NODISCARD const EdgeBlockContainer &get_edge_blocks() const;
181 IOSS_NODISCARD const FaceBlockContainer &get_face_blocks() const;
182 IOSS_NODISCARD const ElementBlockContainer &get_element_blocks() const;
183 IOSS_NODISCARD const SideSetContainer &get_sidesets() const;
184 IOSS_NODISCARD const NodeSetContainer &get_nodesets() const;
185 IOSS_NODISCARD const EdgeSetContainer &get_edgesets() const;
186 IOSS_NODISCARD const FaceSetContainer &get_facesets() const;
187 IOSS_NODISCARD const ElementSetContainer &get_elementsets() const;
188 IOSS_NODISCARD const CommSetContainer &get_commsets() const;
189 IOSS_NODISCARD const StructuredBlockContainer &get_structured_blocks() const;
190 IOSS_NODISCARD const AssemblyContainer &get_assemblies() const;
191 IOSS_NODISCARD const BlobContainer &get_blobs() const;
192 IOSS_NODISCARD const CoordinateFrameContainer &get_coordinate_frames() const;
193
194 // Retrieve the Grouping Entity with the specified name.
195 // Returns nullptr if the entity does not exist
196 IOSS_NODISCARD GroupingEntity *get_entity(const std::string &my_name, EntityType io_type) const;
197 IOSS_NODISCARD GroupingEntity *get_entity(const std::string &my_name) const;
198 IOSS_NODISCARD NodeBlock *get_node_block(const std::string &my_name) const;
199 IOSS_NODISCARD EdgeBlock *get_edge_block(const std::string &my_name) const;
200 IOSS_NODISCARD FaceBlock *get_face_block(const std::string &my_name) const;
201 IOSS_NODISCARD ElementBlock *get_element_block(const std::string &my_name) const;
202 IOSS_NODISCARD SideSet *get_sideset(const std::string &my_name) const;
203 IOSS_NODISCARD SideBlock *get_sideblock(const std::string &my_name) const;
204 IOSS_NODISCARD NodeSet *get_nodeset(const std::string &my_name) const;
205 IOSS_NODISCARD EdgeSet *get_edgeset(const std::string &my_name) const;
206 IOSS_NODISCARD FaceSet *get_faceset(const std::string &my_name) const;
207 IOSS_NODISCARD ElementSet *get_elementset(const std::string &my_name) const;
208 IOSS_NODISCARD CommSet *get_commset(const std::string &my_name) const;
209 IOSS_NODISCARD StructuredBlock *get_structured_block(const std::string &my_name) const;
210 IOSS_NODISCARD Assembly *get_assembly(const std::string &my_name) const;
211 IOSS_NODISCARD Blob *get_blob(const std::string &my_name) const;
212
213 // Not guaranteed to be efficient...
214 // Note that not all GroupingEntity's are guaranteed to have an 'id'...
215 IOSS_NODISCARD GroupingEntity *get_entity(int64_t id, EntityType io_type) const;
216
217 IOSS_NODISCARD const CoordinateFrame &get_coordinate_frame(int64_t id) const;
218
219 // Add the name 'alias' as an alias for the database entity of
220 // type 'type' with the name 'db_name'. Returns true if alias
221 // added; false if problems adding alias.
222 bool add_alias(const std::string &db_name, const std::string &alias, EntityType type);
223 bool add_alias(const std::string &db_name, const std::string &alias);
224 bool add_alias(const GroupingEntity *ge);
225 IOSS_NODISCARD std::string get_alias(const std::string &alias, EntityType type) const;
226 IOSS_NODISCARD std::string get_alias_nl(const std::string &alias,
227 EntityType type) const; // Not locked by mutex
228
229 IOSS_NODISCARD const AliasMap &get_alias_map(EntityType entity_type) const;
230
231 /// Get a map containing all aliases defined for the entity with basename 'my_name'
232 int get_aliases(const std::string &my_name, EntityType type,
233 std::vector<std::string> &aliases) const;
234
235 // This routine transfers all relevant aliases from the 'this'
236 // region and applies them to the 'to' file.
237 void transfer_mesh_aliases(Region *to) const;
238
239 // Ensure that the 'this' region has the same ids and names as the 'from' region.
240 void synchronize_id_and_name(const Region *from, bool sync_attribute_field_names = false);
241
242 // Returns true if the passed in name refers to a known Entity
243 // defined on this region. If true, then 'type' (if non-nullptr) is
244 // filled in with the type of the entity; if false, then type (if
245 // non-nullptr) is set to 'INVALID' This function is defined to
246 // consolidate several distinct implementations of this code in
247 // client code. Because of this, the 'type' used in the client
248 // code is repeated here instead of something more generic.
249 IOSS_NODISCARD bool is_valid_io_entity(const std::string &my_name, unsigned int io_type,
250 std::string *my_type = nullptr) const;
251
252 void check_for_duplicate_names(const Ioss::GroupingEntity *entity) const;
253
254 // Retrieve the element block that contains the specified element
255 // The 'local_id' is the local database id (1-based), not the global id.
256 // returns nullptr if no element block contains this element (local_id <= 0
257 // or greater than number of elements in database)
258 IOSS_NODISCARD ElementBlock *get_element_block(size_t local_id) const;
259
260 // Retrieve the structured block that contains the specified node
261 // The 'global_offset' is the global offset (0-based)
262 // returns nullptr if no structured block contains this node (local_id <= 0
263 // or greater than number of cell-nodes in database)
264 IOSS_NODISCARD StructuredBlock *get_structured_block(size_t global_offset) const;
265
266 // Handle implicit properties -- These are calculated from data stored
267 // in the grouping entity instead of having an explicit value assigned.
268 // An example would be 'element_block_count' for a region.
269 IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const override;
270
271 IOSS_NODISCARD const std::vector<std::string> &get_information_records() const;
272 void add_information_records(const std::vector<std::string> &info);
273 void add_information_record(const std::string &info);
274
275 IOSS_NODISCARD const std::vector<std::string> &get_qa_records() const;
276 void add_qa_record(const std::string &code, const std::string &code_qa,
277 const std::string &date = "", const std::string &time = "");
278
279 template <typename T, typename U>
280 std::vector<size_t> get_entity_field_data(const std::string &field_name,
281 const std::vector<T *> &entity_container,
282 std::vector<U> &field_data) const;
283
284 protected:
285 int64_t internal_get_field_data(const Field &field, void *data,
286 size_t data_size = 0) const override;
287
288 int64_t internal_put_field_data(const Field &field, void *data,
289 size_t data_size = 0) const override;
290
291 int64_t internal_get_zc_field_data(const Field &field, void **data,
292 size_t *data_size) const override;
293
294 private:
295 template <typename T>
296 std::vector<size_t> internal_get_entity_field_data(const std::string &field_name,
297 const std::vector<T *> &entity_container,
298 void *data, size_t data_size = 0) const;
299
300 // Add the name 'alias' as an alias for the database entity with the
301 // name 'db_name'. Returns true if alias added; false if problems
302 // adding alias. Not protected by mutex -- call internally only.
303 bool add_alias_nl(const std::string &db_name, const std::string &alias, EntityType type);
304 bool add_alias_nl(const GroupingEntity *ge);
305
306 bool begin_mode_nl(State new_state);
307 bool end_mode_nl(State current_state);
308
309 void delete_database() override;
310
311 mutable std::map<EntityType, AliasMap> aliases_; ///< Stores alias mappings
312
313 // Containers for all grouping entities
318
323
331
332 int currentState{-1};
333 mutable int stateCount{0};
334 bool modelDefined{false};
335 bool transientDefined{false};
336 };
337} // namespace Ioss
338
339/** \brief Get the index (1-based) of the currently-active state.
340 *
341 * \returns The index.
342 */
343inline int Ioss::Region::get_current_state() const { return currentState; }
344
346{
347 return static_cast<unsigned int>((get_database()->entity_field_support() & fld_type) != 0U) != 0U;
348}
349
350inline int64_t Ioss::Region::node_global_to_local(int64_t global, bool must_exist) const
351{
352 return get_database()->node_global_to_local(global, must_exist);
353}
354
355/** \brief Get all information records (informative strings) for the region's database.
356 *
357 * \returns The informative strings.
358 */
359inline const std::vector<std::string> &Ioss::Region::get_information_records() const
360{
361 IOSS_FUNC_ENTER(m_);
362 return get_database()->get_information_records();
363}
364
365/** \brief Add multiple information records (informative strings) to the region's database.
366 *
367 * \param[in] info The strings to add.
368 */
369inline void Ioss::Region::add_information_records(const std::vector<std::string> &info)
370{
371 IOSS_FUNC_ENTER(m_);
372 return get_database()->add_information_records(info);
373}
374
375/** \brief Add an information record (an informative string) to the region's database.
376 *
377 * \param[in] info The string to add.
378 */
379inline void Ioss::Region::add_information_record(const std::string &info)
380{
381 IOSS_FUNC_ENTER(m_);
382 return get_database()->add_information_record(info);
383}
384
385/** \brief Add a QA record, which consists of 4 strings, to the region's database
386 *
387 * The 4 function parameters correspond to the 4 QA record strings.
388 *
389 * \param[in] code A descriptive code name, such as the application that modified the database.
390 * \param[in] code_qa A descriptive string, such as the version of the application that modified
391 * the database.
392 * \param[in] date A relevant date, such as the date the database was modified.
393 * \param[in] time A relevant time, such as the time the database was modified.
394 */
395inline void Ioss::Region::add_qa_record(const std::string &code, const std::string &code_qa,
396 const std::string &date, const std::string &time)
397{
398 IOSS_FUNC_ENTER(m_);
399 return get_database()->add_qa_record(code, code_qa, date, time);
400}
401
402/** \brief Get all QA records, each of which consists of 4 strings, from the region's database.
403 *
404 * The 4 strings that make up a database QA record are:
405 *
406 * 1. A descriptive code name, such as the application that modified the database.
407 *
408 * 2. A descriptive string, such as the version of the application that modified the database.
409 *
410 * 3. A relevant date, such as the date the database was modified.
411 *
412 * 4. A relevant time, such as the time the database was modified.
413 *
414 * \returns All QA records in a single vector. Every 4 consecutive elements of the
415 * vector make up a single QA record.
416 */
417inline const std::vector<std::string> &Ioss::Region::get_qa_records() const
418{
419 IOSS_FUNC_ENTER(m_);
420 return get_database()->get_qa_records();
421}
422
423namespace Ioss {
424
425 template <typename T>
426 bool verify_field_exists_in_entity_group(const std::string &field_name,
427 const std::vector<T *> &entity_container)
428 {
429 bool found = false;
431
432 for (const T *entity : entity_container) {
433 if (entity->field_exists(field_name)) {
434 Ioss::Field field = entity->get_field(field_name);
435
436 if (found && field.get_role() != role) {
437 std::ostringstream errmsg;
438#if defined BUILT_IN_SIERRA
439 errmsg << "ERROR: Field " << field.get_name() << " with role " << field.role_string()
440 << " on entity " << entity->name() << " does not match previously found role "
441 << Ioss::Field::role_string(role) << ".\n",
442#else
443 fmt::print(errmsg,
444 "ERROR: Field {} with role {} on entity {} does not match previously found "
445 "role {}.\n",
446 field.get_name(), field.role_string(), entity->name(),
448#endif
449 IOSS_ERROR(errmsg);
450 }
451
452 found = true;
453 role = field.get_role();
454 }
455 }
456
457 return found;
458 }
459
460 namespace impl {
461 template <typename T>
462 size_t get_field_data_count_for_entities(const std::string &field_name,
463 const std::vector<T *> &entity_container)
464 {
465 size_t count = 0;
466
467 for (const T *entity : entity_container) {
468 if (entity->field_exists(field_name)) {
469 Ioss::Field field = entity->get_field(field_name);
470
471 count += entity->entity_count() * field.raw_storage()->component_count();
472 }
473 }
474
475 return count;
476 }
477 } // namespace impl
478} // namespace Ioss
479
480template <typename T, typename U>
481std::vector<size_t> Ioss::Region::get_entity_field_data(const std::string &field_name,
482 const std::vector<T *> &entity_container,
483 std::vector<U> &field_data) const
484{
485 bool field_exists = verify_field_exists_in_entity_group(field_name, entity_container);
486
487 if (!field_exists) {
488 return std::vector<size_t>(entity_container.size() + 1, 0);
489 }
490
491 size_t field_count = impl::get_field_data_count_for_entities(field_name, entity_container);
492
493 field_data.resize(field_count);
494 size_t data_size = field_count * sizeof(U);
495
496 std::vector<size_t> offsets =
497 internal_get_entity_field_data(field_name, entity_container, Data(field_data), data_size);
498
499 assert(offsets.size() == (entity_container.size() + 1));
500 assert(offsets[entity_container.size()] == field_count);
501
502 return offsets;
503}
504
505template <typename T>
506std::vector<size_t>
508 const std::vector<T *> &entity_container, void *data,
509 size_t data_size) const
510{
511 return get_database()->get_entity_field_data(field_name, entity_container, data, data_size);
512}
#define IOSS_FUNC_ENTER(m)
Definition Ioss_CodeTypes.h:104
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:54
IOSS_NODISCARD constexpr T * Data(std::vector< T > &vec)
Definition Ioss_Utils.h:56
void IOSS_ERROR(const std::ostringstream &errmsg)
Definition Ioss_Utils.h:38
A homogeneous collection of other GroupingEntities.
Definition Ioss_Assembly.h:31
A homogeneous collection of other GroupingEntities.
Definition Ioss_Blob.h:31
Definition Ioss_CommSet.h:27
Definition Ioss_CoordinateFrame.h:19
An input or output Database.
Definition Ioss_DatabaseIO.h:63
A collection of element edges with the same topology.
Definition Ioss_EdgeBlock.h:29
A collection of element edges.
Definition Ioss_EdgeSet.h:30
A collection of elements having the same topology.
Definition Ioss_ElementBlock.h:29
A collection of elements.
Definition Ioss_ElementSet.h:30
A collection of element faces with the same topology.
Definition Ioss_FaceBlock.h:29
A collection of element faces.
Definition Ioss_FaceSet.h:30
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
IOSS_NODISCARD const VariableType * raw_storage() const
Definition Ioss_Field.h:161
RoleType
Definition Ioss_Field.h:69
@ INTERNAL
Definition Ioss_Field.h:70
IOSS_NODISCARD const std::string & get_name() const
Definition Ioss_Field.h:124
IOSS_NODISCARD std::string role_string() const
Definition Ioss_Field.C:362
IOSS_NODISCARD RoleType get_role() const
Get the role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) of the data in the field.
Definition Ioss_Field.h:177
Base class for all 'grouping' entities. The following derived classes are typical:
Definition Ioss_GroupingEntity.h:67
A collection of all nodes in the region.
Definition Ioss_NodeBlock.h:33
A collection of nodes.
Definition Ioss_NodeSet.h:29
A named value that has a known type.
Definition Ioss_Property.h:27
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:90
BlobContainer blobs
Definition Ioss_Region.h:329
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:395
IOSS_NODISCARD bool model_defined() const
Determine whether the metadata defining the model (nontransient, geometry, and toploloty) has been se...
Definition Ioss_Region.h:135
IOSS_NODISCARD std::string type_string() const override
Get the name of the particular type of entity.
Definition Ioss_Region.h:96
IOSS_NODISCARD EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition Ioss_Region.h:99
StructuredBlockContainer structuredBlocks
Definition Ioss_Region.h:327
IOSS_NODISCARD bool transient_defined() const
Determine whether the metadata related to the transient data has been set.
Definition Ioss_Region.h:142
IOSS_NODISCARD 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:417
AssemblyContainer assemblies
Definition Ioss_Region.h:328
IOSS_NODISCARD std::string contains_string() const override
What does this entity contain.
Definition Ioss_Region.h:98
IOSS_NODISCARD int get_current_state() const
Get the index (1-based) of the currently-active state.
Definition Ioss_Region.h:343
int currentState
Definition Ioss_Region.h:332
IOSS_NODISCARD int64_t node_global_to_local(int64_t global, bool must_exist=true) const
Definition Ioss_Region.h:350
ElementBlockContainer elementBlocks
Definition Ioss_Region.h:317
EdgeBlockContainer edgeBlocks
Definition Ioss_Region.h:315
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
Definition Ioss_Region.h:481
EdgeSetContainer edgeSets
Definition Ioss_Region.h:320
FaceBlockContainer faceBlocks
Definition Ioss_Region.h:316
IOSS_NODISCARD const std::vector< std::string > & get_information_records() const
Get all information records (informative strings) for the region's database.
Definition Ioss_Region.h:359
NodeBlockContainer nodeBlocks
Definition Ioss_Region.h:314
CommSetContainer commSets
Definition Ioss_Region.h:325
ElementSetContainer elementSets
Definition Ioss_Region.h:322
StateTimeContainer stateTimes
Definition Ioss_Region.h:330
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
Definition Ioss_Region.h:507
IOSS_NODISCARD bool supports_field_type(Ioss::EntityType fld_type) const
Definition Ioss_Region.h:345
std::map< EntityType, AliasMap > aliases_
Stores alias mappings.
Definition Ioss_Region.h:311
virtual int add_state(double time)
Definition Ioss_Region.h:116
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:369
void add_information_record(const std::string &info)
Add an information record (an informative string) to the region's database.
Definition Ioss_Region.h:379
NodeSetContainer nodeSets
Definition Ioss_Region.h:319
CoordinateFrameContainer coordinateFrames
Definition Ioss_Region.h:326
IOSS_NODISCARD std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition Ioss_Region.h:97
FaceSetContainer faceSets
Definition Ioss_Region.h:321
SideSetContainer sideSets
Definition Ioss_Region.h:324
A collection of element sides having the same topology.
Definition Ioss_SideBlock.h:37
A collection of element sides.
Definition Ioss_SideSet.h:29
A structured zone – i,j,k.
Definition Ioss_StructuredBlock.h:104
IOSS_NODISCARD int component_count() const
Definition Ioss_VariableType.h:112
size_t get_field_data_count_for_entities(const std::string &field_name, const std::vector< T * > &entity_container)
Definition Ioss_Region.h:462
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
std::vector< CommSet * > CommSetContainer
Definition Ioss_Region.h:75
State
Access states for a database.
Definition Ioss_State.h:15
std::vector< FaceSet * > FaceSetContainer
Definition Ioss_Region.h:70
std::vector< ElementBlock * > ElementBlockContainer
Definition Ioss_Region.h:66
std::vector< FaceBlock * > FaceBlockContainer
Definition Ioss_Region.h:65
std::map< std::string, std::string, std::less<> > AliasMap
Definition Ioss_Region.h:80
std::vector< EdgeBlock * > EdgeBlockContainer
Definition Ioss_Region.h:64
bool verify_field_exists_in_entity_group(const std::string &field_name, const std::vector< T * > &entity_container)
Definition Ioss_Region.h:426
std::vector< ElementSet * > ElementSetContainer
Definition Ioss_Region.h:71
std::vector< Ioss::Blob * > BlobContainer
Definition Ioss_Region.h:61
std::vector< NodeSet * > NodeSetContainer
Definition Ioss_Region.h:68
std::vector< double > StateTimeContainer
Definition Ioss_Region.h:76
std::vector< SideSet * > SideSetContainer
Definition Ioss_Region.h:73
std::vector< EdgeSet * > EdgeSetContainer
Definition Ioss_Region.h:69
MeshType
The mesh type – structured, unstructured, hybrid (future), or unknown.
Definition Ioss_MeshType.h:12
std::vector< CoordinateFrame > CoordinateFrameContainer
Definition Ioex_Utils.h:46
std::vector< Ioss::Assembly * > AssemblyContainer
Definition Ioss_Region.h:60
std::vector< NodeBlock * > NodeBlockContainer
Definition Ioss_Region.h:63
std::vector< StructuredBlock * > StructuredBlockContainer
Definition Ioss_Region.h:74
EntityType
The particular type of GroupingEntity.
Definition Ioss_EntityType.h:12
@ REGION
Definition Ioss_EntityType.h:25