| 1 |
// Copyright(C) 1999-2023 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 |
namespace Ioss { |
| 10 |
|
| 11 |
/** \brief Specifies how an Ioss::DatabaseIO object will be used. |
| 12 |
*/ |
| 13 |
enum DatabaseUsage { |
| 14 |
WRITE_RESTART = 1, /**< The current state of the simulation, including model and field data |
| 15 |
will be written to this database. */ |
| 16 |
READ_RESTART = 2, /**< A previous state of the simulation, including model and field data |
| 17 |
will be read from this database. */ |
| 18 |
WRITE_RESULTS = 4, /**< Mesh-based results data, such as nodal displacements, will be written |
| 19 |
to this database. */ |
| 20 |
READ_MODEL = 8, /**< Model data such as node coordinates, element connectivities will be read |
| 21 |
from this database. */ |
| 22 |
WRITE_HISTORY = |
| 23 |
16, /**< Global results data, such as total energy, will be written to this database. */ |
| 24 |
WRITE_HEARTBEAT = |
| 25 |
32, /**< Text-based results data for particular nodes, edges, faces, elements, |
| 26 |
or global variables at particular times will be written to this database. */ |
| 27 |
QUERY_TIMESTEPS_ONLY = 64 /**< Special mode where the application is *only* going to query |
| 28 |
the number of timesteps and the timestep values on the database. |
| 29 |
All other region data will not exist. */ |
| 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 |
|
| 42 |
inline bool is_input_event(Ioss::DatabaseUsage db_usage) |
| 43 |
{ |
| 44 |
return db_usage == Ioss::READ_MODEL || db_usage == Ioss::READ_RESTART || |
| 45 |
db_usage == Ioss::QUERY_TIMESTEPS_ONLY; |
| 46 |
} |
| 47 |
} // namespace Ioss |