move OutputDir parameter to TypeTag-less implementation

This commit is contained in:
Arne Morten Kvarving 2024-07-05 17:49:51 +02:00
parent 805e0a4bb7
commit 8a67f44793
3 changed files with 6 additions and 12 deletions

View File

@ -356,11 +356,6 @@ struct MinTimeStepSize<TypeTag, Properties::TTag::FvBaseDiscretization>
static constexpr type value = 0.0; static constexpr type value = 0.0;
}; };
//! By default, write the simulation output to the current working directory
template<class TypeTag>
struct OutputDir<TypeTag, Properties::TTag::FvBaseDiscretization>
{ static constexpr auto value = "."; };
} // namespace Opm::Parameters } // namespace Opm::Parameters
namespace Opm { namespace Opm {
@ -546,7 +541,7 @@ public:
("Turn on caching of intensive quantities"); ("Turn on caching of intensive quantities");
Parameters::registerParam<TypeTag, Parameters::EnableStorageCache> Parameters::registerParam<TypeTag, Parameters::EnableStorageCache>
("Store previous storage terms and avoid re-calculating them."); ("Store previous storage terms and avoid re-calculating them.");
Parameters::registerParam<TypeTag, Parameters::OutputDir> Parameters::Register<Parameters::OutputDir>
("The directory to which result files are written"); ("The directory to which result files are written");
} }

View File

@ -53,14 +53,13 @@ struct EnableAsyncVtkOutput { static constexpr bool value = true; };
*/ */
struct EnableGridAdaptation { static constexpr bool value = false; }; struct EnableGridAdaptation { static constexpr bool value = false; };
//! \brief Number of threads per process.
struct ThreadsPerProcess { static constexpr int value = 1; };
/*! /*!
* \brief The directory to which simulation output ought to be written to. * \brief The directory to which simulation output ought to be written to.
*/ */
template<class TypeTag, class MyTypeTag> struct OutputDir { static constexpr auto value = ""; };
struct OutputDir { using type = Properties::UndefinedProperty; };
//! \brief Number of threads per process.
struct ThreadsPerProcess { static constexpr int value = 1; };
/*! /*!
* \brief Global switch to enable or disable the writing of VTK output files * \brief Global switch to enable or disable the writing of VTK output files

View File

@ -204,7 +204,7 @@ public:
*/ */
std::string outputDir() const std::string outputDir() const
{ {
std::string outputDir = Parameters::get<TypeTag, Parameters::OutputDir>(); std::string outputDir = Parameters::Get<Parameters::OutputDir>();
if (outputDir.empty()) if (outputDir.empty())
outputDir = "."; outputDir = ".";