1 // Copyright(C) 1999-2021 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 #ifndef IOSS_Ioss_DBUsage_h 8 #define IOSS_Ioss_DBUsage_h 9 10 #include "vtk_ioss_mangle.h" 11 12 namespace Ioss { 13 14 /** \brief Specifies how an Ioss::DatabaseIO object will be used. 15 */ 16 enum DatabaseUsage { 17 WRITE_RESTART = 1, /**< The current state of the simulation, including model and field data 18 will be written to this database. */ 19 READ_RESTART = 2, /**< A previous state of the simulation, including model and field data 20 will be read from this database. */ 21 WRITE_RESULTS = 4, /**< Mesh-based results data, such as nodal displacements, will be written 22 to this database. */ 23 READ_MODEL = 8, /**< Model data such as node coordinates, element connectivities will be read 24 from this database. */ 25 WRITE_HISTORY = 26 16, /**< Global results data, such as total energy, will be written to this database. */ 27 WRITE_HEARTBEAT = 28 32 /**< Text-based results data for particular nodes, edges, faces, elements, 29 or global variables at particular times will be written to this database. */ 30 }; 31 32 enum IfDatabaseExistsBehavior { 33 DB_OVERWRITE, 34 DB_APPEND, 35 DB_APPEND_GROUP, 36 DB_MODIFY, 37 DB_ABORT, 38 DB_ADD_SUFFIX, 39 DB_ADD_SUFFIX_OVERWRITE 40 }; // Used if topology change in DB_OVERWRITE mode 41 is_input_event(Ioss::DatabaseUsage db_usage)42 inline bool is_input_event(Ioss::DatabaseUsage db_usage) 43 { 44 return db_usage == Ioss::READ_MODEL || db_usage == Ioss::READ_RESTART; 45 } 46 } // namespace Ioss 47 #endif // IOSS_Ioss_DBUsage_h 48