diff --git a/dumux/material/spatialparams/sequentialfv.hh b/dumux/material/spatialparams/sequentialfv.hh index 1f214c28db3d3fbc66d47e72b16b5c9c0ed7ea4d..efea0982b08b66b479d55fe9b908a74c3b00b566 100644 --- a/dumux/material/spatialparams/sequentialfv.hh +++ b/dumux/material/spatialparams/sequentialfv.hh @@ -38,6 +38,7 @@ namespace Dumux template<class TypeTag> class SequentialFVSpatialParams: public SequentialFVSpatialParamsOneP<TypeTag> { + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Implementation = typename GET_PROP_TYPE(TypeTag, SpatialParams); @@ -54,8 +55,8 @@ class SequentialFVSpatialParams: public SequentialFVSpatialParamsOneP<TypeTag> /// @endcond public: - SequentialFVSpatialParams(const GridView &gridView) - :SequentialFVSpatialParamsOneP<TypeTag>(gridView) + SequentialFVSpatialParams(const Problem& problem) + :SequentialFVSpatialParamsOneP<TypeTag>(problem) { } diff --git a/dumux/material/spatialparams/sequentialfv1p.hh b/dumux/material/spatialparams/sequentialfv1p.hh index 1f19e64005f771bb62e494a8b83bdaeb4a0f2abb..29eb62b20ce1515a9a13b569e81604445e8f13e9 100644 --- a/dumux/material/spatialparams/sequentialfv1p.hh +++ b/dumux/material/spatialparams/sequentialfv1p.hh @@ -46,6 +46,7 @@ NEW_PROP_TAG(SpatialParams); template<class TypeTag> class SequentialFVSpatialParamsOneP { + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Implementation = typename GET_PROP_TYPE(TypeTag, SpatialParams); @@ -61,7 +62,7 @@ class SequentialFVSpatialParamsOneP using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>; public: - SequentialFVSpatialParamsOneP(const GridView &gridView) + SequentialFVSpatialParamsOneP(const Problem& problem) { } /*! diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh b/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh index 7ea150b65bcd991bfd1c07bb433515f953dc2680..22c8ee9a8626bf5c52e911197776158f714edd7a 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/problem.hh @@ -75,7 +75,7 @@ public: DiffusionProblem1P(TimeManager& timeManager, Grid& grid) : ParentType(timeManager, grid), gravity_(0) { - spatialParams_ = std::make_shared<SpatialParams>(grid.leafGridView()); + spatialParams_ = std::make_shared<SpatialParams>(asImp_()); gravity_ = 0; if (getParam<bool>("Problem.EnableGravity")) gravity_[dim - 1] = -9.81; @@ -105,7 +105,7 @@ public: DiffusionProblem1P(Grid& grid) : ParentType(grid, false), gravity_(0) { - spatialParams_ = std::make_shared<SpatialParams>(grid.leafGridView()); + spatialParams_ = std::make_shared<SpatialParams>(asImp_()); gravity_ = 0; if (getParam<bool>("Problem.EnableGravity")) gravity_[dim - 1] = -9.81; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh b/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh index 976afd0eeaf71bb60e5ec38a7772e074b6a69512..67e48f3f5ae99b311792173ad16ffaf3bd879554 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/problem.hh @@ -74,7 +74,7 @@ public: DiffusionProblem2P(TimeManager& timeManager, Grid& grid) : ParentType(timeManager, grid), gravity_(0) { - spatialParams_ = std::make_shared<SpatialParams>(grid.leafGridView()); + spatialParams_ = std::make_shared<SpatialParams>(asImp_()); gravity_ = 0; if (getParam<bool>("Problem.EnableGravity")) gravity_[dim - 1] = -9.81; @@ -107,7 +107,7 @@ public: DiffusionProblem2P(Grid& grid) : ParentType(grid, false), gravity_(0) { - spatialParams_ = std::make_shared<SpatialParams>(grid.leafGridView()); + spatialParams_ = std::make_shared<SpatialParams>(asImp_()); gravity_ = 0; if (getParam<bool>("Problem.EnableGravity")) gravity_[dim - 1] = -9.81; diff --git a/dumux/porousmediumflow/2p/sequential/impes/problem.hh b/dumux/porousmediumflow/2p/sequential/impes/problem.hh index c818202444cefab8cbee63c7b7aea05c1f4d5ca1..8dbd6bd375e319ce3c8399c9f24e877aab81b56c 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/problem.hh @@ -77,7 +77,7 @@ public: : ParentType(timeManager, grid), gravity_(0) { - spatialParams_ = std::make_shared<SpatialParams>(grid.leafGridView()); + spatialParams_ = std::make_shared<SpatialParams>(asImp_()); gravity_ = 0; if (getParam<bool>("Problem.EnableGravity")) diff --git a/dumux/porousmediumflow/2p/sequential/transport/problem.hh b/dumux/porousmediumflow/2p/sequential/transport/problem.hh index 9976e09885479a19eb0654fef39722b00e788cbb..ab9742dd564f9b6a6bfc074236d574c9f44fe125 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/problem.hh @@ -98,7 +98,7 @@ public: { cFLFactor_ = getParam<Scalar>("Impet.CFLFactor"); - spatialParams_ = std::make_shared<SpatialParams>(grid.leafGridView()); + spatialParams_ = std::make_shared<SpatialParams>(asImp_()); gravity_ = 0; if (getParam<bool>("Problem.EnableGravity")) diff --git a/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh b/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh index 0d13ca6bf376d0704e281577acbeb51deb7fdfb5..c649a38882c145c989f1551920c92ceb8ef2159d 100644 --- a/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh +++ b/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh @@ -37,6 +37,7 @@ template<class TypeTag> class TestOnePSpatialParams: public SequentialFVSpatialParamsOneP<TypeTag> { using ParentType = SequentialFVSpatialParamsOneP<TypeTag>; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using IndexSet = typename GridView::IndexSet; @@ -74,8 +75,8 @@ public: } - TestOnePSpatialParams(const GridView& gridView) - : ParentType(gridView), gridView_(gridView), indexSet_(gridView.indexSet()) + TestOnePSpatialParams(const Problem& problem) + : ParentType(problem), gridView_(problem.gridView()), indexSet_(problem.gridView().indexSet()) { } private: diff --git a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh index 988c67e18d4f8ebc568a0c2047013048286e722d..0382c2193bd34276ed74cf218e3da835cbae4b5f 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh @@ -63,6 +63,7 @@ template<class TypeTag> class TestDiffusionSpatialParams: public SequentialFVSpatialParams<TypeTag> { using ParentType = SequentialFVSpatialParams<TypeTag>; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using IndexSet = typename GridView::IndexSet; @@ -133,8 +134,8 @@ public: return; } - TestDiffusionSpatialParams(const GridView& gridView) - : ParentType(gridView),gridView_(gridView), indexSet_(gridView.indexSet()), permeability_(0) + TestDiffusionSpatialParams(const Problem& problem) + : ParentType(problem),gridView_(problem.gridView()), indexSet_(problem.gridView().indexSet()), permeability_(0) { // residual saturations materialLawParams_.setSwr(0.0); diff --git a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh index 860ae3384af213a75281e4dddabbb6300332ea4c..de20b85caebfad0ca1f697c8941439f684bcf280 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh @@ -62,6 +62,7 @@ template<class TypeTag> class TestDiffusionSpatialParams3d: public SequentialFVSpatialParams<TypeTag> { using ParentType = SequentialFVSpatialParams<TypeTag>; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -95,8 +96,8 @@ public: return materialLawParams_; } - TestDiffusionSpatialParams3d(const GridView& gridView) - : ParentType(gridView), permeability_(0) + TestDiffusionSpatialParams3d(const Problem& problem) + : ParentType(problem), permeability_(0) { // residual saturations materialLawParams_.setSwr(0.0); diff --git a/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh index 4da3876a02df27eaa4c2dff3772df694ddb9bf52..5ac0286ddccaeee2af778defb6a767fbeb264dac 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh @@ -67,6 +67,7 @@ template<class TypeTag> class Test3d2pSpatialParams: public SequentialFVSpatialParams<TypeTag> { using ParentType = SequentialFVSpatialParams<TypeTag>; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -110,8 +111,8 @@ public: } - Test3d2pSpatialParams(const GridView& gridView) - : ParentType(gridView), constPermeability_(0) + Test3d2pSpatialParams(const Problem& problem) + : ParentType(problem), constPermeability_(0) { diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh b/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh index e0754289be9ba865b8e925c099033b3e8cdc2e5d..ddf2f3d3bb31be37d066d31a7c9e2c0f4abc2e03 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh @@ -62,6 +62,7 @@ public: template<class TypeTag> class TestIMPESAdaptiveSpatialParams: public SequentialFVSpatialParams<TypeTag> { + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -98,8 +99,8 @@ public: } - TestIMPESAdaptiveSpatialParams(const GridView& gridView) - : ParentType(gridView) + TestIMPESAdaptiveSpatialParams(const Problem& problem) + : ParentType(problem) { // residual saturations materialLawParams_.setSwr(0.2); diff --git a/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh b/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh index 958b84377cdd6ae61f18cb55bc087a227fddbecf..5f2050e151e7082af5e531d3c3685bb10ec6179a 100644 --- a/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh @@ -62,6 +62,7 @@ public: template<class TypeTag> class TestIMPESSpatialParams: public SequentialFVSpatialParams<TypeTag> { + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -98,8 +99,8 @@ public: } - TestIMPESSpatialParams(const GridView& gridView) - : ParentType(gridView) + TestIMPESSpatialParams(const Problem& problem) + : ParentType(problem) { // residual saturations materialLawParams_.setSwr(0.2); diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh index 270cb96950796e93d6bfd4b1a4d46b11f5643e47..aa9b3dfb75500338f146a06b12fff0b3172e0444 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh @@ -61,6 +61,7 @@ template<class TypeTag> class Test2PSpatialParams: public SequentialFVSpatialParams<TypeTag> { using ParentType = SequentialFVSpatialParams<TypeTag>; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -115,8 +116,8 @@ public: return materialLawParamsBackground_; } - Test2PSpatialParams(const GridView& gridView) : - ParentType(gridView), permBackground_(0), permLenses_(0), + Test2PSpatialParams(const Problem& problem) : + ParentType(problem), permBackground_(0), permLenses_(0), lensOneLowerLeft_(0), lensOneUpperRight_(0), lensTwoLowerLeft_(0), lensTwoUpperRight_(0), lensThreeLowerLeft_(0), lensThreeUpperRight_(0) { #if PROBLEM == 0 diff --git a/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh b/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh index 709af67ed956f24d2dfd9a09dcce6b3c6300236c..018d15f7fed74fde3a232de9ad45a919d415ca97 100644 --- a/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh @@ -66,6 +66,7 @@ template<class TypeTag> class TestTransportSpatialParams: public SequentialFVSpatialParams<TypeTag> { using ParentType = SequentialFVSpatialParams<TypeTag>; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -94,8 +95,8 @@ public: } - TestTransportSpatialParams(const GridView& gridView) - : ParentType(gridView) + TestTransportSpatialParams(const Problem& problem) + : ParentType(problem) { // residual saturations materialLawParams_.setSwr(0.0); diff --git a/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh b/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh index a632c12b61cc23e9265564f2f4b3afbde63a48f6..c617ccf9a1d964bab7bf45d131fde9ec90a83dce 100644 --- a/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh +++ b/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh @@ -61,6 +61,7 @@ public: template<class TypeTag> class Test2P2CSpatialParams : public SequentialFVSpatialParams<TypeTag> { + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); @@ -91,7 +92,7 @@ public: } - Test2P2CSpatialParams(const GridView& gridView) : SequentialFVSpatialParams<TypeTag>(gridView), + Test2P2CSpatialParams(const Problem& problem) : SequentialFVSpatialParams<TypeTag>(problem), constPermeability_(0) { // residual saturations