Skip to content

Commit

Permalink
EXODIFF: Add minimal assembly support (no diff; summary only)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Nov 7, 2023
1 parent b40650b commit 71f302d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/seacas/applications/exodiff/exoII_read.C
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ template <typename INT> void ExoII_Read<INT>::Get_Init_Data()
num_side_sets = info.num_side_sets;
num_edge_blocks = info.num_edge_blk;
num_face_blocks = info.num_face_blk;
num_assemblies = info.num_assembly;
title = info.title;

if (err > 0 && !interFace.quiet_flag) {
Expand Down
2 changes: 2 additions & 0 deletions packages/seacas/applications/exodiff/exoII_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ template <typename INT> class ExoII_Read
size_t Num_Elements() const { return num_elmts; }
size_t Num_Faces() const { return num_faces; }
size_t Num_Edges() const { return num_edges; }
size_t Num_Assemblies() const { return num_assemblies; }
size_t Num_Node_Sets() const { return num_node_sets; }
size_t Num_Side_Sets() const { return num_side_sets; }
size_t Num_Edge_Blocks() const { return num_edge_blocks; }
Expand Down Expand Up @@ -204,6 +205,7 @@ template <typename INT> class ExoII_Read
size_t num_side_sets{0};
size_t num_edge_blocks{0};
size_t num_face_blocks{0};
size_t num_assemblies{0};
float db_version{0.0};
float api_version{0.0};
int io_word_size{0}; // Note: The "compute word size" is always 8.
Expand Down
12 changes: 6 additions & 6 deletions packages/seacas/applications/exodiff/exodiff.C
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ struct TimeInterp

std::string Date()
{
time_t calendar_time = time(nullptr);
time_t calendar_time = time(nullptr);
#if defined __NVCC__
char tbuf[32];
struct tm *local_time = localtime(&calendar_time);
struct tm *local_time = localtime(&calendar_time);
strftime(tbuf, 32, "%Y/%m/%d %H:%M:%S %Z", local_time);
std::string time_string(tbuf);
#else
auto const local_time = fmt::localtime(calendar_time);
auto time_string = fmt::format("{:%Y/%m/%d %H:%M:%S %Z}", local_time);
auto const local_time = fmt::localtime(calendar_time);
auto time_string = fmt::format("{:%Y/%m/%d %H:%M:%S %Z}", local_time);
#endif
return time_string;
}
Expand Down Expand Up @@ -300,15 +300,15 @@ namespace {
"{0} Title: {2}\n"
"{0} Dim = {3}, Nodes = {5}, Elements = {6}, Faces = {20}, Edges = {21}\n"
"{0} Element Blocks = {4}, Face Blocks = {10}, Edge Blocks = {9}, Nodesets = {7}, "
"Sidesets = {8}\n"
"Sidesets = {8}, Assemblies = {22}\n"
"{0} Vars: Global = {11}, Nodal = {12}, Element = {13}, Face = {17}, Edge = {18}, "
"Nodeset = {14}, Sideset = {15}, Times = {16}\n\n",
prefix, fi.realpath(), file.Title(), file.Dimension(), file.Num_Element_Blocks(),
file.Num_Nodes(), file.Num_Elements(), file.Num_Node_Sets(), file.Num_Side_Sets(),
file.Num_Edge_Blocks(), file.Num_Face_Blocks(), file.Num_Global_Vars(),
file.Num_Nodal_Vars(), file.Num_Element_Vars(), file.Num_NS_Vars(), file.Num_SS_Vars(),
file.Num_Times(), file.Num_FB_Vars(), file.Num_EB_Vars(), count, file.Num_Faces(),
file.Num_Edges());
file.Num_Edges(), file.Num_Assemblies());
}

void initialize(std::vector<MinMaxData> &mm_entity, size_t size, const ToleranceType &ttype)
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/exodiff/map.C
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ namespace {
}
else {
Error(fmt::format("Unable to match {0} {1} in first file with {0} in second file.\n", type,
file1_id_map[id1[i]]));
fmt::group_digits(file1_id_map[id1[i]])));
}
}

Expand Down

0 comments on commit 71f302d

Please sign in to comment.