Skip to content

Commit

Permalink
Reorder method definitions to match class body
Browse files Browse the repository at this point in the history
  • Loading branch information
wthrowe committed Oct 24, 2023
1 parent 525b5c2 commit 860e258
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/Time/History.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,22 @@ void History<Vars>::pup(PUP::er& p) {
// Don't serialize the allocation cache.
}

template <typename Vars>
std::ostream& History<Vars>::print(std::ostream& os) const {
using ::operator<<;
os << "Integration order: " << integration_order_ << "\n";
os << "Step values:\n";
for (auto& record : *this) {
record.print(os);
}
os << "Substep values:\n";
for (auto& record : substep_values_) {
record.print(os);
}
os << "Latest value if discarded: " << latest_value_if_discarded_ << "\n";
return os;
}

// Doxygen is confused by this function for some reason.
/// \cond
template <typename Vars>
Expand Down Expand Up @@ -988,22 +1004,6 @@ bool operator!=(const History<Vars>& a, const History<Vars>& b) {
return not(a == b);
}

template <typename Vars>
std::ostream& History<Vars>::print(std::ostream& os) const {
using ::operator<<;
os << "Integration order: " << integration_order_ << "\n";
os << "Step values:\n";
for (auto& record : *this) {
record.print(os);
}
os << "Substep values:\n";
for (auto& record : substep_values_) {
record.print(os);
}
os << "Latest value if discarded: " << latest_value_if_discarded_ << "\n";
return os;
}

template <typename Vars>
std::ostream& operator<<(std::ostream& os, const History<Vars>& history) {
return history.print(os);
Expand Down

0 comments on commit 860e258

Please sign in to comment.