move Cells(X|Y|Z) to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving
2024-07-05 17:49:51 +02:00
parent ac4c723da7
commit 25aed6d79a
10 changed files with 128 additions and 120 deletions

View File

@@ -110,18 +110,6 @@ struct EnableDiffusion<TypeTag, TTag::DiffusionBaseProblem> { static constexpr b
namespace Opm::Parameters {
template<class TypeTag>
struct CellsX<TypeTag, Properties::TTag::DiffusionBaseProblem>
{ static constexpr unsigned value = 250; };
template<class TypeTag>
struct CellsY<TypeTag, Properties::TTag::DiffusionBaseProblem>
{ static constexpr unsigned value = 1; };
template<class TypeTag>
struct CellsZ<TypeTag, Properties::TTag::DiffusionBaseProblem>
{ static constexpr unsigned value = 1; };
// define the properties specific for the diffusion problem
template<class TypeTag>
struct DomainSizeX<TypeTag, Properties::TTag::DiffusionBaseProblem>
@@ -245,6 +233,24 @@ public:
setupInitialFluidStates_();
}
/*!
* \copydoc FvBaseMultiPhaseProblem::registerParameters
*/
static void registerParameters()
{
ParentType::registerParameters();
Parameters::SetDefault<Parameters::CellsX>(250);
if constexpr (dim > 1) {
Parameters::SetDefault<Parameters::CellsY>(1);
}
if constexpr (dim == 3) {
Parameters::SetDefault<Parameters::CellsZ>(1);
}
}
/*!
* \name Auxiliary methods
*/