24#ifndef DUMUX_PNM_2P_ELEMNT_FLUXVARSCACHE_HH
25#define DUMUX_PNM_2P_ELEMNT_FLUXVARSCACHE_HH
39template<
class GFVC,
bool cachingEnabled>
51 using ParentType::ParentType;
69 : gridFluxVarsCachePtr_(&global) {}
73 template<
class FVElementGeometry,
class ElementVolumeVariables>
74 void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
75 const FVElementGeometry& fvGeometry,
76 const ElementVolumeVariables& elemVolVars) &
77 { bindElement(element, fvGeometry, elemVolVars); }
84 template<
class FVElementGeometry,
class ElementVolumeVariables>
86 const FVElementGeometry& fvGeometry,
87 const ElementVolumeVariables& elemVolVars) &&
89 this->bind(element, fvGeometry, elemVolVars);
90 return std::move(*
this);
93 template<
class FVElementGeometry,
class ElementVolumeVariables>
94 void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
95 const FVElementGeometry& fvGeometry,
96 const ElementVolumeVariables& elemVolVars) &
98 for (
auto&& scvf : scvfs(fvGeometry))
99 fluxVarsCache_.update(gridFluxVarsCache().problem(), element, fvGeometry, elemVolVars, scvf, gridFluxVarsCache().invasionState().invaded(element));
107 template<
class FVElementGeometry,
class ElementVolumeVariables>
109 const FVElementGeometry& fvGeometry,
110 const ElementVolumeVariables& elemVolVars) &&
112 this->bindElement(element, fvGeometry, elemVolVars);
113 return std::move(*
this);
116 template<
class FVElementGeometry,
class ElementVolumeVariables>
117 void bindScvf(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
118 const FVElementGeometry& fvGeometry,
119 const ElementVolumeVariables& elemVolVars,
120 const typename FVElementGeometry::SubControlVolumeFace& scvf) &
122 fluxVarsCache_.update(gridFluxVarsCache().problem(), element, fvGeometry, elemVolVars, scvf, gridFluxVarsCache().invasionState().invaded(element));
130 template<
class FVElementGeometry,
class ElementVolumeVariables>
132 const FVElementGeometry& fvGeometry,
133 const ElementVolumeVariables& elemVolVars,
134 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
136 this->bindScvf(element, fvGeometry, elemVolVars, scvf);
137 return std::move(*
this);
141 template<
class SubControlVolumeFace>
143 {
return fluxVarsCache_; }
146 template<
class SubControlVolumeFace>
148 {
return fluxVarsCache_; }
152 {
return *gridFluxVarsCachePtr_; }
155 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
156 FluxVariablesCache fluxVarsCache_;
Definition: discretization/porenetwork/fvelementgeometry.hh:34
The flux variables caches for an element.
Definition: discretization/cvfe/elementfluxvariablescache.hh:43
The flux variables caches for an element with caching enabled.
Definition: discretization/cvfe/elementfluxvariablescache.hh:51
The flux variables caches for an element.
Definition: porenetwork/2p/elementfluxvariablescache.hh:40
void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &
Definition: porenetwork/2p/elementfluxvariablescache.hh:94
typename GFVC::FluxVariablesCache FluxVariablesCache
export the type of the flux variables cache
Definition: porenetwork/2p/elementfluxvariablescache.hh:66
PNMTwoPElementFluxVariablesCache bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition: porenetwork/2p/elementfluxvariablescache.hh:85
GFVC GridFluxVariablesCache
export the type of the grid flux variables cache
Definition: porenetwork/2p/elementfluxvariablescache.hh:63
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:117
PNMTwoPElementFluxVariablesCache bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition: porenetwork/2p/elementfluxvariablescache.hh:131
PNMTwoPElementFluxVariablesCache(const GridFluxVariablesCache &global)
Definition: porenetwork/2p/elementfluxvariablescache.hh:68
PNMTwoPElementFluxVariablesCache bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition: porenetwork/2p/elementfluxvariablescache.hh:108
void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &
Definition: porenetwork/2p/elementfluxvariablescache.hh:74
const GridFluxVariablesCache & gridFluxVarsCache() const
The global object we are a restriction of.
Definition: porenetwork/2p/elementfluxvariablescache.hh:151
Global flux variable cache.