mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move DomainSize(X|Y|Z) to TypeTag-free parameter system
This commit is contained in:
@@ -156,31 +156,6 @@ struct EpisodeLength { using type = Properties::UndefinedProperty;};
|
|||||||
template <class TypeTag, class MyTypeTag>
|
template <class TypeTag, class MyTypeTag>
|
||||||
struct Initialpressure { using type = Properties::UndefinedProperty;};
|
struct Initialpressure { using type = Properties::UndefinedProperty;};
|
||||||
|
|
||||||
//\Note: from the Julia code, the problem is a 1D problem with 3X1 cell.
|
|
||||||
//\Note: DomainSizeX is 3.0 meters
|
|
||||||
//\Note: DomainSizeY is 1.0 meters
|
|
||||||
template <class TypeTag>
|
|
||||||
struct DomainSizeX<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 300; // meter
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class TypeTag>
|
|
||||||
struct DomainSizeY<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// DomainSizeZ is not needed, while to keep structuredgridvanguard.hh compile
|
|
||||||
template <class TypeTag>
|
|
||||||
struct DomainSizeZ<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Enable gravity false
|
// Enable gravity false
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
struct EnableGravity<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
struct EnableGravity<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||||
@@ -413,13 +388,15 @@ public:
|
|||||||
("Time interval [s] for episode length");
|
("Time interval [s] for episode length");
|
||||||
|
|
||||||
Parameters::SetDefault<Parameters::CellsX>(30);
|
Parameters::SetDefault<Parameters::CellsX>(30);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeX<Scalar>>(300.0);
|
||||||
|
|
||||||
if constexpr (dim > 1) {
|
if constexpr (dim > 1) {
|
||||||
Parameters::SetDefault<Parameters::CellsY>(1);
|
Parameters::SetDefault<Parameters::CellsY>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeY<Scalar>>(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (dim == 3) {
|
if constexpr (dim == 3) {
|
||||||
Parameters::SetDefault<Parameters::CellsZ>(1);
|
Parameters::SetDefault<Parameters::CellsZ>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeZ<Scalar>>(1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,28 +110,6 @@ struct EnableDiffusion<TypeTag, TTag::DiffusionBaseProblem> { static constexpr b
|
|||||||
|
|
||||||
namespace Opm::Parameters {
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
// define the properties specific for the diffusion problem
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeX<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeY<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeZ<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Disable gravity
|
// Disable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
struct EnableGravity<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
||||||
|
|||||||
@@ -131,28 +131,6 @@ namespace Opm::Parameters {
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct InitialWaterSaturation { using type = Properties::UndefinedProperty; };
|
struct InitialWaterSaturation { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
// define the properties specific for the finger problem
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeX<TypeTag, Properties::TTag::FingerBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 0.1;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeY<TypeTag, Properties::TTag::FingerBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 0.3;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeZ<TypeTag, Properties::TTag::FingerBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 0.1;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Enable gravity
|
// Enable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, Properties::TTag::FingerBaseProblem>
|
struct EnableGravity<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||||
@@ -310,13 +288,15 @@ public:
|
|||||||
("The initial saturation in the domain [] of the wetting phase");
|
("The initial saturation in the domain [] of the wetting phase");
|
||||||
|
|
||||||
Parameters::SetDefault<Parameters::CellsX>(20);
|
Parameters::SetDefault<Parameters::CellsX>(20);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeX<Scalar>>(0.1);
|
||||||
|
|
||||||
if constexpr (dim > 1) {
|
if constexpr (dim > 1) {
|
||||||
Parameters::SetDefault<Parameters::CellsY>(70);
|
Parameters::SetDefault<Parameters::CellsY>(70);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeY<Scalar>>(0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (dim == 3) {
|
if constexpr (dim == 3) {
|
||||||
Parameters::SetDefault<Parameters::CellsZ>(1);
|
Parameters::SetDefault<Parameters::CellsZ>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeZ<Scalar>>(0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,27 +138,6 @@ struct LensUpperRightY { using type = Properties::UndefinedProperty; };
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct LensUpperRightZ { using type = Properties::UndefinedProperty; };
|
struct LensUpperRightZ { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeX<TypeTag, Properties::TTag::LensBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 6.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeY<TypeTag, Properties::TTag::LensBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 4.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeZ<TypeTag, Properties::TTag::LensBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Enable gravity
|
// Enable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, Properties::TTag::LensBaseProblem>
|
struct EnableGravity<TypeTag, Properties::TTag::LensBaseProblem>
|
||||||
@@ -385,9 +364,12 @@ public:
|
|||||||
|
|
||||||
Parameters::SetDefault<Parameters::CellsX>(48);
|
Parameters::SetDefault<Parameters::CellsX>(48);
|
||||||
Parameters::SetDefault<Parameters::CellsY>(32);
|
Parameters::SetDefault<Parameters::CellsY>(32);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeX<Scalar>>(6.0);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeY<Scalar>>(4.0);
|
||||||
|
|
||||||
if constexpr (dim == 3) {
|
if constexpr (dim == 3) {
|
||||||
Parameters::SetDefault<Parameters::CellsZ>(16);
|
Parameters::SetDefault<Parameters::CellsZ>(16);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeZ<Scalar>>(1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,28 +123,6 @@ public:
|
|||||||
|
|
||||||
namespace Opm::Parameters {
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
// define the properties specific for the power injection problem
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeX<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 100.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeY<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct DomainSizeZ<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
|
||||||
{
|
|
||||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
static constexpr type value = 1.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Disable gravity
|
// Disable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
struct EnableGravity<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
||||||
@@ -266,13 +244,15 @@ public:
|
|||||||
ParentType::registerParameters();
|
ParentType::registerParameters();
|
||||||
|
|
||||||
Parameters::SetDefault<Parameters::CellsX>(250);
|
Parameters::SetDefault<Parameters::CellsX>(250);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeX<Scalar>>(100.0);
|
||||||
|
|
||||||
if constexpr (dim > 1) {
|
if constexpr (dim > 1) {
|
||||||
Parameters::SetDefault<Parameters::CellsY>(1);
|
Parameters::SetDefault<Parameters::CellsY>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeY<Scalar>>(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (dim == 3) {
|
if constexpr (dim == 3) {
|
||||||
Parameters::SetDefault<Parameters::CellsZ>(1);
|
Parameters::SetDefault<Parameters::CellsZ>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeZ<Scalar>>(1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,28 +124,6 @@ public:
|
|||||||
|
|
||||||
namespace Opm::Parameters {
|
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
|
// Disable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, Properties::TTag::Tutorial1Problem>
|
struct EnableGravity<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||||
@@ -246,9 +224,12 @@ public:
|
|||||||
|
|
||||||
Parameters::SetDefault<Parameters::CellsX>(100);
|
Parameters::SetDefault<Parameters::CellsX>(100);
|
||||||
Parameters::SetDefault<Parameters::CellsY>(1);
|
Parameters::SetDefault<Parameters::CellsY>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeX<Scalar>>(300.0);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeY<Scalar>>(60.0);
|
||||||
|
|
||||||
if constexpr (dim == 3) {
|
if constexpr (dim == 3) {
|
||||||
Parameters::SetDefault<Parameters::CellsZ>(1);
|
Parameters::SetDefault<Parameters::CellsZ>(1);
|
||||||
|
Parameters::SetDefault<Parameters::DomainSizeZ<Scalar>>(0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,18 +73,19 @@ public:
|
|||||||
Parameters::Register<Parameters::GridGlobalRefinements>
|
Parameters::Register<Parameters::GridGlobalRefinements>
|
||||||
("The number of global refinements of the grid "
|
("The number of global refinements of the grid "
|
||||||
"executed after it was loaded");
|
"executed after it was loaded");
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeX>
|
Parameters::Register<Parameters::DomainSizeX<Scalar>>
|
||||||
("The size of the domain in x direction");
|
("The size of the domain in x direction");
|
||||||
Parameters::Register<Parameters::CellsX>
|
Parameters::Register<Parameters::CellsX>
|
||||||
("The number of intervalls in x direction");
|
("The number of intervalls in x direction");
|
||||||
|
|
||||||
if constexpr (dim > 1) {
|
if constexpr (dim > 1) {
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeY>
|
Parameters::Register<Parameters::DomainSizeY<Scalar>>
|
||||||
("The size of the domain in y direction");
|
("The size of the domain in y direction");
|
||||||
Parameters::Register<Parameters::CellsY>
|
Parameters::Register<Parameters::CellsY>
|
||||||
("The number of intervalls in y direction");
|
("The number of intervalls in y direction");
|
||||||
}
|
}
|
||||||
if constexpr (dim > 2) {
|
if constexpr (dim > 2) {
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeZ>
|
Parameters::Register<Parameters::DomainSizeZ<Scalar>>
|
||||||
("The size of the domain in z direction");
|
("The size of the domain in z direction");
|
||||||
Parameters::Register<Parameters::CellsZ>
|
Parameters::Register<Parameters::CellsZ>
|
||||||
("The number of intervalls in z direction");
|
("The number of intervalls in z direction");
|
||||||
@@ -104,14 +105,15 @@ public:
|
|||||||
for (unsigned i = 0; i < dim; ++i)
|
for (unsigned i = 0; i < dim; ++i)
|
||||||
cellRes[i] = 0;
|
cellRes[i] = 0;
|
||||||
|
|
||||||
upperRight[0] = Parameters::get<TypeTag, Parameters::DomainSizeX>();
|
upperRight[0] = Parameters::Get<Parameters::DomainSizeX<Scalar>>();
|
||||||
cellRes[0] = Parameters::Get<Parameters::CellsX>();
|
cellRes[0] = Parameters::Get<Parameters::CellsX>();
|
||||||
|
|
||||||
if constexpr (dim > 1) {
|
if constexpr (dim > 1) {
|
||||||
upperRight[1] = Parameters::get<TypeTag, Parameters::DomainSizeY>();
|
upperRight[1] = Parameters::Get<Parameters::DomainSizeY<Scalar>>();
|
||||||
cellRes[1] = Parameters::Get<Parameters::CellsY>();
|
cellRes[1] = Parameters::Get<Parameters::CellsY>();
|
||||||
}
|
}
|
||||||
if constexpr (dim > 2) {
|
if constexpr (dim > 2) {
|
||||||
upperRight[2] = Parameters::get<TypeTag, Parameters::DomainSizeZ>();
|
upperRight[2] = Parameters::Get<Parameters::DomainSizeZ<Scalar>>();
|
||||||
cellRes[2] = Parameters::Get<Parameters::CellsZ>();
|
cellRes[2] = Parameters::Get<Parameters::CellsZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,18 +68,18 @@ public:
|
|||||||
Parameters::Register<Parameters::GridGlobalRefinements>
|
Parameters::Register<Parameters::GridGlobalRefinements>
|
||||||
("The number of global refinements of the grid "
|
("The number of global refinements of the grid "
|
||||||
"executed after it was loaded");
|
"executed after it was loaded");
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeX>
|
Parameters::Register<Parameters::DomainSizeX>
|
||||||
("The size of the domain in x direction");
|
("The size of the domain in x direction");
|
||||||
Parameters::Register<Parameters::CellsX>
|
Parameters::Register<Parameters::CellsX>
|
||||||
("The number of intervalls in x direction");
|
("The number of intervalls in x direction");
|
||||||
if (dimWorld > 1) {
|
if (dimWorld > 1) {
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeY>
|
Parameters::Register<Parameters::DomainSizeY>
|
||||||
("The size of the domain in y direction");
|
("The size of the domain in y direction");
|
||||||
Parameters::Register<Parameters::CellsY>
|
Parameters::Register<Parameters::CellsY>
|
||||||
("The number of intervalls in y direction");
|
("The number of intervalls in y direction");
|
||||||
}
|
}
|
||||||
if constexpr (dim > 2) {
|
if constexpr (dim > 2) {
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeZ>
|
Parameters::Register<Parameters::DomainSizeZ>
|
||||||
("The size of the domain in z direction");
|
("The size of the domain in z direction");
|
||||||
Parameters::Register<Parameters::CellsZ>
|
Parameters::Register<Parameters::CellsZ>
|
||||||
("The number of intervalls in z direction");
|
("The number of intervalls in z direction");
|
||||||
@@ -97,16 +97,16 @@ public:
|
|||||||
GlobalPosition lowerLeft;
|
GlobalPosition lowerLeft;
|
||||||
|
|
||||||
lowerLeft[0] = 0.0;
|
lowerLeft[0] = 0.0;
|
||||||
upperRight[0] = Parameters::get<TypeTag, Parameters::DomainSizeX>();
|
upperRight[0] = Parameters::Get<Parameters::DomainSizeX>();
|
||||||
cellRes[0] = Parameters::Get<Parameters::CellsX>();
|
cellRes[0] = Parameters::Get<Parameters::CellsX>();
|
||||||
if constexpr (dim > 1) {
|
if constexpr (dim > 1) {
|
||||||
lowerLeft[1] = 0.0;
|
lowerLeft[1] = 0.0;
|
||||||
upperRight[1] = Parameters::get<TypeTag, Parameters::DomainSizeY>();
|
upperRight[1] = Parameters::Get<Parameters::DomainSizeY>();
|
||||||
cellRes[1] = Parameters::Get<Parameters::CellsY>();
|
cellRes[1] = Parameters::Get<Parameters::CellsY>();
|
||||||
}
|
}
|
||||||
if constexpr (dim > 2) {
|
if constexpr (dim > 2) {
|
||||||
lowerLeft[2] = 0.0;
|
lowerLeft[2] = 0.0;
|
||||||
upperRight[2] = Parameters::get<TypeTag, Parameters::DomainSizeZ>();
|
upperRight[2] = Parameters::Get<Parameters::DomainSizeZ>();
|
||||||
cellRes[2] = Parameters::Get<Parameters::CellsZ>();
|
cellRes[2] = Parameters::Get<Parameters::CellsZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,18 +111,18 @@ public:
|
|||||||
Parameters::Register<Parameters::GridGlobalRefinements>
|
Parameters::Register<Parameters::GridGlobalRefinements>
|
||||||
("The number of global refinements of the grid "
|
("The number of global refinements of the grid "
|
||||||
"executed after it was loaded");
|
"executed after it was loaded");
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeX>
|
Parameters::Register<Parameters::DomainSizeX<Scalar>>
|
||||||
("The size of the domain in x direction");
|
("The size of the domain in x direction");
|
||||||
Parameters::Register<Parameters::CellsX>
|
Parameters::Register<Parameters::CellsX>
|
||||||
("The number of intervalls in x direction");
|
("The number of intervalls in x direction");
|
||||||
if (dim > 1) {
|
if (dim > 1) {
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeY>
|
Parameters::Register<Parameters::DomainSizeY<Scalar>>
|
||||||
("The size of the domain in y direction");
|
("The size of the domain in y direction");
|
||||||
Parameters::Register<Parameters::CellsY>
|
Parameters::Register<Parameters::CellsY>
|
||||||
("The number of intervalls in y direction");
|
("The number of intervalls in y direction");
|
||||||
}
|
}
|
||||||
if constexpr (dim > 2) {
|
if constexpr (dim > 2) {
|
||||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeZ>
|
Parameters::Register<Parameters::DomainSizeZ<Scalar>>
|
||||||
("The size of the domain in z direction");
|
("The size of the domain in z direction");
|
||||||
Parameters::Register<Parameters::CellsZ>
|
Parameters::Register<Parameters::CellsZ>
|
||||||
("The number of intervalls in z direction");
|
("The number of intervalls in z direction");
|
||||||
@@ -141,13 +141,13 @@ public:
|
|||||||
Dune::FieldVector<GridScalar, dim> upperRight;
|
Dune::FieldVector<GridScalar, dim> upperRight;
|
||||||
Dune::FieldVector<GridScalar, dim> lowerLeft( 0 );
|
Dune::FieldVector<GridScalar, dim> lowerLeft( 0 );
|
||||||
|
|
||||||
upperRight[0] = Parameters::get<TypeTag, Parameters::DomainSizeX>();
|
upperRight[0] = Parameters::Get<Parameters::DomainSizeX<Scalar>>();
|
||||||
upperRight[1] = Parameters::get<TypeTag, Parameters::DomainSizeY>();
|
upperRight[1] = Parameters::Get<Parameters::DomainSizeY<Scalar>>();
|
||||||
|
|
||||||
cellRes[0] = Parameters::Get<Parameters::CellsX>();
|
cellRes[0] = Parameters::Get<Parameters::CellsX>();
|
||||||
cellRes[1] = Parameters::Get<Parameters::CellsY>();
|
cellRes[1] = Parameters::Get<Parameters::CellsY>();
|
||||||
if constexpr (dim == 3) {
|
if constexpr (dim == 3) {
|
||||||
upperRight[2] = Parameters::get<TypeTag, Parameters::DomainSizeZ>();
|
upperRight[2] = Parameters::Get<Parameters::DomainSizeZ<Scalar>>();
|
||||||
cellRes[2] = Parameters::Get<Parameters::CellsZ>();
|
cellRes[2] = Parameters::Get<Parameters::CellsZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ struct CellsY { static constexpr unsigned value = 1; };
|
|||||||
struct CellsZ { static constexpr unsigned value = 1; };
|
struct CellsZ { static constexpr unsigned value = 1; };
|
||||||
|
|
||||||
//! domain size
|
//! domain size
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class Scalar>
|
||||||
struct DomainSizeX { using type = Properties::UndefinedProperty; };
|
struct DomainSizeX { static constexpr Scalar value = 1.0; };
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class Scalar>
|
||||||
struct DomainSizeY { using type = Properties::UndefinedProperty; };
|
struct DomainSizeY { static constexpr Scalar value = 1.0; };
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class Scalar>
|
||||||
struct DomainSizeZ { using type = Properties::UndefinedProperty; };
|
struct DomainSizeZ { static constexpr Scalar value = 1.0; };
|
||||||
|
|
||||||
//! The default value for the simulation's end time
|
//! The default value for the simulation's end time
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
|
|||||||
Reference in New Issue
Block a user