13#ifndef DUMUX_MD_FREEFLOW_POROUSMEDIUM_INDEX_HELPER_HH
14#define DUMUX_MD_FREEFLOW_POROUSMEDIUM_INDEX_HELPER_HH
16#include <dune/common/indices.hh>
29template<std::
size_t freeFlowIdx, std::
size_t porousMediumIndex,
class FFFS,
bool hasAdapter>
40template<std::
size_t freeFlowIdx, std::
size_t porousMediumIndex,
class FFFS>
41struct IndexHelper<freeFlowIdx, porousMediumIndex, FFFS, false>
46 template<std::
size_t i>
47 static constexpr auto couplingPhaseIdx(Dune::index_constant<i>,
int coupledPhaseIdx = 0)
48 {
return coupledPhaseIdx; }
53 template<std::
size_t i>
54 static constexpr auto couplingCompIdx(Dune::index_constant<i>,
int coupledCompdIdx)
55 {
return coupledCompdIdx; }
66template<std::
size_t freeFlowIdx, std::
size_t porousMediumIndex,
class FFFS>
72 static constexpr int couplingPhaseIdx(Dune::index_constant<freeFlowIdx>,
int coupledPhaseIdx = 0)
78 static constexpr auto couplingPhaseIdx(Dune::index_constant<porousMediumIndex>,
int coupledPhaseIdx = 0)
79 {
return FFFS::multiphaseFluidsystemPhaseIdx; }
84 static constexpr auto couplingCompIdx(Dune::index_constant<freeFlowIdx>,
int coupledCompIdx)
85 {
return coupledCompIdx; }
90 static constexpr auto couplingCompIdx(Dune::index_constant<porousMediumIndex>,
int coupledCompIdx)
91 {
return FFFS::compIdx(coupledCompIdx); }
Definition: indexhelper.hh:18
static constexpr auto couplingPhaseIdx(Dune::index_constant< i >, int coupledPhaseIdx=0)
No adapter is used, just return the input index.
Definition: indexhelper.hh:47
static constexpr auto couplingCompIdx(Dune::index_constant< i >, int coupledCompdIdx)
No adapter is used, just return the input index.
Definition: indexhelper.hh:54
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:84
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:78
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:90
static constexpr int couplingPhaseIdx(Dune::index_constant< freeFlowIdx >, int coupledPhaseIdx=0)
The free-flow model always uses phase index 0.
Definition: indexhelper.hh:72
Helper struct to choose the correct index for phases and components. This is need if the porous-mediu...
Definition: indexhelper.hh:30