From f2b0630040398dc412811b603121be3da15a8b17 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 13 Aug 2018 10:31:18 +0200 Subject: [PATCH] flow: minor parameter related fixes - Change the brief description slightly - Do not print anything anymore if there are no unused parameters - Change the boiler plate text for printing the parameters to the PRT/DBG files in part, this has been requested by [at]atgeirr. --- examples/flow.cpp | 2 +- opm/autodiff/FlowMainEbos.hpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/flow.cpp b/examples/flow.cpp index deb4fa891..0ce6de5db 100644 --- a/examples/flow.cpp +++ b/examples/flow.cpp @@ -115,7 +115,7 @@ int main(int argc, char** argv) typedef TTAG(FlowEarlyBird) PreTypeTag; typedef GET_PROP_TYPE(PreTypeTag, Problem) PreProblem; - PreProblem::setBriefDescription("flow, the OPM reservoir simulator for ECL-decks."); + PreProblem::setBriefDescription("Flow, an advanced reservoir simulator for ECL-decks provided by the Open Porous Media project."); int status = Opm::FlowMainEbos::setupParameters_(argc, argv); if (status != 0) diff --git a/opm/autodiff/FlowMainEbos.hpp b/opm/autodiff/FlowMainEbos.hpp index e62f8971a..518e6a3ec 100755 --- a/opm/autodiff/FlowMainEbos.hpp +++ b/opm/autodiff/FlowMainEbos.hpp @@ -407,9 +407,8 @@ namespace Opm } ss << "Simulation started on " << tmstr << " hrs\n"; - ss << "---- parameters ----\n"; + ss << "Parameters used by Flow:\n"; Ewoms::Parameters::printValues(ss); - ss << "---- /parameters ----\n"; OpmLog::note(ss.str()); } @@ -513,11 +512,15 @@ namespace Opm simtimer.init(timeMap, (size_t)initConfig.getRestartStep()); if (output_cout_) { + std::ostringstream oss; + // This allows a user to catch typos and misunderstandings in the // use of simulator parameters. - std::cout << "----------------- Unrecognized parameters: -----------------\n"; - Ewoms::Parameters::printUnused(); - std::cout << "----------------------------------------------------------------" << std::endl; + if (Ewoms::Parameters::printUnused(oss)) { + std::cout << "----------------- Unrecognized parameters: -----------------\n"; + std::cout << oss.str(); + std::cout << "----------------------------------------------------------------" << std::endl; + } } if (!ioConfig.initOnly()) {