diff --git a/examples/problems/co2ptflashproblem.hh b/examples/problems/co2ptflashproblem.hh index c4741caaa..f3ba95765 100644 --- a/examples/problems/co2ptflashproblem.hh +++ b/examples/problems/co2ptflashproblem.hh @@ -223,14 +223,6 @@ struct Vanguard { using type = Opm::StructuredGridVanguard; }; -template -struct CellsX { static constexpr unsigned value = 30; }; -template -struct CellsY { static constexpr unsigned value = 1; }; -// CellsZ is not needed, while to keep structuredgridvanguard.hh compile -template -struct CellsZ { static constexpr unsigned value = 1; }; - template struct EnableEnergy { static constexpr bool value = false; @@ -240,6 +232,19 @@ struct EnableEnergy { namespace Opm::Parameters { +template +struct CellsX +{ static constexpr unsigned value = 30; }; + +template +struct CellsY +{ static constexpr unsigned value = 1; }; + +// CellsZ is not needed, while to keep structuredgridvanguard.hh compile +template +struct CellsZ +{ static constexpr unsigned value = 1; }; + //\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 @@ -512,7 +517,7 @@ public: { int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx); int inj = 0; - int prod = Parameters::get() - 1; + int prod = Parameters::get() - 1; if (spatialIdx == inj || spatialIdx == prod) { return 1.0; } else { @@ -520,7 +525,7 @@ public: } } - /*! + /*! * \copydoc FvBaseMultiPhaseProblem::materialLawParams */ template @@ -563,7 +568,7 @@ private: // p0 = 75e5 // T0 = 423.25 int inj = 0; - int prod = Parameters::get() - 1; + int prod = Parameters::get() - 1; int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx); ComponentVector comp; comp[0] = Evaluation::createVariable(0.5, 1); diff --git a/examples/problems/diffusionproblem.hh b/examples/problems/diffusionproblem.hh index 23712a1e9..7eb19ba39 100644 --- a/examples/problems/diffusionproblem.hh +++ b/examples/problems/diffusionproblem.hh @@ -110,17 +110,22 @@ struct EnableDiffusion { static constexpr b template struct EnableGravity { static constexpr bool value = false; }; -template -struct CellsX { static constexpr unsigned value = 250; }; -template -struct CellsY { static constexpr unsigned value = 1; }; -template -struct CellsZ { static constexpr unsigned value = 1; }; - } // namespace Opm::Properties namespace Opm::Parameters { +template +struct CellsX +{ static constexpr unsigned value = 250; }; + +template +struct CellsY +{ static constexpr unsigned value = 1; }; + +template +struct CellsZ +{ static constexpr unsigned value = 1; }; + // define the properties specific for the diffusion problem template struct DomainSizeX diff --git a/examples/problems/fingerproblem.hh b/examples/problems/fingerproblem.hh index 5bb535479..a07ca5746 100644 --- a/examples/problems/fingerproblem.hh +++ b/examples/problems/fingerproblem.hh @@ -143,17 +143,22 @@ struct InitialWaterSaturation static constexpr type value = 0.01; }; -template -struct CellsX { static constexpr unsigned value = 20; }; -template -struct CellsY { static constexpr unsigned value = 70; }; -template -struct CellsZ { static constexpr unsigned value = 1; }; - } // namespace Opm::Properties namespace Opm::Parameters { +template +struct CellsX +{ static constexpr unsigned value = 20; }; + +template +struct CellsY +{ static constexpr unsigned value = 70; }; + +template +struct CellsZ +{ static constexpr unsigned value = 1; }; + // define the properties specific for the finger problem template struct DomainSizeX diff --git a/examples/problems/lensproblem.hh b/examples/problems/lensproblem.hh index c178129f2..65ba80862 100644 --- a/examples/problems/lensproblem.hh +++ b/examples/problems/lensproblem.hh @@ -175,13 +175,6 @@ struct LensUpperRightZ static constexpr type value = 1.0; }; -template -struct CellsX { static constexpr unsigned value = 48; }; -template -struct CellsY { static constexpr unsigned value = 32; }; -template -struct CellsZ { static constexpr unsigned value = 16; }; - // By default, include the intrinsic permeability tensor to the VTK output files template struct VtkWriteIntrinsicPermeabilities { static constexpr bool value = true; }; @@ -190,6 +183,18 @@ struct VtkWriteIntrinsicPermeabilities { static namespace Opm::Parameters { +template +struct CellsX +{ static constexpr unsigned value = 48; }; + +template +struct CellsY +{ static constexpr unsigned value = 32; }; + +template +struct CellsZ +{ static constexpr unsigned value = 16; }; + template struct DomainSizeX { diff --git a/examples/problems/powerinjectionproblem.hh b/examples/problems/powerinjectionproblem.hh index 07493add2..24aa69364 100644 --- a/examples/problems/powerinjectionproblem.hh +++ b/examples/problems/powerinjectionproblem.hh @@ -127,17 +127,22 @@ struct VtkWriteFilterVelocities { stat template struct EnableGravity { static constexpr bool value = false; }; -template -struct CellsX { static constexpr unsigned value = 250; }; -template -struct CellsY { static constexpr unsigned value = 1; }; -template -struct CellsZ { static constexpr unsigned value = 1; }; - } // namespace Opm::Properties namespace Opm::Parameters { +template +struct CellsX +{ static constexpr unsigned value = 250; }; + +template +struct CellsY +{ static constexpr unsigned value = 1; }; + +template +struct CellsZ +{ static constexpr unsigned value = 1; }; + // define the properties specific for the power injection problem template struct DomainSizeX diff --git a/examples/tutorial1problem.hh b/examples/tutorial1problem.hh index 7a54c6d0f..039dbff01 100644 --- a/examples/tutorial1problem.hh +++ b/examples/tutorial1problem.hh @@ -124,18 +124,23 @@ public: template struct EnableGravity { static constexpr bool value = false; }; /*@\label{tutorial1:gravity}@*/ -// // define the number of cells used for discretizing the physical domain -template -struct CellsX { static constexpr unsigned value = 100; }; -template -struct CellsY { static constexpr unsigned value = 1; }; -template -struct CellsZ { static constexpr unsigned value = 1; }; /*@\label{tutorial1:default-params-end}@*/ - } // namespace Opm::Properties namespace Opm::Parameters { +// // define the number of cells used for discretizing the physical domain +template +struct CellsX +{ static constexpr unsigned value = 100; }; + +template +struct CellsY +{ static constexpr unsigned value = 1; }; + +template +struct CellsZ +{ static constexpr unsigned value = 1; }; /*@\label{tutorial1:default-params-end}@*/ + // define the physical size of the problem's domain [m] template struct DomainSizeX diff --git a/opm/models/io/cubegridvanguard.hh b/opm/models/io/cubegridvanguard.hh index 78b599847..1a2e401cd 100644 --- a/opm/models/io/cubegridvanguard.hh +++ b/opm/models/io/cubegridvanguard.hh @@ -72,18 +72,18 @@ public: "executed after it was loaded"); Parameters::registerParam ("The size of the domain in x direction"); - Parameters::registerParam + Parameters::registerParam ("The number of intervalls in x direction"); if (dimWorld > 1) { Parameters::registerParam ("The size of the domain in y direction"); - Parameters::registerParam + Parameters::registerParam ("The number of intervalls in y direction"); } if (dimWorld > 2) { Parameters::registerParam ("The size of the domain in z direction"); - Parameters::registerParam + Parameters::registerParam ("The number of intervalls in z direction"); } } @@ -102,14 +102,14 @@ public: cellRes[i] = 0; upperRight[0] = Parameters::get(); - cellRes[0] = Parameters::get(); + cellRes[0] = Parameters::get(); if (dimWorld > 1) { upperRight[1] = Parameters::get(); - cellRes[1] = Parameters::get(); + cellRes[1] = Parameters::get(); } if (dimWorld > 2) { upperRight[2] = Parameters::get(); - cellRes[2] = Parameters::get(); + cellRes[2] = Parameters::get(); } unsigned numRefinements = Parameters::get(); diff --git a/opm/models/io/structuredgridvanguard.hh b/opm/models/io/structuredgridvanguard.hh index 06c980dde..8e684ef9f 100644 --- a/opm/models/io/structuredgridvanguard.hh +++ b/opm/models/io/structuredgridvanguard.hh @@ -113,18 +113,18 @@ public: "executed after it was loaded"); Parameters::registerParam ("The size of the domain in x direction"); - Parameters::registerParam + Parameters::registerParam ("The number of intervalls in x direction"); if (dim > 1) { Parameters::registerParam ("The size of the domain in y direction"); - Parameters::registerParam + Parameters::registerParam ("The number of intervalls in y direction"); } if (dim > 2) { Parameters::registerParam ("The size of the domain in z direction"); - Parameters::registerParam + Parameters::registerParam ("The number of intervalls in z direction"); } } @@ -144,11 +144,11 @@ public: upperRight[0] = Parameters::get(); upperRight[1] = Parameters::get(); - cellRes[0] = Parameters::get(); - cellRes[1] = Parameters::get(); + cellRes[0] = Parameters::get(); + cellRes[1] = Parameters::get(); if (dim == 3) { upperRight[2] = Parameters::get(); - cellRes[2] = Parameters::get(); + cellRes[2] = Parameters::get(); } std::stringstream dgffile; diff --git a/opm/models/utils/basicparameters.hh b/opm/models/utils/basicparameters.hh index 50c4e6723..f759579e7 100644 --- a/opm/models/utils/basicparameters.hh +++ b/opm/models/utils/basicparameters.hh @@ -32,11 +32,23 @@ namespace Opm::Parameters { +//! grid resolution +template +struct CellsX { using type = Properties::UndefinedProperty; }; + +template +struct CellsY { using type = Properties::UndefinedProperty; }; + +template +struct CellsZ { using type = Properties::UndefinedProperty; }; + //! domain size template struct DomainSizeX { using type = Properties::UndefinedProperty; }; + template struct DomainSizeY { using type = Properties::UndefinedProperty; }; + template struct DomainSizeZ { using type = Properties::UndefinedProperty; }; diff --git a/opm/models/utils/basicproperties.hh b/opm/models/utils/basicproperties.hh index bd6c0b59f..331c92737 100644 --- a/opm/models/utils/basicproperties.hh +++ b/opm/models/utils/basicproperties.hh @@ -105,14 +105,6 @@ template struct GridPart { using type = UndefinedProperty; }; #endif -//! grid resolution -template -struct CellsX { using type = UndefinedProperty; }; -template -struct CellsY { using type = UndefinedProperty; }; -template -struct CellsZ { using type = UndefinedProperty; }; - //! name of the grid file template struct GridFile { using type = UndefinedProperty; };