28#include "ioexnl_export.h"
47 class StructuredBlock;
49 class ElementTopology;
52 class PropertyManager;
58 struct CommunicationMetaData;
62 using VNMValuePair = VariableNameMap::value_type;
97 IOSS_NODISCARD bool ok_nl(
bool write_message =
false, std::string *error_message =
nullptr,
98 int *bad_count =
nullptr)
const override;
105 bool begin_state_nl(
int state,
double time)
override;
106 bool end_state_nl(
int state,
double time)
override;
116 maximumNameLength = requested_symbol_size;
121 Ioss::Map &entity_map,
void *ids,
size_t num_to_get,
122 size_t offset)
const;
147 size_t data_size)
const override = 0;
149 size_t data_size)
const override = 0;
151 size_t data_size)
const override = 0;
153 size_t data_size)
const override = 0;
155 size_t data_size)
const override = 0;
157 void *data,
size_t data_size)
const override = 0;
159 size_t data_size)
const override = 0;
161 size_t data_size)
const override = 0;
163 size_t data_size)
const override = 0;
165 size_t data_size)
const override = 0;
167 size_t data_size)
const override = 0;
169 size_t data_size)
const override = 0;
171 size_t data_size)
const override = 0;
173 size_t data_size)
const override = 0;
175 size_t data_size)
const override = 0;
190 virtual int free_file_pointer()
const;
193 bool overwrite,
bool abort_if_error)
const = 0;
196 get_current_state()
const;
200 template <
typename T>
201 void internal_gather_results_metadata(ex_entity_type type, std::vector<T *> entities);
203 void generate_sideset_truth_table();
205 void output_results_names(ex_entity_type type,
VariableNameMap &variables,
206 bool reduction)
const;
217 const std::string &type);
220 void output_other_metadata();
223 int64_t position, int64_t block_count,
232 void *variables)
const;
235 void *variables)
const;
236 void write_reduction_fields()
const;
243 void flush_database_nl()
const override;
244 void finalize_write(
int state,
double sim_time);
246 mutable int m_exodusFilePtr{-1};
248 mutable int m_exodusBasePtr{-1};
254 mutable int exodusMode{EX_CLOBBER};
255 mutable int dbRealWordSize{8};
257 mutable int maximumNameLength{32};
258 int spatialDimension{0};
260 int64_t edgeCount{0};
261 int64_t faceCount{0};
270 int64_t commsetNodeCount{0};
271 int64_t commsetElemCount{0};
295 time_t timeLastFlush{0};
296 int flushInterval{-1};
298 mutable bool fileExists{
false};
299 mutable bool minimizeOpenFiles{
false};
301 mutable bool blockAdjacenciesCalculated{
false};
303 mutable bool nodeConnectivityStatusCalculated{
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
int Ioss_MPI_Comm
Definition Ioss_CodeTypes.h:64
#define IOSS_NOOP_GFI(type)
Definition Ioss_CodeTypes.h:114
Definition Ioexnl_BaseDatabaseIO.h:78
std::map< std::string, Ioss::Int64Vector > activeNodeSetNodesIndex
Definition Ioexnl_BaseDatabaseIO.h:293
void add_attribute_fields(Ioss::GroupingEntity *block, int attribute_count, const std::string &type)
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
IOSS_NODISCARD int maximum_symbol_length() const override
Get the length of the longest name in the database file.
Definition Ioexnl_BaseDatabaseIO.h:109
Ioss::Int64Vector elemCmapElemCnts
Definition Ioexnl_BaseDatabaseIO.h:269
int64_t put_field_internal(const Ioss::FaceBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
void open_state_file(int state)
std::map< ex_entity_type, int > m_groupCount
Definition Ioexnl_BaseDatabaseIO.h:263
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 put_field_internal(const Ioss::FaceSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::map< ex_entity_type, VariableNameMap > m_variables
Definition Ioexnl_BaseDatabaseIO.h:282
int64_t put_field_internal(const Ioss::StructuredBlock *sb, const Ioss::Field &field, void *data, size_t data_size) const override=0
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::NodeBlock *nb, 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
Ioss::Int64Vector elemCmapIds
Definition Ioexnl_BaseDatabaseIO.h:268
std::vector< unsigned char > nodeConnectivityStatus
Definition Ioexnl_BaseDatabaseIO.h:287
int64_t internal_add_results_fields(ex_entity_type type, Ioss::GroupingEntity *entity, int64_t position, int64_t block_count, Ioss::IntVector &truth_table, Ioexnl::VariableNameMap &variables)
virtual void write_meta_data(Ioss::IfDatabaseExistsBehavior behavior)=0
void set_maximum_symbol_length(int requested_symbol_size) override
Definition Ioexnl_BaseDatabaseIO.h:113
EntityIdSet ids_
Definition Ioexnl_BaseDatabaseIO.h:252
void read_reduction_fields() const
int64_t put_field_internal(const Ioss::ElementSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
virtual bool handle_output_file(bool write_message, std::string *error_msg, int *bad_count, bool overwrite, bool abort_if_error) const =0
int64_t add_results_fields(Ioss::GroupingEntity *entity, int64_t position=0)
std::map< ex_entity_type, VariableNameMap > m_reductionVariables
Definition Ioexnl_BaseDatabaseIO.h:283
void update_block_omissions_from_assemblies()
int64_t put_field_internal(const Ioss::Assembly *as, const Ioss::Field &field, void *data, size_t data_size) const override=0
Ioss::Int64Vector nodeCmapIds
Definition Ioexnl_BaseDatabaseIO.h:266
int64_t add_reduction_results_fields(Ioss::GroupingEntity *entity)
IOSS_NODISCARD std::string get_format() const override
Definition Ioexnl_BaseDatabaseIO.h:83
int64_t put_field_internal(const Ioss::EdgeBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
std::string m_groupName
Definition Ioexnl_BaseDatabaseIO.h:250
void add_mesh_reduction_fields(int64_t id, Ioss::GroupingEntity *entity)
void openDatabase_nl() const override
Definition Ioexnl_BaseDatabaseIO.h:180
void get_step_times_nl() override=0
std::map< ex_entity_type, Ioss::IntVector > m_truthTable
Definition Ioexnl_BaseDatabaseIO.h:281
void closeDatabase_nl() const override
Definition Ioexnl_BaseDatabaseIO.h:182
Ioss::Int64Vector nodeCmapNodeCnts
Definition Ioexnl_BaseDatabaseIO.h:267
std::map< ex_entity_type, std::map< int64_t, ValueContainer > > m_reductionValues
Definition Ioexnl_BaseDatabaseIO.h:285
int64_t put_field_internal(const Ioss::SideSet *fs, const Ioss::Field &field, void *data, size_t data_size) const override=0
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 Ioexnl_BaseDatabaseIO.C:93
std::set< std::pair< int64_t, int64_t > > EntityIdSet
Definition Ioexnl_BaseDatabaseIO.h:75
std::map< std::string, int, std::less<> > VariableNameMap
Definition Ioexnl_BaseDatabaseIO.h:61
std::vector< double > ValueContainer
Definition Ioexnl_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