24#ifndef DUMUX_DISCRETIZATION_CCMPFA_ELEMENT_FLUXVARSCACHE_HH
25#define DUMUX_DISCRETIZATION_CCMPFA_ELEMENT_FLUXVARSCACHE_HH
33#include <dune/common/exceptions.hh>
41template<
class PrimaryIV,
class PrimaryIVDataHandle,
42 class SecondaryIV,
class SecondaryIVDataHandle>
61template<
class GFVC,
bool cachingEnabled>
84 static constexpr bool cachingEnabled =
true;
91 using FluxVariablesCacheFiller =
typename GFVC::Traits::FluxVariablesCacheFiller;
94 class BoundaryCacheData
101 template<
class SubControlVolumeFace>
103 {
return fluxVarCaches_[getLocalIdx_(scvf.index())]; }
105 template<
class SubControlVolumeFace>
107 {
return fluxVarCaches_[getLocalIdx_(scvf.index())]; }
112 fluxVarCaches_.clear();
113 cacheScvfIndices_.clear();
114 ivDataStorage_.primaryInteractionVolumes.clear();
115 ivDataStorage_.secondaryInteractionVolumes.clear();
116 ivDataStorage_.primaryDataHandles.clear();
117 ivDataStorage_.secondaryDataHandles.clear();
122 int getLocalIdx_(
const int scvfIdx)
const
124 auto it = std::find(cacheScvfIndices_.begin(), cacheScvfIndices_.end(), scvfIdx);
125 assert(it != cacheScvfIndices_.end() &&
"Could not find the local idx for the given scvf idx!");
129 std::vector<std::size_t> cacheScvfIndices_;
130 std::vector<FluxVariablesCache> fluxVarCaches_;
137 IVDataStorage ivDataStorage_;
143 : gridFluxVarsCachePtr_(&global)
151 template<
class FVElementGeometry,
class ElementVolumeVariables>
153 const FVElementGeometry& fvGeometry,
154 const ElementVolumeVariables& elemVolVars) &&
156 this->bindElement_(element, fvGeometry, elemVolVars);
157 return std::move(*
this);
161 template<
class FVElementGeometry,
class ElementVolumeVariables>
162 void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
163 const FVElementGeometry& fvGeometry,
164 const ElementVolumeVariables& elemVolVars) &
165 { this->bindElement_(element, fvGeometry, elemVolVars); }
172 template<
class FVElementGeometry,
class ElementVolumeVariables>
174 const FVElementGeometry& fvGeometry,
175 const ElementVolumeVariables& elemVolVars) &&
177 this->bind_(element, fvGeometry, elemVolVars);
178 return std::move(*
this);
182 template<
class FVElementGeometry,
class ElementVolumeVariables>
183 void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
184 const FVElementGeometry& fvGeometry,
185 const ElementVolumeVariables& elemVolVars) &
186 { this->bind_(element, fvGeometry, elemVolVars); }
193 template<
class FVElementGeometry,
class ElementVolumeVariables>
195 const FVElementGeometry& fvGeometry,
196 const ElementVolumeVariables& elemVolVars,
197 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
199 this->bindScvf_(element, fvGeometry, elemVolVars, scvf);
200 return std::move(*
this);
204 template<
class FVElementGeometry,
class ElementVolumeVariables>
205 void bindScvf(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
206 const FVElementGeometry& fvGeometry,
207 const ElementVolumeVariables& elemVolVars,
208 const typename FVElementGeometry::SubControlVolumeFace& scvf) &
209 { this->bindScvf_(element, fvGeometry, elemVolVars, scvf); }
212 template<
class FVElementGeometry,
class ElementVolumeVariables>
213 void update(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
214 const FVElementGeometry& fvGeometry,
215 const ElementVolumeVariables& elemVolVars)
218 if (FluxVariablesCacheFiller::isSolDependent)
221 FluxVariablesCacheFiller filler(gridFluxVarsCachePtr_->problem());
224 for (
auto& cache : boundaryCacheData_.fluxVarCaches_)
225 cache.setUpdateStatus(
false);
228 for (
auto scvfIdx : boundaryCacheData_.cacheScvfIndices_)
230 const auto& scvf = fvGeometry.scvf(scvfIdx);
231 auto& scvfCache = boundaryCacheData_[scvf];
232 if (!scvfCache.isUpdated())
233 filler.fill(boundaryCacheData_, scvfCache, boundaryCacheData_.ivDataStorage_,
234 fvGeometry, elemVolVars, scvf);
240 template<
class SubControlVolumeFace>
242 {
return !isEmbeddedInBoundaryIV_(scvf) ? (*gridFluxVarsCachePtr_)[scvf] : boundaryCacheData_[scvf]; }
245 template<
class SubControlVolumeFace>
248 return isEmbeddedInBoundaryIV_(scvf)
249 ? boundaryCacheData_.ivDataStorage_.primaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]
250 : gridFluxVarsCachePtr_->primaryInteractionVolume(scvf);
254 template<
class SubControlVolumeFace>
257 return isEmbeddedInBoundaryIV_(scvf)
258 ? boundaryCacheData_.ivDataStorage_.primaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]
259 : gridFluxVarsCachePtr_->primaryDataHandle(scvf);
263 template<
class SubControlVolumeFace>
266 return isEmbeddedInBoundaryIV_(scvf)
267 ? boundaryCacheData_.ivDataStorage_.secondaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]
268 : gridFluxVarsCachePtr_->secondaryInteractionVolume(scvf);
272 template<
class SubControlVolumeFace>
275 return isEmbeddedInBoundaryIV_(scvf)
276 ? boundaryCacheData_.ivDataStorage_.secondaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]
277 : gridFluxVarsCachePtr_->secondaryDataHandle(scvf);
282 {
return *gridFluxVarsCachePtr_; }
288 template<
class FVElementGeometry,
class ElementVolumeVariables>
289 void bindElement_(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
290 const FVElementGeometry& fvGeometry,
291 const ElementVolumeVariables& elemVolVars)
292 { DUNE_THROW(Dune::NotImplemented,
"Local element binding of the flux variables cache in mpfa schemes"); }
295 template<
class FVElementGeometry,
class ElementVolumeVariables>
296 void bind_(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
297 const FVElementGeometry& fvGeometry,
298 const ElementVolumeVariables& elemVolVars)
300 boundaryCacheData_.clear();
303 std::size_t numPrimaryIv; numPrimaryIv = 0;
304 std::size_t numSecondaryIv; numSecondaryIv = 0;
305 std::size_t numCaches; numCaches = 0;
307 const auto& gridGeometry = fvGeometry.gridGeometry();
308 const auto& gridIvIndexSets = gridGeometry.gridInteractionVolumeIndexSets();
311 auto scvfHandled = [&] (
auto idx)
313 return std::find(boundaryCacheData_.cacheScvfIndices_.begin(),
314 boundaryCacheData_.cacheScvfIndices_.end(),
315 idx) != boundaryCacheData_.cacheScvfIndices_.end();
319 auto handleScvf = [&] (
const auto& scvf,
const auto& indexSet,
bool isSecondary)
321 const auto& scvfIndices = indexSet.gridScvfIndices();
322 if ( indexSet.nodalIndexSet().numBoundaryScvfs() > 0
323 && !std::any_of(scvfIndices.begin(), scvfIndices.end(), scvfHandled) )
325 boundaryCacheData_.cacheScvfIndices_.insert(boundaryCacheData_.cacheScvfIndices_.end(),
328 numCaches += scvfIndices.size();
329 if (isSecondary) numSecondaryIv++;
335 for (
const auto& scvf : scvfs(fvGeometry))
336 gridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex()) ?
337 handleScvf(scvf, gridIvIndexSets.secondaryIndexSet(scvf),
true) :
338 handleScvf(scvf, gridIvIndexSets.primaryIndexSet(scvf),
false) ;
343 const auto& assemblyMapI = gridGeometry.connectivityMap()[gridGeometry.elementMapper().index(element)];
345 for (
const auto& dataJ : assemblyMapI)
347 for (
const auto& scvfJIdx : dataJ.scvfsJ)
349 const auto& scvfJ = fvGeometry.scvf(scvfJIdx);
350 if (gridGeometry.vertexUsesSecondaryInteractionVolume(scvfJ.vertexIndex()))
351 handleScvf(scvfJ, gridIvIndexSets.secondaryIndexSet(scvfJ),
true);
353 handleScvf(scvfJ, gridIvIndexSets.primaryIndexSet(scvfJ),
false);
358 boundaryCacheData_.ivDataStorage_.primaryInteractionVolumes.reserve(numPrimaryIv);
359 boundaryCacheData_.ivDataStorage_.secondaryInteractionVolumes.reserve(numSecondaryIv);
360 boundaryCacheData_.ivDataStorage_.primaryDataHandles.reserve(numPrimaryIv);
361 boundaryCacheData_.ivDataStorage_.secondaryDataHandles.reserve(numSecondaryIv);
363 boundaryCacheData_.fluxVarCaches_.resize(numCaches);
364 for (
auto& cache : boundaryCacheData_.fluxVarCaches_)
365 cache.setUpdateStatus(
false);
367 FluxVariablesCacheFiller filler(gridFluxVarsCachePtr_->problem());
368 for (
auto scvfIdx : boundaryCacheData_.cacheScvfIndices_)
370 const auto& scvf = fvGeometry.scvf(scvfIdx);
371 auto& cache = boundaryCacheData_[scvf];
372 if (!cache.isUpdated())
373 filler.fill(boundaryCacheData_, cache, boundaryCacheData_.ivDataStorage_,
374 fvGeometry, elemVolVars, scvf,
true);
380 template<
class FVElementGeometry,
class ElementVolumeVariables>
381 void bindScvf_(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
382 const FVElementGeometry& fvGeometry,
383 const ElementVolumeVariables& elemVolVars,
384 const typename FVElementGeometry::SubControlVolumeFace& scvf)
385 { DUNE_THROW(Dune::NotImplemented,
"Scvf-local binding of the flux variables cache in mpfa schemes"); }
388 template<
class SubControlVolumeFace>
389 bool isEmbeddedInBoundaryIV_(
const SubControlVolumeFace& scvf)
const
391 const auto& gridGeometry = gridFluxVarsCachePtr_->problem().gridGeometry();
392 const auto& gridIvIndexSets = gridGeometry.gridInteractionVolumeIndexSets();
393 if (gridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex()))
394 return gridIvIndexSets.secondaryIndexSet(scvf).nodalIndexSet().numBoundaryScvfs() > 0;
396 return gridIvIndexSets.primaryIndexSet(scvf).nodalIndexSet().numBoundaryScvfs() > 0;
399 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
404 BoundaryCacheData boundaryCacheData_;
415 using FluxVariablesCacheFiller =
typename GFVC::Traits::FluxVariablesCacheFiller;
431 static constexpr bool cachingEnabled =
false;
437 : gridFluxVarsCachePtr_(&global) {}
444 template<
class FVElementGeometry,
class ElementVolumeVariables>
445 void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
446 const FVElementGeometry& fvGeometry,
447 const ElementVolumeVariables& elemVolVars) &
451 DUNE_THROW(Dune::NotImplemented,
"Local element binding of the flux variables cache in mpfa schemes");
459 template<
class FVElementGeometry,
class ElementVolumeVariables>
461 const FVElementGeometry& fvGeometry,
462 const ElementVolumeVariables& elemVolVars) &&
464 this->bindElement(element, fvGeometry, elemVolVars);
465 return std::move(*
this);
473 template<
class FVElementGeometry,
class ElementVolumeVariables>
474 void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
475 const FVElementGeometry& fvGeometry,
476 const ElementVolumeVariables& elemVolVars) &
481 const auto& problem = gridFluxVarsCache().problem();
482 const auto& gridGeometry = fvGeometry.gridGeometry();
485 const auto& assemblyMapI = gridGeometry.connectivityMap()[gridGeometry.elementMapper().index(element)];
488 unsigned int numNeighborScvfs = 0;
489 for (
const auto& dataJ : assemblyMapI)
490 numNeighborScvfs += dataJ.scvfsJ.size();
491 globalScvfIndices_.resize(fvGeometry.numScvf() + numNeighborScvfs);
495 for (
const auto& scvf : scvfs(fvGeometry))
496 globalScvfIndices_[i++] = scvf.index();
497 for (
const auto& dataJ : assemblyMapI)
498 for (
auto scvfIdx : dataJ.scvfsJ)
499 globalScvfIndices_[i++] = scvfIdx;
506 constexpr auto numIvEstimate = FVElementGeometry::maxNumElementScvfs
507 * GridFluxVariablesCache::Traits::maxLocalElementLevelDifference();
508 ivDataStorage_.primaryInteractionVolumes.reserve(numIvEstimate);
509 ivDataStorage_.secondaryInteractionVolumes.reserve(numIvEstimate);
510 ivDataStorage_.primaryDataHandles.reserve(numIvEstimate);
511 ivDataStorage_.secondaryDataHandles.reserve(numIvEstimate);
514 FluxVariablesCacheFiller filler(problem);
517 fluxVarsCache_.resize(globalScvfIndices_.size());
521 for (
const auto& scvf : scvfs(fvGeometry))
523 auto& scvfCache = fluxVarsCache_[i++];
524 if (!scvfCache.isUpdated())
525 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, scvf,
true);
528 for (
const auto& dataJ : assemblyMapI)
530 for (
const auto scvfIdx : dataJ.scvfsJ)
532 auto& scvfCache = fluxVarsCache_[i++];
533 if (!scvfCache.isUpdated())
534 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx),
true);
544 template<
class FVElementGeometry,
class ElementVolumeVariables>
546 const FVElementGeometry& fvGeometry,
547 const ElementVolumeVariables& elemVolVars) &&
549 this->bind(element, fvGeometry, elemVolVars);
550 return std::move(*
this);
558 template<
class FVElementGeometry,
class ElementVolumeVariables>
559 void bindScvf(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
560 const FVElementGeometry& fvGeometry,
561 const ElementVolumeVariables& elemVolVars,
562 const typename FVElementGeometry::SubControlVolumeFace& scvf) &
566 DUNE_THROW(Dune::NotImplemented,
"Scvf-local binding of the flux variables cache in mpfa schemes");
574 template<
class FVElementGeometry,
class ElementVolumeVariables>
576 const FVElementGeometry& fvGeometry,
577 const ElementVolumeVariables& elemVolVars,
578 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
580 this->bindScvf(element, fvGeometry, elemVolVars, scvf);
581 return std::move(*
this);
588 template<
class FVElementGeometry,
class ElementVolumeVariables>
589 void update(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
590 const FVElementGeometry& fvGeometry,
591 const ElementVolumeVariables& elemVolVars)
595 if (FluxVariablesCacheFiller::isSolDependent)
597 const auto& problem = gridFluxVarsCache().problem();
598 const auto& gridGeometry = fvGeometry.gridGeometry();
599 const auto& assemblyMapI = gridGeometry.connectivityMap()[gridGeometry.elementMapper().index(element)];
602 FluxVariablesCacheFiller filler(problem);
605 for (
auto& cache : fluxVarsCache_)
606 cache.setUpdateStatus(
false);
610 for (
const auto& scvf : scvfs(fvGeometry))
612 auto& scvfCache = fluxVarsCache_[i++];
613 if (!scvfCache.isUpdated())
614 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, scvf);
617 for (
const auto& dataJ : assemblyMapI)
619 for (
const auto scvfIdx : dataJ.scvfsJ)
621 auto& scvfCache = fluxVarsCache_[i++];
622 if (!scvfCache.isUpdated())
623 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx));
630 template<class SubControlVolumeFace, typename std::enable_if_t<!std::is_integral<SubControlVolumeFace>::value,
int> = 0>
632 {
return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
636 {
return fluxVarsCache_[getLocalScvfIdx_(scvfIdx)]; }
639 template<class SubControlVolumeFace, typename std::enable_if_t<!std::is_integral<SubControlVolumeFace>::value,
int> = 0>
641 {
return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
645 {
return fluxVarsCache_[getLocalScvfIdx_(scvfIdx)]; }
648 template<
class SubControlVolumeFace>
650 {
return ivDataStorage_.primaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]; }
653 template<
class SubControlVolumeFace>
655 {
return ivDataStorage_.primaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]; }
658 template<
class SubControlVolumeFace>
660 {
return ivDataStorage_.secondaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]; }
663 template<
class SubControlVolumeFace>
665 {
return ivDataStorage_.secondaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]; }
669 {
return *gridFluxVarsCachePtr_; }
672 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
677 fluxVarsCache_.clear();
678 globalScvfIndices_.clear();
679 ivDataStorage_.primaryInteractionVolumes.clear();
680 ivDataStorage_.secondaryInteractionVolumes.clear();
681 ivDataStorage_.primaryDataHandles.clear();
682 ivDataStorage_.secondaryDataHandles.clear();
686 unsigned int getLocalScvfIdx_(
const int scvfIdx)
const
688 auto it = std::find(globalScvfIndices_.begin(), globalScvfIndices_.end(), scvfIdx);
689 assert(it != globalScvfIndices_.end() &&
"Could not find the flux vars cache for scvfIdx");
694 std::vector<FluxVariablesCache> fluxVarsCache_;
695 std::vector<std::size_t> globalScvfIndices_;
698 using IVDataStorage = InteractionVolumeDataStorage<PrimaryInteractionVolume,
700 SecondaryInteractionVolume,
701 SecondaryIvDataHandle>;
702 IVDataStorage ivDataStorage_;
static ctype distance(const Dune::FieldVector< ctype, dimWorld > &a, const Dune::FieldVector< ctype, dimWorld > &b)
Compute the shortest distance between two points.
Definition: distance.hh:294
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Structure to store interaction volumes and data handles.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:44
std::vector< PrimaryIVDataHandle > primaryDataHandles
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:48
std::vector< SecondaryIV > secondaryInteractionVolumes
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:46
std::vector< PrimaryIV > primaryInteractionVolumes
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:45
std::vector< SecondaryIVDataHandle > secondaryDataHandles
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:49
The flux variables caches for an element.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:62
The flux variables caches for an element with caching enabled.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:70
GFVC GridFluxVariablesCache
export the type of the grid flux variables
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:87
typename GFVC::FluxVariablesCache FluxVariablesCache
export the flux variable cache type
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:81
void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &
Specialization for the global caching being enabled - do nothing here.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:183
CCMpfaElementFluxVariablesCache 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: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:173
typename GFVC::PrimaryInteractionVolume PrimaryInteractionVolume
export the interaction volume types
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:73
void bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf) &
Specialization for the global caching being enabled - do nothing here.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:205
const GridFluxVariablesCache & gridFluxVarsCache() const
The global object we are a restriction of.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:281
const PrimaryIvDataHandle & primaryDataHandle(const SubControlVolumeFace &scvf) const
access to the data handle of an interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:255
void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &
Specialization for the global caching being enabled - do nothing here.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:162
const SecondaryIvDataHandle & secondaryDataHandle(const SubControlVolumeFace &scvf) const
access to the data handle of an interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:273
typename GFVC::SecondaryIvDataHandle SecondaryIvDataHandle
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:78
CCMpfaElementFluxVariablesCache 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: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:152
const SecondaryInteractionVolume & secondaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:264
CCMpfaElementFluxVariablesCache 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: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:194
const PrimaryInteractionVolume & primaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:246
typename GFVC::PrimaryIvDataHandle PrimaryIvDataHandle
export the data handle types used
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:77
void update(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars)
Specialization for the global caching being enabled - do nothing here.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:213
CCMpfaElementFluxVariablesCache(const GridFluxVariablesCache &global)
The constructor.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:142
typename GFVC::SecondaryInteractionVolume SecondaryInteractionVolume
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:74
const SecondaryInteractionVolume & secondaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:659
CCMpfaElementFluxVariablesCache 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: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:575
const PrimaryIvDataHandle & primaryDataHandle(const SubControlVolumeFace &scvf) const
access to the data handle of an interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:654
void update(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars)
Update the transmissibilities if the volume variables have changed.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:589
const PrimaryInteractionVolume & primaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:649
CCMpfaElementFluxVariablesCache 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: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:460
typename GFVC::SecondaryIvDataHandle SecondaryIvDataHandle
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:424
typename GFVC::PrimaryIvDataHandle PrimaryIvDataHandle
export the data handle types used
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:423
const SecondaryIvDataHandle & secondaryDataHandle(const SubControlVolumeFace &scvf) const
access to the data handle of an interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:664
typename GFVC::PrimaryInteractionVolume PrimaryInteractionVolume
export the interaction volume types
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:419
const GridFluxVariablesCache & gridFluxVarsCache() const
The global object we are a restriction of.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:668
void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &
Prepares the transmissibilities of the scv faces in an element.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:445
CCMpfaElementFluxVariablesCache 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: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:545
CCMpfaElementFluxVariablesCache(const GridFluxVariablesCache &global)
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:436
typename GFVC::FluxVariablesCache FluxVariablesCache
export the flux variable cache type
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:427
GFVC GridFluxVariablesCache
export the type of the grid flux variables
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:434
typename GFVC::SecondaryInteractionVolume SecondaryInteractionVolume
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:420
void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars) &
Prepares the transmissibilities of the scv faces in the stencil of an element.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:474
void bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf) &
Prepares the transmissibilities of a single scv face.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:559