mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move EnableTerminalOutput parameter to TypeTag-free parameter system
This commit is contained in:
@@ -378,7 +378,7 @@ private:
|
||||
int mpiRank = FlowGenericVanguard::comm().rank();
|
||||
outputCout_ = false;
|
||||
if (mpiRank == 0)
|
||||
outputCout_ = Parameters::get<PreTypeTag, Parameters::EnableTerminalOutput>();
|
||||
outputCout_ = Parameters::Get<Parameters::EnableTerminalOutput>();
|
||||
|
||||
if (deckFilename.empty()) {
|
||||
if (mpiRank == 0) {
|
||||
|
||||
@@ -85,10 +85,6 @@ template <class TypeTag>
|
||||
struct OutputExtraConvergenceInfo<TypeTag, Properties::TTag::FlowProblem>
|
||||
{ static constexpr auto* value = "none"; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct EnableTerminalOutput<TypeTag, Properties::TTag::FlowProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
template <class TypeTag>
|
||||
struct SaveStep<TypeTag, Properties::TTag::FlowProblem>
|
||||
{ static constexpr auto* value = ""; };
|
||||
@@ -171,7 +167,7 @@ public:
|
||||
// Only rank 0 does print to std::cout, and only if specifically requested.
|
||||
this->terminalOutput_ = false;
|
||||
if (this->grid().comm().rank() == 0) {
|
||||
this->terminalOutput_ = Parameters::get<TypeTag, Parameters::EnableTerminalOutput>();
|
||||
this->terminalOutput_ = Parameters::Get<Parameters::EnableTerminalOutput>();
|
||||
|
||||
this->startConvergenceOutputThread(Parameters::get<TypeTag, Parameters::OutputExtraConvergenceInfo>(),
|
||||
R"(OutputExtraConvergenceInfo (--output-extra-convergence-info))");
|
||||
@@ -190,7 +186,7 @@ public:
|
||||
SolverParameters::registerParameters();
|
||||
TimeStepper::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableTerminalOutput>
|
||||
Parameters::Register<Parameters::EnableTerminalOutput>
|
||||
("Print high-level information about the simulation's progress to the terminal");
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableAdaptiveTimeStepping>
|
||||
("Use adaptive time stepping between report steps");
|
||||
|
||||
@@ -80,8 +80,7 @@
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableTerminalOutput { using type = Properties::UndefinedProperty; };
|
||||
struct EnableTerminalOutput { static constexpr bool value = true; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Opm {
|
||||
, simulator_(simulator)
|
||||
{
|
||||
this->terminal_output_ = ((simulator.gridView().comm().rank() == 0) &&
|
||||
Parameters::get<TypeTag, Parameters::EnableTerminalOutput>());
|
||||
Parameters::Get<Parameters::EnableTerminalOutput>());
|
||||
|
||||
local_num_cells_ = simulator_.gridView().size(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user