Commit b867cc38 authored by Timo Koch's avatar Timo Koch
Browse files

[md] Restructure multidomain traits

parent 6981a79b
......@@ -58,7 +58,7 @@ class PoroMechanicsCouplingManager : public virtual CouplingManager< MDTraits >
using ParentType = CouplingManager< MDTraits >;
// the sub-domain type tags
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
// further types specific to the sub-problems
template<std::size_t id> using Scalar = GetPropType<SubDomainTypeTag<id>, Properties::Scalar>;
......
......@@ -58,13 +58,13 @@ class DarcyDarcyBoundaryCouplingManager
using Scalar = typename MDTraits::Scalar;
using SolutionVector = typename MDTraits::SolutionVector;
template<std::size_t i> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<i>;
template<std::size_t i> using SubDomainTypeTag = typename MDTraits::template SubDomain<i>::TypeTag;
template<std::size_t i> using Problem = GetPropType<SubDomainTypeTag<i>, Properties::Problem>;
template<std::size_t i> using PrimaryVariables = GetPropType<SubDomainTypeTag<i>, Properties::PrimaryVariables>;
template<std::size_t i> using NumEqVector = GetPropType<SubDomainTypeTag<i>, Properties::NumEqVector>;
template<std::size_t i> using ElementVolumeVariables = typename GetPropType<SubDomainTypeTag<i>, Properties::GridVolumeVariables>::LocalView;
template<std::size_t i> using VolumeVariables = typename GetPropType<SubDomainTypeTag<i>, Properties::GridVolumeVariables>::VolumeVariables;
template<std::size_t i> using FVGridGeometry = typename MDTraits::template SubDomainFVGridGeometry<i>;
template<std::size_t i> using FVGridGeometry = typename MDTraits::template SubDomain<i>::FVGridGeometry;
template<std::size_t i> using FVElementGeometry = typename FVGridGeometry<i>::LocalView;
template<std::size_t i> using SubControlVolumeFace = typename FVGridGeometry<i>::SubControlVolumeFace;
template<std::size_t i> using SubControlVolume = typename FVGridGeometry<i>::SubControlVolume;
......@@ -73,7 +73,7 @@ class DarcyDarcyBoundaryCouplingManager
template<std::size_t i>
static constexpr auto domainIdx()
{ return typename MDTraits::template DomainIdx<i>{}; }
{ return typename MDTraits::template SubDomain<i>::Index{}; }
template<std::size_t i>
static constexpr bool isCCTpfa()
......
......@@ -53,14 +53,14 @@ class DarcyDarcyBoundaryCouplingMapper
{
using Scalar = typename MDTraits::Scalar;
template<std::size_t i> using FVGridGeometry = typename MDTraits::template SubDomainFVGridGeometry<i>;
template<std::size_t i> using FVGridGeometry = typename MDTraits::template SubDomain<i>::FVGridGeometry;
template<std::size_t i> using SubControlVolumeFace = typename FVGridGeometry<i>::SubControlVolumeFace;
template<std::size_t i> using GridView = typename FVGridGeometry<i>::GridView;
template<std::size_t i> using Element = typename GridView<i>::template Codim<0>::Entity;
template<std::size_t i>
static constexpr auto domainIdx()
{ return typename MDTraits::template DomainIdx<i>{}; }
{ return typename MDTraits::template SubDomain<i>::Index{}; }
template<std::size_t i>
static constexpr bool isCCTpfa()
......
......@@ -217,8 +217,8 @@ class StokesDarcyCouplingDataImplementation;
*/
template<class MDTraits, class CouplingManager>
using StokesDarcyCouplingData = StokesDarcyCouplingDataImplementation<MDTraits, CouplingManager,
GetPropType<typename MDTraits::template SubDomainTypeTag<0>, Properties::ModelTraits>::enableEnergyBalance(),
(GetPropType<typename MDTraits::template SubDomainTypeTag<0>, Properties::ModelTraits>::numComponents() > 1)>;
GetPropType<typename MDTraits::template SubDomain<0>::TypeTag, Properties::ModelTraits>::enableEnergyBalance(),
(GetPropType<typename MDTraits::template SubDomain<0>::TypeTag, Properties::ModelTraits>::numComponents() > 1)>;
/*!
* \ingroup MultiDomain
......@@ -231,7 +231,7 @@ class StokesDarcyCouplingDataImplementationBase
{
using Scalar = typename MDTraits::Scalar;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using Element = typename FVGridGeometry<id>::GridView::template Codim<0>::Entity;
template<std::size_t id> using FVElementGeometry = typename FVGridGeometry<id>::LocalView;
......@@ -469,14 +469,14 @@ class StokesDarcyCouplingDataImplementation<MDTraits, CouplingManager, enableEne
{
using ParentType = StokesDarcyCouplingDataImplementationBase<MDTraits, CouplingManager>;
using Scalar = typename MDTraits::Scalar;
static constexpr auto stokesIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto darcyIdx = typename MDTraits::template DomainIdx<2>();
static constexpr auto stokesIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto darcyIdx = typename MDTraits::template SubDomain<2>::Index();
static constexpr auto stokesCellCenterIdx = stokesIdx;
static constexpr auto stokesFaceIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto stokesFaceIdx = typename MDTraits::template SubDomain<1>::Index();
// the sub domain type tags
template<std::size_t id>
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using Element = typename FVGridGeometry<id>::GridView::template Codim<0>::Entity;
......@@ -633,14 +633,14 @@ class StokesDarcyCouplingDataImplementation<MDTraits, CouplingManager, enableEne
{
using ParentType = StokesDarcyCouplingDataImplementationBase<MDTraits, CouplingManager>;
using Scalar = typename MDTraits::Scalar;
static constexpr auto stokesIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto darcyIdx = typename MDTraits::template DomainIdx<2>();
static constexpr auto stokesIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto darcyIdx = typename MDTraits::template SubDomain<2>::Index();
static constexpr auto stokesCellCenterIdx = stokesIdx;
static constexpr auto stokesFaceIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto stokesFaceIdx = typename MDTraits::template SubDomain<1>::Index();
// the sub domain type tags
template<std::size_t id>
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using Element = typename FVGridGeometry<id>::GridView::template Codim<0>::Entity;
......
......@@ -55,27 +55,27 @@ class StokesDarcyCouplingManager
using ParentType = StaggeredCouplingManagerBase<MDTraits, StokesDarcyCouplingManager<MDTraits>>;
public:
static constexpr auto stokesCellCenterIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto stokesFaceIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto cellCenterIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto faceIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto stokesCellCenterIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto stokesFaceIdx = typename MDTraits::template SubDomain<1>::Index();
static constexpr auto cellCenterIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto faceIdx = typename MDTraits::template SubDomain<1>::Index();
static constexpr auto stokesIdx = stokesCellCenterIdx;
static constexpr auto darcyIdx = typename MDTraits::template DomainIdx<2>();
static constexpr auto darcyIdx = typename MDTraits::template SubDomain<2>::Index();
private:
using SolutionVector = typename MDTraits::SolutionVector;
// obtain the type tags of the sub problems
using StokesTypeTag = typename MDTraits::template SubDomainTypeTag<0>;
using DarcyTypeTag = typename MDTraits::template SubDomainTypeTag<2>;
using StokesTypeTag = typename MDTraits::template SubDomain<0>::TypeTag;
using DarcyTypeTag = typename MDTraits::template SubDomain<2>::TypeTag;
using CouplingStencils = std::unordered_map<std::size_t, std::vector<std::size_t> >;
using CouplingStencil = CouplingStencils::mapped_type;
// the sub domain type tags
template<std::size_t id>
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
static constexpr bool isCompositional = GetPropType<SubDomainTypeTag<0>, Properties::ModelTraits>::numComponents() > 1;
......@@ -91,7 +91,7 @@ private:
template<std::size_t id> using ElementFluxVariablesCache = typename GetPropType<SubDomainTypeTag<id>, Properties::GridFluxVariablesCache>::LocalView;
template<std::size_t id> using GridVariables = GetPropType<SubDomainTypeTag<id>, Properties::GridVariables>;
template<std::size_t id> using Element = typename GridView<id>::template Codim<0>::Entity;
template<std::size_t id> using PrimaryVariables = typename MDTraits::template PrimaryVariables<id>;
template<std::size_t id> using PrimaryVariables = typename MDTraits::template SubDomain<id>::PrimaryVariables;
template<std::size_t id> using SubControlVolumeFace = typename FVElementGeometry<id>::SubControlVolumeFace;
using CellCenterSolutionVector = GetPropType<StokesTypeTag, Properties::CellCenterSolutionVector>;
......
......@@ -54,18 +54,18 @@ class StokesDarcyCouplingMapper
using Scalar = typename MDTraits::Scalar;
public:
static constexpr auto stokesCellCenterIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto stokesFaceIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto cellCenterIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto faceIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto stokesCellCenterIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto stokesFaceIdx = typename MDTraits::template SubDomain<1>::Index();
static constexpr auto cellCenterIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto faceIdx = typename MDTraits::template SubDomain<1>::Index();
static constexpr auto stokesIdx = stokesCellCenterIdx;
static constexpr auto darcyIdx = typename MDTraits::template DomainIdx<2>();
static constexpr auto darcyIdx = typename MDTraits::template SubDomain<2>::Index();
private:
// obtain the type tags of the sub problems
using StokesTypeTag = typename MDTraits::template SubDomainTypeTag<0>;
using DarcyTypeTag = typename MDTraits::template SubDomainTypeTag<2>;
using StokesTypeTag = typename MDTraits::template SubDomain<0>::TypeTag;
using DarcyTypeTag = typename MDTraits::template SubDomain<2>::TypeTag;
struct ElementMapInfo
{
......@@ -76,7 +76,7 @@ private:
// the sub domain type tags
template<std::size_t id>
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
using CouplingManager = GetPropType<StokesTypeTag, Properties::CouplingManager>;
static_assert(GetPropType<SubDomainTypeTag<stokesIdx>, Properties::FVGridGeometry>::discMethod == DiscretizationMethod::staggered,
......
......@@ -44,13 +44,13 @@ namespace Dumux {
template<class Traits>
class CouplingManager
{
template<std::size_t id> using SubDomainTypeTag = typename Traits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename Traits::template SubDomain<id>::TypeTag;
template<std::size_t id> using PrimaryVariables = GetPropType<SubDomainTypeTag<id>, Properties::PrimaryVariables>;
template<std::size_t id> using GridView = typename GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>::GridView;
template<std::size_t id> using Element = typename GridView<id>::template Codim<0>::Entity;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
template<std::size_t id> using ProblemWeakPtr = std::weak_ptr<const Problem<id>>;
using Problems = typename Traits::template MakeTuple<ProblemWeakPtr>;
using Problems = typename Traits::template Tuple<ProblemWeakPtr>;
public:
//! default type used for coupling element stencils
......
......@@ -54,7 +54,7 @@ template<class MDTraits>
struct CircleAveragePointSourceTraits
{
private:
template<std::size_t i> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<i>;
template<std::size_t i> using SubDomainTypeTag = typename MDTraits::template SubDomain<i>::TypeTag;
template<std::size_t i> using FVGridGeometry = GetPropType<SubDomainTypeTag<i>, Properties::FVGridGeometry>;
template<std::size_t i> using NumEqVector = GetPropType<SubDomainTypeTag<i>, Properties::NumEqVector>;
public:
......@@ -98,11 +98,11 @@ class EmbeddedCouplingManager1d3d<MDTraits, EmbeddedCouplingMode::line>
using Scalar = typename MDTraits::Scalar;
using SolutionVector = typename MDTraits::SolutionVector;
static constexpr auto bulkIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto lowDimIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
// the sub domain type aliases
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView;
......@@ -198,11 +198,11 @@ class EmbeddedCouplingManager1d3d<MDTraits, EmbeddedCouplingMode::average>
using SolutionVector = typename MDTraits::SolutionVector;
using PointSourceData = typename ParentType::PointSourceTraits::PointSourceData;
static constexpr auto bulkIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto lowDimIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
// the sub domain type aliases
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView;
......@@ -576,11 +576,11 @@ class EmbeddedCouplingManager1d3d<MDTraits, EmbeddedCouplingMode::cylindersource
using SolutionVector = typename MDTraits::SolutionVector;
using PointSourceData = typename ParentType::PointSourceTraits::PointSourceData;
static constexpr auto bulkIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto lowDimIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
// the sub domain type aliases
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView;
......@@ -853,11 +853,11 @@ class EmbeddedCouplingManager1d3d<MDTraits, EmbeddedCouplingMode::kernel>
using SolutionVector = typename MDTraits::SolutionVector;
using PointSourceData = typename ParentType::PointSourceTraits::PointSourceData;
static constexpr auto bulkIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto lowDimIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
// the sub domain type aliases
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView;
......
......@@ -51,7 +51,7 @@ template<class MDTraits>
struct DefaultPointSourceTraits
{
private:
template<std::size_t i> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<i>;
template<std::size_t i> using SubDomainTypeTag = typename MDTraits::template SubDomain<i>::TypeTag;
template<std::size_t i> using FVGridGeometry = GetPropType<SubDomainTypeTag<i>, Properties::FVGridGeometry>;
template<std::size_t i> using NumEqVector = GetPropType<SubDomainTypeTag<i>, Properties::NumEqVector>;
public:
......@@ -79,14 +79,14 @@ class EmbeddedCouplingManagerBase
{
using ParentType = CouplingManager<MDTraits>;
using Scalar = typename MDTraits::Scalar;
static constexpr auto bulkIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto lowDimIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
using SolutionVector = typename MDTraits::SolutionVector;
using PointSourceData = typename PSTraits::PointSourceData;
// the sub domain type tags
template<std::size_t id> using PointSource = typename PSTraits::template PointSource<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
template<std::size_t id> using PrimaryVariables = GetPropType<SubDomainTypeTag<id>, Properties::PrimaryVariables>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
......
......@@ -50,13 +50,13 @@ class ExtendedSourceStencil
using MDTraits = typename CouplingManager::MultiDomainTraits;
using Scalar = typename MDTraits::Scalar;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView;
template<std::size_t id> using Element = typename GridView<id>::template Codim<0>::Entity;
static constexpr auto bulkIdx = typename MDTraits::template DomainIdx<0>();
static constexpr auto lowDimIdx = typename MDTraits::template DomainIdx<1>();
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
template<std::size_t id>
static constexpr bool isBox()
......
......@@ -47,8 +47,8 @@ class PointSourceData
using ShapeValues = typename std::vector<Dune::FieldVector<Scalar, 1> >;
// obtain the type tags of the sub problems
using BulkTypeTag = typename MDTraits::template SubDomainTypeTag<0>;
using LowDimTypeTag = typename MDTraits::template SubDomainTypeTag<1>;
using BulkTypeTag = typename MDTraits::template SubDomain<0>::TypeTag;
using LowDimTypeTag = typename MDTraits::template SubDomain<1>::TypeTag;
using BulkPrimaryVariables = GetPropType<BulkTypeTag, Properties::PrimaryVariables>;
using LowDimPrimaryVariables = GetPropType<LowDimTypeTag, Properties::PrimaryVariables>;
......@@ -155,8 +155,8 @@ class PointSourceDataCircleAverage : public PointSourceData<MDTraits>
using ShapeValues = typename std::vector<Dune::FieldVector<Scalar, 1> >;
// obtain the type tags of the sub problems
using BulkTypeTag = typename MDTraits::template SubDomainTypeTag<0>;
using LowDimTypeTag = typename MDTraits::template SubDomainTypeTag<1>;
using BulkTypeTag = typename MDTraits::template SubDomain<0>::TypeTag;
using LowDimTypeTag = typename MDTraits::template SubDomain<1>::TypeTag;
using BulkPrimaryVariables = GetPropType<BulkTypeTag, Properties::PrimaryVariables>;
using LowDimPrimaryVariables = GetPropType<LowDimTypeTag, Properties::PrimaryVariables>;
......
......@@ -55,13 +55,13 @@ class FacetCouplingManager<MDTraits, CouplingMapper, bulkDomainId, lowDimDomainI
using ParentType = CouplingManager< MDTraits >;
// convenience aliases and instances of the two domain ids
using BulkIdType = typename MDTraits::template DomainIdx<bulkDomainId>;
using LowDimIdType = typename MDTraits::template DomainIdx<lowDimDomainId>;
using BulkIdType = typename MDTraits::template SubDomain<bulkDomainId>::Index;
using LowDimIdType = typename MDTraits::template SubDomain<lowDimDomainId>::Index;
static constexpr auto bulkId = BulkIdType();
static constexpr auto lowDimId = LowDimIdType();
// the sub-domain type tags
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
// further types specific to the sub-problems
template<std::size_t id> using PrimaryVariables = GetPropType<SubDomainTypeTag<id>, Properties::PrimaryVariables>;
......
......@@ -55,13 +55,13 @@ class FacetCouplingManager<MDTraits, CouplingMapper, bulkDomainId, lowDimDomainI
using ParentType = CouplingManager< MDTraits >;
// convenience aliases and instances of the two domain ids
using BulkIdType = typename MDTraits::template DomainIdx<bulkDomainId>;
using LowDimIdType = typename MDTraits::template DomainIdx<lowDimDomainId>;
using BulkIdType = typename MDTraits::template SubDomain<bulkDomainId>::Index;
using LowDimIdType = typename MDTraits::template SubDomain<lowDimDomainId>::Index;
static constexpr auto bulkId = BulkIdType();
static constexpr auto lowDimId = LowDimIdType();
// the sub-domain type tags
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
// further types specific to the sub-problems
template<std::size_t id> using PrimaryVariables = GetPropType<SubDomainTypeTag<id>, Properties::PrimaryVariables>;
......
......@@ -90,7 +90,7 @@ template< class MDTraits,
class CouplingMapper,
std::size_t bulkDomainId = 0,
std::size_t lowDimDomainId = 1,
DiscretizationMethod bulkDM = GetPropType<typename MDTraits::template SubDomainTypeTag<bulkDomainId>, Properties::FVGridGeometry>::discMethod >
DiscretizationMethod bulkDM = GetPropType<typename MDTraits::template SubDomain<bulkDomainId>::TypeTag, Properties::FVGridGeometry>::discMethod >
class FacetCouplingManager;
/*!
......@@ -119,15 +119,15 @@ class FacetCouplingThreeDomainManager
using FacetEdgeManager = FacetCouplingManager<MDTraits, CouplingMapper, facetDomainId, edgeDomainId>;
// convenience aliases and instances of the domain ids
using BulkIdType = typename MDTraits::template DomainIdx<bulkDomainId>;
using FacetIdType = typename MDTraits::template DomainIdx<facetDomainId>;
using EdgeIdType = typename MDTraits::template DomainIdx<edgeDomainId>;
using BulkIdType = typename MDTraits::template SubDomain<bulkDomainId>::Index;
using FacetIdType = typename MDTraits::template SubDomain<facetDomainId>::Index;
using EdgeIdType = typename MDTraits::template SubDomain<edgeDomainId>::Index;
static constexpr auto bulkId = BulkIdType();
static constexpr auto facetId = FacetIdType();
static constexpr auto edgeId = EdgeIdType();
// the sub-domain type tags
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
// further types specific to the sub-problems
template<std::size_t id> using LocalResidual = GetPropType<SubDomainTypeTag<id>, Properties::LocalResidual>;
......
......@@ -58,18 +58,25 @@ template<class MDTraits, class CMType, DiffMethod diffMethod, bool useImplicitAs
class MultiDomainFVAssembler
{
template<std::size_t id>
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
public:
using Traits = MDTraits;
using Scalar = typename MDTraits::Scalar;
//! TODO get rid of this GetPropType
template<std::size_t id>
using LocalResidual = GetPropType<SubDomainTypeTag<id>, Properties::LocalResidual>;
template<std::size_t id>
using GridVariables = typename std::tuple_element_t<id, typename MDTraits::GridVariablesTuple>::element_type;
using GridVariables = typename MDTraits::template SubDomain<id>::GridVariables;
template<std::size_t id>
using FVGridGeometry = typename MDTraits::template SubDomain<id>::FVGridGeometry;
template<std::size_t id>
using Problem = typename MDTraits::template SubDomain<id>::Problem;
using JacobianMatrix = typename MDTraits::JacobianMatrix;
using SolutionVector = typename MDTraits::SolutionVector;
......@@ -85,9 +92,9 @@ public:
private:
using ProblemTuple = typename MDTraits::ProblemTuple;
using FVGridGeometryTuple = typename MDTraits::FVGridGeometryTuple;
using GridVariablesTuple = typename MDTraits::GridVariablesTuple;
using ProblemTuple = typename MDTraits::template TupleOfSharedPtrConst<Problem>;
using FVGridGeometryTuple = typename MDTraits::template TupleOfSharedPtrConst<FVGridGeometry>;
using GridVariablesTuple = typename MDTraits::template TupleOfSharedPtr<GridVariables>;
using TimeLoop = TimeLoopBase<Scalar>;
using ThisType = MultiDomainFVAssembler<MDTraits, CouplingManager, diffMethod, isImplicit()>;
......@@ -119,9 +126,6 @@ private:
using type = SubDomainStaggeredLocalAssembler<id, SubDomainTypeTag<id>, ThisType, diffMethod, isImplicit()>;
};
template<std::size_t id>
using FVGridGeometry = typename std::tuple_element<id, FVGridGeometryTuple>::type::element_type;
template<std::size_t id>
using SubDomainAssembler = typename SubDomainAssemblerType<FVGridGeometry<id>::discMethod, id>::type;
......
......@@ -60,7 +60,7 @@ class MultiDomainNewtonSolver: public NewtonSolver<Assembler, LinearSolver, Reas
template<std::size_t i>
using PrivarSwitchPtr = std::unique_ptr<PrimaryVariableSwitch<i>>;
using PriVarSwitchPtrTuple = typename Assembler::Traits::template MakeTuple<PrivarSwitchPtr>;
using PriVarSwitchPtrTuple = typename Assembler::Traits::template Tuple<PrivarSwitchPtr>;
public:
......
......@@ -42,12 +42,12 @@ class StaggeredCouplingManagerBase: public CouplingManager<MDTraits>
{
using ParentType = CouplingManager<MDTraits>;
template<std::size_t id>
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
using StaggeredSubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<0>;
using StaggeredSubDomainTypeTag = typename MDTraits::template SubDomain<0>::TypeTag;
template<std::size_t id> using FVGridGeometry = typename std::tuple_element_t<id, typename MDTraits::FVGridGeometryTuple>::element_type;
template<std::size_t id> using FVGridGeometry = typename MDTraits::template SubDomain<id>::FVGridGeometry;
template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView;
using FVElementGeometry = typename FVGridGeometry<0>::LocalView;
......@@ -205,8 +205,8 @@ public:
decltype(auto) numericEpsilon(Dune::index_constant<i>,
const std::string& paramGroup) const
{
constexpr std::size_t numEqCellCenter = Traits::template PrimaryVariables<cellCenterIdx>::dimension;
constexpr std::size_t numEqFace = Traits::template PrimaryVariables<faceIdx>::dimension;
constexpr std::size_t numEqCellCenter = Traits::template SubDomain<cellCenterIdx>::PrimaryVariables::dimension;
constexpr std::size_t numEqFace = Traits::template SubDomain<faceIdx>::PrimaryVariables::dimension;
constexpr bool isCellCenter = FVGridGeometry<i>::isCellCenter();
constexpr std::size_t numEq = isCellCenter ? numEqCellCenter : numEqFace;
constexpr auto prefix = isCellCenter ? "CellCenter" : "Face";
......
......@@ -43,6 +43,92 @@
#include "traits.hh"
namespace Dumux {
namespace Detail {
namespace Staggered {
//////////////////////////////////////////////////////////
template<template<std::size_t> class SubDomainTypeTag, std::size_t i>
struct SubDomainFVGridGeometryImpl
{ using type = GetPropType<SubDomainTypeTag<i>, Properties::FVGridGeometry>; };
template<template<std::size_t> class SubDomainTypeTag>
struct SubDomainFVGridGeometryImpl<SubDomainTypeTag, 0>
{ using type = typename GetPropType<SubDomainTypeTag<0>, Properties::FVGridGeometry>::CellCenterFVGridGeometryType; };
template<template<std::size_t> class SubDomainTypeTag>
struct SubDomainFVGridGeometryImpl<SubDomainTypeTag, 1>
{ using type = typename GetPropType<SubDomainTypeTag<0>, Properties::FVGridGeometry>::FaceFVGridGeometryType; };
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
template<template<std::size_t> class SubDomainTypeTag, std::size_t i>
struct SubDomainGridVariablesImpl
{ using type = GetPropType<SubDomainTypeTag<i>, Properties::GridVariables>; };
template<template<std::size_t> class SubDomainTypeTag>
struct SubDomainGridVariablesImpl<SubDomainTypeTag, 0>
{ using type = typename GetPropType<SubDomainTypeTag<0>, Properties::GridVariables>::CellCenterGridVariablesType; };
template<template<std::size_t> class SubDomainTypeTag>
struct SubDomainGridVariablesImpl<SubDomainTypeTag, 1>
{ using type = typename GetPropType<SubDomainTypeTag<0>, Properties::GridVariables>::FaceGridVariablesType; };
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
template<template<std::size_t> class SubDomainTypeTag, std::size_t i>
struct SubDomainPrimaryVariablesImpl
{ using type = GetPropType<SubDomainTypeTag<i>, Properties::PrimaryVariables>; };
template<template<std::size_t> class SubDomainTypeTag>