mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move Cells(X|Y|Z) to TypeTag-free parameter system
This commit is contained in:
@@ -124,19 +124,6 @@ public:
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
// // define the number of cells used for discretizing the physical domain
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
{ static constexpr unsigned value = 100; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
{ static constexpr unsigned value = 1; }; /*@\label{tutorial1:default-params-end}@*/
|
||||
|
||||
// define the physical size of the problem's domain [m]
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
@@ -193,7 +180,10 @@ class Tutorial1Problem
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
// Grid dimension
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
enum {
|
||||
dim = GridView::dimension,
|
||||
dimWorld = GridView::dimensionworld
|
||||
};
|
||||
|
||||
// The type of the intrinsic permeability tensor
|
||||
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
|
||||
@@ -247,6 +237,21 @@ public:
|
||||
materialParams_.finalize();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::registerParameters
|
||||
*/
|
||||
static void registerParameters()
|
||||
{
|
||||
ParentType::registerParameters();
|
||||
|
||||
Parameters::SetDefault<Parameters::CellsX>(100);
|
||||
Parameters::SetDefault<Parameters::CellsY>(1);
|
||||
|
||||
if constexpr (dim == 3) {
|
||||
Parameters::SetDefault<Parameters::CellsZ>(1);
|
||||
}
|
||||
}
|
||||
|
||||
//! Specifies the problem name. This is used for files generated by the simulation.
|
||||
std::string name() const
|
||||
{ return "tutorial1"; }
|
||||
|
||||
Reference in New Issue
Block a user