IOSS 2.0

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ioex::DatabaseIO Class Referenceabstract

`#include <Ioex_DatabaseIO.h>`

## Public Member Functions
| DatabaseIO (Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, MPI_Comm communicator, const Ioss::PropertyManager &props)
| DatabaseIO (const DatabaseIO &from)=delete
DatabaseIO & | operator= (const DatabaseIO &from)=delete
| ~DatabaseIO () override
unsigned | entity_field_support () const override
virtual int | get_file_pointer () const =0
Public Member Functions inherited from Ioss::DatabaseIO
bool | ok (bool write_message=false, std::string *error_message=nullptr, int *bad_count=nullptr) const
| Check to see if database state is OK. More...
bool | using_parallel_io () const
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. More...
int64_t | element_global_to_local (int64_t global) const
virtual bool | node_major () const
void | release_memory ()
virtual void | finalize_database ()
std::string | get_filename () const
| Get the file name associated with the database. More...
const std::string & | decoded_filename () const
| Get a file-per-processor filename associated with the database. More...
bool | is_input () const
| Determine whether the database is an input database. More...
Ioss::DatabaseUsage | usage () const
| Get the Ioss::DatabaseUsage type of the database. More...
virtual bool | needs_shared_node_information () const
| Determine whether the database needs information about process ownership of nodes. More...
Ioss::IfDatabaseExistsBehavior | open_create_behavior () const
void | create_path (const std::string &filename) const
| This function is used to create the path to an output directory (or history, restart, etc.) More...
void | set_region (Region *region)
void | openDatabase () const
void | closeDatabase () const
void | flush_database () const
bool | open_group (const std::string &group_name)
| If a database type supports groups and if the database contains groups, open the specified group. More...
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. More...
bool | begin (Ioss::State state)
| Set the database to the given State. More...
bool | end (Ioss::State state)
| Return the database to STATE_CLOSED. More...
bool | begin_state (Region *region, int state, double time)
bool | end_state (Region *region, int state, double time)
void | read_meta_data ()
void | get_step_times ()
virtual bool | internal_edges_available () const
virtual bool | internal_faces_available () const
const std::vector< std::string > & | get_information_records () const
| Get all information records (informative strings) for the database. More...
void | add_information_records (const std::vector< std::string > &info)
| Add multiple information records (informative strings) to the database. More...
void | add_information_record (const std::string &info)
| Add an information record (an informative string) to the database. More...
const std::vector< std::string > & | get_qa_records () const
| Get all QA records, each of which consists of 4 strings, from the database. More...
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. More...
bool | get_logging () const
void | set_logging (bool on_off)
template<typename T >
int64_t | get_field (const T *reg, const Field &field, void *data, size_t data_size) const
template<typename T >
int64_t | put_field (const T *reg, const Field &field, void *data, size_t data_size) const
bool | is_parallel_consistent () const
void | set_parallel_consistency (bool on_off)
bool | get_use_generic_canonical_name () const
void | set_use_generic_canonical_name (bool yes_no)
bool | ignore_database_names () const
void | ignore_database_names (bool yes_no)
char | get_field_separator () const
bool | get_field_recognition () const
void | set_field_separator (char separator)
| Set the character used to separate a field suffix from the field basename when recognizing vector, tensor fields. More...
void | set_field_recognition (bool yes_no)
void | set_lower_case_variable_names (bool true_false) const
void | set_surface_split_type (Ioss::SurfaceSplitType split_type)
Ioss::SurfaceSplitType | get_surface_split_type () const
void | set_block_omissions (const std::vector< std::string > &omissions, const std::vector< std::string > &inclusions={})
void | get_block_adjacencies (const Ioss::ElementBlock *eb, std::vector< std::string > &block_adjacency) const
void | compute_block_membership (Ioss::SideBlock *efblock, std::vector< std::string > &block_membership) const
AxisAlignedBoundingBox | get_bounding_box (const Ioss::ElementBlock *eb) const
AxisAlignedBoundingBox | get_bounding_box (const Ioss::StructuredBlock *sb) const
int | int_byte_size_api () const
| Returns 4 or 8. More...
Region * | get_region () const
void | set_cycle_count (int count) const
void | set_overlay_count (int count) const
void | set_time_scale_factor (double factor)
const Ioss::ParallelUtils & | util () const
const Ioss::PropertyManager & | get_property_manager () const
int | parallel_rank () const
| Get the processor that this mesh database is on. More...
int | parallel_size () const
bool | is_parallel () const
template<>
void | create_group (EntityType type, const std::string &, const std::vector< std::string > &group_spec, const SideSet *)

## Protected Member Functions
bool | ok__ (bool write_message=false, std::string *error_message=nullptr, int *bad_count=nullptr) const override=0
bool | open_group__ (const std::string &group_name) override
bool | create_subgroup__ (const std::string &group_name) override
bool | begin__ (Ioss::State state) override
bool | end__ (Ioss::State state) override
bool | begin_state__ (Ioss::Region *region, int state, double time) override
bool | end_state__ (Ioss::Region *region, int state, double time) override
void | get_step_times__ () override=0
int | maximum_symbol_length () const override
| Get the length of the longest name in the database file. More...
void | set_maximum_symbol_length (int requested_symbol_size) override
size_t | handle_block_ids (const Ioss::EntityBlock *eb, ex_entity_type map_type, Ioss::Map &entity_map, void *ids, size_t num_to_get, size_t offset, size_t count) const
void | compute_block_membership__ (Ioss::SideBlock *efblock, std::vector< std::string > &block_membership) const override
int | int_byte_size_db () const override
void | set_int_byte_size_api (Ioss::DataSize size) const override
| Returns 4 or 8. More...
int64_t | get_field_internal (const Ioss::Region *reg, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t | get_field_internal (const Ioss::NodeBlock *nb, 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 | get_field_internal (const Ioss::FaceBlock *nb, 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 | get_field_internal (const Ioss::StructuredBlock *sb, 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::NodeSet *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::FaceSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t | get_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::SideSet *fs, 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 | put_field_internal (const Ioss::Region *reg, 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::EdgeBlock *nb, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t | put_field_internal (const Ioss::FaceBlock *nb, 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::StructuredBlock *sb, 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 | put_field_internal (const Ioss::NodeSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
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::FaceSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=0
int64_t | put_field_internal (const Ioss::ElementSet *ns, const Ioss::Field &field, void *data, size_t data_size) const override=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 | put_field_internal (const Ioss::CommSet *cs, const Ioss::Field &field, void *data, size_t data_size) const override=0
virtual void | write_meta_data ()=0
void | write_results_metadata ()
void | openDatabase__ () const override
void | closeDatabase__ () const override
virtual int | free_file_pointer () const
int | get_current_state () const
void | put_qa ()
void | put_info ()
template<typename T >
void | internal_write_results_metadata (ex_entity_type type, std::vector< T *> entities, int &glob_index)
void | generate_sideset_truth_table ()
void | output_results_names (ex_entity_type type, VariableNameMap &variables) const
int | gather_names (ex_entity_type type, VariableNameMap &variables, const Ioss::GroupingEntity *ge, int index, bool reduction)
void | get_nodeblocks ()
void | add_attribute_fields (ex_entity_type entity_type, Ioss::GroupingEntity *block, int attribute_count, const std::string &type)
void | output_other_meta_data ()
int64_t | internal_add_results_fields (ex_entity_type type, Ioss::GroupingEntity *entity, int64_t position, int64_t block_count, Ioss::IntVector &truth_table, Ioex::VariableNameMap &variables)
int64_t | add_results_fields (ex_entity_type type, Ioss::GroupingEntity *entity, int64_t position=0)
void | add_region_fields ()
void | store_reduction_field (ex_entity_type type, const Ioss::Field &field, const Ioss::GroupingEntity *ge, void *variables) const
void | get_reduction_field (ex_entity_type type, const Ioss::Field &field, const Ioss::GroupingEntity *ge, void *variables) const
void | write_reduction_fields () const
void | read_reduction_fields () const
int | get_database_step (int global_step) const
void | flush_database__ () const override
void | finalize_write (double sim_time)
Protected Member Functions inherited from Ioss::DatabaseIO
| DatabaseIO (Region *region, std::string filename, Ioss::DatabaseUsage db_usage, MPI_Comm communicator, const Ioss::PropertyManager &props)
void | set_common_side_topology () const
template<typename T >
void | create_groups (const std::string &property_name, EntityType type, const std::string &type_name, const T *set_type)
template<typename T >
void | create_group (EntityType type, const std::string &type_name, const std::vector< std::string > &group_spec, const T *set_type)
void | handle_groups ()
void | check_side_topology () const

## Protected Attributes
int | exodusFilePtr {-1}
std::string | m_groupName
EntityIdSet | ids_
int | exodusMode {EX_CLOBBER}
int | dbRealWordSize {8}
int | maximumNameLength {32}
int | spatialDimension {0}
int64_t | edgeCount {0}
int64_t | faceCount {0}
std::map< ex_entity_type, int > | m_groupCount
Ioss::Int64Vector | nodeCmapIds
Ioss::Int64Vector | nodeCmapNodeCnts
Ioss::Int64Vector | elemCmapIds
Ioss::Int64Vector | elemCmapElemCnts
int64_t | commsetNodeCount {0}
int64_t | commsetElemCount {0}
std::map< ex_entity_type, Ioss::IntVector > | m_truthTable
std::map< ex_entity_type, VariableNameMap > | m_variables
ValueContainer | globalValues
std::vector< unsigned char > | nodeConnectivityStatus
std::map< std::string, Ioss::Int64Vector > | activeNodesetNodesIndex
time_t | timeLastFlush {0}
bool | fileExists {false}
bool | minimizeOpenFiles {false}
bool | blockAdjacenciesCalculated {false}
bool | nodeConnectivityStatusCalculated
Protected Attributes inherited from Ioss::DatabaseIO
Ioss::PropertyManager | properties
ElementTopology * | commonSideTopology {nullptr}
std::string | DBFilename
std::string | decodedFilename
Ioss::State | dbState {STATE_INVALID}
bool | isParallel {false}
| true if running in parallel More...
int | myProcessor {0}
| number of processor this database is for More...
int64_t | nodeCount {0}
int64_t | elementCount {0}
TopoContainer | sideTopology
| Used to speed up faceblock/edgeblock calculations. More...
int | cycleCount {0}
int | overlayCount {0}
double | timeScaleFactor {1.0}
Ioss::SurfaceSplitType | splitType {SPLIT_BY_TOPOLOGIES}
Ioss::DatabaseUsage | dbUsage
Ioss::DataSize | dbIntSizeAPI {USE_INT32_API}
bool | lowerCaseVariableNames {true}
bool | usingParallelIO {false}
std::vector< std::string > | blockOmissions
std::vector< std::string > | blockInclusions
std::vector< std::string > | informationRecords
std::vector< std::string > | qaRecords
Ioss::Map | nodeMap {"node", DBFilename, myProcessor}
Ioss::Map | edgeMap {"edge", DBFilename, myProcessor}
Ioss::Map | faceMap {"face", DBFilename, myProcessor}
Ioss::Map | elemMap {"element", DBFilename, myProcessor}
std::vector< std::vector< bool > > | blockAdjacency

## Constructor & Destructor Documentation

## ◆ DatabaseIO() [1/2]

Ioex::DatabaseIO::DatabaseIO | ( | Ioss::Region * | region,
|  | const std::string & | filename,
|  | Ioss::DatabaseUsage | db_usage,
|  | MPI_Comm | communicator,
|  | const Ioss::PropertyManager & | props
| ) |  |

## ◆ DatabaseIO() [2/2]

Ioex::DatabaseIO::DatabaseIO | ( | const DatabaseIO & | from | ) |
| delete

## ◆ ~DatabaseIO()

Ioex::DatabaseIO::~DatabaseIO | ( |  | ) |
| override virtual

Reimplemented from Ioss::DatabaseIO.

## Member Function Documentation

## ◆ add_attribute_fields()

void Ioex::DatabaseIO::add_attribute_fields | ( | ex_entity_type | entity_type,
|  | Ioss::GroupingEntity * | block,
|  | int | attribute_count,
|  | const std::string & | type
| ) |  |
| protected

Todo:
  REFACTOR Some of the attribute knowledge should be at the Ioss::ElementTopology level instead of here. That would make it easier for an application to register a new element type and its attributes.

## ◆ add_region_fields()

void Ioex::DatabaseIO::add_region_fields | ( |  | ) |
| protected

## ◆ add_results_fields()

int64_t Ioex::DatabaseIO::add_results_fields | ( | ex_entity_type | type,
|  | Ioss::GroupingEntity * | entity,
|  | int64_t | position = `0`
| ) |  |
| protected

## ◆ begin__()

bool Ioex::DatabaseIO::begin__ | ( | Ioss::State | state | ) |
| override protected virtual

Implements Ioss::DatabaseIO.

## ◆ begin_state__()

bool Ioex::DatabaseIO::begin_state__ | ( | Ioss::Region * | region,
|  | int | state,
|  | double | time
| ) |  |
| override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ closeDatabase__()

void Ioex::DatabaseIO::closeDatabase__ | ( |  | ) | const
| inline override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ compute_block_membership__()

void Ioex::DatabaseIO::compute_block_membership__ | ( | Ioss::SideBlock * | efblock,
|  | std::vector< std::string > & | block_membership
| ) |  | const
| override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ create_subgroup__()

bool Ioex::DatabaseIO::create_subgroup__ | ( | const std::string & | group_name | ) |
| override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ end__()

bool Ioex::DatabaseIO::end__ | ( | Ioss::State | state | ) |
| override protected virtual

Implements Ioss::DatabaseIO.

## ◆ end_state__()

bool Ioex::DatabaseIO::end_state__ | ( | Ioss::Region * | region,
|  | int | state,
|  | double | time
| ) |  |
| override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ entity_field_support()

unsigned Ioex::DatabaseIO::entity_field_support | ( |  | ) | const
| override virtual

Implements Ioss::DatabaseIO.

## ◆ finalize_write()

void Ioex::DatabaseIO::finalize_write | ( | double | sim_time | ) |
| protected

## ◆ flush_database__()

void Ioex::DatabaseIO::flush_database__ | ( |  | ) | const
| override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ free_file_pointer()

int Ioex::DatabaseIO::free_file_pointer | ( |  | ) | const
| protected virtual

Reimplemented in Iopx::DatabaseIO.

## ◆ gather_names()

int Ioex::DatabaseIO::gather_names | ( | ex_entity_type | type,
|  | VariableNameMap & | variables,
|  | const Ioss::GroupingEntity * | ge,
|  | int | index,
|  | bool | reduction
| ) |  |
| protected

## ◆ generate_sideset_truth_table()

void Ioex::DatabaseIO::generate_sideset_truth_table | ( |  | ) |
| protected

## ◆ get_current_state()

int Ioex::DatabaseIO::get_current_state | ( |  | ) | const
| protected

## ◆ get_database_step()

int Ioex::DatabaseIO::get_database_step | ( | int | global_step | ) | const
| protected

## ◆ get_field_internal() [1/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::Region * | reg,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [2/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::NodeBlock * | nb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [3/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::EdgeBlock * | nb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [4/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::FaceBlock * | nb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [5/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::ElementBlock * | eb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [6/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::StructuredBlock * | sb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Reimplemented from Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [7/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::SideBlock * | fb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [8/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::NodeSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [9/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::EdgeSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [10/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::FaceSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [11/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::ElementSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [12/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::SideSet * | fs,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_field_internal() [13/13]

int64_t Ioex::DatabaseIO::get_field_internal | ( | const Ioss::CommSet * | cs,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_file_pointer()

virtual int Ioex::DatabaseIO::get_file_pointer | ( |  | ) | const
| pure virtual

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ get_nodeblocks()

void Ioex::DatabaseIO::get_nodeblocks | ( |  | ) |
| protected

## ◆ get_reduction_field()

void Ioex::DatabaseIO::get_reduction_field | ( | ex_entity_type | type,
|  | const Ioss::Field & | field,
|  | const Ioss::GroupingEntity * | ge,
|  | void * | variables
| ) |  | const
| protected

## ◆ get_step_times__()

void Ioex::DatabaseIO::get_step_times__ | ( |  | ) |
| override protected pure virtual

Reimplemented from Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ handle_block_ids()

size_t Ioex::DatabaseIO::handle_block_ids | ( | const Ioss::EntityBlock * | eb,
|  | ex_entity_type | map_type,
|  | Ioss::Map & | entity_map,
|  | void * | ids,
|  | size_t | num_to_get,
|  | size_t | offset,
|  | size_t | count
| ) |  | const
| protected

NOTE: "element" is generic for "element", "face", or "edge"

There are two modes we need to support in this routine:

1. Initial definition of element map (local->global) and elemMap.reverse (global->local).
2. Redefinition of element map via 'reordering' of the original map when the elements on this processor are the same, but their order is changed.

So, there will be two maps the 'elemMap.map' map is a 'direct lookup' map which maps current local position to global id and the 'elemMap.reverse' is an associative lookup which maps the global id to 'original local'. There is also a 'elemMap.reorder' which is direct lookup and maps current local position to original local.

The ids coming in are the global ids; their position is the local id -1 (That is, data[0] contains the global id of local element 1 in this element block). The 'model-local' id is given by eb_offset + 1 + position:

int local_position = elemMap.reverseElementMap[i+1]

But, this assumes 1..numel elements are being output at the same time; we are actually outputting a blocks worth of elements at a time, so we need to consider the block offsets. So... local-in-block position 'i' is index 'eb_offset+i' in 'elemMap.map' and the 'local_position' within the element blocks data arrays is 'local_position-eb_offset'. With this, the position within the data array of this element block is:

int eb_position = elemMap.reverse[elemMap.map[eb_offset+i+1]]-eb_offset-1

To determine which map to update on a call to this function, we use the following hueristics: – If the database state is 'Ioss::STATE_MODEL:', then update the 'elemMap.reverse'. – If the database state is not Ioss::STATE_MODEL, then leave the 'elemMap.reverse' alone since it corresponds to the information already written to the database. [May want to add a Ioss::STATE_REDEFINE_MODEL] – Always update elemMap.map to match the passed in 'ids' array.

NOTE: the maps are built an element block at a time... NOTE: The mapping is done on TRANSIENT fields only; MODEL fields should be in the original order...

## ◆ int_byte_size_db()

int Ioex::DatabaseIO::int_byte_size_db | ( |  | ) | const
| override protected virtual

Implements Ioss::DatabaseIO.

## ◆ internal_add_results_fields()

int64_t Ioex::DatabaseIO::internal_add_results_fields | ( | ex_entity_type | type,
|  | Ioss::GroupingEntity * | entity,
|  | int64_t | position,
|  | int64_t | block_count,
|  | Ioss::IntVector & | truth_table,
|  | Ioex::VariableNameMap & | variables
| ) |  |
| protected

## ◆ internal_write_results_metadata()

template<typename T >

void Ioex::DatabaseIO::internal_write_results_metadata | ( | ex_entity_type | type,
|  | std::vector< T *> | entities,
|  | int & | glob_index
| ) |  |
| protected

## ◆ maximum_symbol_length()

int Ioex::DatabaseIO::maximum_symbol_length | ( |  | ) | const
| inline override protected virtual

Get the length of the longest name in the database file.

Returns
  The length, or 0 for unlimited.

Reimplemented from Ioss::DatabaseIO.

## ◆ ok__()

bool Ioex::DatabaseIO::ok__ | ( | bool | write_message = `false`,
|  | std::string * | error_message = `nullptr`,
|  | int * | bad_count = `nullptr`
| ) |  | const
| override protected pure virtual

Reimplemented from Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ open_group__()

bool Ioex::DatabaseIO::open_group__ | ( | const std::string & | group_name | ) |
| override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ openDatabase__()

void Ioex::DatabaseIO::openDatabase__ | ( |  | ) | const
| inline override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ operator=()

DatabaseIO& Ioex::DatabaseIO::operator= | ( | const DatabaseIO & | from | ) |
| delete

## ◆ output_other_meta_data()

void Ioex::DatabaseIO::output_other_meta_data | ( |  | ) |
| protected

## ◆ output_results_names()

void Ioex::DatabaseIO::output_results_names | ( | ex_entity_type | type,
|  | VariableNameMap & | variables
| ) |  | const
| protected

## ◆ put_field_internal() [1/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::Region * | reg,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [2/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::NodeBlock * | nb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [3/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::EdgeBlock * | nb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [4/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::FaceBlock * | nb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [5/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::ElementBlock * | eb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [6/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::StructuredBlock * | sb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Reimplemented from Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [7/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::SideBlock * | fb,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [8/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::NodeSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [9/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::EdgeSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [10/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::FaceSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [11/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::ElementSet * | ns,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [12/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::SideSet * | fs,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_field_internal() [13/13]

int64_t Ioex::DatabaseIO::put_field_internal | ( | const Ioss::CommSet * | cs,
|  | const Ioss::Field & | field,
|  | void * | data,
|  | size_t | data_size
| ) |  | const
| override protected pure virtual

Implements Ioss::DatabaseIO.

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ put_info()

void Ioex::DatabaseIO::put_info | ( |  | ) |
| protected

## ◆ put_qa()

void Ioex::DatabaseIO::put_qa | ( |  | ) |
| protected

## ◆ read_reduction_fields()

void Ioex::DatabaseIO::read_reduction_fields | ( |  | ) | const
| protected

## ◆ set_int_byte_size_api()

void Ioex::DatabaseIO::set_int_byte_size_api | ( | Ioss::DataSize | size | ) | const
| override protected virtual

Returns 4 or 8.

Set the number of bytes used to represent an integer.

Parameters

  [in] | size | The number of bytes. This is 4 for INT32 or 8 for INT64.

Reimplemented from Ioss::DatabaseIO.

## ◆ set_maximum_symbol_length()

void Ioex::DatabaseIO::set_maximum_symbol_length | ( | int | requested_symbol_size | ) |
| inline override protected virtual

Reimplemented from Ioss::DatabaseIO.

## ◆ store_reduction_field()

void Ioex::DatabaseIO::store_reduction_field | ( | ex_entity_type | type,
|  | const Ioss::Field & | field,
|  | const Ioss::GroupingEntity * | ge,
|  | void * | variables
| ) |  | const
| protected

## ◆ write_meta_data()

virtual void Ioex::DatabaseIO::write_meta_data | ( |  | ) |
| protected pure virtual

Implemented in Iopx::DatabaseIO, and Iofx::DatabaseIO.

## ◆ write_reduction_fields()

void Ioex::DatabaseIO::write_reduction_fields | ( |  | ) | const
| protected

## ◆ write_results_metadata()

void Ioex::DatabaseIO::write_results_metadata | ( |  | ) |
| protected

## Member Data Documentation

## ◆ activeNodesetNodesIndex

std::map<std::string, Ioss::Int64Vector> Ioex::DatabaseIO::activeNodesetNodesIndex
| mutable protected

## ◆ blockAdjacenciesCalculated

bool Ioex::DatabaseIO::blockAdjacenciesCalculated {false}
| mutable protected

## ◆ commsetElemCount

int64_t Ioex::DatabaseIO::commsetElemCount {0}
| protected

## ◆ commsetNodeCount

int64_t Ioex::DatabaseIO::commsetNodeCount {0}
| protected

## ◆ dbRealWordSize

int Ioex::DatabaseIO::dbRealWordSize {8}
| mutable protected

## ◆ edgeCount

int64_t Ioex::DatabaseIO::edgeCount {0}
| protected

## ◆ elemCmapElemCnts

Ioss::Int64Vector Ioex::DatabaseIO::elemCmapElemCnts
| protected

## ◆ elemCmapIds

Ioss::Int64Vector Ioex::DatabaseIO::elemCmapIds
| protected

## ◆ exodusFilePtr

int Ioex::DatabaseIO::exodusFilePtr {-1}
| mutable protected

## ◆ exodusMode

int Ioex::DatabaseIO::exodusMode {EX_CLOBBER}
| mutable protected

## ◆ faceCount

int64_t Ioex::DatabaseIO::faceCount {0}
| protected

## ◆ fileExists

bool Ioex::DatabaseIO::fileExists {false}
| mutable protected

## ◆ globalValues

ValueContainer Ioex::DatabaseIO::globalValues
| mutable protected

## ◆ ids_

EntityIdSet Ioex::DatabaseIO::ids_
| mutable protected

## ◆ m_groupCount

std::map<ex_entity_type, int> Ioex::DatabaseIO::m_groupCount
| mutable protected

## ◆ m_groupName

std::string Ioex::DatabaseIO::m_groupName
| mutable protected

## ◆ m_truthTable

std::map<ex_entity_type, Ioss::IntVector> Ioex::DatabaseIO::m_truthTable
| mutable protected

## ◆ m_variables

std::map<ex_entity_type, VariableNameMap> Ioex::DatabaseIO::m_variables
| mutable protected

## ◆ maximumNameLength

int Ioex::DatabaseIO::maximumNameLength {32}
| mutable protected

## ◆ minimizeOpenFiles

bool Ioex::DatabaseIO::minimizeOpenFiles {false}
| mutable protected

## ◆ nodeCmapIds

Ioss::Int64Vector Ioex::DatabaseIO::nodeCmapIds
| protected

## ◆ nodeCmapNodeCnts

Ioss::Int64Vector Ioex::DatabaseIO::nodeCmapNodeCnts
| protected

## ◆ nodeConnectivityStatus

std::vector<unsigned char> Ioex::DatabaseIO::nodeConnectivityStatus
| mutable protected

## ◆ nodeConnectivityStatusCalculated

bool Ioex::DatabaseIO::nodeConnectivityStatusCalculated
| mutable protected

Initial value:
{
false}

## ◆ spatialDimension

int Ioex::DatabaseIO::spatialDimension {0}
| protected

## ◆ timeLastFlush

time_t Ioex::DatabaseIO::timeLastFlush {0}
| protected

The documentation for this class was generated from the following files:

- src/exodus/Ioex_DatabaseIO.h
- src/exodus/Ioex_DatabaseIO.C