From da2b47b459ea4e552dff65b00bdd14daec3530ab Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 28 Jun 2024 12:16:28 +0200 Subject: [PATCH] changed: move the OutputDir parameter to Opm::Parameters --- .../discretization/common/fvbasediscretization.hh | 11 ++++++----- opm/models/discretization/common/fvbaseparameters.hh | 6 ++++++ opm/models/discretization/common/fvbaseproblem.hh | 2 +- opm/models/discretization/common/fvbaseproperties.hh | 6 ------ 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/opm/models/discretization/common/fvbasediscretization.hh b/opm/models/discretization/common/fvbasediscretization.hh index 55bac88ff..2c3de30ab 100644 --- a/opm/models/discretization/common/fvbasediscretization.hh +++ b/opm/models/discretization/common/fvbasediscretization.hh @@ -237,10 +237,6 @@ struct MinTimeStepSize static constexpr type value = 0.0; }; -//! By default, write the simulation output to the current working directory -template -struct OutputDir { static constexpr auto value = "."; }; - //! Enable the VTK output by default template struct EnableVtkOutput { static constexpr bool value = true; }; @@ -342,6 +338,11 @@ template struct EnableGridAdaptation { static constexpr bool value = false; }; +//! By default, write the simulation output to the current working directory +template +struct OutputDir +{ static constexpr auto value = "."; }; + } // namespace Opm::Parameters namespace Opm { @@ -527,7 +528,7 @@ public: ("Turn on caching of intensive quantities"); Parameters::registerParam ("Store previous storage terms and avoid re-calculating them."); - Parameters::registerParam + Parameters::registerParam ("The directory to which result files are written"); } diff --git a/opm/models/discretization/common/fvbaseparameters.hh b/opm/models/discretization/common/fvbaseparameters.hh index f13569aff..8dc3d954f 100644 --- a/opm/models/discretization/common/fvbaseparameters.hh +++ b/opm/models/discretization/common/fvbaseparameters.hh @@ -46,6 +46,12 @@ struct ThreadsPerProcess { using type = Properties::UndefinedProperty; }; template struct EnableGridAdaptation { using type = Properties::UndefinedProperty; }; +/*! + * \brief The directory to which simulation output ought to be written to. + */ +template +struct OutputDir { using type = Properties::UndefinedProperty; }; + } // namespace Opm::Parameters #endif diff --git a/opm/models/discretization/common/fvbaseproblem.hh b/opm/models/discretization/common/fvbaseproblem.hh index 2941e02b9..c09a92ba9 100644 --- a/opm/models/discretization/common/fvbaseproblem.hh +++ b/opm/models/discretization/common/fvbaseproblem.hh @@ -204,7 +204,7 @@ public: */ std::string outputDir() const { - std::string outputDir = Parameters::get(); + std::string outputDir = Parameters::get(); if (outputDir.empty()) outputDir = "."; diff --git a/opm/models/discretization/common/fvbaseproperties.hh b/opm/models/discretization/common/fvbaseproperties.hh index 89f1a0ac7..1558108f0 100644 --- a/opm/models/discretization/common/fvbaseproperties.hh +++ b/opm/models/discretization/common/fvbaseproperties.hh @@ -199,12 +199,6 @@ struct UseLinearizationLock { using type = UndefinedProperty; }; // high-level simulation control -/*! - * \brief The directory to which simulation output ought to be written to. - */ -template -struct OutputDir { using type = UndefinedProperty; }; - /*! * \brief Global switch to enable or disable the writing of VTK output files *