24#ifndef DUMUX_PNM_2P_ELEMNT_FLUXVARSCACHE_HH
25#define DUMUX_PNM_2P_ELEMNT_FLUXVARSCACHE_HH
37template<
class GFVC,
bool cachingEnabled>
49 using ParentType::ParentType;
67 : gridFluxVarsCachePtr_(&global) {}
71 template<
class FVElementGeometry,
class ElementVolumeVariables>
72 void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
73 const FVElementGeometry& fvGeometry,
74 const ElementVolumeVariables& elemVolVars)
76 bindElement(element, fvGeometry, elemVolVars);
79 template<
class FVElementGeometry,
class ElementVolumeVariables>
80 void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
81 const FVElementGeometry& fvGeometry,
82 const ElementVolumeVariables& elemVolVars)
84 for (
auto&& scvf : scvfs(fvGeometry))
85 fluxVarsCache_.update(gridFluxVarsCache().problem(), element, fvGeometry, elemVolVars, scvf, gridFluxVarsCache().invasionState().invaded(element));
88 template<
class FVElementGeometry,
class ElementVolumeVariables>
89 void bindScvf(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
90 const FVElementGeometry& fvGeometry,
91 const ElementVolumeVariables& elemVolVars,
92 const typename FVElementGeometry::SubControlVolumeFace& scvf)
94 fluxVarsCache_.update(gridFluxVarsCache().problem(), element, fvGeometry, elemVolVars, scvf, gridFluxVarsCache().invasionState().invaded(element));
98 template<
class SubControlVolumeFace>
100 {
return fluxVarsCache_; }
103 template<
class SubControlVolumeFace>
105 {
return fluxVarsCache_; }
109 {
return *gridFluxVarsCachePtr_; }
112 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
113 FluxVariablesCache fluxVarsCache_;
Definition: discretization/porenetwork/fvelementgeometry.hh:33
The flux variables caches for an element.
Definition: discretization/box/elementfluxvariablescache.hh:42
The flux variables caches for an element with caching enabled.
Definition: discretization/box/elementfluxvariablescache.hh:50
The flux variables caches for an element.
Definition: porenetwork/2p/elementfluxvariablescache.hh:38
typename GFVC::FluxVariablesCache FluxVariablesCache
export the type of the flux variables cache
Definition: porenetwork/2p/elementfluxvariablescache.hh:64
void bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf)
Definition: porenetwork/2p/elementfluxvariablescache.hh:89
GFVC GridFluxVariablesCache
export the type of the grid flux variables cache
Definition: porenetwork/2p/elementfluxvariablescache.hh:61
void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars)
Definition: porenetwork/2p/elementfluxvariablescache.hh:72
void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars)
Definition: porenetwork/2p/elementfluxvariablescache.hh:80
PNMTwoPElementFluxVariablesCache(const GridFluxVariablesCache &global)
Definition: porenetwork/2p/elementfluxvariablescache.hh:66
const GridFluxVariablesCache & gridFluxVarsCache() const
The global object we are a restriction of.
Definition: porenetwork/2p/elementfluxvariablescache.hh:108
Global flux variable cache.