Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion opm/simulators/flow/Banners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ void printFlowTrailer(int nprocs,
int nthreads,
const double total_setup_time,
const double deck_read_time,
const SimulatorReport& report)
const SimulatorReport& report,
const std::string_view extra_summary)
{
std::ostringstream ss;
ss << "\n\n================ End of simulation ===============\n\n";
Expand All @@ -125,6 +126,15 @@ void printFlowTrailer(int nprocs,
ss << fmt::format("Setup time: {:9.2f} s\n", total_setup_time);
ss << fmt::format(" Deck input: {:9.2f} s\n", deck_read_time);
report.reportFullyImplicit(ss);
if (!extra_summary.empty()) {
if (extra_summary.front() != '\n') {
ss << '\n';
}
ss << extra_summary;
if (extra_summary.back() != '\n') {
ss << '\n';
}
}
OpmLog::info(ss.str());
}

Expand Down
3 changes: 2 additions & 1 deletion opm/simulators/flow/Banners.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ void printFlowTrailer(int nprocs,
int nthreads,
const double total_setup_time,
const double deck_read_time,
const SimulatorReport& report);
const SimulatorReport& report,
std::string_view extra_summary);

} // namespace Opm

Expand Down
3 changes: 2 additions & 1 deletion opm/simulators/flow/FlowMain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ namespace Opm {
= omp_get_max_threads();
#endif

printFlowTrailer(mpi_size_, threads, total_setup_time_, deck_read_time_, report);
printFlowTrailer(mpi_size_, threads, total_setup_time_, deck_read_time_, report,
simulator_->model().simulator().problem().extraTrailerSummary());

detail::handleExtraConvergenceOutput(report,
Parameters::Get<Parameters::OutputExtraConvergenceInfo>(),
Expand Down
5 changes: 5 additions & 0 deletions opm/simulators/flow/FlowProblem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ class FlowProblem : public GetPropType<TypeTag, Properties::BaseProblem>
using DirectionalMobilityPtr = Utility::CopyablePtr<DirectionalMobility<TypeTag>>;

public:

/// Extra module-specific lines appended to the final simulation trailer
/// (e.g. geomechanics timing). Derived problems may shadow this.
std::string extraTrailerSummary() const
{ return {}; }
using BaseType::briefDescription;
using BaseType::helpPreamble;
using BaseType::shouldWriteOutput;
Expand Down