From 466e26d33045ae6b8129b224b0c2f70396b25cb3 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 28 Jun 2024 12:17:13 +0200 Subject: [PATCH] changed: FlowMain parameters moved to Opm::Parameters namespace --- opm/simulators/flow/FlowMain.hpp | 47 ++++++++++++++------------------ opm/simulators/flow/Main.hpp | 2 +- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/opm/simulators/flow/FlowMain.hpp b/opm/simulators/flow/FlowMain.hpp index 027af96d8..397454f67 100644 --- a/opm/simulators/flow/FlowMain.hpp +++ b/opm/simulators/flow/FlowMain.hpp @@ -41,37 +41,32 @@ #include #include -namespace Opm::Properties { +namespace Opm::Parameters { template -struct EnableDryRun { - using type = UndefinedProperty; -}; +struct EnableDryRun { using type = Properties::UndefinedProperty; }; + template -struct OutputInterval { - using type = UndefinedProperty; -}; +struct OutputInterval { using type = Properties::UndefinedProperty; }; + template -struct EnableLoggingFalloutWarning { - using type = UndefinedProperty; -}; +struct EnableLoggingFalloutWarning { using type = Properties::UndefinedProperty; }; // TODO: enumeration parameters. we use strings for now. template -struct EnableDryRun { - static constexpr auto value = "auto"; -}; +struct EnableDryRun +{ static constexpr auto value = "auto"; }; + // Do not merge parallel output files or warn about them template -struct EnableLoggingFalloutWarning { - static constexpr bool value = false; -}; -template -struct OutputInterval { - static constexpr int value = 1; -}; +struct EnableLoggingFalloutWarning +{ static constexpr bool value = false; }; -} // namespace Opm::Properties +template +struct OutputInterval +{ static constexpr int value = 1; }; + +} // namespace Opm::Parameters namespace Opm { @@ -114,11 +109,11 @@ namespace Opm { return EXIT_SUCCESS; } // register the flow specific parameters - Parameters::registerParam + Parameters::registerParam ("Specify if the simulation ought to be actually run, or just pretended to be"); - Parameters::registerParam + Parameters::registerParam ("Specify the number of report steps between two consecutive writes of restart data"); - Parameters::registerParam + Parameters::registerParam ("Developer option to see whether logging was on non-root processors. " "In that case it will be appended to the *.DBG or *.PRT files"); @@ -421,7 +416,7 @@ namespace Opm { detail::mergeParallelLogFiles(eclState().getIOConfig().getOutputDir(), Parameters::get(), - Parameters::get()); + Parameters::get()); } void setupModelSimulator() @@ -432,7 +427,7 @@ namespace Opm { try { // Possible to force initialization only behavior (NOSIM). - const std::string& dryRunString = Parameters::get(); + const std::string& dryRunString = Parameters::get(); if (dryRunString != "" && dryRunString != "auto") { bool yesno; if (dryRunString == "true" diff --git a/opm/simulators/flow/Main.hpp b/opm/simulators/flow/Main.hpp index 372b61c0c..6e1c1da0a 100644 --- a/opm/simulators/flow/Main.hpp +++ b/opm/simulators/flow/Main.hpp @@ -417,7 +417,7 @@ private: outputDir, Parameters::get(), !Parameters::get(), - Parameters::get(), + Parameters::get(), Parameters::get(), Parameters::get(), getNumThreads(),