Commit 2f1dc736 authored by Timo Koch's avatar Timo Koch

Merge branch 'cleanup/facet-propsystem-macros' into 'master'

Cleanup/facet propsystem macros

See merge request !1457

(cherry picked from commit 60d81a46)

3e574047 [test][facet][gravity] do not use prop system macros
cf9e6d99 [test][facet][gravity] fix test name
033389f9 [test][facet][linearprofile] do not use prop system macros
parent c5863a20
......@@ -20,7 +20,7 @@ dune_add_test(NAME test_md_facet_1p1p_gravity_xi1_tpfa
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_gravity_xi1_lowdim-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_gravity_tpfa params.input")
dune_add_test(NAME test_facet_1p1p_tpfa_gravity_xi066_tpfa
dune_add_test(NAME test_facet_1p1p_gravity_xi066_tpfa
LABELS multidomain
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
TARGET test_md_facet_1p1p_gravity_tpfa
......
......@@ -65,9 +65,9 @@ namespace Dumux {
namespace Properties {
// set cm property in the sub-problems
using TpfaTraits = TestTraits<TTAG(OnePBulkTpfa), TTAG(OnePLowDimTpfa)>;
SET_TYPE_PROP(OnePBulkTpfa, CouplingManager, typename TpfaTraits::CouplingManager);
SET_TYPE_PROP(OnePLowDimTpfa, CouplingManager, typename TpfaTraits::CouplingManager);
using TpfaTraits = TestTraits<TTag::OnePBulkTpfa, TTag::OnePLowDimTpfa>;
template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePBulkTpfa> { using type = typename TpfaTraits::CouplingManager; };
template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePLowDimTpfa> { using type = typename TpfaTraits::CouplingManager; };
} // end namespace Properties
} // end namespace Dumux
......@@ -93,10 +93,10 @@ int main(int argc, char** argv) try
//////////////////////////////////////////////////////
// try to create the grids (from the given grid file)
//////////////////////////////////////////////////////
using BulkProblemTypeTag = TTAG(BULKTYPETAG);
using LowDimProblemTypeTag = TTAG(LOWDIMTYPETAG);
using BulkGrid = typename GET_PROP_TYPE(BulkProblemTypeTag, Grid);
using LowDimGrid = typename GET_PROP_TYPE(LowDimProblemTypeTag, Grid);
using BulkProblemTypeTag = Properties::TTag::BULKTYPETAG;
using LowDimProblemTypeTag = Properties::TTag::LOWDIMTYPETAG;
using BulkGrid = GetPropType<BulkProblemTypeTag, Properties::Grid>;
using LowDimGrid = GetPropType<LowDimProblemTypeTag, Properties::Grid>;
using GridManager = FacetCouplingGridManager<BulkGrid, LowDimGrid>;
GridManager gridManager;
......@@ -112,8 +112,8 @@ int main(int argc, char** argv) try
const auto& lowDimGridView = gridManager.template grid<1>().leafGridView();
// create the finite volume grid geometries
using BulkFVGridGeometry = typename GET_PROP_TYPE(BulkProblemTypeTag, FVGridGeometry);
using LowDimFVGridGeometry = typename GET_PROP_TYPE(LowDimProblemTypeTag, FVGridGeometry);
using BulkFVGridGeometry = GetPropType<BulkProblemTypeTag, Properties::FVGridGeometry>;
using LowDimFVGridGeometry = GetPropType<LowDimProblemTypeTag, Properties::FVGridGeometry>;
auto bulkFvGridGeometry = std::make_shared<BulkFVGridGeometry>(bulkGridView);
auto lowDimFvGridGeometry = std::make_shared<LowDimFVGridGeometry>(lowDimGridView);
bulkFvGridGeometry->update();
......@@ -129,8 +129,8 @@ int main(int argc, char** argv) try
auto couplingManager = std::make_shared<CouplingManager>();
// the problems (boundary conditions)
using BulkProblem = typename GET_PROP_TYPE(BulkProblemTypeTag, Problem);
using LowDimProblem = typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem);
using BulkProblem = GetPropType<BulkProblemTypeTag, Properties::Problem>;
using LowDimProblem = GetPropType<LowDimProblemTypeTag, Properties::Problem>;
auto bulkSpatialParams = std::make_shared<typename BulkProblem::SpatialParams>(bulkFvGridGeometry, "Bulk");
auto bulkProblem = std::make_shared<BulkProblem>(bulkFvGridGeometry, bulkSpatialParams, couplingManager, "Bulk");
auto lowDimSpatialParams = std::make_shared<typename LowDimProblem::SpatialParams>(lowDimFvGridGeometry, "LowDim");
......@@ -152,8 +152,8 @@ int main(int argc, char** argv) try
couplingManager->init(bulkProblem, lowDimProblem, couplingMapper, x);
// the grid variables
using BulkGridVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, GridVariables);
using LowDimGridVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, GridVariables);
using BulkGridVariables = GetPropType<BulkProblemTypeTag, Properties::GridVariables>;
using LowDimGridVariables = GetPropType<LowDimProblemTypeTag, Properties::GridVariables>;
auto bulkGridVariables = std::make_shared<BulkGridVariables>(bulkProblem, bulkFvGridGeometry);
auto lowDimGridVariables = std::make_shared<LowDimGridVariables>(lowDimProblem, lowDimFvGridGeometry);
bulkGridVariables->init(x[bulkId]);
......@@ -165,13 +165,9 @@ int main(int argc, char** argv) try
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, x[bulkId], bulkProblem->name(), "Bulk");
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, x[lowDimId], lowDimProblem->name(), "LowDim");
// container for the output of the exact solutions
std::vector<typename GET_PROP_TYPE(BulkProblemTypeTag, Scalar)> bulkExact;
std::vector<typename GET_PROP_TYPE(LowDimProblemTypeTag, Scalar)> lowDimExact;
// Add model specific output fields
using BulkIOFields = typename GET_PROP_TYPE(BulkProblemTypeTag, IOFields);
using LowIOFields = typename GET_PROP_TYPE(LowDimProblemTypeTag, IOFields);
using BulkIOFields = GetPropType<BulkProblemTypeTag, Properties::IOFields>;
using LowIOFields = GetPropType<LowDimProblemTypeTag, Properties::IOFields>;
BulkIOFields::initOutputModule(bulkVtkWriter);
LowIOFields::initOutputModule(lowDimVtkWriter);
......
......@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief The problem for the bulk domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
......@@ -49,22 +48,31 @@ template<class TypeTag> class OnePBulkProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePBulk, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePBulkTpfa, INHERITS_FROM(OnePBulk, CCTpfaFacetCouplingModel));
namespace TTag {
struct OnePBulk { using InheritsFrom = std::tuple<OneP>; };
struct OnePBulkTpfa { using InheritsFrom = std::tuple<CCTpfaFacetCouplingModel, OnePBulk>; };
} // end namespace TTag
// Set the grid type
SET_TYPE_PROP(OnePBulk, Grid, BULKGRIDTYPE);
template<class TypeTag>
struct Grid<TypeTag, TTag::OnePBulk> { using type = BULKGRIDTYPE; };
// Set the problem type
SET_TYPE_PROP(OnePBulk, Problem, OnePBulkProblem<TypeTag>);
template<class TypeTag>
struct Problem<TypeTag, TTag::OnePBulk> { using type = OnePBulkProblem<TypeTag>; };
// set the spatial params
SET_TYPE_PROP(OnePBulk, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::OnePBulk>
{
using type = OnePSpatialParams< GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar> >;
};
// the fluid system
SET_PROP(OnePBulk, FluidSystem)
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePBulk>
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
};
......@@ -81,7 +89,7 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
......@@ -93,9 +101,9 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
static constexpr int dimWorld = GridView::dimensionworld;
......
......@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief The problem for the lower-dimensional domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
......@@ -48,23 +47,33 @@ namespace Dumux {
template<class TypeTag> class OnePLowDimProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePLowDim, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePLowDimTpfa, INHERITS_FROM(CCTpfaModel, OnePLowDim));
namespace TTag {
struct OnePLowDim { using InheritsFrom = std::tuple<OneP>; };
struct OnePLowDimTpfa { using InheritsFrom = std::tuple<OnePLowDim, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type
SET_TYPE_PROP(OnePLowDim, Grid, LOWDIMGRIDTYPE);
template<class TypeTag>
struct Grid<TypeTag, TTag::OnePLowDim> { using type = LOWDIMGRIDTYPE; };
// Set the problem type
SET_TYPE_PROP(OnePLowDim, Problem, OnePLowDimProblem<TypeTag>);
template<class TypeTag>
struct Problem<TypeTag, TTag::OnePLowDim> { using type = OnePLowDimProblem<TypeTag>; };
// set the spatial params
SET_TYPE_PROP(OnePLowDim, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::OnePLowDim>
{
using type = OnePSpatialParams< GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar> >;
};
// the fluid system
SET_PROP(OnePLowDim, FluidSystem)
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePLowDim>
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
};
......@@ -80,7 +89,7 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
......@@ -92,9 +101,9 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
static constexpr int dimWorld = GridView::dimensionworld;
......
......@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief Test for the one-phase facet coupling model.
*/
#include <config.h>
#include <iostream>
......@@ -65,9 +64,9 @@ namespace Dumux {
namespace Properties {
// set cm property in the sub-problems
using TpfaTraits = TestTraits<TTAG(OnePBulkTpfa), TTAG(OnePLowDimTpfa)>;
SET_TYPE_PROP(OnePBulkTpfa, CouplingManager, typename TpfaTraits::CouplingManager);
SET_TYPE_PROP(OnePLowDimTpfa, CouplingManager, typename TpfaTraits::CouplingManager);
using TpfaTraits = TestTraits<TTag::OnePBulkTpfa, TTag::OnePLowDimTpfa>;
template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePBulkTpfa> { using type = typename TpfaTraits::CouplingManager; };
template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePLowDimTpfa> { using type = typename TpfaTraits::CouplingManager; };
} // end namespace Properties
} // end namespace Dumux
......@@ -93,10 +92,10 @@ int main(int argc, char** argv) try
//////////////////////////////////////////////////////
// try to create the grids (from the given grid file)
//////////////////////////////////////////////////////
using BulkProblemTypeTag = TTAG(BULKTYPETAG);
using LowDimProblemTypeTag = TTAG(LOWDIMTYPETAG);
using BulkGrid = typename GET_PROP_TYPE(BulkProblemTypeTag, Grid);
using LowDimGrid = typename GET_PROP_TYPE(LowDimProblemTypeTag, Grid);
using BulkProblemTypeTag = Properties::TTag::BULKTYPETAG;
using LowDimProblemTypeTag = Properties::TTag::LOWDIMTYPETAG;
using BulkGrid = GetPropType<BulkProblemTypeTag, Properties::Grid>;
using LowDimGrid = GetPropType<LowDimProblemTypeTag, Properties::Grid>;
using GridManager = FacetCouplingGridManager<BulkGrid, LowDimGrid>;
GridManager gridManager;
......@@ -112,8 +111,8 @@ int main(int argc, char** argv) try
const auto& lowDimGridView = gridManager.template grid<1>().leafGridView();
// create the finite volume grid geometries
using BulkFVGridGeometry = typename GET_PROP_TYPE(BulkProblemTypeTag, FVGridGeometry);
using LowDimFVGridGeometry = typename GET_PROP_TYPE(LowDimProblemTypeTag, FVGridGeometry);
using BulkFVGridGeometry = GetPropType<BulkProblemTypeTag, Properties::FVGridGeometry>;
using LowDimFVGridGeometry = GetPropType<LowDimProblemTypeTag, Properties::FVGridGeometry>;
auto bulkFvGridGeometry = std::make_shared<BulkFVGridGeometry>(bulkGridView);
auto lowDimFvGridGeometry = std::make_shared<LowDimFVGridGeometry>(lowDimGridView);
bulkFvGridGeometry->update();
......@@ -129,8 +128,8 @@ int main(int argc, char** argv) try
auto couplingManager = std::make_shared<CouplingManager>();
// the problems (boundary conditions)
using BulkProblem = typename GET_PROP_TYPE(BulkProblemTypeTag, Problem);
using LowDimProblem = typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem);
using BulkProblem = GetPropType<BulkProblemTypeTag, Properties::Problem>;
using LowDimProblem = GetPropType<LowDimProblemTypeTag, Properties::Problem>;
auto bulkSpatialParams = std::make_shared<typename BulkProblem::SpatialParams>(bulkFvGridGeometry, "Bulk");
auto bulkProblem = std::make_shared<BulkProblem>(bulkFvGridGeometry, bulkSpatialParams, couplingManager, "Bulk");
auto lowDimSpatialParams = std::make_shared<typename LowDimProblem::SpatialParams>(lowDimFvGridGeometry, "LowDim");
......@@ -152,8 +151,8 @@ int main(int argc, char** argv) try
couplingManager->init(bulkProblem, lowDimProblem, couplingMapper, x);
// the grid variables
using BulkGridVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, GridVariables);
using LowDimGridVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, GridVariables);
using BulkGridVariables = GetPropType<BulkProblemTypeTag, Properties::GridVariables>;
using LowDimGridVariables = GetPropType<LowDimProblemTypeTag, Properties::GridVariables>;
auto bulkGridVariables = std::make_shared<BulkGridVariables>(bulkProblem, bulkFvGridGeometry);
auto lowDimGridVariables = std::make_shared<LowDimGridVariables>(lowDimProblem, lowDimFvGridGeometry);
bulkGridVariables->init(x[bulkId]);
......@@ -165,13 +164,9 @@ int main(int argc, char** argv) try
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, x[bulkId], bulkProblem->name(), "Bulk");
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, x[lowDimId], lowDimProblem->name(), "LowDim");
// container for the output of the exact solutions
std::vector<typename GET_PROP_TYPE(BulkProblemTypeTag, Scalar)> bulkExact;
std::vector<typename GET_PROP_TYPE(LowDimProblemTypeTag, Scalar)> lowDimExact;
// Add model specific output fields
using BulkIOFields = typename GET_PROP_TYPE(BulkProblemTypeTag, IOFields);
using LowDimIOFields = typename GET_PROP_TYPE(LowDimProblemTypeTag, IOFields);
using BulkIOFields = GetPropType<BulkProblemTypeTag, Properties::IOFields>;
using LowDimIOFields = GetPropType<LowDimProblemTypeTag, Properties::IOFields>;
BulkIOFields::initOutputModule(bulkVtkWriter);
LowDimIOFields::initOutputModule(lowDimVtkWriter);
......
......@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief The problem for the bulk domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
......@@ -48,23 +47,33 @@ namespace Dumux {
template<class TypeTag> class OnePBulkProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePBulk, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePBulkTpfa, INHERITS_FROM(OnePBulk, CCTpfaFacetCouplingModel));
namespace TTag {
struct OnePBulk { using InheritsFrom = std::tuple<OneP>; };
struct OnePBulkTpfa { using InheritsFrom = std::tuple<CCTpfaFacetCouplingModel, OnePBulk>; };
} // end namespace TTag
// Set the grid type
SET_TYPE_PROP(OnePBulk, Grid, BULKGRIDTYPE);
template<class TypeTag>
struct Grid<TypeTag, TTag::OnePBulk> { using type = BULKGRIDTYPE; };
// Set the problem type
SET_TYPE_PROP(OnePBulk, Problem, OnePBulkProblem<TypeTag>);
template<class TypeTag>
struct Problem<TypeTag, TTag::OnePBulk> { using type = OnePBulkProblem<TypeTag>; };
// set the spatial params
SET_TYPE_PROP(OnePBulk, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::OnePBulk>
{
using type = OnePSpatialParams< GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar> >;
};
// the fluid system
SET_PROP(OnePBulk, FluidSystem)
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePBulk>
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
};
......@@ -81,7 +90,7 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
......@@ -93,9 +102,9 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
public:
OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
......
......@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief The problem for the lower-dimensional domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
......@@ -48,23 +47,33 @@ namespace Dumux {
template<class TypeTag> class OnePLowDimProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePLowDim, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePLowDimTpfa, INHERITS_FROM(CCTpfaModel, OnePLowDim));
namespace TTag {
struct OnePLowDim { using InheritsFrom = std::tuple<OneP>; };
struct OnePLowDimTpfa { using InheritsFrom = std::tuple<OnePLowDim, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type
SET_TYPE_PROP(OnePLowDim, Grid, LOWDIMGRIDTYPE);
template<class TypeTag>
struct Grid<TypeTag, TTag::OnePLowDim> { using type = LOWDIMGRIDTYPE; };
// Set the problem type
SET_TYPE_PROP(OnePLowDim, Problem, OnePLowDimProblem<TypeTag>);
template<class TypeTag>
struct Problem<TypeTag, TTag::OnePLowDim> { using type = OnePLowDimProblem<TypeTag>; };
// set the spatial params
SET_TYPE_PROP(OnePLowDim, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::OnePLowDim>
{
using type = OnePSpatialParams< GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar> >;
};
// the fluid system
SET_PROP(OnePLowDim, FluidSystem)
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePLowDim>
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
};
......@@ -80,7 +89,7 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
......@@ -92,9 +101,9 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
public:
OnePLowDimProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment