Skip to content

Commit

Permalink
IOSS: Fix upper/lower suffix determination for composite fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Apr 22, 2024
1 parent 4cae738 commit e480bca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions packages/seacas/libraries/ioss/src/Ioss_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
// See packages/seacas/LICENSE for details

#include "Ioss_CodeTypes.h"
#include "Ioss_DatabaseIO.h"
#include "Ioss_FileInfo.h"
#include "Ioss_Utils.h"
#include <cassert>
#include <cctype>
#include <cstdint>
Expand Down Expand Up @@ -35,10 +32,13 @@
#endif
#include <cstdio>

#include "Ioss_CompositeVariableType.h"
#include "Ioss_DatabaseIO.h"
#include "Ioss_ElementBlock.h"
#include "Ioss_ElementTopology.h"
#include "Ioss_EntityType.h"
#include "Ioss_Field.h"
#include "Ioss_FileInfo.h"
#include "Ioss_GroupingEntity.h"
#include "Ioss_IOFactory.h"
#include "Ioss_NodeBlock.h"
Expand All @@ -47,6 +47,7 @@
#include "Ioss_Region.h"
#include "Ioss_SideBlock.h"
#include "Ioss_State.h"
#include "Ioss_Utils.h"
#include "Ioss_VariableType.h"

#if defined(__IOSS_WINDOWS__)
Expand Down Expand Up @@ -606,7 +607,12 @@ namespace {
// Are suffices upper or lowercase...
std::vector<std::string> tmp;
field_tokenize(names[which_names[0]], suffix_separator, tmp);
Ioss::Suffix suffix{tmp[tmp.size() - 1]};

// If a composite variable, then need to check the interior suffix, not the last (which
// will be 1,2,...)
bool is_composite = dynamic_cast<const Ioss::CompositeVariableType *>(
field.transformed_storage()) != nullptr;
Ioss::Suffix suffix{tmp[tmp.size() - (is_composite ? 2 : 1)]};
field.set_suffices_uppercase(suffix.is_uppercase());
field.set_index(index);
for (const auto &which_name : which_names) {
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/main/io_shell.C
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

namespace {
std::string codename;
std::string version = "6.5 (2024/04/03)";
std::string version = "6.6 (2024/04/22)";

bool mem_stats = false;

Expand Down

0 comments on commit e480bca

Please sign in to comment.