28#include "ioex_export.h"
47 class StructuredBlock;
49 class ElementTopology;
52 class PropertyManager;
58 struct CommunicationMetaData;
99 bool supports_group()
const;
115 return open_group_nl(group_name);
131 return create_subgroup_nl(group_name);
140 return open_root_group_nl();
147 int num_child_group()
const;
158 return open_child_group_nl(child_index);
167 Ioss::NameList groups_describe(
bool return_full_names =
false)
const;
175 IOSS_NODISCARD bool ok_nl(
bool write_message =
false, std::string *error_message =
nullptr,
176 int *bad_count =
nullptr)
const override;
178 void release_memory_nl()
override;
180 bool supports_internal_change_set_nl()
override;
181 bool open_internal_change_set_nl(
const std::string &set_name)
override;
182 bool open_internal_change_set_nl(
int index)
override;
183 bool create_internal_change_set_nl(
const std::string &set_name)
override;
184 int num_internal_change_set_nl()
override;
185 Ioss::NameList internal_change_set_describe_nl(
bool return_full_names)
override;
187 bool open_root_group_nl()
const;
188 bool open_group_nl(
const std::string &group_name)
const;
189 bool open_child_group_nl(
int index)
const;
190 bool create_subgroup_nl(
const std::string &group_name);
195 void open_state_file(
int state);
197 bool begin_state_nl(
int state,
double time)
override;
198 bool end_state_nl(
int state,
double time)
override;
207 maximumNameLength = requested_symbol_size;
212 Ioss::Map &entity_map,
void *ids,
size_t num_to_get,
213 size_t offset)
const;
222 size_t data_size)
const override = 0;
224 size_t data_size)
const override = 0;
226 size_t data_size)
const override = 0;
228 size_t data_size)
const override = 0;
230 size_t data_size)
const override = 0;
232 void *data,
size_t data_size)
const override = 0;
234 size_t data_size)
const override = 0;
236 size_t data_size)
const override = 0;
238 size_t data_size)
const override = 0;
240 size_t data_size)
const override = 0;
242 size_t data_size)
const override = 0;
244 size_t data_size)
const override = 0;
246 size_t data_size)
const override = 0;
248 size_t data_size)
const override = 0;
250 size_t data_size)
const override = 0;
253 size_t data_size)
const override = 0;
255 size_t data_size)
const override = 0;
257 size_t data_size)
const override = 0;
259 size_t data_size)
const override = 0;
261 size_t data_size)
const override = 0;
263 void *data,
size_t data_size)
const override = 0;
265 size_t data_size)
const override = 0;
267 size_t data_size)
const override = 0;
269 size_t data_size)
const override = 0;
271 size_t data_size)
const override = 0;
273 size_t data_size)
const override = 0;
275 size_t data_size)
const override = 0;
277 size_t data_size)
const override = 0;
279 size_t data_size)
const override = 0;
281 size_t data_size)
const override = 0;
296 virtual int free_file_pointer()
const;
298 virtual bool open_input_file(
bool write_message, std::string *error_msg,
int *bad_count,
299 bool abort_if_error)
const = 0;
301 bool overwrite,
bool abort_if_error)
const = 0;
302 void finalize_file_open()
const;
305 get_current_state()
const;
309 template <
typename T>
310 void internal_gather_results_metadata(ex_entity_type type, std::vector<T *> entities);
312 void generate_sideset_truth_table();
314 void output_results_names(ex_entity_type type,
VariableNameMap &variables,
315 bool reduction)
const;
319 void get_nodeblocks();
320 void get_assemblies();
323 void update_block_omissions_from_assemblies();
326 const std::string &type);
329 void output_other_metadata();
330 void output_field_metadata();
333 int64_t position, int64_t block_count,
343 void add_region_fields();
345 void *variables)
const;
348 void *variables)
const;
349 void write_reduction_fields()
const;
350 void read_reduction_fields()
const;
356 void flush_database_nl()
const override;
357 void finalize_write(
int state,
double sim_time);
359 mutable int m_exodusFilePtr{-1};
361 mutable int m_exodusBasePtr{-1};
367 mutable int exodusMode{EX_CLOBBER};
368 mutable int dbRealWordSize{8};
370 mutable int maximumNameLength{32};
371 int spatialDimension{0};
373 int64_t edgeCount{0};
374 int64_t faceCount{0};
383 int64_t commsetNodeCount{0};
384 int64_t commsetElemCount{0};
408 time_t timeLastFlush{0};
409 int flushInterval{-1};
410 int m_timestepCount{0};
412 mutable bool fileExists{
false};
413 mutable bool minimizeOpenFiles{
false};
415 mutable bool blockAdjacenciesCalculated{
false};
417 mutable bool nodeConnectivityStatusCalculated{
#define IOSS_FUNC_ENTER(m)
Definition Ioss_CodeTypes.h:105
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
int Ioss_MPI_Comm
Definition Ioss_CodeTypes.h:64
Definition Ioex_BaseDatabaseIO.h:78
int64_t put_field_internal(const Ioss::ElementBlock *eb, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t put_field_internal(const Ioss::SideBlock *fb, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::Assembly *as, const Ioss::Field &field, void *data, size_t data_size) const override=0
IOSS_NODISCARD std::string get_internal_change_set_name() const override
Definition Ioex_BaseDatabaseIO.h:93
virtual bool handle_output_file(bool write_message, std::string *error_msg, int *bad_count, bool overwrite, bool abort_if_error) const =0
std::map< ex_entity_type, VariableNameMap > m_variables
Definition Ioex_BaseDatabaseIO.h:395
Ioss::Int64Vector elemCmapElemCnts
Definition Ioex_BaseDatabaseIO.h:382
int64_t put_field_internal(const Ioss::EdgeBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
bool create_subgroup(const std::string &group_name)
If a database type supports groups, create the specified group as a child of the current group.
Definition Ioex_BaseDatabaseIO.h:128
int64_t get_field_internal(const Ioss::FaceSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
Ioss::Int64Vector elemCmapIds
Definition Ioex_BaseDatabaseIO.h:381
int64_t put_field_internal(const Ioss::Assembly *as, const Ioss::Field &field, void *data, size_t data_size) const override=0
virtual void write_meta_data(Ioss::IfDatabaseExistsBehavior behavior)=0
int64_t put_field_internal(const Ioss::SideSet *fs, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::SideBlock *fb, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::Blob *blob, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::EdgeBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t put_field_internal(const Ioss::FaceSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::ElementBlock *eb, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t put_field_internal(const Ioss::StructuredBlock *sb, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::vector< unsigned char > nodeConnectivityStatus
Definition Ioex_BaseDatabaseIO.h:400
Ioss::Int64Vector nodeCmapIds
Definition Ioex_BaseDatabaseIO.h:379
int64_t put_field_internal(const Ioss::FaceBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
bool open_group(const std::string &group_name)
If a database type supports groups and if the database contains groups, open the specified group.
Definition Ioex_BaseDatabaseIO.h:112
int64_t get_field_internal(const Ioss::StructuredBlock *sb, const Ioss::Field &field, void *data, size_t data_size) const override=0
void set_maximum_symbol_length(int requested_symbol_size) override
Definition Ioex_BaseDatabaseIO.h:204
int64_t put_field_internal(const Ioss::EdgeSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t put_field_internal(const Ioss::Blob *blob, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::CommSet *cs, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::NodeSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::string m_groupName
Definition Ioex_BaseDatabaseIO.h:363
IOSS_NODISCARD int maximum_symbol_length() const override
Get the length of the longest name in the database file.
Definition Ioex_BaseDatabaseIO.h:200
Ioss::Int64Vector nodeCmapNodeCnts
Definition Ioex_BaseDatabaseIO.h:380
virtual bool open_input_file(bool write_message, std::string *error_msg, int *bad_count, bool abort_if_error) const =0
int64_t get_field_internal(const Ioss::NodeBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::map< ex_entity_type, std::map< int64_t, ValueContainer > > m_reductionValues
Definition Ioex_BaseDatabaseIO.h:398
IOSS_NODISCARD std::string get_format() const override
Definition Ioex_BaseDatabaseIO.h:85
int64_t put_field_internal(const Ioss::ElementSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::EdgeSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t get_field_internal(const Ioss::SideSet *fs, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::map< ex_entity_type, Ioss::IntVector > m_truthTable
Definition Ioex_BaseDatabaseIO.h:394
void closeDatabase_nl() const override
Definition Ioex_BaseDatabaseIO.h:288
int64_t get_field_internal(const Ioss::FaceBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
void openDatabase_nl() const override
Definition Ioex_BaseDatabaseIO.h:286
bool open_root_group()
If a database type supports groups, and if the database contains groups, open the root group for the ...
Definition Ioex_BaseDatabaseIO.h:137
bool open_child_group(int child_index)
If a database type supports groups, open the child group of the current group at the specified [zero-...
Definition Ioex_BaseDatabaseIO.h:155
int64_t put_field_internal(const Ioss::NodeBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
EntityIdSet ids_
Definition Ioex_BaseDatabaseIO.h:365
std::map< std::string, Ioss::Int64Vector > activeNodeSetNodesIndex
Definition Ioex_BaseDatabaseIO.h:406
int64_t get_field_internal(const Ioss::ElementSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::map< ex_entity_type, VariableNameMap > m_reductionVariables
Definition Ioex_BaseDatabaseIO.h:396
int64_t put_field_internal(const Ioss::CommSet *cs, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t put_field_internal(const Ioss::NodeSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::map< ex_entity_type, int > m_groupCount
Definition Ioex_BaseDatabaseIO.h:376
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
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
Base class for all 'block'-type grouping entities, which means all members of the block are similar o...
Definition Ioss_EntityBlock.h:38
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
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 collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
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:91
A namespace for the exodus database format.
Definition Ioex_BaseDatabaseIO.C:209
VariableNameMap::value_type VNMValuePair
Definition Ioex_BaseDatabaseIO.h:62
std::map< std::string, int, std::less<> > VariableNameMap
Definition Ioex_BaseDatabaseIO.h:61
std::set< std::pair< int64_t, int64_t > > EntityIdSet
Definition Ioex_BaseDatabaseIO.h:75
std::vector< double > ValueContainer
Definition Ioex_BaseDatabaseIO.h:65
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
State
Access states for a database.
Definition Ioss_State.h:15
std::vector< int64_t > Int64Vector
Definition Ioss_CodeTypes.h:22
Ioss::NameList NameList
Definition Ioss_ChangeSetFactory.h:25
DataSize
The number of bytes used to store an integer type.
Definition Ioss_DataSize.h:13
DatabaseUsage
Specifies how an Ioss::DatabaseIO object will be used.
Definition Ioss_DBUsage.h:13
std::vector< int > IntVector
Definition Ioss_CodeTypes.h:21
IfDatabaseExistsBehavior
Definition Ioss_DBUsage.h:32