move DomainSize(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 25aed6d79a
commit 0509285170
10 changed files with 41 additions and 161 deletions

View File

@@ -124,28 +124,6 @@ public:
namespace Opm::Parameters {
// define the physical size of the problem's domain [m]
template<class TypeTag>
struct DomainSizeX<TypeTag, Properties::TTag::Tutorial1Problem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 300.0;
}; /*@\label{tutorial1:grid-default-params-begin}@*/
template<class TypeTag>
struct DomainSizeY<TypeTag, Properties::TTag::Tutorial1Problem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 60.0;
};
template<class TypeTag>
struct DomainSizeZ<TypeTag, Properties::TTag::Tutorial1Problem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 0.0;
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::Tutorial1Problem>
@@ -246,9 +224,12 @@ public:
Parameters::SetDefault<Parameters::CellsX>(100);
Parameters::SetDefault<Parameters::CellsY>(1);
Parameters::SetDefault<Parameters::DomainSizeX<Scalar>>(300.0);
Parameters::SetDefault<Parameters::DomainSizeY<Scalar>>(60.0);
if constexpr (dim == 3) {
Parameters::SetDefault<Parameters::CellsZ>(1);
Parameters::SetDefault<Parameters::DomainSizeZ<Scalar>>(0.0);
}
}