25#ifndef DUMUX_MD_FREEFLOW_POROUSMEDIUM_INDEX_HELPER_HH
26#define DUMUX_MD_FREEFLOW_POROUSMEDIUM_INDEX_HELPER_HH
28#include <dune/common/indices.hh>
41template<std::
size_t freeFlowIdx, std::
size_t porousMediumIndex,
class FFFS,
bool hasAdapter>
52template<std::
size_t freeFlowIdx, std::
size_t porousMediumIndex,
class FFFS>
58 template<std::
size_t i>
59 static constexpr auto couplingPhaseIdx(Dune::index_constant<i>,
int coupledPhaseIdx = 0)
60 {
return coupledPhaseIdx; }
65 template<std::
size_t i>
66 static constexpr auto couplingCompIdx(Dune::index_constant<i>,
int coupledCompdIdx)
67 {
return coupledCompdIdx; }
78template<std::
size_t freeFlowIdx, std::
size_t porousMediumIndex,
class FFFS>
84 static constexpr int couplingPhaseIdx(Dune::index_constant<freeFlowIdx>,
int coupledPhaseIdx = 0)
90 static constexpr auto couplingPhaseIdx(Dune::index_constant<porousMediumIndex>,
int coupledPhaseIdx = 0)
91 {
return FFFS::multiphaseFluidsystemPhaseIdx; }
96 static constexpr auto couplingCompIdx(Dune::index_constant<freeFlowIdx>,
int coupledCompIdx)
97 {
return coupledCompIdx; }
102 static constexpr auto couplingCompIdx(Dune::index_constant<porousMediumIndex>,
int coupledCompIdx)
103 {
return FFFS::compIdx(coupledCompIdx); }
static constexpr auto porousMediumIndex
Definition: multidomain/boundary/freeflowporousmedium/couplingmanager.hh:47
Definition: indexhelper.hh:30
Helper struct to choose the correct index for phases and components. This is need if the porous-mediu...
Definition: indexhelper.hh:42
static constexpr auto couplingPhaseIdx(Dune::index_constant< i >, int coupledPhaseIdx=0)
No adapter is used, just return the input index.
Definition: indexhelper.hh:59
static constexpr auto couplingCompIdx(Dune::index_constant< i >, int coupledCompdIdx)
No adapter is used, just return the input index.
Definition: indexhelper.hh:66
static constexpr auto couplingCompIdx(Dune::index_constant< freeFlowIdx >, int coupledCompIdx)
The free-flow model does not need any change of the component index.
Definition: indexhelper.hh:96
static constexpr auto couplingPhaseIdx(Dune::index_constant< porousMediumIndex >, int coupledPhaseIdx=0)
The phase index of the porous-medium-flow model is given by the adapter fluidsystem (i....
Definition: indexhelper.hh:90
static constexpr auto couplingCompIdx(Dune::index_constant< porousMediumIndex >, int coupledCompIdx)
The component index of the porous-medium-flow model is mapped by the adapter fluidsystem.
Definition: indexhelper.hh:102
static constexpr int couplingPhaseIdx(Dune::index_constant< freeFlowIdx >, int coupledPhaseIdx=0)
The free-flow model always uses phase index 0.
Definition: indexhelper.hh:84