Skip to content

Commit

Permalink
Modify how we loop through packages to enroll history outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Nov 13, 2024
1 parent b3a2b8d commit cbc36bd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/outputs/history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ void HistoryOutput::WriteOutputFile(Mesh *pm, ParameterInput *pin, SimTime *tm,
md_base->Initialize(pm->block_list, pm);
}

// Loop over all packages of the application
for (const auto &pkg : packages) {
// Loop over all packages of the application in alphabetical order
std::vector<std::string> keys;
for (const auto& pair : packages) {
keys.push_back(pair.first);
}
std::sort(keys.begin(), keys.end());
for (const auto &key : keys) {
const auto &pkg = packages[key];
const auto &params = pkg.second->AllParams();

// Check if the package has enrolled scalar history functions which are stored in the
Expand Down

0 comments on commit cbc36bd

Please sign in to comment.