diff --git a/packages/seacas/applications/conjoin/CJ_ExodusEntity.h b/packages/seacas/applications/conjoin/CJ_ExodusEntity.h index 3481cd3054..9e8765a052 100644 --- a/packages/seacas/applications/conjoin/CJ_ExodusEntity.h +++ b/packages/seacas/applications/conjoin/CJ_ExodusEntity.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -22,8 +22,6 @@ namespace Excn { template struct Mesh { - Mesh() = default; - size_t count(ObjectType type) const { switch (type) { @@ -56,11 +54,6 @@ namespace Excn { struct Block { - Block() = default; - Block(const Block &other) = default; - ~Block() = default; - Block &operator=(const Block &other) = default; - size_t entity_count() const { return elementCount; } IntVector truthTable{}; @@ -77,8 +70,6 @@ namespace Excn { template struct NodeSet { - NodeSet() = default; - IntVector truthTable{}; ex_entity_id id{0}; size_t nodeCount{0}; @@ -111,8 +102,6 @@ namespace Excn { template struct SideSet { - SideSet() = default; - IntVector truthTable{}; ex_entity_id id{0}; size_t sideCount{0}; @@ -140,7 +129,6 @@ namespace Excn { struct CommunicationMap { - CommunicationMap() = default; CommunicationMap(size_t the_id, size_t count, char the_type) : id(the_id), entityCount(count), type(the_type) { diff --git a/packages/seacas/applications/conjoin/CJ_Internals.C b/packages/seacas/applications/conjoin/CJ_Internals.C index 0c2f0927a7..09decb37fc 100644 --- a/packages/seacas/applications/conjoin/CJ_Internals.C +++ b/packages/seacas/applications/conjoin/CJ_Internals.C @@ -567,7 +567,7 @@ int Excn::Internals::put_metadata(const std::vector &blocks) // store element type as attribute of connectivity variable status = nc_put_att_text(exodusFilePtr, connid, ATT_NAME_ELB, - static_cast(std::strlen(blocks[iblk].elType.c_str())) + 1, + static_cast(blocks[iblk].elType.size()) + 1, blocks[iblk].elType.c_str()); if (status != NC_NOERR) { ex_opts(EX_VERBOSE); diff --git a/packages/seacas/applications/conjoin/CJ_SystemInterface.C b/packages/seacas/applications/conjoin/CJ_SystemInterface.C index b5952c3039..6954ab0937 100644 --- a/packages/seacas/applications/conjoin/CJ_SystemInterface.C +++ b/packages/seacas/applications/conjoin/CJ_SystemInterface.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -23,8 +23,6 @@ namespace { Excn::SystemInterface::SystemInterface() { enroll_options(); } -Excn::SystemInterface::~SystemInterface() = default; - void Excn::SystemInterface::enroll_options() { options_.usage("[options] list_of_files_to_join"); diff --git a/packages/seacas/applications/conjoin/CJ_SystemInterface.h b/packages/seacas/applications/conjoin/CJ_SystemInterface.h index ea7582fcc4..56d1a01d2e 100644 --- a/packages/seacas/applications/conjoin/CJ_SystemInterface.h +++ b/packages/seacas/applications/conjoin/CJ_SystemInterface.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2024 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. // @@ -15,8 +15,6 @@ namespace Excn { { public: SystemInterface(); - ~SystemInterface(); - bool parse_options(int argc, char **argv); int debug() const { return debugLevel_; } diff --git a/packages/seacas/applications/conjoin/Conjoin.C b/packages/seacas/applications/conjoin/Conjoin.C index 3117bed6d1..1b6d74eeaf 100644 --- a/packages/seacas/applications/conjoin/Conjoin.C +++ b/packages/seacas/applications/conjoin/Conjoin.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -53,7 +53,7 @@ #include "CJ_Version.h" namespace { - bool check_variable_params(size_t p, Excn::Variables &vars); + bool check_variable_params(size_t p, const Excn::Variables &vars); template void clear(std::vector &vec) { vec.clear(); @@ -280,7 +280,7 @@ namespace { std::vector>> &nodesets, std::vector>> &sidesets); - int case_compare(const std::string &s1, const std::string &s2); + bool case_compare(const std::string &s1, const std::string &s2); template void verify_set_position_mapping(const std::string &type, size_t part_count, @@ -290,19 +290,19 @@ namespace { bool problem = false; for (size_t p = 0; p < part_count; p++) { for (size_t i = 0; i < sets[p].size(); i++) { - if (sets[p][i].id == 0) { - continue; - } - auto glob_pos = sets[p][i].position_; + if (sets[p][i].id == 0) { + continue; + } + auto glob_pos = sets[p][i].position_; if (global_sets[glob_pos].id != sets[p][i].id || - case_compare(global_sets[glob_pos].name_, sets[p][i].name_) != 0) { + !case_compare(global_sets[glob_pos].name_, sets[p][i].name_)) { problem = true; fmt::print(stderr, "\nERROR: {0} Mismatch on part {1}:\n" - "\tpart {0} at position {2} has id {3} and name {4}\n" - "\tglobal {0} at position {5} has id {6} and name {7}\n", - type, p+1, i, sets[p][i].id, sets[p][i].name_, - glob_pos, global_sets[glob_pos].id, global_sets[glob_pos].name_); + "\tpart {0} at position {2} has id {3} and name {4}\n" + "\tglobal {0} at position {5} has id {6} and name {7}\n", + type, p + 1, i, sets[p][i].id, sets[p][i].name_, glob_pos, + global_sets[glob_pos].id, global_sets[glob_pos].name_); global_sets[glob_pos].dump(); sets[p][i].dump(); } @@ -1871,7 +1871,7 @@ namespace { // See if any of the variable names conflict with the status variable name... if (status != "NONE") { for (size_t i = 0; i < static_cast(vars.count(Excn::InOut::OUT_)) - 1; i++) { - if (case_compare(output_name_list[i], status) == 0) { + if (case_compare(output_name_list[i], status)) { // Error -- duplicate element variable names on output database. fmt::print(stderr, "\nERROR: A {} variable already exists on the input database with the " @@ -1913,7 +1913,7 @@ namespace { const std::string &comb_stat = si.combined_mesh_status_variable(); if (!comb_stat.empty()) { for (int i = 0; i < vars.count(Excn::InOut::OUT_); i++) { - if (case_compare(comb_stat, output_name_list[i]) == 0) { + if (case_compare(comb_stat, output_name_list[i])) { *combined_status_variable_index = i + 1; break; } @@ -1960,7 +1960,7 @@ namespace { // If 'variable_list' is empty or specified 'ALL', then all // variables are to be output if (variable_list.empty() || - (variable_list.size() == 1 && case_compare(variable_list[0].first, "all") == 0)) { + (variable_list.size() == 1 && case_compare(variable_list[0].first, "all"))) { std::iota(vars.index_.begin(), vars.index_.end(), 1); vars.outputCount = num_vars + extra; return; @@ -1968,7 +1968,7 @@ namespace { // Another possibility is user specifies "NONE" for the variable // list so no variables will be written. Just return 0. - if (variable_list.size() == 1 && case_compare(variable_list[0].first, "none") == 0) { + if (variable_list.size() == 1 && case_compare(variable_list[0].first, "none")) { vars.outputCount = extra; return; } @@ -1997,7 +1997,7 @@ namespace { var_name = elem.first; bool found = false; for (size_t j = 0; j < exo_names.size() && !found; j++) { - if (case_compare(exo_names[j], var_name) == 0) { + if (case_compare(exo_names[j], var_name)) { found = true; vars.index_[j] = ++var_count; } @@ -2024,7 +2024,7 @@ namespace { } } - bool check_variable_params(size_t p, Excn::Variables &vars) + bool check_variable_params(size_t p, const Excn::Variables &vars) { // Determines the number of variables of type 'type()' that will // be written to the output database. The 'variable_list' vector @@ -2372,7 +2372,7 @@ namespace { } } SMART_ASSERT(gi != gsset_size); - sets[p][i].position_ = gi; + sets[p][i].position_ = gi; // Get the parameters for this sideset... ex_set set{}; @@ -2422,23 +2422,26 @@ namespace { size_t offset = 0; for (size_t p = 0; p < part_count; p++) { - for (size_t lss = 0; lss < sets[p].size(); lss++) { - if (sets[p][lss].position_ == ss) { - Excn::ExodusFile id(p); - sets[p][lss].elems.resize(sets[p][lss].sideCount); - sets[p][lss].sides.resize(sets[p][lss].sideCount); - ex_get_set(id, EX_SIDE_SET, ss_id, sets[p][lss].elems.data(), sets[p][lss].sides.data()); - - // Add these to the elem_side vector... - for (size_t i = 0; i < sets[p][lss].sideCount; i++) { - size_t global_elem = local_mesh[p].localElementToGlobal[sets[p][lss].elems[i] - 1] + 1; - elem_side[offset + i] = std::make_pair((INT)global_elem, (INT)sets[p][lss].sides[i]); - } - offset += sets[p][lss].sideCount; - break; - } - } - } + for (size_t lss = 0; lss < sets[p].size(); lss++) { + if (sets[p][lss].position_ == ss) { + Excn::ExodusFile id(p); + sets[p][lss].elems.resize(sets[p][lss].sideCount); + sets[p][lss].sides.resize(sets[p][lss].sideCount); + ex_get_set(id, EX_SIDE_SET, ss_id, sets[p][lss].elems.data(), + sets[p][lss].sides.data()); + + // Add these to the elem_side vector... + for (size_t i = 0; i < sets[p][lss].sideCount; i++) { + size_t global_elem = + local_mesh[p].localElementToGlobal[sets[p][lss].elems[i] - 1] + 1; + elem_side[offset + i] = + std::make_pair((INT)global_elem, (INT)sets[p][lss].sides[i]); + } + offset += sets[p][lss].sideCount; + break; + } + } + } uniquify(elem_side); @@ -2461,21 +2464,22 @@ namespace { // Try the lower_bound searching of elem_side for now. If // inefficient, fix later... for (size_t p = 0; p < part_count; p++) { - for (size_t lss = 0; lss < sets[p].size(); lss++) { - if (sets[p][lss].position_ == ss) { - sets[p][lss].elemOrderMap.resize(sets[p][lss].sideCount); - for (size_t i = 0; i < sets[p][lss].sideCount; i++) { - size_t global_elem = - local_mesh[p].localElementToGlobal[sets[p][lss].elems[i] - 1] + 1; - std::pair es = std::make_pair((INT)global_elem, (INT)sets[p][lss].sides[i]); - - auto iter = std::lower_bound(elem_side.begin(), elem_side.end(), es); - size_t pos = iter - elem_side.begin(); - sets[p][lss].elemOrderMap[i] = pos; - } - break; - } - } + for (size_t lss = 0; lss < sets[p].size(); lss++) { + if (sets[p][lss].position_ == ss) { + sets[p][lss].elemOrderMap.resize(sets[p][lss].sideCount); + for (size_t i = 0; i < sets[p][lss].sideCount; i++) { + size_t global_elem = + local_mesh[p].localElementToGlobal[sets[p][lss].elems[i] - 1] + 1; + std::pair es = + std::make_pair((INT)global_elem, (INT)sets[p][lss].sides[i]); + + auto iter = std::lower_bound(elem_side.begin(), elem_side.end(), es); + size_t pos = iter - elem_side.begin(); + sets[p][lss].elemOrderMap[i] = pos; + } + break; + } + } } } } @@ -2484,19 +2488,19 @@ namespace { for (size_t ss = 0; ss < glob_ssets.size(); ss++) { size_t sum = 0; for (size_t p = 0; p < part_count; p++) { - for (size_t lss = 0; lss < sets[p].size(); lss++) { - if (sets[p][lss].position_ == ss) { - sets[p][lss].offset_ = sum; - sum += sets[p][lss].entity_count(); - - if (debug_level & 16) { - fmt::print("Part {} ", p + 1); - sets[p][lss].dump(); - } - break; - } - } - } + for (size_t lss = 0; lss < sets[p].size(); lss++) { + if (sets[p][lss].position_ == ss) { + sets[p][lss].offset_ = sum; + sum += sets[p][lss].entity_count(); + + if (debug_level & 16) { + fmt::print("Part {} ", p + 1); + sets[p][lss].dump(); + } + break; + } + } + } } // Free some memory which is no longer needed... @@ -2628,54 +2632,51 @@ namespace { std::string var_name; int out_position = -1; for (auto [v_name, v_blkid] : variable_names) { - if (v_blkid > 0) { - if (var_name != v_name) { - var_name = v_name; - // Find which exodus variable matches this name - out_position = -1; - for (size_t j = 0; j < exo_names.size(); j++) { - if (case_compare(exo_names[j], var_name) == 0) { - out_position = vars.index_[j] - 1; - break; - } - } - if (out_position < 0) { - fmt::print(stderr, - "ERROR: Variable '{}' does not exist on any block in this database.\n", - v_name); - exit(EXIT_FAILURE); + if (v_blkid > 0 && var_name != v_name) { + var_name = v_name; + // Find which exodus variable matches this name + out_position = -1; + for (size_t j = 0; j < exo_names.size(); j++) { + if (case_compare(exo_names[j], var_name)) { + out_position = vars.index_[j] - 1; + break; } + } + if (out_position < 0) { + fmt::print(stderr, "ERROR: Variable '{}' does not exist on any block in this database.\n", + v_name); + exit(EXIT_FAILURE); + } - // Set all truth table entries for this variable to negative - // of current value and then iterate over specified blocks and - // set those positive. This way can make sure that the - // variable truly exists for the block that the user specified. - found_it = false; - for (size_t b = 0; b < global.count(vars.objectType); b++) { - if (glob_blocks[b].id == v_blkid) { - if (glob_blocks[b].truthTable[out_position] == 0) { - fmt::print(stderr, "ERROR: Variable '{}' does not exist on block {}.\n", v_name, - v_blkid); - exit(EXIT_FAILURE); - } - else { - found_it = true; - break; - } + // Set all truth table entries for this variable to negative + // of current value and then iterate over specified blocks and + // set those positive. This way can make sure that the + // variable truly exists for the block that the user specified. + found_it = false; + for (size_t b = 0; b < global.count(vars.objectType); b++) { + if (glob_blocks[b].id == v_blkid) { + if (glob_blocks[b].truthTable[out_position] == 0) { + fmt::print(stderr, "ERROR: Variable '{}' does not exist on block {}.\n", v_name, + v_blkid); + exit(EXIT_FAILURE); } else { - // User does not want this variable output on these blocks... - glob_blocks[b].truthTable[out_position] = 0; + found_it = true; + break; } } - - if (!found_it) { - fmt::print(stderr, - "ERROR: User-specified block id of {} for variable '{}' does not exist.\n", - v_blkid, v_name); - exit(EXIT_FAILURE); + else { + // User does not want this variable output on these blocks... + glob_blocks[b].truthTable[out_position] = 0; } } + + if (!found_it) { + fmt::print(stderr, + "ERROR: User-specified block id of {} for variable '{}' does not exist.\n", + v_blkid, v_name); + exit(EXIT_FAILURE); + } } } } @@ -2753,20 +2754,11 @@ namespace { } } - int case_compare(const std::string &s1, const std::string &s2) + bool case_compare(const std::string &s1, const std::string &s2) { - const char *c1 = s1.c_str(); - const char *c2 = s2.c_str(); - for (;;) { - if (::toupper(*c1) != ::toupper(*c2)) { - return ::toupper(*c1) - ::toupper(*c2); - } - if (*c1 == '\0') { - return 0; - } - c1++; - c2++; - } + return (s1.size() == s2.size()) && + std::equal(s1.begin(), s1.end(), s2.begin(), + [](char a, char b) { return std::tolower(a) == std::tolower(b); }); } void add_info_record(char *info_record, int size) diff --git a/packages/seacas/applications/cpup/CP_SystemInterface.C b/packages/seacas/applications/cpup/CP_SystemInterface.C index 60fc8873f0..dd9d219731 100644 --- a/packages/seacas/applications/cpup/CP_SystemInterface.C +++ b/packages/seacas/applications/cpup/CP_SystemInterface.C @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -51,8 +51,6 @@ namespace { Cpup::SystemInterface::SystemInterface(int rank) : myRank_(rank) { enroll_options(); } -Cpup::SystemInterface::~SystemInterface() = default; - void Cpup::SystemInterface::enroll_options() { options_.usage("[options] basename"); diff --git a/packages/seacas/applications/cpup/CP_SystemInterface.h b/packages/seacas/applications/cpup/CP_SystemInterface.h index 0887f3e5e5..a7295f1e62 100644 --- a/packages/seacas/applications/cpup/CP_SystemInterface.h +++ b/packages/seacas/applications/cpup/CP_SystemInterface.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -20,7 +20,6 @@ namespace Cpup { { public: explicit SystemInterface(int rank = 0); - ~SystemInterface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/applications/ejoin/EJ_SystemInterface.C b/packages/seacas/applications/ejoin/EJ_SystemInterface.C index 13bbca0768..b5a5f81715 100644 --- a/packages/seacas/applications/ejoin/EJ_SystemInterface.C +++ b/packages/seacas/applications/ejoin/EJ_SystemInterface.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -43,8 +43,6 @@ SystemInterface::SystemInterface() enroll_options(); } -SystemInterface::~SystemInterface() = default; - void SystemInterface::enroll_options() { options_.usage("[options] list_of_files_to_join"); diff --git a/packages/seacas/applications/ejoin/EJ_SystemInterface.h b/packages/seacas/applications/ejoin/EJ_SystemInterface.h index a8bf2120d9..4fee64870f 100644 --- a/packages/seacas/applications/ejoin/EJ_SystemInterface.h +++ b/packages/seacas/applications/ejoin/EJ_SystemInterface.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-, 20232023 National Technology & Engineering Solutions +// Copyright(C) 1999-, 20232023, 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. // @@ -16,7 +16,6 @@ class SystemInterface { public: SystemInterface(); - ~SystemInterface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/applications/ejoin/EJoin.C b/packages/seacas/applications/ejoin/EJoin.C index cc2328e7c7..739e81b7ea 100644 --- a/packages/seacas/applications/ejoin/EJoin.C +++ b/packages/seacas/applications/ejoin/EJoin.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -126,7 +126,7 @@ namespace { namespace { void transfer_elementblock(Ioss::Region ®ion, Ioss::Region &output_region, bool create_assemblies, bool debug); - void transfer_assembly(Ioss::Region ®ion, Ioss::Region &output_region, bool debug); + void transfer_assembly(const Ioss::Region ®ion, Ioss::Region &output_region, bool debug); void transfer_nodesets(Ioss::Region ®ion, Ioss::Region &output_region, bool debug); void transfer_sidesets(Ioss::Region ®ion, Ioss::Region &output_region, bool debug); void create_nodal_nodeset(Ioss::Region ®ion, Ioss::Region &output_region, bool debug); @@ -625,7 +625,7 @@ namespace { } } - void transfer_assembly(Ioss::Region ®ion, Ioss::Region &output_region, bool debug) + void transfer_assembly(const Ioss::Region ®ion, Ioss::Region &output_region, bool debug) { // All assemblies on the input parts will be transferred to the output mesh // Possibly renamed if a name conflict diff --git a/packages/seacas/applications/epu/EP_ExodusEntity.h b/packages/seacas/applications/epu/EP_ExodusEntity.h index f2516ebd70..563db19319 100644 --- a/packages/seacas/applications/epu/EP_ExodusEntity.h +++ b/packages/seacas/applications/epu/EP_ExodusEntity.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2022, 2023, 2024 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. * @@ -24,8 +24,6 @@ namespace Excn { class Mesh { public: - Mesh() = default; - size_t count(ObjectType type) const { switch (type) { @@ -64,8 +62,6 @@ namespace Excn { class Assembly { public: - Assembly() = default; - size_t entity_count() const { return entityCount; } ObjectType entity_type() const { return type_; } @@ -89,8 +85,6 @@ namespace Excn { copy_string(elType, other.elType); } - ~Block() = default; - size_t entity_count() const { return elementCount; } char elType[MAX_STR_LENGTH + 1]{}; @@ -121,8 +115,6 @@ namespace Excn { template class NodeSet { public: - NodeSet() = default; - ex_entity_id id{0}; int64_t nodeCount{0}; int64_t dfCount{0}; @@ -155,8 +147,6 @@ namespace Excn { template class SideSet { public: - SideSet() = default; - ex_entity_id id{0}; int64_t sideCount{0}; int64_t dfCount{0}; @@ -189,7 +179,6 @@ namespace Excn { { copy_string(elType, other.elType); } - ~EdgeBlock() = default; char elType[MAX_STR_LENGTH + 1]{}; std::string name_; @@ -235,7 +224,6 @@ namespace Excn { { copy_string(elType, other.elType); } - ~FaceBlock() = default; char elType[MAX_STR_LENGTH + 1]{}; std::string name_; @@ -272,7 +260,6 @@ namespace Excn { class CommunicationMap { public: - CommunicationMap() = default; CommunicationMap(int the_id, int64_t count, char the_type) : id(the_id), entityCount(count), type(the_type) { diff --git a/packages/seacas/applications/epu/EP_ParallelDisks.h b/packages/seacas/applications/epu/EP_ParallelDisks.h index 1a9d7e855c..16f807b160 100644 --- a/packages/seacas/applications/epu/EP_ParallelDisks.h +++ b/packages/seacas/applications/epu/EP_ParallelDisks.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2022, 2023, 2024 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. * @@ -19,7 +19,6 @@ namespace Excn { public: ParallelDisks() = default; - ~ParallelDisks() = default; ParallelDisks(const ParallelDisks &) = delete; ParallelDisks &operator=(const ParallelDisks &) = delete; diff --git a/packages/seacas/applications/epu/EP_SystemInterface.C b/packages/seacas/applications/epu/EP_SystemInterface.C index 6293ac3c4b..af6fb1d0c5 100644 --- a/packages/seacas/applications/epu/EP_SystemInterface.C +++ b/packages/seacas/applications/epu/EP_SystemInterface.C @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -50,8 +50,6 @@ namespace { Excn::SystemInterface::SystemInterface(int rank) : myRank_(rank) { enroll_options(); } -Excn::SystemInterface::~SystemInterface() = default; - void Excn::SystemInterface::enroll_options() { options_.usage("[options] basename"); diff --git a/packages/seacas/applications/epu/EP_SystemInterface.h b/packages/seacas/applications/epu/EP_SystemInterface.h index 3eb73995c4..ca892562b2 100644 --- a/packages/seacas/applications/epu/EP_SystemInterface.h +++ b/packages/seacas/applications/epu/EP_SystemInterface.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * Copyright(C) 1999-2022, 2024 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. * @@ -21,7 +21,6 @@ namespace Excn { { public: explicit SystemInterface(int rank = 0); - ~SystemInterface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/applications/epu/epu.C b/packages/seacas/applications/epu/epu.C index ec2a211202..a0a0cb7ca6 100644 --- a/packages/seacas/applications/epu/epu.C +++ b/packages/seacas/applications/epu/epu.C @@ -169,8 +169,7 @@ namespace { names = nullptr; } - int case_compare(const char *s1, const char *s2); - int case_compare(const std::string &s1, const std::string &s2); + bool case_compare(const std::string &s1, const std::string &s2); template void get_id_map(int exoid, ex_entity_type type, ex_inquiry inq_type, std::vector &ids) @@ -187,7 +186,7 @@ namespace { } for (int i = 0; i < map_count; i++) { - if (case_compare(names[i], "original_global_id_map") == 0) { + if (case_compare(names[i], "original_global_id_map")) { error = ex_get_num_map(exoid, type, i + 1, ids.data()); if (error < 0) { exodus_error(__LINE__); @@ -3018,7 +3017,7 @@ namespace { // If found, create an 'epu'-specific name; don't redo the check; assume ok... bool found = false; for (int i = 0; i < num_input_vars && !found; i++) { - if (case_compare(input_name_list[i], "processor_id") == 0) { + if (case_compare(input_name_list[i], "processor_id")) { found = true; } } @@ -3125,7 +3124,7 @@ namespace { // If 'variable_list' is empty or specified 'ALL', then all // variables are to be output if (variable_list.empty() || - (variable_list.size() == 1 && case_compare(variable_list[0].first, "all") == 0)) { + (variable_list.size() == 1 && case_compare(variable_list[0].first, "all"))) { for (size_t i = 0; i < vars.index_.size(); i++) { vars.index_[i] = i + 1; } @@ -3136,7 +3135,7 @@ namespace { // Another possibility is user specifies "NONE" for the variable // list so no variables will be written. Just return 0 or 1 based // on the 'add_processor_id' setting. Default var_index is ok. - if (variable_list.size() == 1 && case_compare(variable_list[0].first, "none") == 0) { + if (variable_list.size() == 1 && case_compare(variable_list[0].first, "none")) { vars.outputCount = extra; return; } @@ -3165,7 +3164,7 @@ namespace { var_name = elem.first; bool found = false; for (size_t j = 0; j < exo_names.size() && !found; j++) { - if (case_compare(exo_names[j], var_name) == 0) { + if (case_compare(exo_names[j], var_name)) { found = true; vars.index_[j] = ++var_count; } @@ -4583,7 +4582,7 @@ namespace { // Find which exodus variable matches this name out_position = -1; for (size_t j = 0; j < exo_names.size(); j++) { - if (case_compare(exo_names[j], var_name) == 0) { + if (case_compare(exo_names[j], var_name)) { out_position = vars.index_[j] - 1; break; } @@ -4721,25 +4720,11 @@ namespace { } } - int case_compare(const char *s1, const char *s2) + bool case_compare(const std::string &s1, const std::string &s2) { - const char *c1 = s1; - const char *c2 = s2; - for (;;) { - if (::toupper(*c1) != ::toupper(*c2)) { - return ::toupper(*c1) - ::toupper(*c2); - } - if (*c1 == '\0') { - return 0; - } - c1++; - c2++; - } - } - - int case_compare(const std::string &s1, const std::string &s2) - { - return case_compare(s1.c_str(), s2.c_str()); + return (s1.size() == s2.size()) && + std::equal(s1.begin(), s1.end(), s2.begin(), + [](char a, char b) { return std::tolower(a) == std::tolower(b); }); } void add_info_record(char *info_record, int size) diff --git a/packages/seacas/applications/exodiff/ED_SystemInterface.C b/packages/seacas/applications/exodiff/ED_SystemInterface.C index e3c37b3b08..482ec97e81 100644 --- a/packages/seacas/applications/exodiff/ED_SystemInterface.C +++ b/packages/seacas/applications/exodiff/ED_SystemInterface.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -249,8 +249,6 @@ namespace { SystemInterface::SystemInterface() { enroll_options(); } -SystemInterface::~SystemInterface() = default; - void SystemInterface::show_version() { fmt::print("EXODIFF\t(Version: {}) Modified: {}\n", version, verdate); diff --git a/packages/seacas/applications/exodiff/ED_SystemInterface.h b/packages/seacas/applications/exodiff/ED_SystemInterface.h index 4347563292..f78794d70b 100644 --- a/packages/seacas/applications/exodiff/ED_SystemInterface.h +++ b/packages/seacas/applications/exodiff/ED_SystemInterface.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2024 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. // @@ -17,7 +17,6 @@ class SystemInterface { public: SystemInterface(); - ~SystemInterface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/applications/exodiff/ED_Version.h b/packages/seacas/applications/exodiff/ED_Version.h index 5cc927bbd0..08b16c94c4 100644 --- a/packages/seacas/applications/exodiff/ED_Version.h +++ b/packages/seacas/applications/exodiff/ED_Version.h @@ -1,9 +1,9 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // // See packages/seacas/LICENSE for details #pragma once -static const std::string version("3.28"); -static const std::string verdate("2023-11-14"); +static const std::string version("3.31"); +static const std::string verdate("2024-01-10"); diff --git a/packages/seacas/applications/exodiff/assembly.h b/packages/seacas/applications/exodiff/assembly.h index 1554d6734a..838db12bcc 100644 --- a/packages/seacas/applications/exodiff/assembly.h +++ b/packages/seacas/applications/exodiff/assembly.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -17,12 +17,12 @@ template class Assembly : public Exo_Entity public: Assembly(); Assembly(int file_id, size_t assembly_id); - ~Assembly() override = default; Assembly(const Assembly &) = delete; const Assembly &operator=(const Assembly &) = delete; ex_entity_type Type() const { return assembly_type; } const std::vector &Entities() const { return entities; } + size_t Size() const override { return entities.size(); } private: int Check_State() const override; diff --git a/packages/seacas/applications/exodiff/check.C b/packages/seacas/applications/exodiff/check.C index db9d47d138..f1ce9559e4 100644 --- a/packages/seacas/applications/exodiff/check.C +++ b/packages/seacas/applications/exodiff/check.C @@ -260,12 +260,7 @@ namespace { Assembly *assembly1 = file1.Get_Assembly_by_Index(b); if (assembly1 != nullptr) { Assembly *assembly2 = nullptr; - if (interFace.by_name) { - assembly2 = file2.Get_Assembly_by_Name(assembly1->Name()); - } - else { - assembly2 = file2.Get_Assembly_by_Id(assembly1->Id()); - } + assembly2 = file2.Get_Assembly_by_Name(assembly1->Name()); if (assembly2 == nullptr) { Warning(fmt::format(".. Assembly '{}' with id {} exists in first " "file but not the second.\n", @@ -285,12 +280,7 @@ namespace { Assembly *assembly2 = file2.Get_Assembly_by_Index(b); if (assembly2 != nullptr) { Assembly *assembly1 = nullptr; - if (interFace.by_name) { - assembly1 = file1.Get_Assembly_by_Name(assembly2->Name()); - } - else { - assembly1 = file1.Get_Assembly_by_Id(assembly2->Id()); - } + assembly1 = file1.Get_Assembly_by_Name(assembly2->Name()); if (assembly1 == nullptr) { Warning(fmt::format(".. Assembly '{}' with id {} exists in second " "file but not the first.\n", @@ -417,10 +407,10 @@ namespace { } if (assembly1->Size() != assembly2->Size()) { Warning(fmt::format(".. Assembly '{}': number of entities doesn't agree ({} != {}).\n", - assembly1->Name(), assembly1->Size(), assembly2->Size())); + assembly1->Name(), assembly1->Entities().size(), assembly2->Entities().size())); is_same = false; } - if ((assembly1->Type() == assembly2->Type()) && (assembly1->Size() == assembly2->Size())) { + if ((assembly1->Type() == assembly2->Type()) && (assembly1->Entities().size() == assembly2->Entities().size())) { // Check membership of the entities list... if (!std::is_permutation(assembly1->Entities().begin(), assembly1->Entities().end(), assembly2->Entities().begin())) { diff --git a/packages/seacas/applications/exodiff/exo_block.h b/packages/seacas/applications/exodiff/exo_block.h index 04eabb23c8..25496a5221 100644 --- a/packages/seacas/applications/exodiff/exo_block.h +++ b/packages/seacas/applications/exodiff/exo_block.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -18,7 +18,6 @@ template class Exo_Block : public Exo_Entity Exo_Block(); Exo_Block(int file_id, size_t exo_block_id); Exo_Block(int file_id, size_t id, const char *type, size_t num_e, size_t num_npe); - ~Exo_Block() override = default; Exo_Block(const Exo_Block &) = delete; const Exo_Block &operator=(const Exo_Block &) = delete; diff --git a/packages/seacas/applications/exodiff/exo_entity.C b/packages/seacas/applications/exodiff/exo_entity.C index 007ce6918c..bc8f6c079d 100644 --- a/packages/seacas/applications/exodiff/exo_entity.C +++ b/packages/seacas/applications/exodiff/exo_entity.C @@ -332,11 +332,13 @@ void Exo_Entity::internal_load_params() if (name[0] != '\0') { name_ = name.data(); to_lower(name_); + generatedName_ = false; } else { name_ = short_label(); name_ += "_"; name_ += std::to_string(id_); + generatedName_ = true; } } numVars = get_num_variables(fileId, exodus_type(), label()); diff --git a/packages/seacas/applications/exodiff/exo_entity.h b/packages/seacas/applications/exodiff/exo_entity.h index e48ed77f28..c6fdf920f2 100644 --- a/packages/seacas/applications/exodiff/exo_entity.h +++ b/packages/seacas/applications/exodiff/exo_entity.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -32,7 +32,7 @@ class Exo_Entity Exo_Entity(const Exo_Entity &) = delete; const Exo_Entity &operator=(const Exo_Entity &) = delete; - size_t Size() const { return numEntity; } + virtual size_t Size() const { return numEntity; } size_t Id() const { return id_; } size_t Index() const { return index_; } diff --git a/packages/seacas/applications/exomatlab/EML_SystemInterface.h b/packages/seacas/applications/exomatlab/EML_SystemInterface.h index 711372ad2e..7c24e14184 100644 --- a/packages/seacas/applications/exomatlab/EML_SystemInterface.h +++ b/packages/seacas/applications/exomatlab/EML_SystemInterface.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -13,7 +13,6 @@ class SystemInterface { public: SystemInterface(); - ~SystemInterface() = default; bool parse_options(int argc, char **argv); diff --git a/packages/seacas/applications/nas2exo/N2ENasReader.h b/packages/seacas/applications/nas2exo/N2ENasReader.h index a87ac53370..a493e6174e 100644 --- a/packages/seacas/applications/nas2exo/N2ENasReader.h +++ b/packages/seacas/applications/nas2exo/N2ENasReader.h @@ -2,7 +2,7 @@ // Name : testnas2exo.cpp // Author : Ramon J. Moral (STRA LLC), John Niederhaus (Coordinator, SNL) // Version : -// Copyright : (c) Sandia National Labs 2020, 2021, 2022 +// Copyright : (c) Sandia National Labs 2020, 2021, 2022, 2024 // Description : Testing nas2exo Library, C++ 14 //============================================================================ @@ -24,8 +24,6 @@ namespace NasModules { public: N2ENasReader(std::string ifname = ""); - virtual ~N2ENasReader() = default; - inline unsigned getLineCount() { return this->lineCount; }; inline size_t getNumberGridPts() { return this->gridList.size(); }; inline size_t getNumberElems() { return this->elementList.size(); }; diff --git a/packages/seacas/applications/nas2exo/nas2exo.C b/packages/seacas/applications/nas2exo/nas2exo.C index 4e01d573f3..5b6901f725 100644 --- a/packages/seacas/applications/nas2exo/nas2exo.C +++ b/packages/seacas/applications/nas2exo/nas2exo.C @@ -162,7 +162,7 @@ namespace { bool inputFileExists(const std::string &infile) { - std::ifstream inf(infile.c_str()); + std::ifstream inf(infile); return inf.good(); } diff --git a/packages/seacas/applications/nem_slice/elb.h b/packages/seacas/applications/nem_slice/elb.h index ebc957f935..20321841df 100644 --- a/packages/seacas/applications/nem_slice/elb.h +++ b/packages/seacas/applications/nem_slice/elb.h @@ -13,7 +13,7 @@ #include #include -#define ELB_VERSION "4.19" +#define ELB_VERSION "4.20" #define UTIL_NAME "nem_slice" #define ELB_FALSE 0 #define ELB_TRUE 1 @@ -141,7 +141,7 @@ struct Solver_Description /* Structure used to store information about the weighting scheme, if * any, that is to be used. */ -template struct Weight_Description +struct Weight_Description { int type{-1}; /* See weight type below for possible types */ int ow_read{0}; /* 1 if element block settings overwrite exodus file read */ @@ -156,16 +156,16 @@ template struct Weight_Description int nvals{0}; /* vectors to hold element block weights */ - std::vector elemblk{}; /* Id of element block */ - std::vector elemblk_wgt{}; /* Weight of that element block */ + std::vector elemblk{}; /* Id of element block */ + std::vector elemblk_wgt{}; /* Weight of that element block */ /* vector to indicate if weight value has already been overwritten */ - std::vector ow{}; + std::vector ow{}; std::vector vertices{}; std::vector edges{}; - Weight_Description() = default; + Weight_Description() = default; }; /* Structure used to store information about the FEM mesh */ diff --git a/packages/seacas/applications/nem_slice/elb_exo.h b/packages/seacas/applications/nem_slice/elb_exo.h index ab3522fe59..3bd1b8d245 100644 --- a/packages/seacas/applications/nem_slice/elb_exo.h +++ b/packages/seacas/applications/nem_slice/elb_exo.h @@ -12,7 +12,8 @@ /* Function prototypes */ template int read_exo_weights(Problem_Description *prob, /* Pointer to problem info structure */ - Weight_Description *weight); /* Pointer to weight info structure */ + Weight_Description *weight, /* Pointer to weight info structure */ + INT dummy); template int read_mesh_params(const std::string &exo_file, /* Name of ExodusII geometry file */ @@ -24,9 +25,9 @@ template int read_mesh(const std::string &exo_file, /* Name of ExodusII geometry file */ Problem_Description *problem, /* Problem information */ Mesh_Description *mesh, /* Mesh information structure */ - Weight_Description *weight); /* Weight specification structure */ + Weight_Description *weight); /* Weight specification structure */ template int init_weight_struct(Problem_Description *problem, /* Problem information */ Mesh_Description *mesh, /* Mesh information structure */ - Weight_Description *weight); /* Weight specification structure */ + Weight_Description *weight); /* Weight specification structure */ diff --git a/packages/seacas/applications/nem_slice/elb_exo_util.C b/packages/seacas/applications/nem_slice/elb_exo_util.C index bf5620901c..a8e99deaa5 100644 --- a/packages/seacas/applications/nem_slice/elb_exo_util.C +++ b/packages/seacas/applications/nem_slice/elb_exo_util.C @@ -19,7 +19,7 @@ #include #include -#include "elb.h" // for Weight_Description, etc +#include "elb.h" // for Weight_Description, etc #include "elb_elem.h" // for get_elem_type, E_Type, etc #include "elb_err.h" // for Gen_Error, MAX_ERR_MSG #include "elb_exo.h" @@ -34,11 +34,11 @@ * This function reads the nodal or elemental values from an ExodusII file * which will be used by Chaco for weighting of the graph. *****************************************************************************/ -template int read_exo_weights(Problem_Description *prob, Weight_Description *weight); -template int read_exo_weights(Problem_Description *prob, Weight_Description *weight); +template int read_exo_weights(Problem_Description *prob, Weight_Description *weight, int dummy); +template int read_exo_weights(Problem_Description *prob, Weight_Description *weight, int64_t dummy); template -int read_exo_weights(Problem_Description *prob, Weight_Description *weight) +int read_exo_weights(Problem_Description *prob, Weight_Description *weight, INT /*dummy*/) { int exoid; /*---------------------------Execution Begins--------------------------------*/ @@ -276,13 +276,13 @@ int read_mesh_params(const std::string &exo_file, Problem_Description *problem, * This function reads in the finite element mesh. *****************************************************************************/ template int read_mesh(const std::string &exo_file, Problem_Description *problem, - Mesh_Description *mesh, Weight_Description *weight); + Mesh_Description *mesh, Weight_Description *weight); template int read_mesh(const std::string &exo_file, Problem_Description *problem, - Mesh_Description *mesh, Weight_Description *weight); + Mesh_Description *mesh, Weight_Description *weight); template int read_mesh(const std::string &exo_file, Problem_Description *problem, - Mesh_Description *mesh, Weight_Description *weight) + Mesh_Description *mesh, Weight_Description *weight) { float version; float *xptr; @@ -451,13 +451,13 @@ int read_mesh(const std::string &exo_file, Problem_Description *problem, * This function initializes the weight structure given the current mesh. *****************************************************************************/ template int init_weight_struct(Problem_Description *problem, Mesh_Description *mesh, - Weight_Description *weight); + Weight_Description *weight); template int init_weight_struct(Problem_Description *problem, Mesh_Description *mesh, - Weight_Description *weight); + Weight_Description *weight); template int init_weight_struct(Problem_Description *problem, Mesh_Description *mesh, - Weight_Description *weight) + Weight_Description *weight) { if (problem->type == NODAL) { weight->nvals = mesh->num_nodes; diff --git a/packages/seacas/applications/nem_slice/elb_graph.C b/packages/seacas/applications/nem_slice/elb_graph.C index 71f88a55de..81c234ea7c 100644 --- a/packages/seacas/applications/nem_slice/elb_graph.C +++ b/packages/seacas/applications/nem_slice/elb_graph.C @@ -33,7 +33,7 @@ namespace { template int find_adjacency(Problem_Description * /*problem*/, Mesh_Description * /*mesh*/, - Graph_Description * /*graph*/, Weight_Description * /*weight*/, + Graph_Description * /*graph*/, Weight_Description * /*weight*/, Sphere_Info * /*sphere*/); } // namespace /*****************************************************************************/ @@ -44,16 +44,16 @@ namespace { * This function does the work to generate the graph from the FE mesh. *****************************************************************************/ template int generate_graph(Problem_Description *problem, Mesh_Description *mesh, - Graph_Description *graph, Weight_Description *weight, + Graph_Description *graph, Weight_Description *weight, Sphere_Info *sphere); template int generate_graph(Problem_Description *problem, Mesh_Description *mesh, - Graph_Description *graph, Weight_Description *weight, + Graph_Description *graph, Weight_Description *weight, Sphere_Info *sphere); template int generate_graph(Problem_Description *problem, Mesh_Description *mesh, - Graph_Description *graph, Weight_Description *weight, + Graph_Description *graph, Weight_Description *weight, Sphere_Info *sphere) { double time1 = get_time(); @@ -180,7 +180,7 @@ namespace { *****************************************************************************/ template int find_adjacency(Problem_Description *problem, Mesh_Description *mesh, - Graph_Description *graph, Weight_Description *weight, + Graph_Description *graph, Weight_Description *weight, Sphere_Info *sphere) { std::vector pt_list; diff --git a/packages/seacas/applications/nem_slice/elb_graph.h b/packages/seacas/applications/nem_slice/elb_graph.h index fbb801e976..b30c28e69e 100644 --- a/packages/seacas/applications/nem_slice/elb_graph.h +++ b/packages/seacas/applications/nem_slice/elb_graph.h @@ -11,7 +11,7 @@ struct Problem_Description; struct Sphere_Info; template struct Graph_Description; template struct Mesh_Description; -template struct Weight_Description; +struct Weight_Description; template int generate_graph(Problem_Description *problem, /* Pointer to structure containing information @@ -19,6 +19,6 @@ int generate_graph(Problem_Description *problem, /* Pointer to structure cont Mesh_Description *mesh, /* Pointer to structure containing the mesh */ Graph_Description *graph, /* Pointer to structure in which to store * the graph. */ - Weight_Description *weight, /* Pointer to structure for graph weighting */ + Weight_Description *weight, /* Pointer to structure for graph weighting */ Sphere_Info *sphere /* Pointer to sphere adjustment structure */ ); diff --git a/packages/seacas/applications/nem_slice/elb_inp.C b/packages/seacas/applications/nem_slice/elb_inp.C index cb0a205313..9f45047c89 100644 --- a/packages/seacas/applications/nem_slice/elb_inp.C +++ b/packages/seacas/applications/nem_slice/elb_inp.C @@ -60,13 +60,13 @@ template int cmd_line_arg_parse(int argc, char *argv[], std::string &exoII_inp_f std::string &ascii_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *prob, Solver_Description *solver, - Weight_Description *weight); + Weight_Description *weight); template int cmd_line_arg_parse(int argc, char *argv[], std::string &exoII_inp_file, std::string &ascii_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *prob, Solver_Description *solver, - Weight_Description *weight); + Weight_Description *weight); template int cmd_line_arg_parse(int argc, char *argv[], /* Args as passed by main() */ @@ -77,7 +77,7 @@ int cmd_line_arg_parse(int argc, char *argv[], /* Args as passe LB_Description *lb, /* Structure for load balance description */ Problem_Description *prob, /* Structure for various problem params */ Solver_Description *solver, /* Structure for eigen solver params */ - Weight_Description *weight /* Structure for weighting graph */ + Weight_Description *weight /* Structure for weighting graph */ ) { int opt_let; @@ -633,17 +633,17 @@ value\n"); template int read_cmd_file(std::string &ascii_inp_file, std::string &exoII_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *problem, - Solver_Description *solver, Weight_Description *weight); + Solver_Description *solver, Weight_Description *weight); template int read_cmd_file(std::string &ascii_inp_file, std::string &exoII_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *problem, - Solver_Description *solver, Weight_Description *weight); + Solver_Description *solver, Weight_Description *weight); template int read_cmd_file(std::string &ascii_inp_file, std::string &exoII_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *problem, Solver_Description *solver, - Weight_Description *weight) + Weight_Description *weight) { FILE *inp_fd; std::string ctemp; @@ -1301,18 +1301,18 @@ int read_cmd_file(std::string &ascii_inp_file, std::string &exoII_inp_file, template int check_inp_specs(std::string &exoII_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *prob, Solver_Description *solver, - Weight_Description *weight); + Weight_Description *weight); template int check_inp_specs(std::string &exoII_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *prob, Solver_Description *solver, - Weight_Description *weight); + Weight_Description *weight); template int check_inp_specs(std::string &exoII_inp_file, std::string &nemI_out_file, Machine_Description *machine, LB_Description *lb, Problem_Description *prob, Solver_Description *solver, - Weight_Description *weight) + Weight_Description *weight) { /* Check that an input ExodusII file name was specified */ if (exoII_inp_file.empty()) { diff --git a/packages/seacas/applications/nem_slice/elb_inp.h b/packages/seacas/applications/nem_slice/elb_inp.h index f1e01bf45f..f122a8602c 100644 --- a/packages/seacas/applications/nem_slice/elb_inp.h +++ b/packages/seacas/applications/nem_slice/elb_inp.h @@ -12,7 +12,7 @@ struct Machine_Description; struct Problem_Description; struct Solver_Description; template struct LB_Description; -template struct Weight_Description; +struct Weight_Description; /* Prototype for command-line parsing function */ template @@ -30,7 +30,7 @@ int cmd_line_arg_parse( * information about the run */ Solver_Description *solver, /* Pointer to structure in which to place parameters * for the eigensolver */ - Weight_Description *weight /* Pointer to structure in which to place parameters + Weight_Description *weight /* Pointer to structure in which to place parameters * for the graph weighting scheme */ ); @@ -47,7 +47,7 @@ int read_cmd_file(std::string &ascii_inp_file, /* The ASCII input file n * information about the run */ Solver_Description *solver, /* Pointer to structure in which to place parameters * for the eigensolver */ - Weight_Description *weight /* Pointer to structure in which to place + Weight_Description *weight /* Pointer to structure in which to place * parameters for the eigensolver */ ); @@ -63,7 +63,7 @@ int check_inp_specs(std::string &exoII_inp_file, /* The ExodusII input F * information about the run */ Solver_Description *solver, /* Pointer to structure in which to place parameters * for the eigensolver */ - Weight_Description *weight /* Pointer to structure in which to place + Weight_Description *weight /* Pointer to structure in which to place * parameters for the weighting scheme */ ); diff --git a/packages/seacas/applications/nem_slice/elb_loadbal.C b/packages/seacas/applications/nem_slice/elb_loadbal.C index 61124d49a4..5b036f6345 100644 --- a/packages/seacas/applications/nem_slice/elb_loadbal.C +++ b/packages/seacas/applications/nem_slice/elb_loadbal.C @@ -104,12 +104,12 @@ namespace { template int generate_loadbal(Machine_Description *machine, Problem_Description *problem, Mesh_Description *mesh, LB_Description *lb, Solver_Description *solve, Graph_Description *graph, - Weight_Description *weight, Sphere_Info *sphere, int argc, + Weight_Description *weight, Sphere_Info *sphere, int argc, char *argv[]); template int generate_loadbal(Machine_Description *machine, Problem_Description *problem, Mesh_Description *mesh, LB_Description *lb, Solver_Description *solve, Graph_Description *graph, - Weight_Description *weight, Sphere_Info *sphere, int argc, + Weight_Description *weight, Sphere_Info *sphere, int argc, char *argv[]); /* Variables used in Chaco */ @@ -123,7 +123,7 @@ template int generate_loadbal(Machine_Description *machine, Problem_Description *problem, Mesh_Description *mesh, LB_Description *lb, Solver_Description *solve, Graph_Description *graph, - Weight_Description *weight, Sphere_Info *sphere, int argc, char *argv[]) + Weight_Description *weight, Sphere_Info *sphere, int argc, char *argv[]) { const char *assignfile = nullptr; diff --git a/packages/seacas/applications/nem_slice/elb_loadbal.h b/packages/seacas/applications/nem_slice/elb_loadbal.h index 5987c1a42e..322a3a06b2 100644 --- a/packages/seacas/applications/nem_slice/elb_loadbal.h +++ b/packages/seacas/applications/nem_slice/elb_loadbal.h @@ -14,13 +14,13 @@ struct Sphere_Info; template struct Graph_Description; template struct LB_Description; template struct Mesh_Description; -template struct Weight_Description; +struct Weight_Description; template int generate_loadbal(Machine_Description *machine, Problem_Description *problem, Mesh_Description *mesh, LB_Description *lb, Solver_Description *solve, Graph_Description *graph, - Weight_Description *weight, Sphere_Info *sphere, int argc, char *argv[]); + Weight_Description *weight, Sphere_Info *sphere, int argc, char *argv[]); template int generate_maps(Machine_Description *machine, Problem_Description *problem, diff --git a/packages/seacas/applications/nem_slice/elb_main.C b/packages/seacas/applications/nem_slice/elb_main.C index 3b3b08bfbf..933177bc84 100644 --- a/packages/seacas/applications/nem_slice/elb_main.C +++ b/packages/seacas/applications/nem_slice/elb_main.C @@ -37,7 +37,7 @@ namespace { template void print_input(Machine_Description * /*machine*/, LB_Description * /*lb*/, Problem_Description * /*prob*/, Solver_Description * /*solver*/, - Weight_Description * /*weight*/); + Weight_Description * /*weight*/); } // namespace /*****************************************************************************/ @@ -174,7 +174,7 @@ template int internal_main(int argc, char *argv[], INT /* dummy * LB_Description lb; Problem_Description problem; Solver_Description solver; - Weight_Description weight; + Weight_Description weight; Mesh_Description mesh; Sphere_Info sphere; Graph_Description graph; @@ -266,7 +266,7 @@ template int internal_main(int argc, char *argv[], INT /* dummy * /* If desired, read in the weighting factors from the ExodusII file */ if (weight.type & READ_EXO) { time1 = get_time(); - if (!read_exo_weights(&problem, &weight)) { + if (!read_exo_weights(&problem, &weight, (INT)0)) { fmt::print(stderr, "Error during read of ExodusII weights\n"); error_report(); exit(1); @@ -515,7 +515,7 @@ template int internal_main(int argc, char *argv[], INT /* dummy * namespace { template void print_input(Machine_Description *machine, LB_Description *lb, Problem_Description *prob, - Solver_Description *solver, Weight_Description *weight) + Solver_Description *solver, Weight_Description *weight) { fmt::print("{} version {}\n", UTIL_NAME, ELB_VERSION); diff --git a/packages/seacas/applications/nem_slice/elb_util.C b/packages/seacas/applications/nem_slice/elb_util.C index c26f5dbdcc..fe26cb3828 100644 --- a/packages/seacas/applications/nem_slice/elb_util.C +++ b/packages/seacas/applications/nem_slice/elb_util.C @@ -393,8 +393,10 @@ int64_t find_int(INT value1, INT value2, size_t start, size_t stop, INT *vector1 *****************************************************************************/ template int64_t in_list(int value, size_t count, const int *vector); template int64_t in_list(int64_t value, size_t count, const int64_t *vector); +template int64_t in_list(int value, size_t count, const int64_t *vector); +template int64_t in_list(int64_t value, size_t count, const int *vector); -template int64_t in_list(INT value, size_t count, const INT *vector) +template int64_t in_list(INT value, size_t count, const INT2 *vector) { for (size_t i = 0; i < count; i++) { if (vector[i] == value) { @@ -406,8 +408,10 @@ template int64_t in_list(INT value, size_t count, const INT *vect template int64_t in_list(int value, const std::vector &vector); template int64_t in_list(int64_t value, const std::vector &vector); +template int64_t in_list(int value, const std::vector &vector); +template int64_t in_list(int64_t value, const std::vector &vector); -template int64_t in_list(INT value, const std::vector &vector) +template int64_t in_list(INT value, const std::vector &vector) { size_t count = vector.size(); for (size_t i = 0; i < count; i++) { diff --git a/packages/seacas/applications/nem_slice/elb_util.h b/packages/seacas/applications/nem_slice/elb_util.h index b58818c669..4121fc98b3 100644 --- a/packages/seacas/applications/nem_slice/elb_util.h +++ b/packages/seacas/applications/nem_slice/elb_util.h @@ -95,9 +95,9 @@ void find_first_last(INT val, size_t vecsize, INT *vector, INT *first, INT *last template int64_t find_int(INT value1, INT value2, size_t start, size_t stop, INT *vector1, INT *vector2); -template int64_t in_list(INT value, size_t count, const INT *vector); +template int64_t in_list(INT value, size_t count, const INT2 *vector); -template int64_t in_list(INT value, const std::vector &vector); +template int64_t in_list(INT value, const std::vector &vector); extern int roundfloat(float value /* the value to be rounded */ ); diff --git a/packages/seacas/applications/nem_slice/fix_column_partitions.C b/packages/seacas/applications/nem_slice/fix_column_partitions.C index dd269cab67..e27c0aeb8e 100644 --- a/packages/seacas/applications/nem_slice/fix_column_partitions.C +++ b/packages/seacas/applications/nem_slice/fix_column_partitions.C @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2021, 2023, 2024 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. * @@ -28,7 +28,7 @@ namespace { @param side_id Side across which we want to find an adjacent element @param nadj Number of elements adjacent to cur_elem (from graph description) @param adj Pointer to elements adjacent to cur_elem (from graph description) - @param global_connect Global connectivity array + @param mesh Mesh Description to get connectivity, element types, ... @param adj_elem ID of adjacent element (-1 if not found) @param adj_side Local ID of common side in adjacent element (0 if adj_elem not found) */ diff --git a/packages/seacas/applications/slice/SL_Decompose.C b/packages/seacas/applications/slice/SL_Decompose.C index b239094672..72006cd0c1 100644 --- a/packages/seacas/applications/slice/SL_Decompose.C +++ b/packages/seacas/applications/slice/SL_Decompose.C @@ -101,20 +101,11 @@ namespace { throw std::runtime_error(errmsg.str()); } - int case_compare(const char *s1, const char *s2) + bool case_compare(const std::string &s1, const std::string &s2) { - const char *c1 = s1; - const char *c2 = s2; - for (;;) { - if (::toupper(*c1) != ::toupper(*c2)) { - return (::toupper(*c1) - ::toupper(*c2)); - } - if (*c1 == '\0') { - return 0; - } - c1++; - c2++; - } + return (s1.size() == s2.size()) && + std::equal(s1.begin(), s1.end(), s2.begin(), + [](char a, char b) { return std::tolower(a) == std::tolower(b); }); } #if USE_ZOLTAN @@ -694,7 +685,7 @@ void decompose_elements(const Ioss::Region ®ion, SystemInterface &interFace, } for (int i = 0; i < map_count; i++) { - if (case_compare(names[i], map_name.c_str()) == 0) { + if (case_compare(names[i], map_name)) { elem_to_proc.resize(element_count); error = ex_get_num_map(exoid, EX_ELEM_MAP, i + 1, elem_to_proc.data()); if (error < 0) { diff --git a/packages/seacas/applications/slice/SL_SystemInterface.C b/packages/seacas/applications/slice/SL_SystemInterface.C index 11a030574a..b8c0859a1a 100644 --- a/packages/seacas/applications/slice/SL_SystemInterface.C +++ b/packages/seacas/applications/slice/SL_SystemInterface.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -38,8 +38,6 @@ namespace { SystemInterface::SystemInterface() { enroll_options(); } -SystemInterface::~SystemInterface() = default; - void SystemInterface::enroll_options() { options_.usage("[options] file_to_split [output_file]"); diff --git a/packages/seacas/applications/slice/SL_SystemInterface.h b/packages/seacas/applications/slice/SL_SystemInterface.h index 6e18156adc..c0f5aef74a 100644 --- a/packages/seacas/applications/slice/SL_SystemInterface.h +++ b/packages/seacas/applications/slice/SL_SystemInterface.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -18,7 +18,6 @@ class SystemInterface { public: SystemInterface(); - ~SystemInterface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/applications/slice/Slice.C b/packages/seacas/applications/slice/Slice.C index fcec96880d..aa29f02d94 100644 --- a/packages/seacas/applications/slice/Slice.C +++ b/packages/seacas/applications/slice/Slice.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -77,7 +77,7 @@ namespace { } } - Ioss::PropertyManager set_properties(SystemInterface &interFace) + Ioss::PropertyManager set_properties(const SystemInterface &interFace) { Ioss::PropertyManager properties; if (interFace.netcdf4_) { @@ -243,10 +243,10 @@ namespace { const auto &blocks = region.get_element_blocks(); for (const auto &block : blocks) { block->field_add(Ioss::Field(decomp_variable_name, region.field_int_type(), IOSS_SCALAR(), - Ioss::Field::TRANSIENT)); + Ioss::Field::TRANSIENT)); if (add_chain_info) { block->field_add( - Ioss::Field("chain", region.field_int_type(), "Real[2]", Ioss::Field::TRANSIENT)); + Ioss::Field("chain", region.field_int_type(), "Real[2]", Ioss::Field::TRANSIENT)); } } region.end_mode(Ioss::STATE_DEFINE_TRANSIENT); diff --git a/packages/seacas/applications/zellij/Cell.h b/packages/seacas/applications/zellij/Cell.h index 8e058764d9..8db0dac916 100644 --- a/packages/seacas/applications/zellij/Cell.h +++ b/packages/seacas/applications/zellij/Cell.h @@ -1,4 +1,4 @@ -// Copyright(C) 2021, 2022 National Technology & Engineering Solutions +// Copyright(C) 2021, 2022, 2024 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. // @@ -37,9 +37,6 @@ enum class Loc { C = 0, BL, B, BR, L, R, TL, T, TR }; class Cell { public: - Cell() = default; - Cell(const Cell &) = default; - std::pair get_coordinate_range(enum Axis) const; void initialize(size_t i, size_t j, std::shared_ptr unit_cell); diff --git a/packages/seacas/applications/zellij/ZE_SystemInterface.C b/packages/seacas/applications/zellij/ZE_SystemInterface.C index 5fd3bdb319..4201d77e78 100644 --- a/packages/seacas/applications/zellij/ZE_SystemInterface.C +++ b/packages/seacas/applications/zellij/ZE_SystemInterface.C @@ -1,4 +1,4 @@ -// Copyright(C) 2021, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 2021, 2022, 2023, 2024 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. // @@ -20,8 +20,6 @@ SystemInterface::SystemInterface(int my_rank) : myRank_(my_rank) { enroll_options(); } -SystemInterface::~SystemInterface() = default; - namespace { void parse_offset(const char *tokens, vector3d &offset, int myRank); } diff --git a/packages/seacas/applications/zellij/ZE_SystemInterface.h b/packages/seacas/applications/zellij/ZE_SystemInterface.h index 5beeae23da..f57f92fd95 100644 --- a/packages/seacas/applications/zellij/ZE_SystemInterface.h +++ b/packages/seacas/applications/zellij/ZE_SystemInterface.h @@ -1,4 +1,4 @@ -// Copyright(C) 2021, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 2021, 2022, 2023, 2024 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. // @@ -19,7 +19,6 @@ class SystemInterface { public: explicit SystemInterface(int my_rank = 0); - ~SystemInterface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/libraries/aprepro_lib/apr_builtin.cc b/packages/seacas/libraries/aprepro_lib/apr_builtin.cc index f02ea1523c..b996a99ff6 100644 --- a/packages/seacas/libraries/aprepro_lib/apr_builtin.cc +++ b/packages/seacas/libraries/aprepro_lib/apr_builtin.cc @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -471,9 +471,9 @@ namespace SEAMS { { double seconds = h * 3600.0 + mi * 60 + se; - int64_t m = static_cast(mon); - int64_t d = static_cast(day); - int64_t y = static_cast(year); + auto m = static_cast(mon); + auto d = static_cast(day); + auto y = static_cast(year); if (m > 2) { m -= 3; @@ -954,7 +954,7 @@ namespace SEAMS { lines << "\t"; for (int ic = 0; ic < cols; ic++) { #if defined FMT_SUPPORT - SEAMS::symrec *format = aprepro->getsym("_FORMAT"); + const SEAMS::symrec *format = aprepro->getsym("_FORMAT"); if (format->value.svar.empty()) { fmt::print(lines, "{}", my_array_data->data[idx++]); } diff --git a/packages/seacas/libraries/aprepro_lib/apr_getline.cc b/packages/seacas/libraries/aprepro_lib/apr_getline.cc index 58946276ca..3840eee6f4 100644 --- a/packages/seacas/libraries/aprepro_lib/apr_getline.cc +++ b/packages/seacas/libraries/aprepro_lib/apr_getline.cc @@ -1,6 +1,6 @@ /* - * Copyright (C) 1991, 1992, 1993, 2021, 2022, 2023 by Chris Thewalt (thewalt@ce.berkeley.edu) + * Copyright (C) 1991, 1992, 1993, 2021, 2022, 2023, 2024 by Chris Thewalt (thewalt@ce.berkeley.edu) * * Permission to use, copy, modify, and distribute this software * for any purpose and without fee is hereby granted, provided @@ -199,13 +199,12 @@ namespace { { #ifdef __unix__ char ch; - int c; - while ((c = read(0, &ch, 1)) == -1) { + while (read(0, &ch, 1) == -1) { if (errno != EINTR) { break; } } - c = (ch <= 0) ? -1 : ch; + int c = (ch <= 0) ? -1 : ch; #endif /* __unix__ */ #ifdef MSDOS int c = _bios_keybrd(_NKEYBRD_READ); diff --git a/packages/seacas/libraries/aprepro_lib/apr_symrec.h b/packages/seacas/libraries/aprepro_lib/apr_symrec.h index f9fcc267f6..724a825fe6 100644 --- a/packages/seacas/libraries/aprepro_lib/apr_symrec.h +++ b/packages/seacas/libraries/aprepro_lib/apr_symrec.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-, 20212021, National Technology & Engineering Solutions +// Copyright(C) 1999-, 20212021, , , 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. // @@ -20,10 +20,6 @@ namespace SEAMS { int cols{0}; array(int r, int c) : rows(r), cols(c) { data.resize(r * c); } - - array(const array &) = default; - array() = default; - ~array() = default; }; struct symrec @@ -68,8 +64,6 @@ namespace SEAMS { array *(*arrfnct_dd)(double, double){nullptr}; array *(*arrfnct_d)(double){nullptr}; array *(*arrfnct_a)(const array *){nullptr}; - - value() = default; } value; symrec *next; diff --git a/packages/seacas/libraries/exodus/include/exodusII.h b/packages/seacas/libraries/exodus/include/exodusII.h index 2b6388ca43..f3ab3b718d 100644 --- a/packages/seacas/libraries/exodus/include/exodusII.h +++ b/packages/seacas/libraries/exodus/include/exodusII.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -1813,27 +1813,31 @@ EXODUS_EXPORT int ex_get_idx(int exoid, /**< NetCDF/Exodus file ID * \defgroup ErrorReturnCodes Error return codes - #exerrval return values * @{ */ -#define EX_MEMFAIL 1000 /**< memory allocation failure flag def */ -#define EX_BADFILEMODE 1001 /**< bad file mode def */ -#define EX_BADFILEID 1002 /**< bad file id def */ -#define EX_WRONGFILETYPE 1003 /**< wrong file type for function */ -#define EX_LOOKUPFAIL 1004 /**< id table lookup failed */ -#define EX_BADPARAM 1005 /**< bad parameter passed */ -#define EX_INTERNAL 1006 /**< internal logic error */ -#define EX_DUPLICATEID 1007 /**< duplicate id found */ -#define EX_DUPLICATEOPEN 1008 /**< duplicate open */ -#define EX_BADFILENAME 1009 /**< empty or null filename specified */ -#define EX_MSG -1000 /**< message print code - no error implied */ -#define EX_PRTLASTMSG -1001 /**< print last error message msg code */ -#define EX_NOTROOTID -1002 /**< file id is not the root id; it is a subgroup id */ -#define EX_LASTERR -1003 /**< in ex_err, use existing err_num value */ -#define EX_NULLENTITY -1006 /**< null entity found */ -#define EX_NOENTITY -1007 /**< no entities of that type on database */ -#define EX_NOTFOUND -1008 /**< could not find requested variable on database */ - -#define EX_FATAL -1 /**< fatal error flag def */ -#define EX_NOERR 0 /**< no error flag def */ -#define EX_WARN 1 /**< warning flag def */ +enum ex_error_return_code { + EX_MEMFAIL = 1000, /**< memory allocation failure flag def */ + EX_BADFILEMODE = 1001, /**< bad file mode def */ + EX_BADFILEID = 1002, /**< bad file id def */ + EX_WRONGFILETYPE = 1003, /**< wrong file type for function */ + EX_LOOKUPFAIL = 1004, /**< id table lookup failed */ + EX_BADPARAM = 1005, /**< bad parameter passed */ + EX_INTERNAL = 1006, /**< internal logic error */ + EX_DUPLICATEID = 1007, /**< duplicate id found */ + EX_DUPLICATEOPEN = 1008, /**< duplicate open */ + EX_BADFILENAME = 1009, /**< empty or null filename specified */ + EX_MSG = -1000, /**< message print code - no error implied */ + EX_PRTLASTMSG = -1001, /**< print last error message msg code */ + EX_NOTROOTID = -1002, /**< file id is not the root id; it is a subgroup id */ + EX_LASTERR = -1003, /**< in ex_err, use existing err_num value */ + EX_NULLENTITY = -1006, /**< null entity found */ + EX_NOENTITY = -1007, /**< no entities of that type on database */ + EX_NOTFOUND = -1008, /**< could not find requested variable on database */ + + EX_FATAL = -1, /**< fatal error flag def */ + EX_NOERR = 0, /**< no error flag def */ + EX_WARN = 1 /**< warning flag def */ +}; +typedef enum ex_error_return_code ex_error_return_code; + /** @} */ #ifdef __cplusplus diff --git a/packages/seacas/libraries/exodus/src/ex_put_var_multi_time.c b/packages/seacas/libraries/exodus/src/ex_put_var_multi_time.c index 3188d5ed3d..b9076b6387 100644 --- a/packages/seacas/libraries/exodus/src/ex_put_var_multi_time.c +++ b/packages/seacas/libraries/exodus/src/ex_put_var_multi_time.c @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2023, 2024 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. * @@ -14,12 +14,9 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex const char *DNUMOBJVAR, int *varid) { int status; - int obj_id_ndx; int dimid, time_dim, numobjdim, dims[2]; - size_t num_obj; - size_t num_obj_var; - size_t num_entity; + size_t obj_id_ndx = 0; int *obj_var_truth_tab; char errmsg[MAX_ERR_LENGTH]; @@ -31,7 +28,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", ex_name_of_object(var_type), obj_id, VOBJID, exoid); ex_err_fn(exoid, __func__, errmsg, status); - return (EX_FATAL); + return EX_FATAL; } obj_id_ndx = obj_id; } @@ -42,14 +39,14 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", ex_name_of_object(var_type), obj_id, VOBJID, exoid); ex_err_fn(exoid, __func__, errmsg, status); - return (EX_FATAL); + return EX_FATAL; } obj_id_ndx = obj_id; } else { /* Determine index of obj_id in VOBJID array */ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); - if (obj_id_ndx <= 0) { + if (obj_id_ndx == 0) { ex_get_err(NULL, NULL, &status); if (status != 0) { @@ -58,14 +55,14 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex "Warning: no variables allowed for NULL block %" PRId64 " in file id %d", obj_id, exoid); ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); - return (EX_WARN); + return EX_WARN; } snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", ex_name_of_object(var_type), obj_id, VOBJID, exoid); ex_err_fn(exoid, __func__, errmsg, status); - return (EX_FATAL); + return EX_FATAL; } } } @@ -76,16 +73,19 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex /* check for the existence of an TNAME variable truth table */ if (nc_inq_varid(exoid, VOBJTAB, varid) == NC_NOERR) { /* find out number of TNAMEs and TNAME variables */ + size_t num_obj = 0; + size_t num_obj_var = 0; + status = exi_get_dimension(exoid, DNUMOBJ, ex_name_of_object(var_type), &num_obj, &dimid, __func__); if (status != NC_NOERR) { - return (status); + return status; } status = exi_get_dimension(exoid, DNUMOBJVAR, ex_name_of_object(var_type), &num_obj_var, &dimid, __func__); if (status != NC_NOERR) { - return (status); + return status; } if (!(obj_var_truth_tab = malloc(num_obj * num_obj_var * sizeof(int)))) { @@ -94,7 +94,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex "truth table in file id %d", ex_name_of_object(var_type), exoid); ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); - return (EX_FATAL); + return EX_FATAL; } /* read in the TNAME variable truth table */ @@ -102,7 +102,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get truth table from file id %d", exoid); ex_err_fn(exoid, __func__, errmsg, status); - return (EX_FATAL); + return EX_FATAL; } if (obj_var_truth_tab[num_obj_var * (obj_id_ndx - 1) + var_index - 1] == 0L) { @@ -111,7 +111,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex errmsg, MAX_ERR_LENGTH, "ERROR: Invalid %s variable %d, %s %" PRId64 " in file id %d", ex_name_of_object(var_type), var_index, ex_name_of_object(var_type), obj_id, exoid); ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); - return (EX_FATAL); + return EX_FATAL; } free(obj_var_truth_tab); } @@ -123,6 +123,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex goto error_ret; /* exit define mode and return */ } + size_t num_entity = 0; exi_get_dimension(exoid, exi_dim_num_entries_in_object(var_type, obj_id_ndx), ex_name_of_object(var_type), &num_entity, &numobjdim, __func__); @@ -130,7 +131,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex if ((status = nc_redef(exoid)) != NC_NOERR) { snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); ex_err_fn(exoid, __func__, errmsg, status); - return (EX_FATAL); + return EX_FATAL; } /* define netCDF variable to store TNAME variable values */ @@ -147,7 +148,7 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex /* leave define mode */ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { - return (EX_FATAL); + return EX_FATAL; } } else { @@ -155,15 +156,15 @@ static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex ex_name_of_object(var_type), exi_name_var_of_object(var_type, var_index, obj_id_ndx), exoid); ex_err_fn(exoid, __func__, errmsg, status); - return (EX_FATAL); + return EX_FATAL; } } - return (EX_NOERR); + return EX_NOERR; /* Fatal error: exit definition mode and return */ error_ret: exi_leavedef(exoid, __func__); - return (EX_FATAL); + return EX_FATAL; } /*! diff --git a/packages/seacas/libraries/ioss/Doxyfile b/packages/seacas/libraries/ioss/Doxyfile index fdda9d803d..7374c09314 100644 --- a/packages/seacas/libraries/ioss/Doxyfile +++ b/packages/seacas/libraries/ioss/Doxyfile @@ -2668,7 +2668,7 @@ PLANTUML_INCLUDE_PATH = # Minimum value: 0, maximum value: 10000, default value: 50. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_GRAPH_MAX_NODES = 250 +DOT_GRAPH_MAX_NODES = 260 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs # generated by dot. A depth value of 3 means that only nodes reachable from the diff --git a/packages/seacas/libraries/ioss/export.tar.gz b/packages/seacas/libraries/ioss/export.tar.gz new file mode 100644 index 0000000000..b5eeec3216 Binary files /dev/null and b/packages/seacas/libraries/ioss/export.tar.gz differ diff --git a/packages/seacas/libraries/ioss/src/Ioss_Assembly.h b/packages/seacas/libraries/ioss/src/Ioss_Assembly.h index bbb4262abf..e9914dec66 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Assembly.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Assembly.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -31,7 +31,6 @@ namespace Ioss { { public: Assembly() = default; // Used for template typing only - ~Assembly() override = default; Assembly(const Assembly &) = default; Assembly(DatabaseIO *io_database, const std::string &my_name); diff --git a/packages/seacas/libraries/ioss/src/Ioss_Blob.h b/packages/seacas/libraries/ioss/src/Ioss_Blob.h index 71da78870c..a819652def 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Blob.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Blob.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -32,7 +32,6 @@ namespace Ioss { public: Blob() = default; // Used for template typing only Blob(const Blob &other) = default; - ~Blob() override = default; Blob(DatabaseIO *io_database, const std::string &my_name, int64_t item_count); diff --git a/packages/seacas/libraries/ioss/src/Ioss_Compare.h b/packages/seacas/libraries/ioss/src/Ioss_Compare.h index c6b38187c6..bbedf224ea 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Compare.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Compare.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2024 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. // @@ -19,9 +19,6 @@ namespace Ioss { class IOSS_EXPORT Compare { public: - Compare() = default; - ~Compare() = default; - // Compare the mesh in 'input_region_1' to 'input_region_2'. Behavior can be controlled // via options in 'options' static bool compare_database(Ioss::Region &input_region_1, Ioss::Region &input_region_2, diff --git a/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.C b/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.C index 3667290ac8..7a7d8d4b61 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.C @@ -877,6 +877,34 @@ namespace Ioss { void DatabaseIO::set_block_omissions(const std::vector &omissions, const std::vector &inclusions) { + if (!omissions.empty() && !inclusions.empty()) { + // Only one can be non-empty + std::ostringstream errmsg; + fmt::print(errmsg, + "ERROR: Only one of element block omission or inclusion can be non-empty" + " [{}]\n", + get_filename()); + IOSS_ERROR(errmsg); + } + + if (!assemblyOmissions.empty() && !inclusions.empty()) { + std::ostringstream errmsg; + fmt::print(errmsg, + "ERROR: Only one of element block inclusion or assembly omission can be non-empty" + " [{}]\n", + get_filename()); + IOSS_ERROR(errmsg); + } + + if (!assemblyInclusions.empty() && !omissions.empty()) { + std::ostringstream errmsg; + fmt::print(errmsg, + "ERROR: Only one of element block omission or assembly inclusion can be non-empty" + " [{}]\n", + get_filename()); + IOSS_ERROR(errmsg); + } + if (!omissions.empty()) { blockOmissions.assign(omissions.cbegin(), omissions.cend()); Ioss::sort(blockOmissions.begin(), blockOmissions.end()); @@ -900,6 +928,24 @@ namespace Ioss { IOSS_ERROR(errmsg); } + if (!blockOmissions.empty() && !inclusions.empty()) { + std::ostringstream errmsg; + fmt::print(errmsg, + "ERROR: Only one of element block omission or assembly inclusion can be non-empty" + " [{}]\n", + get_filename()); + IOSS_ERROR(errmsg); + } + + if (!blockInclusions.empty() && !omissions.empty()) { + std::ostringstream errmsg; + fmt::print(errmsg, + "ERROR: Only one of element block inclusion or assembly omission can be non-empty" + " [{}]\n", + get_filename()); + IOSS_ERROR(errmsg); + } + if (!omissions.empty()) { assemblyOmissions.assign(omissions.cbegin(), omissions.cend()); Ioss::sort(assemblyOmissions.begin(), assemblyOmissions.end()); diff --git a/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.h b/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.h index 428b533496..7860f4b142 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -66,7 +66,9 @@ namespace Ioss { DatabaseIO() = delete; DatabaseIO(const DatabaseIO &) = delete; + DatabaseIO(DatabaseIO &&) = delete; DatabaseIO &operator=(const DatabaseIO &) = delete; + DatabaseIO &operator=(DatabaseIO &&) = delete; virtual ~DatabaseIO(); /** \brief Check to see if database state is OK. diff --git a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C index 83ae1b5848..7f83f00530 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C +++ b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C @@ -1253,26 +1253,41 @@ namespace Ioss { show_progress(__func__); // global_index is 1-based index into global list of elems // [1..global_elem_count] -#if defined(DC_USE_HOPSCOTCH) || defined(DC_USE_ROBIN) +#if defined(DC_USE_HOPSCOTCH) || defined(DC_USE_ROBIN) || defined(DC_USE_VECTOR) elemGTL.reserve(localElementMap.size() + m_importPreLocalElemIndex + importElementMap.size()); #endif for (size_t i = 0; i < localElementMap.size(); i++) { size_t global_index = localElementMap[i] + m_elementOffset + 1; size_t local_index = i + m_importPreLocalElemIndex + 1; +#if defined(DC_USE_VECTOR) + elemGTL.emplace_back(global_index, local_index); +#else elemGTL.insert({global_index, local_index}); +#endif } for (size_t i = 0; i < m_importPreLocalElemIndex; i++) { size_t global_index = importElementMap[i] + 1; size_t local_index = i + 1; +#if defined(DC_USE_VECTOR) + elemGTL.emplace_back(global_index, local_index); +#else elemGTL.insert({global_index, local_index}); +#endif } for (size_t i = m_importPreLocalElemIndex; i < importElementMap.size(); i++) { size_t global_index = importElementMap[i] + 1; size_t local_index = localElementMap.size() + i + 1; +#if defined(DC_USE_VECTOR) + elemGTL.emplace_back(global_index, local_index); +#else elemGTL.insert({global_index, local_index}); +#endif } +#if defined(DC_USE_VECTOR) + Ioss::sort(elemGTL.begin(), elemGTL.end()); +#endif show_progress("build_global_to_local_elem_map end"); } diff --git a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h index d1d949235d..3994033858 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -31,7 +31,7 @@ #include #endif -#define DC_USE_HOPSCOTCH +#define DC_USE_VECTOR #if defined DC_USE_HOPSCOTCH #include #elif defined DC_USE_ROBIN @@ -144,8 +144,6 @@ namespace Ioss { ElementBlockBatchOffset(const ElementBlockBatchOffset &) = delete; ElementBlockBatchOffset(ElementBlockBatchOffset &&) = delete; - ~ElementBlockBatchOffset() = default; - size_t get_ioss_element_size(const std::vector &blockSubsetIndex) const; std::vector get_ioss_offset(const std::vector &blockSubsetIndex, @@ -209,7 +207,15 @@ namespace Ioss { bool i_own_elem(size_t global_index) const { // global_index is 1-based index into global list of elements [1..global_element_count] +#if defined(DC_USE_VECTOR) + return std::binary_search( + elemGTL.begin(), elemGTL.end(), std::pair{global_index, 0}, + [](const std::pair &lhs, const std::pair &val) -> bool { + return lhs.first < val.first; + }); +#else return elemGTL.find(global_index) != elemGTL.end(); +#endif } size_t node_global_to_local(size_t global_index) const @@ -230,8 +236,16 @@ namespace Ioss { // global_index is 1-based index into global list of elements [1..global_node_count] // return value is 1-based index into local list of elements on this // processor (ioss-decomposition) +#if defined(DC_USE_VECTOR) + auto I = lower_bound( + elemGTL.begin(), elemGTL.end(), global_index, + [](const std::pair &lhs, INT val) -> bool { return lhs.first < val; }); + assert(I != elemGTL.end() && I->first == global_index); +#else auto I = elemGTL.find(global_index); +#endif assert(I != elemGTL.end()); + assert(I->first == global_index); return I->second; } @@ -871,6 +885,8 @@ namespace Ioss { tsl::hopscotch_pg_map elemGTL; // Convert from global index to local index (1-based) #elif defined DC_USE_ROBIN tsl::robin_pg_map elemGTL; // Convert from global index to local index (1-based) +#elif defined DC_USE_VECTOR + std::vector> elemGTL; // Convert from global index to local index (1-based) #else // This is the original method that was used in IOSS prior to using hopscotch or robin map. std::map elemGTL; // Convert from global index to local index (1-based) diff --git a/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.C b/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.C index cbc2904d47..b31294b063 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.C +++ b/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2023, 2024 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. // @@ -36,8 +36,6 @@ Ioss::EdgeBlock::EdgeBlock(Ioss::DatabaseIO *io_database, const std::string &my_ } } -Ioss::EdgeBlock::~EdgeBlock() = default; - Ioss::Property Ioss::EdgeBlock::get_implicit_property(const std::string &my_name) const { return Ioss::EntityBlock::get_implicit_property(my_name); diff --git a/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.h b/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.h index 3cb47e8c53..f809b2ccdb 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.h +++ b/packages/seacas/libraries/ioss/src/Ioss_EdgeBlock.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -32,7 +32,6 @@ namespace Ioss { int64_t number_edges); EdgeBlock(const EdgeBlock &) = default; - ~EdgeBlock() override; std::string type_string() const override { return "EdgeBlock"; } std::string short_type_string() const override { return "edgeblock"; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.C b/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.C index 6f63b7786a..2762da54a8 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.C +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2021, 2023, 2024 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. // @@ -37,8 +37,6 @@ namespace Ioss { number_elements)); } - ElementBlock::~ElementBlock() = default; - Property ElementBlock::get_implicit_property(const std::string &my_name) const { return EntityBlock::get_implicit_property(my_name); diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.h b/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.h index 4b4fd983a2..aac8b0db4a 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.h +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementBlock.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -32,7 +32,6 @@ namespace Ioss { const std::string &element_type, int64_t number_elements); ElementBlock(const ElementBlock &) = default; - ~ElementBlock() override; std::string type_string() const override { return "ElementBlock"; } std::string short_type_string() const override { return "block"; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.C b/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.C index aea07ab41a..cc06d4806c 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.C +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -41,8 +41,6 @@ namespace Ioss { return registry_; } - Ioss::ElementPermutation::~ElementPermutation() = default; - ElementPermutation *Ioss::ElementPermutation::factory(const std::string &type) { std::string ltype = Ioss::Utils::lowercase(type); diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.h b/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.h index 24233e4310..96c76f7b81 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.h +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementPermutation.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -59,7 +59,7 @@ namespace Ioss { ElementPermutation(const ElementPermutation &) = delete; ElementPermutation &operator=(const ElementPermutation &) = delete; - virtual ~ElementPermutation(); + virtual ~ElementPermutation() = default; unsigned num_permutations() const; @@ -139,7 +139,6 @@ namespace Ioss { static const char *name; static void factory(); - ~NullPermutation() override = default; NullPermutation(const NullPermutation &) = delete; protected: @@ -152,7 +151,6 @@ namespace Ioss { static const char *name; static void factory(); - ~SpherePermutation() override = default; SpherePermutation(const SpherePermutation &) = delete; protected: @@ -165,7 +163,6 @@ namespace Ioss { static const char *name; static void factory(); - ~LinePermutation() override = default; LinePermutation(const LinePermutation &) = delete; protected: @@ -178,7 +175,6 @@ namespace Ioss { static const char *name; static void factory(); - ~SpringPermutation() override = default; SpringPermutation(const SpringPermutation &) = delete; protected: @@ -191,7 +187,6 @@ namespace Ioss { static const char *name; static void factory(); - ~TriPermutation() override = default; TriPermutation(const TriPermutation &) = delete; protected: @@ -204,7 +199,6 @@ namespace Ioss { static const char *name; static void factory(); - ~QuadPermutation() override = default; QuadPermutation(const QuadPermutation &) = delete; protected: @@ -217,7 +211,6 @@ namespace Ioss { static const char *name; static void factory(); - ~TetPermutation() override = default; TetPermutation(const TetPermutation &) = delete; protected: @@ -230,7 +223,6 @@ namespace Ioss { static const char *name; static void factory(); - ~PyramidPermutation() override = default; PyramidPermutation(const PyramidPermutation &) = delete; protected: @@ -243,7 +235,6 @@ namespace Ioss { static const char *name; static void factory(); - ~WedgePermutation() override = default; WedgePermutation(const WedgePermutation &) = delete; protected: @@ -256,7 +247,6 @@ namespace Ioss { static const char *name; static void factory(); - ~HexPermutation() override = default; HexPermutation(const HexPermutation &) = delete; protected: @@ -271,7 +261,6 @@ namespace Ioss { static void make_super(const std::string &type); static void factory(); static void factory(unsigned n); - ~SuperPermutation() override = default; SuperPermutation(const SuperPermutation &) = delete; static std::string get_name(unsigned n); diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C b/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C index 0bb79eda0d..6bdb9de951 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -61,8 +61,6 @@ Ioss::ETRegistry &Ioss::ElementTopology::registry() return registry_; } -Ioss::ElementTopology::~ElementTopology() = default; - bool Ioss::ElementTopology::edges_similar() const { return true; } bool Ioss::ElementTopology::faces_similar() const { return true; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.h b/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.h index 4d0ac65c02..43d5693965 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.h +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -71,7 +71,7 @@ namespace Ioss { ElementTopology(const ElementTopology &) = delete; ElementTopology &operator=(const ElementTopology &) = delete; - virtual ~ElementTopology(); + virtual ~ElementTopology() = default; const std::string &name() const { return name_; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_EntitySet.h b/packages/seacas/libraries/ioss/src/Ioss_EntitySet.h index 77a612306e..7883c4b4f5 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_EntitySet.h +++ b/packages/seacas/libraries/ioss/src/Ioss_EntitySet.h @@ -43,6 +43,5 @@ namespace Ioss { protected: EntitySet(DatabaseIO *io_database, const std::string &my_name, size_t entity_cnt); EntitySet(const EntitySet &) = default; - ~EntitySet() override = default; }; } // namespace Ioss diff --git a/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.C b/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.C index 78b5529bc4..08f4bbe175 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.C +++ b/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2023, 2024 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. // @@ -35,8 +35,6 @@ Ioss::FaceBlock::FaceBlock(Ioss::DatabaseIO *io_database, const std::string &my_ } } -Ioss::FaceBlock::~FaceBlock() = default; - Ioss::Property Ioss::FaceBlock::get_implicit_property(const std::string &my_name) const { return Ioss::EntityBlock::get_implicit_property(my_name); diff --git a/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.h b/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.h index a283ab568f..8080a25db4 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.h +++ b/packages/seacas/libraries/ioss/src/Ioss_FaceBlock.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -32,7 +32,6 @@ namespace Ioss { int64_t number_faces); FaceBlock(const FaceBlock &) = default; - ~FaceBlock() override; std::string type_string() const override { return "FaceBlock"; } std::string short_type_string() const override { return "faceblock"; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_FaceGenerator.h b/packages/seacas/libraries/ioss/src/Ioss_FaceGenerator.h index 6ac121bd19..d88745ffff 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_FaceGenerator.h +++ b/packages/seacas/libraries/ioss/src/Ioss_FaceGenerator.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -118,7 +118,6 @@ namespace Ioss { { public: explicit FaceGenerator(Ioss::Region ®ion); - ~FaceGenerator() = default; static size_t id_hash(size_t global_id); diff --git a/packages/seacas/libraries/ioss/src/Ioss_Field.h b/packages/seacas/libraries/ioss/src/Ioss_Field.h index 2d27521a9b..afb0ca20fd 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Field.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Field.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -96,12 +96,6 @@ namespace Ioss { Field(std::string name, BasicType type, const VariableType *storage, RoleType role, size_t value_count = 0, size_t index = 0); - Field(const Ioss::Field &from) = default; - Field &operator=(const Field &from) = default; - Field(Ioss::Field &&from) = default; - Field &operator=(Field &&from) = default; - ~Field() = default; - // Compare two fields (used for STL container) bool operator<(const Field &other) const; diff --git a/packages/seacas/libraries/ioss/src/Ioss_FieldManager.h b/packages/seacas/libraries/ioss/src/Ioss_FieldManager.h index afc47acc9e..f1d963900b 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_FieldManager.h +++ b/packages/seacas/libraries/ioss/src/Ioss_FieldManager.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -40,7 +40,6 @@ namespace Ioss { } FieldManager &operator=(const FieldManager &) = delete; - ~FieldManager() = default; // If a field with the same 'name' exists, an exception will be thrown. // Add the specified field to the list. diff --git a/packages/seacas/libraries/ioss/src/Ioss_FileInfo.C b/packages/seacas/libraries/ioss/src/Ioss_FileInfo.C index dafc99018b..ded57b377e 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_FileInfo.C +++ b/packages/seacas/libraries/ioss/src/Ioss_FileInfo.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -85,8 +85,6 @@ namespace Ioss { exists_ = readable_ || internal_access(filename_, F_OK); } - FileInfo::~FileInfo() = default; - //: Returns TRUE if the file exists (is readable) bool FileInfo::exists() const { return exists_; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_FileInfo.h b/packages/seacas/libraries/ioss/src/Ioss_FileInfo.h index 167c3ea06c..f7cb877655 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_FileInfo.h +++ b/packages/seacas/libraries/ioss/src/Ioss_FileInfo.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2024 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. // @@ -50,8 +50,6 @@ namespace Ioss { //! \param my_filename base filename FileInfo(const std::string &dirpath, const std::string &my_filename); - ~FileInfo(); - //! returns the number of processors that this file exists. //! 0: Exists nowhere //! \#proc: Exists everywhere diff --git a/packages/seacas/libraries/ioss/src/Ioss_Glob.h b/packages/seacas/libraries/ioss/src/Ioss_Glob.h index 78c575b25b..b137707632 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Glob.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Glob.h @@ -189,7 +189,7 @@ namespace Ioss::glob { return state_pos; } - size_t fail_state_; + size_t fail_state_{0}; private: std::tuple ExecAux(const String &str, bool comp_end = true) const @@ -207,7 +207,7 @@ namespace Ioss::glob { // the string if (comp_end) { if ((state_pos == match_state_) && (str_pos == str.length())) { - return {state_pos == match_state_, str_pos}; + return {true, str_pos}; } return {false, str_pos}; @@ -776,13 +776,6 @@ namespace Ioss::glob { c_ = str_[++pos_]; } - inline bool IsSpecialChar(charT c) - { - bool b = c == '?' || c == '*' || c == '+' || c == '(' || c == ')' || c == '[' || c == ']' || - c == '|' || c == '!' || c == '@' || c == '\\'; - return b; - } - String str_; size_t pos_{0}; charT c_; diff --git a/packages/seacas/libraries/ioss/src/Ioss_Map.h b/packages/seacas/libraries/ioss/src/Ioss_Map.h index d6929062b9..d670621af6 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Map.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Map.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -53,7 +53,6 @@ namespace Ioss { } Map(const Map &from) = delete; Map &operator=(const Map &from) = delete; - ~Map() = default; void set_rank(int processor) { m_myProcessor = processor; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_MemoryUtils.h b/packages/seacas/libraries/ioss/src/Ioss_MemoryUtils.h index b74ca11432..59fedbd6e5 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_MemoryUtils.h +++ b/packages/seacas/libraries/ioss/src/Ioss_MemoryUtils.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -13,9 +13,6 @@ namespace Ioss { class IOSS_EXPORT MemoryUtils { public: - MemoryUtils() = default; - ~MemoryUtils() = default; - /** \brief Return amount of memory being used on this processor */ static size_t get_memory_info(); diff --git a/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.C b/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.C index bc0ea9d58d..1f7cc1cace 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.C +++ b/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2021, 2023, 2024 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. // @@ -75,7 +75,6 @@ Ioss::NodeBlock::NodeBlock(Ioss::DatabaseIO *io_database, const std::string &my_ } Ioss::NodeBlock::NodeBlock(const Ioss::NodeBlock &other) = default; -Ioss::NodeBlock::~NodeBlock() = default; Ioss::Property Ioss::NodeBlock::get_implicit_property(const std::string &my_name) const { diff --git a/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.h b/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.h index f1728ae7ab..d6fb5cccef 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.h +++ b/packages/seacas/libraries/ioss/src/Ioss_NodeBlock.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -37,8 +37,6 @@ namespace Ioss { NodeBlock(const NodeBlock &other); - ~NodeBlock() override; - std::string type_string() const override { return "NodeBlock"; } std::string short_type_string() const override { return "nodeblock"; } std::string contains_string() const override { return "Node"; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_NullEntity.C b/packages/seacas/libraries/ioss/src/Ioss_NullEntity.C index 4c17b37382..f05c1d35f6 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_NullEntity.C +++ b/packages/seacas/libraries/ioss/src/Ioss_NullEntity.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2024 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. // @@ -6,4 +6,6 @@ #include "Ioss_NullEntity.h" -Ioss::NullEntity::~NullEntity() = default; +namespace Ioss { + NullEntity::NullEntity() : Ioss::GroupingEntity(nullptr, "null_entity", 0) {} +} // namespace Ioss diff --git a/packages/seacas/libraries/ioss/src/Ioss_NullEntity.h b/packages/seacas/libraries/ioss/src/Ioss_NullEntity.h index 9f7656275b..312ae61b29 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_NullEntity.h +++ b/packages/seacas/libraries/ioss/src/Ioss_NullEntity.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -23,8 +23,7 @@ namespace Ioss { class IOSS_EXPORT NullEntity : public GroupingEntity { public: - NullEntity() : Ioss::GroupingEntity(nullptr, "null_entity", 0) {} - ~NullEntity() override; + NullEntity(); std::string type_string() const override { return "NullEntity"; } std::string short_type_string() const override { return "null"; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.h b/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.h index d0b397464c..b8ab886191 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.h +++ b/packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -32,10 +32,6 @@ namespace Ioss { public: ParallelUtils() = default; explicit ParallelUtils(Ioss_MPI_Comm the_communicator); - ~ParallelUtils() = default; - - // Assignment operator - // Copy constructor enum MinMax { DO_MAX, DO_MIN, DO_SUM }; diff --git a/packages/seacas/libraries/ioss/src/Ioss_Property.h b/packages/seacas/libraries/ioss/src/Ioss_Property.h index 6a378e7090..0a5fd0eaf3 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Property.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Property.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -27,14 +27,13 @@ namespace Ioss { public: enum BasicType { INVALID = -1, REAL, INTEGER, POINTER, STRING, VEC_INTEGER, VEC_DOUBLE }; enum Origin { - INTERNAL = -1, // &values); protected: - Transform(); + Transform() = default; virtual bool internal_execute(const Ioss::Field &field, void *data) = 0; }; diff --git a/packages/seacas/libraries/ioss/src/Ioss_Utils.h b/packages/seacas/libraries/ioss/src/Ioss_Utils.h index a0af63301e..07de7f56fb 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Utils.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Utils.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -52,9 +52,6 @@ namespace Ioss { class IOSS_EXPORT Utils { public: - Utils() = default; - ~Utils() = default; - /** * \defgroup IossStreams Streams used for IOSS output *@{ @@ -405,8 +402,8 @@ namespace Ioss { /** \brief Case-insensitive substring comparison. * - * \param[in] prefix - * \param[in] str + * \param[in] prefix The prefix that should start the string + * \param[in] str The string which should begin with prefix * \returns `true` if `str` begins with `prefix` or `prefix` is empty */ static bool substr_equal(const std::string &prefix, const std::string &str); @@ -532,6 +529,14 @@ namespace Ioss { const std::string &header, const std::string &suffix = "\n\t", bool print_empty = false); + static void insert_sort_and_unique(const std::vector &src, std::vector &dest) + { + dest.insert(dest.end(), src.begin(), src.end()); + std::sort(dest.begin(), dest.end(), std::less<>()); + auto endIter = std::unique(dest.begin(), dest.end()); + dest.resize(endIter - dest.begin()); + } + private: // SEE: http://lemire.me/blog/2017/04/10/removing-duplicates-from-lists-quickly template static size_t unique(std::vector &out, bool skip_first) diff --git a/packages/seacas/libraries/ioss/src/Ioss_VariableType.C b/packages/seacas/libraries/ioss/src/Ioss_VariableType.C index c72bb962bc..8ff109ba0b 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_VariableType.C +++ b/packages/seacas/libraries/ioss/src/Ioss_VariableType.C @@ -38,8 +38,6 @@ namespace Ioss { } } - VariableType::~VariableType() = default; - VariableType::VariableType(const std::string &type, int comp_count, bool delete_me) : name_(type), componentCount(comp_count) { diff --git a/packages/seacas/libraries/ioss/src/Ioss_VariableType.h b/packages/seacas/libraries/ioss/src/Ioss_VariableType.h index 3fd7503bfd..4c932efa22 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_VariableType.h +++ b/packages/seacas/libraries/ioss/src/Ioss_VariableType.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -66,7 +66,7 @@ namespace Ioss { VariableType(const VariableType &) = delete; VariableType &operator=(const VariableType &) = delete; - virtual ~VariableType(); + virtual ~VariableType() = default; int component_count() const; diff --git a/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.C b/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.C index 13894625ba..efd3748eba 100644 --- a/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -65,8 +65,6 @@ namespace Ioad { return Ioss::SerializeIO::getRank(); } - DatabaseIO::~DatabaseIO() {} - bool DatabaseIO::begin_nl(Ioss::State state) { // initialization diff --git a/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.h b/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.h index b19b706ecc..bff19e728a 100644 --- a/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/adios/Ioad_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -40,9 +40,6 @@ namespace Ioad { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - ~DatabaseIO(); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; std::string get_format() const override { return "ADIOS2"; } diff --git a/packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.h b/packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.h index d0e9d131b4..3c816fbacf 100644 --- a/packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.h +++ b/packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -100,9 +100,6 @@ namespace Iocgns { class IOCGNS_EXPORT Utils { public: - Utils() = default; - ~Utils() = default; - static std::pair decompose_name(const std::string &name, bool is_parallel); static std::string decompose_sb_name(const std::string &name); diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Beam2.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Beam2.h index 8cd536469d..5807c97af4 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Beam2.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Beam2.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Beam2() override = default; Beam2(const Beam2 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Beam3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Beam3.h index 5d076b0a4b..ec4a024130 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Beam3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Beam3.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Beam3() override = default; Beam3(const Beam3 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Beam4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Beam4.h index 249d96e66d..6ef6c32f11 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Beam4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Beam4.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Beam4() override = default; Beam4(const Beam4 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2.h index a6c2f5b2d8..706cd69200 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2.h @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Edge2() override = default; Edge2(const Edge2 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D2.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D2.h index 41ba792ee1..31301fd2cf 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D2.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D2.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Edge2D2() override = default; Edge2D2(const Edge2D2 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D3.h index 4d98a90d61..dde08fd38c 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge2D3.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Edge2D3() override = default; Edge2D3(const Edge2D3 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge3.h index 9a143e2023..8bc631fb1c 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge3.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Edge3() override = default; Edge3(const Edge3 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge4.h index d282ebf3fb..03d9b7e293 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Edge4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Edge4.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Edge4() override = default; Edge4(const Edge4 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex16.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex16.h index daf85babf7..0035b3291d 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex16.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex16.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex16() override = default; Hex16(const Hex16 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex20.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex20.h index 37c2e5e8ed..792a7e39ba 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex20.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex20.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex20() override = default; Hex20(const Hex20 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex27.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex27.h index bd0b6dd3a2..92bdbe55cc 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex27.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex27.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex27() override = default; Hex27(const Hex27 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex32.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex32.h index f9f4a6d97d..2e1ca5956b 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex32.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex32.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex32() override = default; Hex32(const Hex32 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex64.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex64.h index 9e7f839ebe..1c49aad829 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex64.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex64.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex64() override = default; Hex64(const Hex64 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.C b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.C index 80978eb458..af7e5ac4e6 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.C +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2021 National Technology & Engineering Solutions +// Copyright(C) 1999-2021, 2024 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. // @@ -32,38 +32,33 @@ namespace Ioss { namespace { struct Constants { - static const int nnode = 8; - static const int nedge = 12; - static const int nedgenode = 2; - static const int nface = 6; - static const int nfacenode = 4; - static const int nfaceedge = 4; - static int edge_node_order[nedge][nedgenode]; - static int face_node_order[nface][nfacenode]; - static int face_edge_order[nface][nfaceedge]; - static int nodes_per_face[nface + 1]; - static int edges_per_face[nface + 1]; + static constexpr int nnode = 8; + static constexpr int nedge = 12; + static constexpr int nedgenode = 2; + static constexpr int nface = 6; + static constexpr int nfacenode = 4; + static constexpr int nfaceedge = 4; + + // Edge numbers are zero-based [0..number_edges) + static constexpr int edge_node_order[nedge][nedgenode] = // [edge][edge_node] + {{0, 1}, {1, 2}, {2, 3}, {3, 0}, {4, 5}, {5, 6}, + {6, 7}, {7, 4}, {0, 4}, {1, 5}, {2, 6}, {3, 7}}; + + // Face numbers are zero-based [0..number_faces) + static constexpr int face_node_order[nface][nfacenode] = // [face][face_node] + {{0, 1, 5, 4}, {1, 2, 6, 5}, {2, 3, 7, 6}, {0, 4, 7, 3}, {0, 3, 2, 1}, {4, 5, 6, 7}}; + + static constexpr int face_edge_order[nface][nfaceedge] = // [face][face_edge] + {{0, 9, 4, 8}, {1, 10, 5, 9}, {2, 11, 6, 10}, {8, 7, 11, 3}, {3, 2, 1, 0}, {4, 5, 6, 7}}; + + // face 0 returns number of nodes for all faces if homogeneous + // returns -1 if faces have differing topology + static constexpr int nodes_per_face[nface + 1] = {4, 4, 4, 4, 4, 4, 4}; + + // face 0 returns number of edges for all faces if homogeneous + // returns -1 if faces have differing topology + static constexpr int edges_per_face[nface + 1] = {4, 4, 4, 4, 4, 4, 4}; }; - - // Edge numbers are zero-based [0..number_edges) - int Constants::edge_node_order[nedge][nedgenode] = // [edge][edge_node] - {{0, 1}, {1, 2}, {2, 3}, {3, 0}, {4, 5}, {5, 6}, - {6, 7}, {7, 4}, {0, 4}, {1, 5}, {2, 6}, {3, 7}}; - - // Face numbers are zero-based [0..number_faces) - int Constants::face_node_order[nface][nfacenode] = // [face][face_node] - {{0, 1, 5, 4}, {1, 2, 6, 5}, {2, 3, 7, 6}, {0, 4, 7, 3}, {0, 3, 2, 1}, {4, 5, 6, 7}}; - - int Constants::face_edge_order[nface][nfaceedge] = // [face][face_edge] - {{0, 9, 4, 8}, {1, 10, 5, 9}, {2, 11, 6, 10}, {8, 7, 11, 3}, {3, 2, 1, 0}, {4, 5, 6, 7}}; - - // face 0 returns number of nodes for all faces if homogeneous - // returns -1 if faces have differing topology - int Constants::nodes_per_face[nface + 1] = {4, 4, 4, 4, 4, 4, 4}; - - // face 0 returns number of edges for all faces if homogeneous - // returns -1 if faces have differing topology - int Constants::edges_per_face[nface + 1] = {4, 4, 4, 4, 4, 4, 4}; } // namespace void Ioss::Hex8::factory() diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.h index f2f3a109c3..765a17d08d 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex8.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex8() override = default; Hex8(const Hex8 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex9.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex9.h index f7ff58f110..3c82cf7819 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Hex9.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Hex9.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Hex9() override = default; Hex9(const Hex9 &) = delete; ElementShape shape() const override { return ElementShape::HEX; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Node.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Node.h index 516ea08cbf..3045bb94e9 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Node.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Node.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static void factory(); Node(const Node &) = delete; - ~Node() override = default; ElementShape shape() const override { return ElementShape::POINT; } int spatial_dimension() const override; diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid13.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid13.h index fb1951d8f8..e60f95c084 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid13.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid13.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Pyramid13() override = default; Pyramid13(const Pyramid13 &) = delete; ElementShape shape() const override { return ElementShape::PYRAMID; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid14.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid14.h index 14031ca2a7..c19ee01c67 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid14.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid14.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Pyramid14() override = default; Pyramid14(const Pyramid14 &) = delete; ElementShape shape() const override { return ElementShape::PYRAMID; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid18.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid18.h index e0847ad2e4..c9656e2b52 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid18.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid18.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Pyramid18() override = default; Pyramid18(const Pyramid18 &) = delete; ElementShape shape() const override { return ElementShape::PYRAMID; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid19.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid19.h index e571564dfd..f30e0b9581 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid19.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid19.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Pyramid19() override = default; Pyramid19(const Pyramid19 &) = delete; ElementShape shape() const override { return ElementShape::PYRAMID; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid5.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid5.h index 8918fbf939..5b180166f1 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid5.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Pyramid5.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Pyramid5() override = default; Pyramid5(const Pyramid5 &) = delete; ElementShape shape() const override { return ElementShape::PYRAMID; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad12.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad12.h index 1ab1a07459..2ddb9d941d 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad12.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad12.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Quad12() override = default; Quad12(const Quad12 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad16.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad16.h index 6199126c76..97f8cd40b9 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad16.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad16.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Quad16() override = default; Quad16(const Quad16 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad4.h index 89727fdda9..771d44d901 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad4.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Quad4() override = default; Quad4(const Quad4 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad6.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad6.h index d965dc7967..6cef2f201e 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad6.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad6.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static void factory(); Quad6(const Quad6 &) = delete; - ~Quad6() override = default; ElementShape shape() const override { return ElementShape::QUAD; } int spatial_dimension() const override; diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad8.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad8.h index 206c9492b3..15816d0bdb 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad8.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad8.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Quad8() override = default; Quad8(const Quad8 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad9.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad9.h index 232893d486..5089d6c492 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Quad9.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Quad9.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Quad9() override = default; Quad9(const Quad9 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Shell4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Shell4.h index 2d34c0abfa..fd791d1979 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Shell4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Shell4.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Shell4() override = default; Shell4(const Shell4 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Shell8.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Shell8.h index becf1283da..7d3e3b46ba 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Shell8.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Shell8.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Shell8() override = default; Shell8(const Shell8 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Shell9.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Shell9.h index 01855bd64f..e19a8a8ca3 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Shell9.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Shell9.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Shell9() override = default; Shell9(const Shell9 &) = delete; ElementShape shape() const override { return ElementShape::QUAD; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D2.h b/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D2.h index 68cd398fe3..7b4a9098cf 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D2.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D2.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~ShellLine2D2() override = default; ShellLine2D2(const ShellLine2D2 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D3.h index 3559e1d32d..dce85be7da 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_ShellLine2D3.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~ShellLine2D3() override = default; ShellLine2D3(const ShellLine2D3 &) = delete; ElementShape shape() const override { return ElementShape::LINE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Sphere.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Sphere.h index 1b9b9a9836..75322bbdc9 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Sphere.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Sphere.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Sphere() override = default; Sphere(const Sphere &) = delete; ElementShape shape() const override { return ElementShape::SPHERE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Spring2.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Spring2.h index d784850e5b..7f0c007ba1 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Spring2.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Spring2.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Spring2() override = default; Spring2(const Spring2 &) = delete; ElementShape shape() const override { return ElementShape::SPRING; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Spring3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Spring3.h index 00b89de4a1..05e8fba6ec 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Spring3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Spring3.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Spring3() override = default; Spring3(const Spring3 &) = delete; ElementShape shape() const override { return ElementShape::SPRING; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Super.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Super.h index a65763463c..f12471182f 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Super.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Super.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -29,9 +29,9 @@ namespace Ioss { static const char *name; static void factory(); - ~Super() override; Super(const std::string &my_name, int node_count); Super(const Super &) = delete; + virtual ~Super() override; static void make_super(const std::string &type); diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet10.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet10.h index 4d4962e1c9..7ce7796fb3 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet10.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet10.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet10() override = default; Tet10(const Tet10 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet11.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet11.h index 29a1d6c55c..f3cfc3d14e 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet11.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet11.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static void factory(); Tet11(const Tet11 &) = delete; - ~Tet11() override = default; ElementShape shape() const override { return ElementShape::TET; } int spatial_dimension() const override; diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet14.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet14.h index 25cb12653c..4d1acc937a 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet14.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet14.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet14() override = default; Tet14(const Tet14 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet15.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet15.h index 2cb52f9d09..72aac4c4ca 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet15.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet15.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet15() override = default; Tet15(const Tet15 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet16.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet16.h index 3d7f9b3d3e..73efe29ddc 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet16.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet16.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet16() override = default; Tet16(const Tet16 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet4.h index f88d9f778d..abdcd04ca9 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet4.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet4() override = default; Tet4(const Tet4 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet40.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet40.h index f56220d0b5..c44659b03e 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet40.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet40.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet40() override = default; Tet40(const Tet40 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet7.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet7.h index 5efe59a672..7b6f0a2e36 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet7.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet7.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet7() override = default; Tet7(const Tet7 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet8.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet8.h index 68c4ef00f3..4139a140d3 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tet8.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tet8.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tet8() override = default; Tet8(const Tet8 &) = delete; ElementShape shape() const override { return ElementShape::TET; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri13.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri13.h index 13d7e5c748..1024c66673 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri13.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri13.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri13() override = default; Tri13(const Tri13 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri3.h index 206b23e92d..72c7c6fb80 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri3.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -21,7 +21,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri3() override = default; Tri3(const Tri3 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4.h index ec65c81852..1843e9748b 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri4() override = default; Tri4(const Tri4 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4a.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4a.h index d2fed2b69f..6a63af8e33 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4a.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri4a.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri4a() override = default; Tri4a(const Tri4a &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri6.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri6.h index 019ac2e4c3..80b47a09f6 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri6.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri6.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri6() override = default; Tri6(const Tri6 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri7.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri7.h index 8f57936043..f2d70c6815 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri7.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri7.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri7() override = default; Tri7(const Tri7 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri9.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri9.h index 62988b674f..fcc5156ed3 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Tri9.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Tri9.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Tri9() override = default; Tri9(const Tri9 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell3.h b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell3.h index 72413b2779..10ca065ef2 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell3.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell3.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~TriShell3() override = default; TriShell3(const TriShell3 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell4.h b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell4.h index f4a990e997..daa5e0da47 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell4.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell4.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~TriShell4() override = default; TriShell4(const TriShell4 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell6.h b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell6.h index 63e32e0290..23b26a534a 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell6.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell6.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~TriShell6() override = default; TriShell6(const TriShell6 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell7.h b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell7.h index 3a9cdbff2a..daac748256 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell7.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_TriShell7.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~TriShell7() override = default; TriShell7(const TriShell7 &) = delete; ElementShape shape() const override { return ElementShape::TRI; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Unknown.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Unknown.h index 5f3ac0db74..c5c959465d 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Unknown.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Unknown.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Unknown() override = default; Unknown(const Unknown &) = delete; ElementShape shape() const override { return ElementShape::UNKNOWN; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge12.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge12.h index c8bafb59fd..c9f720df62 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge12.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge12.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge12() override = default; Wedge12(const Wedge12 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge15.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge15.h index 710d387eb9..6e03585f5b 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge15.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge15.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge15() override = default; Wedge15(const Wedge15 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge16.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge16.h index 9079299566..d49fd12eb2 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge16.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge16.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge16() override = default; Wedge16(const Wedge16 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.C b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.C index 9ab308a8ae..52d46910db 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.C +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2024 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. // @@ -77,8 +77,6 @@ Ioss::Wedge18::Wedge18() : Ioss::ElementTopology(Ioss::Wedge18::name, "Wedge_18" Ioss::ElementTopology::alias(Ioss::Wedge18::name, "Solid_Wedge_18_3D"); } -Ioss::Wedge18::~Wedge18() = default; - int Ioss::Wedge18::parametric_dimension() const { return 3; } int Ioss::Wedge18::spatial_dimension() const { return 3; } int Ioss::Wedge18::order() const { return 2; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.h index a029b1b9a2..b07812cd3f 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge18.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge18() override; Wedge18(const Wedge18 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge20.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge20.h index 36a395f5a6..d8b0c7a388 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge20.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge20.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge20() override = default; Wedge20(const Wedge20 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge21.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge21.h index 6809c5934e..55901c5286 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge21.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge21.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge21() override = default; Wedge21(const Wedge21 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge24.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge24.h index ea1a38d4e6..ccd2b2062c 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge24.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge24.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge24() override = default; Wedge24(const Wedge24 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge52.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge52.h index a4c91fc77f..a37a241dcb 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge52.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge52.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge52() override = default; Wedge52(const Wedge52 &) = delete; ElementShape shape() const override { return ElementShape::WEDGE; } diff --git a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge6.h b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge6.h index 30cec3d442..7359f46fbf 100644 --- a/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge6.h +++ b/packages/seacas/libraries/ioss/src/elements/Ioss_Wedge6.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -22,7 +22,6 @@ namespace Ioss { static const char *name; static void factory(); - ~Wedge6() override = default; Wedge6(const Wedge6 &) = delete; int spatial_dimension() const override; diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.C index 5b9bda22ff..d3cb6ad61f 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.C @@ -79,8 +79,6 @@ namespace { template void write_attribute_names(int exoid, ex_entity_type type, const std::vector &entities); - void insert_sort_and_unique(const std::vector &src, std::vector &dest); - class AssemblyTreeFilter { public: @@ -691,14 +689,6 @@ namespace Ioex { { Ioss::SerializeIO serializeIO_(this); - if (!assemblyOmissions.empty()) { - assert(blockInclusions.empty()); - } - - if (!assemblyInclusions.empty()) { - assert(blockOmissions.empty()); - } - // Query number of assemblies... auto assemblies = get_exodus_assemblies(get_file_pointer()); if (!assemblies.empty()) { @@ -730,8 +720,8 @@ namespace Ioex { cleanup_exodus_assembly_vector(assemblies); - insert_sort_and_unique(exclusions, blockOmissions); - insert_sort_and_unique(inclusions, blockInclusions); + Ioss::Utils::insert_sort_and_unique(exclusions, blockOmissions); + Ioss::Utils::insert_sort_and_unique(inclusions, blockInclusions); } } @@ -3129,12 +3119,4 @@ namespace { } #endif } - - void insert_sort_and_unique(const std::vector &src, std::vector &dest) - { - dest.insert(dest.end(), src.begin(), src.end()); - std::sort(dest.begin(), dest.end(), std::less<>()); - auto endIter = std::unique(dest.begin(), dest.end()); - dest.resize(endIter - dest.begin()); - } } // namespace diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.h index 1873234e58..88aaaf0f98 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_BaseDatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -79,8 +79,6 @@ namespace Ioex { public: BaseDatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - BaseDatabaseIO(const BaseDatabaseIO &from) = delete; - BaseDatabaseIO &operator=(const BaseDatabaseIO &from) = delete; ~BaseDatabaseIO() override; @@ -111,7 +109,6 @@ namespace Ioex { bool begin_state_nl(int state, double time) override; bool end_state_nl(int state, double time) override; - void get_step_times_nl() override = 0; int maximum_symbol_length() const override { return maximumNameLength; } diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C index eb3c0b5ea1..6e4a240f44 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -67,8 +67,8 @@ namespace { const size_t max_line_length = MAX_LINE_LENGTH; - const std::string SEP() { return std::string("@"); } // Separator for attribute offset storage - const std::array complex_suffix{".re", ".im"}; + std::string SEP() { return std::string("@"); } // Separator for attribute offset storage + std::array complex_suffix{".re", ".im"}; void get_connectivity_data(int exoid, void *data, ex_entity_type type, ex_entity_id id, int position) diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.h index 558b020a62..fe6f21a7d7 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -63,9 +63,6 @@ namespace Ioex { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; - ~DatabaseIO() override = default; // Kluge -- a few applications need access so can directly access exodus API int get_file_pointer() const override; // Open file and set exodusFilePtr. diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C index c821fbfe7f..f75bed76e1 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -1208,7 +1208,6 @@ namespace Ioex { if (m_processor == set.root_) { // Read the set data from the file.. file_data.resize(set.file_count()); - m_decomposition.show_progress("\tex_get_var (set)"); ierr = ex_get_var(filePtr, step, type, var_index, id, set.file_count(), file_data.data()); } else { diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h index 2082bb70da..4dc5627a3a 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -116,7 +116,6 @@ namespace Ioex { { public: DecompositionData(const Ioss::PropertyManager &props, Ioss_MPI_Comm communicator); - ~DecompositionData() = default; int int_size() const { return sizeof(INT); } @@ -291,7 +290,6 @@ namespace Ioex { { public: ElementBlockBatchReader(const DecompositionDataBase *decompDB); - ~ElementBlockBatchReader() = default; size_t get_connectivity_size(const std::vector &blocks_subset_index) const; diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_IOFactory.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_IOFactory.C index 4fd5aee3f5..4cff66334a 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_IOFactory.C +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_IOFactory.C @@ -59,7 +59,7 @@ namespace Ioex { // The "exodus" and "parallel_exodus" databases can both be accessed // from this factory. The "parallel_exodus" is returned only if the following // are true: - // 0. The db_usage is 'READ_MODEL' (not officially supported for READ_RESTART yet) + // 0. The db_usage is an input type. // 1. Parallel run with >1 processor // 2. There is a DECOMPOSITION_METHOD specified in 'properties' // 3. The decomposition method is not "EXTERNAL" @@ -69,13 +69,13 @@ namespace Ioex { bool decompose = false; if (proc_count > 1) { - if (db_usage == Ioss::READ_MODEL || db_usage == Ioss::READ_RESTART) { + if (is_input_event(db_usage)) { std::string method = check_decomposition_property(properties, db_usage); if (!method.empty() && method != "EXTERNAL") { decompose = true; } } - else if (db_usage == Ioss::WRITE_RESULTS || db_usage == Ioss::WRITE_RESTART) { + else { if (check_composition_property(properties, db_usage)) { decompose = true; } @@ -123,7 +123,7 @@ namespace { if (db_usage == Ioss::READ_MODEL) { decomp_property = "MODEL_DECOMPOSITION_METHOD"; } - else if (db_usage == Ioss::READ_RESTART) { + else if (db_usage == Ioss::READ_RESTART || db_usage == Ioss::QUERY_TIMESTEPS_ONLY) { decomp_property = "RESTART_DECOMPOSITION_METHOD"; } diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_Internals.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_Internals.h index 62bb669632..f4fd372bc8 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_Internals.h +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_Internals.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -72,12 +72,8 @@ namespace Ioss { namespace Ioex { struct IOEX_EXPORT NodeBlock { - NodeBlock() = default; - NodeBlock(const NodeBlock &other) = default; explicit NodeBlock(const Ioss::NodeBlock &other); - ~NodeBlock() = default; - std::string name{}; entity_id id{0}; int64_t entityCount{0}; @@ -88,10 +84,7 @@ namespace Ioex { struct IOEX_EXPORT Assembly { - Assembly() = default; - Assembly(const Assembly &other) = default; explicit Assembly(const Ioss::Assembly &other); - ~Assembly() = default; std::string name{}; entity_id id{0}; @@ -103,10 +96,7 @@ namespace Ioex { struct IOEX_EXPORT Blob { - Blob() = default; - Blob(const Blob &other) = default; explicit Blob(const Ioss::Blob &other); - ~Blob() = default; std::string name{}; entity_id id{0}; @@ -130,8 +120,6 @@ namespace Ioex { explicit EdgeBlock(const Ioss::EdgeBlock &other); - ~EdgeBlock() = default; - char elType[MAX_STR_LENGTH + 1]{}; std::string name{}; entity_id id{0}; @@ -157,8 +145,6 @@ namespace Ioex { explicit FaceBlock(const Ioss::FaceBlock &other); - ~FaceBlock() = default; - char elType[MAX_STR_LENGTH + 1]{}; std::string name{}; entity_id id{0}; @@ -186,8 +172,6 @@ namespace Ioex { explicit ElemBlock(const Ioss::ElementBlock &other); - ~ElemBlock() = default; - char elType[MAX_STR_LENGTH + 1]{}; std::string name{}; entity_id id{0}; @@ -203,8 +187,6 @@ namespace Ioex { struct IOEX_EXPORT NodeSet { - NodeSet() = default; - NodeSet(const NodeSet &other) = default; explicit NodeSet(const Ioss::NodeSet &other); std::string name{}; @@ -219,8 +201,6 @@ namespace Ioex { struct IOEX_EXPORT EdgeSet { - EdgeSet() = default; - EdgeSet(const EdgeSet &other) = default; explicit EdgeSet(const Ioss::EdgeSet &other); std::string name{}; @@ -233,8 +213,6 @@ namespace Ioex { struct IOEX_EXPORT FaceSet { - FaceSet() = default; - FaceSet(const FaceSet &other) = default; explicit FaceSet(const Ioss::FaceSet &other); std::string name{}; @@ -247,8 +225,6 @@ namespace Ioex { struct IOEX_EXPORT ElemSet { - ElemSet() = default; - ElemSet(const ElemSet &other) = default; explicit ElemSet(const Ioss::ElementSet &other); std::string name{}; @@ -261,7 +237,6 @@ namespace Ioex { struct IOEX_EXPORT SideSet { - SideSet() = default; explicit SideSet(const Ioss::SideBlock &other); explicit SideSet(const Ioss::SideSet &other); @@ -276,7 +251,6 @@ namespace Ioex { struct IOEX_EXPORT CommunicationMap { - CommunicationMap() = default; CommunicationMap(entity_id the_id, int64_t count, char the_type) : id(the_id), entityCount(count), type(the_type) { @@ -288,9 +262,6 @@ namespace Ioex { struct IOEX_EXPORT CommunicationMetaData { - CommunicationMetaData() = default; - CommunicationMetaData(const CommunicationMetaData &) = delete; - std::vector nodeMap{}; std::vector elementMap{}; int processorId{0}; @@ -323,8 +294,6 @@ namespace Ioex { class IOEX_EXPORT Mesh { public: - Mesh() = default; - Mesh(int dim, const char *the_title, const Ioss::ParallelUtils &util, bool file_pp) : dimensionality(dim), file_per_processor(file_pp), parallelUtil(util) { diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h index d039fefd3f..5b9bd8f31d 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -69,8 +69,6 @@ namespace Ioex { ParallelDatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &properties); - ParallelDatabaseIO(const ParallelDatabaseIO &from) = delete; - ParallelDatabaseIO &operator=(const ParallelDatabaseIO &from) = delete; ~ParallelDatabaseIO(); int get_file_pointer() const override; // Open file and set exodusFilePtr. diff --git a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.C b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.C index 24f226535a..a53fd251cb 100644 --- a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -197,16 +197,6 @@ namespace Ioexnl { // Returns byte size of integers stored on the database... int BaseDatabaseIO::int_byte_size_db() const { return 8; } - // common - BaseDatabaseIO::~BaseDatabaseIO() - { - try { - free_file_pointer(); - } - catch (...) { - } - } - // common unsigned BaseDatabaseIO::entity_field_support() const { diff --git a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.h b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.h index d5bd02d5ed..0e82c46f22 100644 --- a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_BaseDatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -79,10 +79,6 @@ namespace Ioexnl { public: BaseDatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - BaseDatabaseIO(const BaseDatabaseIO &from) = delete; - BaseDatabaseIO &operator=(const BaseDatabaseIO &from) = delete; - - ~BaseDatabaseIO() override; std::string get_format() const override { return "ExoNull"; } diff --git a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_DatabaseIO.h b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_DatabaseIO.h index 9f5542a674..bc12d0019b 100644 --- a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -63,9 +63,6 @@ namespace Ioexnl { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; - ~DatabaseIO() override = default; // Kluge -- a few applications need access so can directly access exodus API int get_file_pointer() const override; // Open file and set exodusFilePtr. diff --git a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_Internals.h b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_Internals.h index 729a3f98b0..881069db1d 100644 --- a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_Internals.h +++ b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_Internals.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -72,12 +72,8 @@ namespace Ioss { namespace Ioexnl { struct IOEXNL_EXPORT NodeBlock { - NodeBlock() = default; - NodeBlock(const NodeBlock &other) = default; explicit NodeBlock(const Ioss::NodeBlock &other); - ~NodeBlock() = default; - std::string name{}; entity_id id{0}; int64_t entityCount{0}; @@ -88,10 +84,7 @@ namespace Ioexnl { struct IOEXNL_EXPORT Assembly { - Assembly() = default; - Assembly(const Assembly &other) = default; explicit Assembly(const Ioss::Assembly &other); - ~Assembly() = default; std::string name{}; entity_id id{0}; @@ -103,10 +96,7 @@ namespace Ioexnl { struct IOEXNL_EXPORT Blob { - Blob() = default; - Blob(const Blob &other) = default; explicit Blob(const Ioss::Blob &other); - ~Blob() = default; std::string name{}; entity_id id{0}; @@ -130,8 +120,6 @@ namespace Ioexnl { explicit EdgeBlock(const Ioss::EdgeBlock &other); - ~EdgeBlock() = default; - char elType[MAX_STR_LENGTH + 1]{}; std::string name{}; entity_id id{0}; @@ -157,8 +145,6 @@ namespace Ioexnl { explicit FaceBlock(const Ioss::FaceBlock &other); - ~FaceBlock() = default; - char elType[MAX_STR_LENGTH + 1]{}; std::string name{}; entity_id id{0}; @@ -186,8 +172,6 @@ namespace Ioexnl { explicit ElemBlock(const Ioss::ElementBlock &other); - ~ElemBlock() = default; - char elType[MAX_STR_LENGTH + 1]{}; std::string name{}; entity_id id{0}; @@ -203,8 +187,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT NodeSet { - NodeSet() = default; - NodeSet(const NodeSet &other) = default; explicit NodeSet(const Ioss::NodeSet &other); std::string name{}; @@ -219,8 +201,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT EdgeSet { - EdgeSet() = default; - EdgeSet(const EdgeSet &other) = default; explicit EdgeSet(const Ioss::EdgeSet &other); std::string name{}; @@ -233,8 +213,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT FaceSet { - FaceSet() = default; - FaceSet(const FaceSet &other) = default; explicit FaceSet(const Ioss::FaceSet &other); std::string name{}; @@ -247,8 +225,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT ElemSet { - ElemSet() = default; - ElemSet(const ElemSet &other) = default; explicit ElemSet(const Ioss::ElementSet &other); std::string name{}; @@ -261,7 +237,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT SideSet { - SideSet() = default; explicit SideSet(const Ioss::SideBlock &other); explicit SideSet(const Ioss::SideSet &other); @@ -276,7 +251,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT CommunicationMap { - CommunicationMap() = default; CommunicationMap(entity_id the_id, int64_t count, char the_type) : id(the_id), entityCount(count), type(the_type) { @@ -288,9 +262,6 @@ namespace Ioexnl { struct IOEXNL_EXPORT CommunicationMetaData { - CommunicationMetaData() = default; - CommunicationMetaData(const CommunicationMetaData &) = delete; - std::vector nodeMap{}; std::vector elementMap{}; int processorId{0}; @@ -314,7 +285,6 @@ namespace Ioexnl { explicit Redefine(int exoid); Redefine(const Redefine &from) = delete; Redefine &operator=(const Redefine &from) = delete; - ~Redefine(); private: int exodusFilePtr; @@ -323,8 +293,6 @@ namespace Ioexnl { class IOEXNL_EXPORT Mesh { public: - Mesh() = default; - Mesh(int dim, const char *the_title, const Ioss::ParallelUtils &util, bool file_pp) : dimensionality(dim), file_per_processor(file_pp), parallelUtil(util) { diff --git a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.C b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.C index b22316ce3b..fd61c0d3be 100644 --- a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.C @@ -5,7 +5,7 @@ // strange cases // // -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -294,8 +294,6 @@ namespace Ioexnl { { } - ParallelDatabaseIO::~ParallelDatabaseIO() = default; - void ParallelDatabaseIO::release_memory_nl() { free_file_pointer(); diff --git a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.h b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.h index 7bd9106329..ae52ceb655 100644 --- a/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/exonull/Ioexnl_ParallelDatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -68,9 +68,6 @@ namespace Ioexnl { ParallelDatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &properties); - ParallelDatabaseIO(const ParallelDatabaseIO &from) = delete; - ParallelDatabaseIO &operator=(const ParallelDatabaseIO &from) = delete; - ~ParallelDatabaseIO(); int get_file_pointer() const override; // Open file and set exodusFilePtr. bool needs_shared_node_information() const override { return true; } diff --git a/packages/seacas/libraries/ioss/src/faodel/Iofaodel_DatabaseIO.h b/packages/seacas/libraries/ioss/src/faodel/Iofaodel_DatabaseIO.h index 209117a45f..7a609f2f36 100644 --- a/packages/seacas/libraries/ioss/src/faodel/Iofaodel_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/faodel/Iofaodel_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -66,8 +66,6 @@ namespace Iofaodel { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &properties); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; ~DatabaseIO(); // TODO what should this be for Faodel? diff --git a/packages/seacas/libraries/ioss/src/gen_struc/Iogs_DatabaseIO.h b/packages/seacas/libraries/ioss/src/gen_struc/Iogs_DatabaseIO.h index 0018a91c89..1f55622a59 100644 --- a/packages/seacas/libraries/ioss/src/gen_struc/Iogs_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/gen_struc/Iogs_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -69,8 +69,6 @@ namespace Iogs { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; ~DatabaseIO() override; diff --git a/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.C b/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.C index 00d93b2882..54ae6dc351 100644 --- a/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.C +++ b/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -52,8 +52,6 @@ namespace Iogs { GeneratedMesh::GeneratedMesh() { initialize(); } - GeneratedMesh::~GeneratedMesh() = default; - void GeneratedMesh::initialize() { if (processorCount > numZ) { diff --git a/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.h b/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.h index 33db27acd4..d19b481d91 100644 --- a/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.h +++ b/packages/seacas/libraries/ioss/src/gen_struc/Iogs_GeneratedMesh.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -137,7 +137,7 @@ namespace Iogs { explicit GeneratedMesh(const std::string ¶meters, int proc_count = 1, int my_proc = 0); GeneratedMesh(int64_t num_x, int64_t num_y, int64_t num_z, int proc_count = 1, int my_proc = 0); GeneratedMesh(); - virtual ~GeneratedMesh(); + virtual ~GeneratedMesh() = default; /** * Add a sideset along the specified face of the hex mesh. diff --git a/packages/seacas/libraries/ioss/src/generated/Iogn_DashSurfaceMesh.h b/packages/seacas/libraries/ioss/src/generated/Iogn_DashSurfaceMesh.h index d95cc296b8..53366fdc1f 100644 --- a/packages/seacas/libraries/ioss/src/generated/Iogn_DashSurfaceMesh.h +++ b/packages/seacas/libraries/ioss/src/generated/Iogn_DashSurfaceMesh.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -140,8 +140,6 @@ namespace Iogn { { } - ~DashSurfaceMesh() override = default; - int64_t node_count() const override; int64_t node_count_proc() const override; @@ -196,8 +194,6 @@ namespace Iogn { public: explicit ExodusMesh(const ExodusData &exodusData); - ~ExodusMesh() override = default; - int64_t node_count() const override; int64_t node_count_proc() const override; diff --git a/packages/seacas/libraries/ioss/src/generated/Iogn_DatabaseIO.h b/packages/seacas/libraries/ioss/src/generated/Iogn_DatabaseIO.h index bb33621398..c7e3aa04d6 100644 --- a/packages/seacas/libraries/ioss/src/generated/Iogn_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/generated/Iogn_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -80,9 +80,6 @@ namespace Iogn { */ DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; - ~DatabaseIO() override; std::string get_format() const override { return "Generated"; } diff --git a/packages/seacas/libraries/ioss/src/generated/Iogn_GeneratedMesh.h b/packages/seacas/libraries/ioss/src/generated/Iogn_GeneratedMesh.h index 76e48dfa72..0e19391401 100644 --- a/packages/seacas/libraries/ioss/src/generated/Iogn_GeneratedMesh.h +++ b/packages/seacas/libraries/ioss/src/generated/Iogn_GeneratedMesh.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -168,8 +168,7 @@ namespace Iogn { GeneratedMesh(); GeneratedMesh(const GeneratedMesh &) = delete; GeneratedMesh &operator=(const GeneratedMesh &) = delete; - - virtual ~GeneratedMesh() = default; + virtual ~GeneratedMesh() = default; /** * Split each hexahedral element into 6 tetrahedral elements. diff --git a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_DatabaseIO.h b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_DatabaseIO.h index 2d8817b21e..9d9f5c7ca4 100644 --- a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -66,8 +66,6 @@ namespace Iohb { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; ~DatabaseIO() override; diff --git a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.C b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.C index f37da24977..e08fd60a7f 100644 --- a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.C +++ b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // @@ -14,8 +14,6 @@ namespace Iohb { { } - Layout::~Layout() = default; - void Layout::add_literal(const std::string &label) { fmt::print(layout_, "{}", label); } void Layout::add_legend(const std::string &label) diff --git a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h index dcbabe7f6d..34122957be 100644 --- a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h +++ b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -23,8 +23,6 @@ namespace Iohb { Layout(const Layout &) = delete; Layout &operator=(const Layout &) = delete; - ~Layout(); - const std::string layout() const { return layout_.str(); } void add_literal(const std::string &label); @@ -59,7 +57,7 @@ namespace Iohb { template inline void Layout::add(const std::string &name, const T &value) { output_common(name); - if (fieldWidth_ > 0) { + if (!showLabels && fieldWidth_ > 0) { fmt::print(layout_, "{0:{1}}", value, fieldWidth_); } else { @@ -75,7 +73,7 @@ namespace Iohb { // double fmt::print(layout_, "{}", value); } - else if (fieldWidth_ > 0) { + else if (!showLabels && fieldWidth_ > 0) { fmt::print(layout_, "{0:{1}.{2}e}", value, fieldWidth_, precision_); } else { @@ -91,7 +89,7 @@ namespace Iohb { } else { output_common(name); - if (fieldWidth_ > 0) { + if (!showLabels && fieldWidth_ > 0) { fmt::print(layout_, "{0:{1}}", fmt::join(value, separator_), fieldWidth_); } else { @@ -112,7 +110,7 @@ namespace Iohb { // double fmt::print(layout_, "{}", fmt::join(value, separator_)); } - else if (fieldWidth_ > 0) { + else if (!showLabels && fieldWidth_ > 0) { fmt::print(layout_, "{0:{2}.{1}e}", fmt::join(value, separator_), precision_, fieldWidth_); } else { diff --git a/packages/seacas/libraries/ioss/src/main/info_interface.C b/packages/seacas/libraries/ioss/src/main/info_interface.C index dc991e804d..a6699f0f44 100644 --- a/packages/seacas/libraries/ioss/src/main/info_interface.C +++ b/packages/seacas/libraries/ioss/src/main/info_interface.C @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -18,8 +18,6 @@ Info::Interface::Interface() { enroll_options(); } -Info::Interface::~Interface() = default; - void Info::Interface::enroll_options() { options_.usage("[options] basename"); diff --git a/packages/seacas/libraries/ioss/src/main/info_interface.h b/packages/seacas/libraries/ioss/src/main/info_interface.h index a7701a2c5f..65d304582c 100644 --- a/packages/seacas/libraries/ioss/src/main/info_interface.h +++ b/packages/seacas/libraries/ioss/src/main/info_interface.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2022, 2023, 2024 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. * @@ -20,7 +20,6 @@ namespace Info { { public: Interface(); - ~Interface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/libraries/ioss/src/main/io_modify.C b/packages/seacas/libraries/ioss/src/main/io_modify.C index 74e86b674f..4c6e070839 100644 --- a/packages/seacas/libraries/ioss/src/main/io_modify.C +++ b/packages/seacas/libraries/ioss/src/main/io_modify.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -763,9 +763,6 @@ namespace { int size() const { return (int)m_vertices.size(); } public: - Graph() = default; // Constructor - ~Graph() = default; - void add_edge(const std::string &v, const std::string &w); // to add an edge to graph bool is_cyclic(); // returns true if there is a cycle in this graph }; diff --git a/packages/seacas/libraries/ioss/src/main/modify_interface.C b/packages/seacas/libraries/ioss/src/main/modify_interface.C index 291520b0e0..4ea5e7b248 100644 --- a/packages/seacas/libraries/ioss/src/main/modify_interface.C +++ b/packages/seacas/libraries/ioss/src/main/modify_interface.C @@ -18,8 +18,6 @@ Modify::Interface::Interface() { enroll_options(); } -Modify::Interface::~Interface() = default; - void Modify::Interface::enroll_options() { options_.usage("[options] basename"); diff --git a/packages/seacas/libraries/ioss/src/main/modify_interface.h b/packages/seacas/libraries/ioss/src/main/modify_interface.h index fb2c01099d..21241ada5a 100644 --- a/packages/seacas/libraries/ioss/src/main/modify_interface.h +++ b/packages/seacas/libraries/ioss/src/main/modify_interface.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2022, 2024 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. * @@ -18,7 +18,6 @@ namespace Modify { { public: Interface(); - ~Interface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/libraries/ioss/src/main/shell_interface.C b/packages/seacas/libraries/ioss/src/main/shell_interface.C index 5334f58fb8..94f7c2557c 100644 --- a/packages/seacas/libraries/ioss/src/main/shell_interface.C +++ b/packages/seacas/libraries/ioss/src/main/shell_interface.C @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -24,8 +24,6 @@ IOShell::Interface::Interface(std::string app_version) : version(std::move(app_v enroll_options(); } -IOShell::Interface::~Interface() = default; - void IOShell::Interface::enroll_options() { options_.usage("[options] input_file[s] output_file"); diff --git a/packages/seacas/libraries/ioss/src/main/shell_interface.h b/packages/seacas/libraries/ioss/src/main/shell_interface.h index 17f2e7a37f..9081c2df94 100644 --- a/packages/seacas/libraries/ioss/src/main/shell_interface.h +++ b/packages/seacas/libraries/ioss/src/main/shell_interface.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -21,7 +21,6 @@ namespace IOShell { { public: explicit Interface(std::string app_version); - ~Interface(); bool parse_options(int argc, char **argv, int my_processor); diff --git a/packages/seacas/libraries/ioss/src/main/skinner_interface.C b/packages/seacas/libraries/ioss/src/main/skinner_interface.C index 93fbf86d00..33669ffcb7 100644 --- a/packages/seacas/libraries/ioss/src/main/skinner_interface.C +++ b/packages/seacas/libraries/ioss/src/main/skinner_interface.C @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * Copyright(C) 1999-2024 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. * @@ -19,8 +19,6 @@ Skinner::Interface::Interface() { enroll_options(); } -Skinner::Interface::~Interface() = default; - void Skinner::Interface::enroll_options() { options_.usage("[options] input_file[s] output_file"); diff --git a/packages/seacas/libraries/ioss/src/main/skinner_interface.h b/packages/seacas/libraries/ioss/src/main/skinner_interface.h index 16f8a9bf7a..aa98ce320d 100644 --- a/packages/seacas/libraries/ioss/src/main/skinner_interface.h +++ b/packages/seacas/libraries/ioss/src/main/skinner_interface.h @@ -1,5 +1,5 @@ /* - * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * Copyright(C) 1999-2020, 2022, 2024 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. * @@ -21,7 +21,6 @@ namespace Skinner { { public: Interface(); - ~Interface(); bool parse_options(int argc, char **argv); diff --git a/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.C b/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.C index 30cb05ebc6..44a7d2a563 100644 --- a/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -27,8 +27,6 @@ namespace Ionull { { } - DatabaseIO::~DatabaseIO() = default; - void DatabaseIO::read_meta_data_nl() {} unsigned DatabaseIO::entity_field_support() const diff --git a/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.h b/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.h index 2f0dc99a13..83e9e5d5f2 100644 --- a/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/null/Ionull_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 2023 National Technology & Engineering Solutions +// Copyright(C) 2023, 2024 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. // @@ -49,10 +49,6 @@ namespace Ionull { DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; - ~DatabaseIO() override; - std::string get_format() const override { return "Null"; } // Check capabilities of input/output database... Returns an diff --git a/packages/seacas/libraries/ioss/src/pamgen/Iopg_DatabaseIO.h b/packages/seacas/libraries/ioss/src/pamgen/Iopg_DatabaseIO.h index b676dda27d..35ba56ab12 100644 --- a/packages/seacas/libraries/ioss/src/pamgen/Iopg_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/pamgen/Iopg_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2024 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. // @@ -61,8 +61,6 @@ namespace Iopg { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &properties); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; ~DatabaseIO(); std::string get_format() const override { return "PamGen"; } diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C index 9746e2920d..b874666e7c 100644 --- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.C @@ -643,6 +643,13 @@ namespace Iotm { } } + void DatabaseIO::update_block_omissions_from_assemblies() + { + m_textMesh->update_block_omissions_from_assemblies(get_region(), + assemblyOmissions, assemblyInclusions, + blockOmissions, blockInclusions); + } + void DatabaseIO::get_elemblocks() { // Attributes of an element block are: @@ -675,6 +682,37 @@ namespace Iotm { order++; } + + if (!assemblyOmissions.empty() || !assemblyInclusions.empty()) { + update_block_omissions_from_assemblies(); + } + + assert(blockOmissions.empty() || blockInclusions.empty()); // Only one can be non-empty + + // Handle all block omissions or inclusions... + if (!blockOmissions.empty()) { + for (const auto &name : blockOmissions) { + auto block = get_region()->get_element_block(name); + if (block != nullptr) { + block->property_add(Ioss::Property(std::string("omitted"), 1)); + } + } + } + + if (!blockInclusions.empty()) { + const auto &blocks = get_region()->get_element_blocks(); + for (auto &block : blocks) { + block->property_add(Ioss::Property(std::string("omitted"), 1)); + } + + // Now, erase the property on any blocks in the inclusion list... + for (const auto &name : blockInclusions) { + auto block = get_region()->get_element_block(name); + if (block != nullptr) { + block->property_erase("omitted"); + } + } + } } void DatabaseIO::get_nodesets() diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.h b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.h index a85c3bcc36..b1eec86e0b 100644 --- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.h +++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_DatabaseIO.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2023, 2024 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. // @@ -68,8 +68,6 @@ namespace Iotm { public: DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage, Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props); - DatabaseIO(const DatabaseIO &from) = delete; - DatabaseIO &operator=(const DatabaseIO &from) = delete; ~DatabaseIO() override; @@ -103,6 +101,8 @@ namespace Iotm { void get_commsets(); void get_assemblies(); + void update_block_omissions_from_assemblies(); + const Ioss::Map &get_node_map() const; const Ioss::Map &get_element_map() const; diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C index 58e22a1b7e..6538b66554 100644 --- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C +++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.C @@ -26,6 +26,79 @@ } while (false) namespace Iotm { + +class AssemblyTreeFilter +{ +public: + AssemblyTreeFilter() = delete; + AssemblyTreeFilter(const AssemblyTreeFilter &) = delete; + + AssemblyTreeFilter(Ioss::Region *region, const Ioss::EntityType filterType, const Assemblies &assemblies) + : m_region(region), + m_type(filterType), + m_assemblies(assemblies) + { + for (const std::string& assemblyName : m_assemblies.get_part_names()) { + m_visitedAssemblies[assemblyName] = false; + } + } + + void update_list_from_assembly_tree(const AssemblyData *assembly, std::vector &list) + { + // Walk the tree without cyclic dependency + if (nullptr != assembly) { + if (!m_visitedAssemblies[assembly->name]) { + m_visitedAssemblies[assembly->name] = true; + + const Ioss::EntityType assemblyType = TextMesh::assembly_type_to_entity_type(assembly->get_assembly_type()); + if (m_type == assemblyType) { + for (const std::string& assemblyMember : assembly->data) { + Ioss::GroupingEntity *ge = m_region->get_entity(assemblyMember, m_type); + if (nullptr != ge) { + list.push_back(ge->name()); + } + } + } + + if (Ioss::ASSEMBLY == assemblyType) { + for (const std::string& subAssemblyName : assembly->data) { + // Find the sub assembly + const AssemblyData *subAssembly = m_assemblies.get_group_data(subAssemblyName); + + if (nullptr != subAssembly) { + update_list_from_assembly_tree(subAssembly, list); + } else { + std::ostringstream errmsg; + fmt::print(errmsg, "ERROR: Could not find sub-assembly with id: {} and name: {}", + assembly->id, assembly->name); + IOSS_ERROR(errmsg); + } + } + } + } + } + } + + void update_assembly_filter_list(std::vector &assemblyFilterList) + { + for (const std::string& assemblyName : m_assemblies.get_part_names()) { + if (m_visitedAssemblies[assemblyName]) { + assemblyFilterList.emplace_back(assemblyName); + } + } + + std::sort(assemblyFilterList.begin(), assemblyFilterList.end(), std::less<>()); + auto endIter = std::unique(assemblyFilterList.begin(), assemblyFilterList.end()); + assemblyFilterList.resize(endIter - assemblyFilterList.begin()); + } + +private: + Ioss::Region *m_region = nullptr; + Ioss::EntityType m_type = Ioss::INVALID_TYPE; + const Assemblies &m_assemblies; + mutable std::map m_visitedAssemblies; +}; + void error_handler(const std::ostringstream &message) { throw std::logic_error((message).str()); } TextMesh::TextMesh(int, int my_proc) : m_myProcessor(my_proc) @@ -634,7 +707,7 @@ namespace Iotm { return assembly->id; } - Ioss::EntityType TextMesh::assembly_type_to_entity_type(const AssemblyType type) const + Ioss::EntityType TextMesh::assembly_type_to_entity_type(const AssemblyType type) { if (type == AssemblyType::BLOCK) { return Ioss::ELEMENTBLOCK; @@ -844,4 +917,44 @@ namespace Iotm { return sideset->get_split_type(); } + + void TextMesh::update_block_omissions_from_assemblies(Ioss::Region *region, + std::vector& assemblyOmissions, + std::vector& assemblyInclusions, + std::vector& blockOmissions, + std::vector& blockInclusions) const + { + // Query number of assemblies... + if (assembly_count() > 0) { + std::vector exclusions; + std::vector inclusions; + + AssemblyTreeFilter inclusionFilter(region, Ioss::ELEMENTBLOCK, m_data.assemblies); + AssemblyTreeFilter exclusionFilter(region, Ioss::ELEMENTBLOCK, m_data.assemblies); + + for (const std::string& assemblyName : m_data.assemblies.get_part_names()) { + const AssemblyData *assembly = m_data.assemblies.get_group_data(assemblyName); + + bool omitAssembly = + std::binary_search(assemblyOmissions.begin(), assemblyOmissions.end(), assembly->name); + bool includeAssembly = + std::binary_search(assemblyInclusions.begin(), assemblyInclusions.end(), assembly->name); + + if (omitAssembly) { + exclusionFilter.update_list_from_assembly_tree(assembly, exclusions); + } + + if (includeAssembly) { + inclusionFilter.update_list_from_assembly_tree(assembly, inclusions); + } + } + + exclusionFilter.update_assembly_filter_list(assemblyOmissions); + inclusionFilter.update_assembly_filter_list(assemblyInclusions); + + Ioss::Utils::insert_sort_and_unique(exclusions, blockOmissions); + Ioss::Utils::insert_sort_and_unique(inclusions, blockInclusions); + } + } + } // namespace Iotm diff --git a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h index 91a7ae97e3..fb79ef364e 100644 --- a/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h +++ b/packages/seacas/libraries/ioss/src/text_mesh/Iotm_TextMesh.h @@ -8,6 +8,7 @@ #include "Ioss_CodeTypes.h" #include "Ioss_EntityType.h" // for EntityType +#include "Ioss_Region.h" #include // for size_t #include // for int64_t #include // for map, etc @@ -34,6 +35,7 @@ namespace Iotm { using ElementData = text_mesh::ElementData; using SidesetData = text_mesh::SidesetData; using NodesetData = text_mesh::NodesetData; + using Assemblies = text_mesh::Assemblies; using AssemblyData = text_mesh::AssemblyData; using Coordinates = text_mesh::Coordinates; using TextMeshParser = text_mesh::TextMeshParser; @@ -283,7 +285,13 @@ namespace Iotm { Ioss::EntityType get_assembly_type(const std::string &name) const; std::vector get_assembly_members(const std::string &name) const; - Ioss::EntityType assembly_type_to_entity_type(const AssemblyType type) const; + static Ioss::EntityType assembly_type_to_entity_type(const AssemblyType type); + + void update_block_omissions_from_assemblies(Ioss::Region *region, + std::vector& assemblyOmissions, + std::vector& assemblyInclusions, + std::vector& blockOmissions, + std::vector& blockInclusions) const; unsigned spatial_dimension() const; diff --git a/packages/seacas/libraries/ioss/src/unit_tests/CMakeLists.txt b/packages/seacas/libraries/ioss/src/unit_tests/CMakeLists.txt index 2fbcd70ffb..17a7bbb440 100644 --- a/packages/seacas/libraries/ioss/src/unit_tests/CMakeLists.txt +++ b/packages/seacas/libraries/ioss/src/unit_tests/CMakeLists.txt @@ -4,6 +4,11 @@ TRIBITS_ADD_EXECUTABLE( SOURCES unitMain.C UnitTestTextMesh.C ) +TRIBITS_ADD_EXECUTABLE( + Utst_iotm + SOURCES unitMain.C UnitTestIotmDatabaseIO.C +) + TRIBITS_ADD_EXECUTABLE( Utst_blockbatchread SOURCES unitMain.C UnitTestElementBlockBatchRead.C @@ -51,6 +56,18 @@ TRIBITS_ADD_TEST( NUM_MPI_PROCS 4 ) +TRIBITS_ADD_TEST( + Utst_iotm + NAME Utst_iotm + NUM_MPI_PROCS 1 +) + +TRIBITS_ADD_TEST( + Utst_iotm + NAME Utst_iotm + NUM_MPI_PROCS 2 +) + TRIBITS_INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../" diff --git a/packages/seacas/libraries/ioss/src/unit_tests/UnitTestIotmDatabaseIO.C b/packages/seacas/libraries/ioss/src/unit_tests/UnitTestIotmDatabaseIO.C new file mode 100644 index 0000000000..c430cbf846 --- /dev/null +++ b/packages/seacas/libraries/ioss/src/unit_tests/UnitTestIotmDatabaseIO.C @@ -0,0 +1,178 @@ +// Copyright(C) 1999-2020, 2022 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. +// +// See packages/seacas/LICENSE for details + +#ifdef SEACAS_HAVE_MPI +#include "mpi.h" +#endif +#include "gtest/gtest.h" + +#include "Ionit_Initializer.h" +#include "Ioss_DBUsage.h" +#include "Ioss_ElementBlock.h" +#include "Ioss_ElementTopology.h" +#include "Ioss_Hex8.h" +#include "Ioss_NodeBlock.h" +#include "Ioss_NodeSet.h" +#include "Ioss_PropertyManager.h" +#include "Ioss_Region.h" +#include "Ioss_Shell4.h" +#include "Ioss_SideBlock.h" +#include "Ioss_SideSet.h" +#include "text_mesh/Iotm_DatabaseIO.h" +#include +#include +#include +#include +#include + +#include "Ioss_CodeTypes.h" +#include "Ioss_Field.h" +#include "Ioss_ParallelUtils.h" + +namespace { + +Iotm::DatabaseIO *create_input_db_io(const std::string &meshDesc) +{ + Ioss::Init::Initializer init_db; + + Ioss::DatabaseUsage db_usage = Ioss::READ_MODEL; + Ioss::PropertyManager properties; + + properties.add(Ioss::Property("INTEGER_SIZE_DB", 8)); + properties.add(Ioss::Property("INTEGER_SIZE_API", 8)); + + auto *db_io = new Iotm::DatabaseIO(nullptr, meshDesc, db_usage, + Ioss::ParallelUtils::comm_world(), properties); + return db_io; +} + +Iotm::DatabaseIO *create_output_db_io(const std::string &filename) +{ + Ioss::Init::Initializer init_db; + Ioss::DatabaseUsage db_usage = Ioss::WRITE_RESULTS; + Ioss::PropertyManager properties; + + properties.add(Ioss::Property("INTEGER_SIZE_DB", 8)); + properties.add(Ioss::Property("INTEGER_SIZE_API", 8)); + + auto *db_io = new Iotm::DatabaseIO(nullptr, filename, db_usage, + Ioss::ParallelUtils::comm_world(), properties); + return db_io; +} + +int get_parallel_size() +{ + return Ioss::ParallelUtils(Ioss::ParallelUtils::comm_world()).parallel_size(); +} + +int get_parallel_rank() +{ + return Ioss::ParallelUtils(Ioss::ParallelUtils::comm_world()).parallel_rank(); +} + +bool include_entity(const Ioss::GroupingEntity *entity) +{ + assert(entity); + + // Check whether entity has "omitted" property... + bool omitted = (entity->property_exists("omitted")) && + (entity->get_property("omitted").get_int() == 1); + + return !omitted; +} + +TEST(TextMesh, twoHexesSerial) +{ + if (get_parallel_size() != 1) { + GTEST_SKIP(); + } + + std::string meshDesc = "0,1,HEX_8,1,2,3,4,5,6,7,8,block_1\n" + "0,2,HEX_8,5,6,7,8,9,10,11,12,block_2"; + + Iotm::DatabaseIO *db_io = create_input_db_io(meshDesc); + db_io->set_surface_split_type(Ioss::SPLIT_BY_ELEMENT_BLOCK); + + Ioss::Region region(db_io); + + EXPECT_TRUE(nullptr != db_io); + EXPECT_TRUE(db_io->ok()); + EXPECT_EQ("TextMesh", db_io->get_format()); + + const std::vector &element_blocks = region.get_element_blocks(); + EXPECT_EQ(2u, element_blocks.size()); + + EXPECT_EQ(1u, element_blocks[0]->entity_count()); + EXPECT_EQ(1u, element_blocks[1]->entity_count()); + + EXPECT_EQ(Ioss::Hex8::name, element_blocks[0]->topology()->name()); + EXPECT_EQ(Ioss::Hex8::name, element_blocks[1]->topology()->name()); +} + +TEST(TextMesh, twoHexesParallel) +{ + if (get_parallel_size() != 2) { + GTEST_SKIP(); + } + + std::string meshDesc = "0,1,HEX_8,1,2,3,4,5,6,7,8,block_1\n" + "1,2,HEX_8,5,6,7,8,9,10,11,12,block_2"; + + Iotm::DatabaseIO *db_io = create_input_db_io(meshDesc); + db_io->set_surface_split_type(Ioss::SPLIT_BY_ELEMENT_BLOCK); + + Ioss::Region region(db_io); + + EXPECT_TRUE(nullptr != db_io); + EXPECT_TRUE(db_io->ok()); + EXPECT_EQ("TextMesh", db_io->get_format()); + + const std::vector &element_blocks = region.get_element_blocks(); + EXPECT_EQ(2u, element_blocks.size()); + + if(get_parallel_rank() == 0) { + EXPECT_EQ(1u, element_blocks[0]->entity_count()); + EXPECT_EQ(0u, element_blocks[1]->entity_count()); + } else { + EXPECT_EQ(0u, element_blocks[0]->entity_count()); + EXPECT_EQ(1u, element_blocks[1]->entity_count()); + } + + EXPECT_EQ(Ioss::Hex8::name, element_blocks[0]->topology()->name()); + EXPECT_EQ(Ioss::Hex8::name, element_blocks[1]->topology()->name()); +} + +TEST(TextMesh, twoHexesParallel_skipBlock1) +{ + if (get_parallel_size() != 2) { + GTEST_SKIP(); + } + + std::string meshDesc = "0,1,HEX_8,1,2,3,4,5,6,7,8,block_1\n" + "1,2,HEX_8,5,6,7,8,9,10,11,12,block_2"; + + const std::vector omittedBlocks{"block_1"}; + + Iotm::DatabaseIO *db_io = create_input_db_io(meshDesc); + db_io->set_surface_split_type(Ioss::SPLIT_BY_ELEMENT_BLOCK); + db_io->set_block_omissions(omittedBlocks); + + Ioss::Region region(db_io); + + EXPECT_TRUE(nullptr != db_io); + EXPECT_TRUE(db_io->ok()); + EXPECT_EQ("TextMesh", db_io->get_format()); + + const std::vector &element_blocks = region.get_element_blocks(); + EXPECT_EQ(2u, element_blocks.size()); + + EXPECT_FALSE(include_entity(element_blocks[0])); + EXPECT_TRUE(include_entity(element_blocks[1])); +} + +} + + diff --git a/packages/seacas/libraries/suplib_cpp/FileInfo.C b/packages/seacas/libraries/suplib_cpp/FileInfo.C index 9afa9bc5a8..1ae20a943c 100644 --- a/packages/seacas/libraries/suplib_cpp/FileInfo.C +++ b/packages/seacas/libraries/suplib_cpp/FileInfo.C @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions +// Copyright(C) 1999-2021, 2023, 2024 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. // @@ -23,8 +23,8 @@ #define X_OK 1 /* execute permission - unsupported in windows*/ #define F_OK 0 /* Test for existence. */ #ifndef S_ISREG -#define S_ISREG(m) (((m)&_S_IFMT) == _S_IFREG) -#define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR) +#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) +#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #endif #else #include @@ -60,7 +60,7 @@ FileInfo::FileInfo(const std::string &dirpath, const std::string &my_filename) if (!dirpath.empty()) { filename_ = dirpath; if (filename_.at(filename_.size() - 1) != '/') { - static std::string SLASH("/"); + const static std::string SLASH("/"); filename_ += SLASH; } } @@ -69,8 +69,6 @@ FileInfo::FileInfo(const std::string &dirpath, const std::string &my_filename) exists_ = readable_ || internal_access(filename_, F_OK); } -FileInfo::~FileInfo() = default; - //: Returns TRUE if the file exists (is readable) bool FileInfo::exists() const { return exists_; } diff --git a/packages/seacas/libraries/suplib_cpp/FileInfo.h b/packages/seacas/libraries/suplib_cpp/FileInfo.h index 1cdbab174e..d32906d2a8 100644 --- a/packages/seacas/libraries/suplib_cpp/FileInfo.h +++ b/packages/seacas/libraries/suplib_cpp/FileInfo.h @@ -1,4 +1,4 @@ -// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2020, 2022, 2024 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. // @@ -44,8 +44,6 @@ class FileInfo //! \param my_filename base filename FileInfo(const std::string &dirpath, const std::string &my_filename); - ~FileInfo(); - bool exists() const; //!< returns True if file exists, false if nonexistent bool is_readable() const; //!< Exists and is readable bool is_writable() const; //!< Exists and is writable diff --git a/packages/seacas/libraries/suplib_cpp/hwm.C b/packages/seacas/libraries/suplib_cpp/hwm.C index 8f0dde6c99..a3eef69a3d 100644 --- a/packages/seacas/libraries/suplib_cpp/hwm.C +++ b/packages/seacas/libraries/suplib_cpp/hwm.C @@ -1,3 +1,4 @@ +#include // For memory utilities... #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || \ defined(__MINGW32__) || defined(_WIN64) || defined(__MINGW64__) diff --git a/packages/seacas/libraries/suplib_cpp/hwm.h b/packages/seacas/libraries/suplib_cpp/hwm.h index 1271b7f0ca..9ca2ea79c3 100644 --- a/packages/seacas/libraries/suplib_cpp/hwm.h +++ b/packages/seacas/libraries/suplib_cpp/hwm.h @@ -1,8 +1,8 @@ -// Copyright(C) 1999-2022 National Technology & Engineering Solutions +// Copyright(C) 1999-2022, 2024 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. // // See packages/seacas/LICENSE for details #pragma once - +#include size_t get_hwm_memory_info();