Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ProjectName.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set(PROJECT_NAME Seacas)
# Turn on export dependency generation for WrapExteranl package
set(${PROJECT_NAME}_GENERATE_EXPORT_FILE_DEPENDENCIES_DEFAULT ON)

set(${PROJECT_NAME}_GENERATE_REPO_VERSION_FILE_DEFAULT ON)
set(${PROJECT_NAME}_GENERATE_REPO_VERSION_FILE_DEFAULT OFF)

set(${PROJECT_NAME}_GENERATE_VERSION_DATE_FILES_DEFAULT ON)
set(${PROJECT_NAME}_GENERATE_VERSION_DATE_FILES_DEFAULT OFF)

set(SEACAS_GTest_TPL_name "GTest")
7 changes: 5 additions & 2 deletions packages/seacas/applications/cpup/cpup.C
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <vector>

#include "add_to_log.h"
#define FMT_DEPRECATED_OSTREAM

#include "fmt/ostream.h"
#include "fmt/ranges.h"
#include "format_time.h"
Expand Down Expand Up @@ -173,9 +173,12 @@ template <typename INT> void cpup(Cpup::SystemInterface &interFace, INT /*dummy*
// Query the system to see if the number of files exceeds the system limit and we
// need to force use of minimize_open_files...
int max_files = open_file_limit() - 1; // We also have an output file.
if (debug_level & 1) {
fmt::print(stderr, "{} Open file limit = {}\n", time_stamp(tsFormat), max_files);
}
if (interFace.processor_count() > max_files) {
minimize_open_files = true;
fmt::print("Single file mode... (Max open = {})\n", max_files);
fmt::print("INFO: Automatically setting single file mode... (Max open = {})\n", max_files);
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/applications/ejoin/EJ_Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions
// Copyright(C) 1999-2020, 2022, 2023, 2024, 2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand All @@ -9,6 +9,6 @@

static const std::array<std::string, 3> qainfo{
"ejoin",
"2024/08/29",
"1.6.5",
"2025/04/18",
"1.6.6",
};
1 change: 1 addition & 0 deletions packages/seacas/applications/ejoin/EJoin.C
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ int main(int argc, char *argv[])
if (dbi[p]->int_byte_size_api() > int_byte_size) {
int_byte_size = dbi[p]->int_byte_size_api();
}
dbi[p]->set_lower_case_database_names(false);
}

for (size_t p = 0; p < interFace.inputFiles_.size(); p++) {
Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/applications/slice/SL_Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2024 National Technology & Engineering Solutions
// Copyright(C) 1999-2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand All @@ -9,6 +9,6 @@

static const std::array<std::string, 3> qainfo{
"slice",
"2024/07/17",
"2.3.01",
"2025/04/18",
"2.3.02",
};
3 changes: 2 additions & 1 deletion packages/seacas/applications/slice/Slice.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2024 National Technology & Engineering Solutions
// Copyright(C) 1999-2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand Down Expand Up @@ -397,6 +397,7 @@ int main(int argc, char *argv[])
dbi->set_int_byte_size_api(Ioss::USE_INT64_API);
}

dbi->set_lower_case_database_names(false);
dbi->set_surface_split_type(Ioss::SPLIT_BY_DONT_SPLIT);
dbi->set_field_separator(0);

Expand Down
1 change: 1 addition & 0 deletions packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ namespace Ioss {
}

Utils::check_set_bool_property(properties, "LOWER_CASE_VARIABLE_NAMES", lowerCaseVariableNames);
Utils::check_set_bool_property(properties, "LOWER_CASE_DATABASE_NAMES", lowerCaseDatabaseNames);
Utils::check_set_bool_property(properties, "USE_GENERIC_CANONICAL_NAMES",
useGenericCanonicalName);
Utils::check_set_bool_property(properties, "IGNORE_DATABASE_NAMES", ignoreDatabaseNames);
Expand Down
8 changes: 7 additions & 1 deletion packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2024 National Technology & Engineering Solutions
// Copyright(C) 1999-2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand Down Expand Up @@ -531,6 +531,11 @@ namespace Ioss {
lowerCaseVariableNames = true_false;
}

void set_lower_case_database_names(bool true_false) const
{
lowerCaseDatabaseNames = true_false;
}

/* \brief Set the method used to split sidesets into homogeneous blocks.
*
* \param[in] split_type The desired method.
Expand Down Expand Up @@ -767,6 +772,7 @@ namespace Ioss {
bool isParallel{false}; //!< true if running in parallel

mutable bool lowerCaseVariableNames{true};
mutable bool lowerCaseDatabaseNames{true};
bool usingParallelIO{false};

// List of element blocks that should be omitted or included from
Expand Down
1 change: 1 addition & 0 deletions packages/seacas/libraries/ioss/src/Ioss_Doxygen.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ par_cgns | Input/Output | alias for parallel CGNS
----------|:--------:|------------
LOGGING | on/[off] | enable/disable logging of field input/output
LOWER_CASE_VARIABLE_NAMES | [on]/off | Convert all variable names read from input database to lowercase; replace ' ' with '_'
LOWER_CASE_DATABASE_NAMES | on/[off] | Convert all block/set names read from input database to lowercase; replace ' ' with '_'
USE_GENERIC_CANONICAL_NAMES | on/[off] | use `block_{id}` as canonical name of an element block instead of the name (if any) stored on the database. The database name will be an alias.
IGNORE_DATABASE_NAMES | on/[off] | Do not read any element block, nodeset, ... names if they exist on the database. Use only the canonical generated names (entitytype + _ + id)
IGNORE_ATTRIBUTE_NAMES | on/[off] | Do not read the attribute names that may exist on an input database. Instead for an element block with N attributes, the fields will be named `attribute_1` ... `attribute_N`
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_EntityBlock.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2023 National Technology & Engineering Solutions
// Copyright(C) 1999-2023, 2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand Down
5 changes: 5 additions & 0 deletions packages/seacas/libraries/ioss/src/Ioss_Region.C
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,11 @@ namespace Ioss {
aliases_[type].insert(std::make_pair(uname, canon));
}

std::string lname = Ioss::Utils::lowercase(alias);
if (lname != alias && lname != canon) {
aliases_[type].insert(std::make_pair(lname, canon));
}

bool result;
std::tie(std::ignore, result) = aliases_[type].insert(std::make_pair(alias, canon));
return result;
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

#pragma once
namespace Ioss {
inline const char *Version() { return "2025-03-13"; }
inline const char *Version() { return "2025-04-14"; }
} // namespace Ioss
12 changes: 7 additions & 5 deletions packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ namespace Ioex {
else {
Ioss::SerializeIO serializeio_(this);
block_name = Ioex::get_entity_name(get_file_pointer(), entity_type, id, basename,
maximumNameLength, db_has_name);
maximumNameLength, lowerCaseDatabaseNames, db_has_name);
}
if (get_use_generic_canonical_name()) {
std::swap(block_name, alias);
Expand Down Expand Up @@ -1596,8 +1596,9 @@ namespace Ioex {
side_set_name = alias;
}
else {
side_set_name = Ioex::get_entity_name(get_file_pointer(), EX_SIDE_SET, id, "surface",
maximumNameLength, db_has_name);
side_set_name =
Ioex::get_entity_name(get_file_pointer(), EX_SIDE_SET, id, "surface",
maximumNameLength, lowerCaseDatabaseNames, db_has_name);
}

if (side_set_name == "universal_sideset") {
Expand Down Expand Up @@ -2001,8 +2002,9 @@ namespace Ioex {
Xset_name = alias;
}
else {
Xset_name = Ioex::get_entity_name(get_file_pointer(), type, id, base + "list",
maximumNameLength, db_has_name);
Xset_name =
Ioex::get_entity_name(get_file_pointer(), type, id, base + "list",
maximumNameLength, lowerCaseDatabaseNames, db_has_name);
}

if (get_use_generic_canonical_name()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/exodus/Ioex_Internals.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2024 National Technology & Engineering Solutions
// Copyright(C) 1999-2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ namespace Ioex {
}
else {
block_name = Ioex::get_entity_name(get_file_pointer(), entity_type, id, basename,
maximumNameLength, db_has_name);
maximumNameLength, lowerCaseDatabaseNames, db_has_name);
}
if (get_use_generic_canonical_name()) {
std::swap(block_name, alias);
Expand Down Expand Up @@ -1534,8 +1534,9 @@ namespace Ioex {
side_set_name = alias;
}
else {
side_set_name = Ioex::get_entity_name(get_file_pointer(), EX_SIDE_SET, id, "surface",
maximumNameLength, db_has_name);
side_set_name =
Ioex::get_entity_name(get_file_pointer(), EX_SIDE_SET, id, "surface",
maximumNameLength, lowerCaseDatabaseNames, db_has_name);
}

if (side_set_name == "universal_sideset") {
Expand Down Expand Up @@ -1897,7 +1898,7 @@ namespace Ioex {
}
else {
Xset_name = Ioex::get_entity_name(get_file_pointer(), type, id, base + "list",
maximumNameLength, db_has_name);
maximumNameLength, lowerCaseDatabaseNames, db_has_name);
}

if (get_use_generic_canonical_name()) {
Expand Down
19 changes: 11 additions & 8 deletions packages/seacas/libraries/ioss/src/exodus/Ioex_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ namespace Ioex {
}

std::string get_entity_name(int exoid, ex_entity_type type, int64_t id,
const std::string &basename, int length, bool &db_has_name)
const std::string &basename, int length, bool lower_case_names,
bool &db_has_name)
{
std::vector<char> buffer(length + 1);
buffer[0] = '\0';
Expand All @@ -667,16 +668,18 @@ namespace Ioex {
exodus_error(exoid, __LINE__, __func__, __FILE__);
}
if (buffer[0] != '\0') {
Ioss::Utils::fixup_name(Data(buffer));
std::string name{Data(buffer)};
if (lower_case_names) {
Ioss::Utils::fixup_name(name);
}
// Filter out names of the form "basename_id" if the name
// id doesn't match the id in the name...
size_t base_size = basename.size();
if (std::strncmp(basename.c_str(), Data(buffer), base_size) == 0) {
int64_t name_id = extract_id(Data(buffer));
if (Ioss::Utils::substr_equal(basename, name)) {
int64_t name_id = extract_id(name);

// See if name is truly of form "basename_name_id" (e.g. "surface_{id}")
std::string tmp_name = Ioss::Utils::encode_entity_name(basename, name_id);
if (tmp_name == Data(buffer)) {
if (tmp_name == name) {
if (name_id > 0) {
db_has_name = false;
if (name_id != id) {
Expand All @@ -686,15 +689,15 @@ namespace Ioex {
"embedded id {}.\n"
" This can cause issues later; the entity will be renamed to '{}' "
"(IOSS)\n\n",
Data(buffer), id, name_id, new_name);
name, id, name_id, new_name);
return new_name;
}
return tmp_name;
}
}
}
db_has_name = true;
return {Data(buffer)};
return name;
}
db_has_name = false;
return Ioss::Utils::encode_entity_name(basename, id);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/exodus/Ioex_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace Ioex {

IOSS_NODISCARD IOEX_EXPORT std::string get_entity_name(int exoid, ex_entity_type type, int64_t id,
const std::string &basename, int length,
bool &db_has_name);
bool lower_case_names, bool &db_has_name);

IOEX_EXPORT bool filter_node_list(Ioss::Int64Vector &nodes,
const std::vector<unsigned char> &node_connectivity_status);
Expand Down
4 changes: 3 additions & 1 deletion packages/seacas/libraries/ioss/src/main/io_info.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <stdint.h>
#include <tokenize.h>

#define FMT_DEPRECATED_OSTREAM
#include <cstddef>
#include <cstdlib>
#include <fmt/format.h>
Expand Down Expand Up @@ -667,6 +666,9 @@ namespace Ioss {
dbi->set_use_generic_canonical_name(true);
}

dbi->set_lower_case_variable_names(false);
dbi->set_lower_case_database_names(false);

if (interFace.surface_split_scheme() != Ioss::SPLIT_INVALID) {
dbi->set_surface_split_type(Ioss::int_to_surface_split(interFace.surface_split_scheme()));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/main/io_info_main.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace {
std::string codename;
std::string version = "1.07 (2024/11/08)";
std::string version = "1.08 (2025/04/18)";

#ifdef SEACAS_HAVE_MPI
void mpi_finalize()
Expand Down
5 changes: 3 additions & 2 deletions packages/seacas/libraries/ioss/src/main/io_modify.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2024 National Technology & Engineering Solutions
// Copyright(C) 1999-2025 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand Down Expand Up @@ -71,7 +71,7 @@ using real = double;

namespace {
std::string codename;
std::string version = "2.07 (2024-04-15)";
std::string version = "2.08 (2025-04-18)";

std::vector<Ioss::GroupingEntity *> attributes_modified;

Expand Down Expand Up @@ -524,6 +524,7 @@ namespace {
if (dbi == nullptr || !dbi->ok(true)) {
std::exit(EXIT_FAILURE);
}
dbi->set_lower_case_database_names(false);
}

void handle_help(const std::string &topic)
Expand Down
8 changes: 7 additions & 1 deletion packages/seacas/libraries/ioss/src/main/io_shell.C
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

namespace {
std::string codename;
std::string version = "7.0 (2024/11/08)";
std::string version = "7.1 (2025/04/18)";

bool mem_stats = false;

Expand Down Expand Up @@ -274,6 +274,8 @@ namespace {
if (!interFace.lower_case_variable_names) {
dbi->set_lower_case_variable_names(false);
}
dbi->set_lower_case_database_names(interFace.lower_case_database_names);

if (interFace.outFiletype == "cgns") {
// CGNS stores BCs (SideSets) on the zones which
// correspond to element blocks. If split input sideblocks
Expand Down Expand Up @@ -567,6 +569,8 @@ namespace {
if (!interFace.lower_case_variable_names) {
dbi1->set_lower_case_variable_names(false);
}
dbi1->set_lower_case_database_names(interFace.lower_case_database_names);

if (interFace.outFiletype == "cgns") {
// CGNS stores BCs (SideSets) on the zones which
// correspond to element blocks. If split input sideblocks
Expand Down Expand Up @@ -618,6 +622,8 @@ namespace {
if (!interFace.lower_case_variable_names) {
dbi2->set_lower_case_variable_names(false);
}
dbi2->set_lower_case_database_names(interFace.lower_case_database_names);

if (interFace.outFiletype == "cgns") {
// CGNS stores BCs (SideSets) on the zones which
// correspond to element blocks. If split input sideblocks
Expand Down
7 changes: 7 additions & 0 deletions packages/seacas/libraries/ioss/src/main/shell_interface.C
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ void IOShell::Interface::enroll_options()
"\t\tVariable names are left as they appear in the input mesh file",
nullptr);

options_.enroll(
"lower_case_database_names", Ioss::GetLongOption::OptType::NoValue,
"Lowercase all block/set/assembly names and replace spaces with underscores.\n"
"\t\tBy default, block/set/assembly names are left as they appear in the input mesh file",
nullptr);

options_.enroll("retain_empty_blocks", Ioss::GetLongOption::OptType::NoValue,
"If any empty element blocks on input file, keep them and write to output file.\n"
"\t\tDefault is to ignore empty blocks.",
Expand Down Expand Up @@ -666,6 +672,7 @@ bool IOShell::Interface::parse_options(int argc, char **argv, int my_processor)
in_memory_write = (options_.retrieve("memory_write") != nullptr);
delete_timesteps = (options_.retrieve("delete_timesteps") != nullptr);
lower_case_variable_names = (options_.retrieve("native_variable_names") == nullptr);
lower_case_database_names = (options_.retrieve("lower_case_database_names") != nullptr);
disable_field_recognition = (options_.retrieve("disable_field_recognition") != nullptr);
retain_empty_blocks = (options_.retrieve("retain_empty_blocks") != nullptr);
boundary_sideset = (options_.retrieve("boundary_sideset") != nullptr);
Expand Down
3 changes: 2 additions & 1 deletion packages/seacas/libraries/ioss/src/main/shell_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ namespace IOShell {
bool quiet{false};
bool in_memory_read{false};
bool in_memory_write{false};
bool lower_case_variable_names{true};
bool lower_case_variable_names{false};
bool lower_case_database_names{false};
bool delete_timesteps{false};
bool minimize_open_files{false};
bool disable_field_recognition{false};
Expand Down
Loading