Skip to content

Commit

Permalink
IOSS: Add property to disable field metadata output
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Jul 11, 2024
1 parent b4c75e2 commit b2229ab
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,6 @@ namespace Ioex {
"IOEX: Setting EX_VERBOSE|EX_DEBUG because EX_DEBUG environment variable is set.\n");
ex_opts(EX_VERBOSE | EX_DEBUG);
}
// This is also done down in the exodus library, but helps logic to do it here...
if (util().get_environment("EXODUS_VERBOSE", isParallel)) {
fmt::print(
Ioss::DebugOut(),
"IOEX: Exodus error reporting set to VERBOSE because EXODUS_VERBOSE environment variable is set.\n");
ex_opts(EX_VERBOSE);
}

if (!is_input()) {
if (util().get_environment("EX_MODE", exodusMode, isParallel)) {
Expand Down Expand Up @@ -264,6 +257,7 @@ namespace Ioex {

// See if there are any properties that need to (or can) be
// handled prior to opening/creating database...
#if NC_HAS_HDF5
bool compress = ((properties.exists("COMPRESSION_LEVEL") &&
properties.get("COMPRESSION_LEVEL").get_int() > 0) ||
(properties.exists("COMPRESSION_SHUFFLE") &&
Expand All @@ -272,24 +266,31 @@ namespace Ioex {
if (compress) {
exodusMode |= EX_NETCDF4;
}
#endif

if (properties.exists("FILE_TYPE")) {
std::string type = properties.get("FILE_TYPE").get_string();
if (type == "netcdf3" || type == "netcdf-3") {
exodusMode = EX_CLOBBER; // Reset back to default...
}
#if NC_HAS_HDF5
if (type == "netcdf4" || type == "netcdf-4" || type == "hdf5") {
exodusMode |= EX_NETCDF4;
}
#endif
#if NC_HAS_CDF5
else if (type == "netcdf5" || type == "netcdf-5" || type == "cdf5") {
exodusMode |= EX_64BIT_DATA;
}
#endif
}

#if NC_HAS_HDF5
if (properties.exists("ENABLE_FILE_GROUPS")) {
exodusMode |= EX_NETCDF4;
exodusMode |= EX_NOCLASSIC;
}
#endif

if (properties.exists("MAXIMUM_NAME_LENGTH")) {
maximumNameLength = properties.get("MAXIMUM_NAME_LENGTH").get_int();
Expand Down Expand Up @@ -1593,7 +1594,6 @@ namespace Ioex {
// common
int64_t BaseDatabaseIO::add_results_fields(Ioss::GroupingEntity *entity, int64_t position)
{
if (m_timestepCount == 0) return 0;
ex_entity_type type = Ioex::map_exodus_type(entity->type());
return internal_add_results_fields(type, entity, position, m_groupCount[type],
m_truthTable[type], m_variables[type]);
Expand Down Expand Up @@ -1999,7 +1999,11 @@ namespace Ioex {
}

// Output field metadata
output_field_metadata();
bool do_metadata = true;
Ioss::Utils::check_set_bool_property(properties, "OUTPUT_FIELD_METADATA", do_metadata);
if (do_metadata) {
output_field_metadata();
}
}
}

Expand Down

0 comments on commit b2229ab

Please sign in to comment.