Commit 033389f9 authored by Dennis Gläser's avatar Dennis Gläser

[test][facet][linearprofile] do not use prop system macros

parent cf9e6d99
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* \ingroup FacetTests * \ingroup FacetTests
* \brief Test for the one-phase facet coupling model. * \brief Test for the one-phase facet coupling model.
*/ */
#include <config.h> #include <config.h>
#include <iostream> #include <iostream>
...@@ -65,9 +64,9 @@ namespace Dumux { ...@@ -65,9 +64,9 @@ namespace Dumux {
namespace Properties { namespace Properties {
// set cm property in the sub-problems // set cm property in the sub-problems
using TpfaTraits = TestTraits<TTAG(OnePBulkTpfa), TTAG(OnePLowDimTpfa)>; using TpfaTraits = TestTraits<TTag::OnePBulkTpfa, TTag::OnePLowDimTpfa>;
SET_TYPE_PROP(OnePBulkTpfa, CouplingManager, typename TpfaTraits::CouplingManager); template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePBulkTpfa> { using type = typename TpfaTraits::CouplingManager; };
SET_TYPE_PROP(OnePLowDimTpfa, CouplingManager, typename TpfaTraits::CouplingManager); template<class TypeTag> struct CouplingManager<TypeTag, TTag::OnePLowDimTpfa> { using type = typename TpfaTraits::CouplingManager; };
} // end namespace Properties } // end namespace Properties
} // end namespace Dumux } // end namespace Dumux
...@@ -93,10 +92,10 @@ int main(int argc, char** argv) try ...@@ -93,10 +92,10 @@ int main(int argc, char** argv) try
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// try to create the grids (from the given grid file) // try to create the grids (from the given grid file)
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
using BulkProblemTypeTag = TTAG(BULKTYPETAG); using BulkProblemTypeTag = Properties::TTag::BULKTYPETAG;
using LowDimProblemTypeTag = TTAG(LOWDIMTYPETAG); using LowDimProblemTypeTag = Properties::TTag::LOWDIMTYPETAG;
using BulkGrid = typename GET_PROP_TYPE(BulkProblemTypeTag, Grid); using BulkGrid = GetPropType<BulkProblemTypeTag, Properties::Grid>;
using LowDimGrid = typename GET_PROP_TYPE(LowDimProblemTypeTag, Grid); using LowDimGrid = GetPropType<LowDimProblemTypeTag, Properties::Grid>;
using GridManager = FacetCouplingGridManager<BulkGrid, LowDimGrid>; using GridManager = FacetCouplingGridManager<BulkGrid, LowDimGrid>;
GridManager gridManager; GridManager gridManager;
...@@ -112,8 +111,8 @@ int main(int argc, char** argv) try ...@@ -112,8 +111,8 @@ int main(int argc, char** argv) try
const auto& lowDimGridView = gridManager.template grid<1>().leafGridView(); const auto& lowDimGridView = gridManager.template grid<1>().leafGridView();
// create the finite volume grid geometries // create the finite volume grid geometries
using BulkFVGridGeometry = typename GET_PROP_TYPE(BulkProblemTypeTag, FVGridGeometry); using BulkFVGridGeometry = GetPropType<BulkProblemTypeTag, Properties::FVGridGeometry>;
using LowDimFVGridGeometry = typename GET_PROP_TYPE(LowDimProblemTypeTag, FVGridGeometry); using LowDimFVGridGeometry = GetPropType<LowDimProblemTypeTag, Properties::FVGridGeometry>;
auto bulkFvGridGeometry = std::make_shared<BulkFVGridGeometry>(bulkGridView); auto bulkFvGridGeometry = std::make_shared<BulkFVGridGeometry>(bulkGridView);
auto lowDimFvGridGeometry = std::make_shared<LowDimFVGridGeometry>(lowDimGridView); auto lowDimFvGridGeometry = std::make_shared<LowDimFVGridGeometry>(lowDimGridView);
bulkFvGridGeometry->update(); bulkFvGridGeometry->update();
...@@ -129,8 +128,8 @@ int main(int argc, char** argv) try ...@@ -129,8 +128,8 @@ int main(int argc, char** argv) try
auto couplingManager = std::make_shared<CouplingManager>(); auto couplingManager = std::make_shared<CouplingManager>();
// the problems (boundary conditions) // the problems (boundary conditions)
using BulkProblem = typename GET_PROP_TYPE(BulkProblemTypeTag, Problem); using BulkProblem = GetPropType<BulkProblemTypeTag, Properties::Problem>;
using LowDimProblem = typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem); using LowDimProblem = GetPropType<LowDimProblemTypeTag, Properties::Problem>;
auto bulkSpatialParams = std::make_shared<typename BulkProblem::SpatialParams>(bulkFvGridGeometry, "Bulk"); auto bulkSpatialParams = std::make_shared<typename BulkProblem::SpatialParams>(bulkFvGridGeometry, "Bulk");
auto bulkProblem = std::make_shared<BulkProblem>(bulkFvGridGeometry, bulkSpatialParams, couplingManager, "Bulk"); auto bulkProblem = std::make_shared<BulkProblem>(bulkFvGridGeometry, bulkSpatialParams, couplingManager, "Bulk");
auto lowDimSpatialParams = std::make_shared<typename LowDimProblem::SpatialParams>(lowDimFvGridGeometry, "LowDim"); auto lowDimSpatialParams = std::make_shared<typename LowDimProblem::SpatialParams>(lowDimFvGridGeometry, "LowDim");
...@@ -152,8 +151,8 @@ int main(int argc, char** argv) try ...@@ -152,8 +151,8 @@ int main(int argc, char** argv) try
couplingManager->init(bulkProblem, lowDimProblem, couplingMapper, x); couplingManager->init(bulkProblem, lowDimProblem, couplingMapper, x);
// the grid variables // the grid variables
using BulkGridVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, GridVariables); using BulkGridVariables = GetPropType<BulkProblemTypeTag, Properties::GridVariables>;
using LowDimGridVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, GridVariables); using LowDimGridVariables = GetPropType<LowDimProblemTypeTag, Properties::GridVariables>;
auto bulkGridVariables = std::make_shared<BulkGridVariables>(bulkProblem, bulkFvGridGeometry); auto bulkGridVariables = std::make_shared<BulkGridVariables>(bulkProblem, bulkFvGridGeometry);
auto lowDimGridVariables = std::make_shared<LowDimGridVariables>(lowDimProblem, lowDimFvGridGeometry); auto lowDimGridVariables = std::make_shared<LowDimGridVariables>(lowDimProblem, lowDimFvGridGeometry);
bulkGridVariables->init(x[bulkId]); bulkGridVariables->init(x[bulkId]);
...@@ -165,13 +164,9 @@ int main(int argc, char** argv) try ...@@ -165,13 +164,9 @@ int main(int argc, char** argv) try
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, x[bulkId], bulkProblem->name(), "Bulk"); VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, x[bulkId], bulkProblem->name(), "Bulk");
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, x[lowDimId], lowDimProblem->name(), "LowDim"); 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 // Add model specific output fields
using BulkIOFields = typename GET_PROP_TYPE(BulkProblemTypeTag, IOFields); using BulkIOFields = GetPropType<BulkProblemTypeTag, Properties::IOFields>;
using LowDimIOFields = typename GET_PROP_TYPE(LowDimProblemTypeTag, IOFields); using LowDimIOFields = GetPropType<LowDimProblemTypeTag, Properties::IOFields>;
BulkIOFields::initOutputModule(bulkVtkWriter); BulkIOFields::initOutputModule(bulkVtkWriter);
LowDimIOFields::initOutputModule(lowDimVtkWriter); LowDimIOFields::initOutputModule(lowDimVtkWriter);
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* \ingroup FacetTests * \ingroup FacetTests
* \brief The problem for the bulk domain in the single-phase facet coupling test. * \brief The problem for the bulk domain in the single-phase facet coupling test.
*/ */
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH #ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH #define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
...@@ -48,23 +47,33 @@ namespace Dumux { ...@@ -48,23 +47,33 @@ namespace Dumux {
template<class TypeTag> class OnePBulkProblem; template<class TypeTag> class OnePBulkProblem;
namespace Properties { namespace Properties {
// create the type tag nodes // create the type tag nodes
NEW_TYPE_TAG(OnePBulk, INHERITS_FROM(OneP)); namespace TTag {
NEW_TYPE_TAG(OnePBulkTpfa, INHERITS_FROM(OnePBulk, CCTpfaFacetCouplingModel)); struct OnePBulk { using InheritsFrom = std::tuple<OneP>; };
struct OnePBulkTpfa { using InheritsFrom = std::tuple<CCTpfaFacetCouplingModel, OnePBulk>; };
} // end namespace TTag
// Set the grid type // 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 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 the spatial params
SET_TYPE_PROP(OnePBulk, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry), template<class TypeTag>
typename GET_PROP_TYPE(TypeTag, Scalar) >); struct SpatialParams<TypeTag, TTag::OnePBulk>
{
using type = OnePSpatialParams< GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar> >;
};
// the fluid system // the fluid system
SET_PROP(OnePBulk, FluidSystem) template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePBulk>
{ {
private: private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public: public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
}; };
...@@ -81,7 +90,7 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag> ...@@ -81,7 +90,7 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
{ {
using ParentType = 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 PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar; using Scalar = typename GridVariables::Scalar;
...@@ -93,9 +102,9 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag> ...@@ -93,9 +102,9 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager); using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
public: public:
OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* \ingroup FacetTests * \ingroup FacetTests
* \brief The problem for the lower-dimensional domain in the single-phase facet coupling test. * \brief The problem for the lower-dimensional domain in the single-phase facet coupling test.
*/ */
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH #ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH #define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
...@@ -48,23 +47,33 @@ namespace Dumux { ...@@ -48,23 +47,33 @@ namespace Dumux {
template<class TypeTag> class OnePLowDimProblem; template<class TypeTag> class OnePLowDimProblem;
namespace Properties { namespace Properties {
// create the type tag nodes // create the type tag nodes
NEW_TYPE_TAG(OnePLowDim, INHERITS_FROM(OneP)); namespace TTag {
NEW_TYPE_TAG(OnePLowDimTpfa, INHERITS_FROM(CCTpfaModel, OnePLowDim)); struct OnePLowDim { using InheritsFrom = std::tuple<OneP>; };
struct OnePLowDimTpfa { using InheritsFrom = std::tuple<OnePLowDim, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type // 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 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 the spatial params
SET_TYPE_PROP(OnePLowDim, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry), template<class TypeTag>
typename GET_PROP_TYPE(TypeTag, Scalar) >); struct SpatialParams<TypeTag, TTag::OnePLowDim>
{
using type = OnePSpatialParams< GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar> >;
};
// the fluid system // the fluid system
SET_PROP(OnePLowDim, FluidSystem) template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePLowDim>
{ {
private: private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public: public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
}; };
...@@ -80,7 +89,7 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag> ...@@ -80,7 +89,7 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
{ {
using ParentType = 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 ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using PrimaryVariables = typename GridVariables::PrimaryVariables; using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar; using Scalar = typename GridVariables::Scalar;
...@@ -92,9 +101,9 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag> ...@@ -92,9 +101,9 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager); using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
public: public:
OnePLowDimProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, 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