12#ifndef DUMUX_DISCRETIZATION_CCMPFA_ELEMENT_FLUXVARSCACHE_HH
13#define DUMUX_DISCRETIZATION_CCMPFA_ELEMENT_FLUXVARSCACHE_HH
21#include <dune/common/exceptions.hh>
29template<
class PrimaryIV,
class PrimaryIVDataHandle,
30 class SecondaryIV,
class SecondaryIVDataHandle>
49template<
class GFVC,
bool cachingEnabled>
72 static constexpr bool cachingEnabled =
true;
79 using FluxVariablesCacheFiller =
typename GFVC::Traits::FluxVariablesCacheFiller;
82 class BoundaryCacheData
89 template<
class SubControlVolumeFace>
91 {
return fluxVarCaches_[getLocalIdx_(scvf.index())]; }
93 template<
class SubControlVolumeFace>
95 {
return fluxVarCaches_[getLocalIdx_(scvf.index())]; }
100 fluxVarCaches_.clear();
101 cacheScvfIndices_.clear();
102 ivDataStorage_.primaryInteractionVolumes.clear();
103 ivDataStorage_.secondaryInteractionVolumes.clear();
104 ivDataStorage_.primaryDataHandles.clear();
105 ivDataStorage_.secondaryDataHandles.clear();
110 int getLocalIdx_(
const int scvfIdx)
const
112 auto it = std::find(cacheScvfIndices_.begin(), cacheScvfIndices_.end(), scvfIdx);
113 assert(it != cacheScvfIndices_.end() &&
"Could not find the local idx for the given scvf idx!");
117 std::vector<std::size_t> cacheScvfIndices_;
118 std::vector<FluxVariablesCache> fluxVarCaches_;
125 IVDataStorage ivDataStorage_;
131 : gridFluxVarsCachePtr_(&global)
139 template<
class FVElementGeometry,
class ElementVolumeVariables>
141 const FVElementGeometry& fvGeometry,
142 const ElementVolumeVariables& elemVolVars) &&
144 this->bindElement_(element, fvGeometry, elemVolVars);
145 return std::move(*
this);
149 template<
class FVElementGeometry,
class ElementVolumeVariables>
150 void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
151 const FVElementGeometry& fvGeometry,
152 const ElementVolumeVariables& elemVolVars) &
153 { this->bindElement_(element, fvGeometry, elemVolVars); }
160 template<
class FVElementGeometry,
class ElementVolumeVariables>
162 const FVElementGeometry& fvGeometry,
163 const ElementVolumeVariables& elemVolVars) &&
165 this->bind_(element, fvGeometry, elemVolVars);
166 return std::move(*
this);
170 template<
class FVElementGeometry,
class ElementVolumeVariables>
171 void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
172 const FVElementGeometry& fvGeometry,
173 const ElementVolumeVariables& elemVolVars) &
174 { this->bind_(element, fvGeometry, elemVolVars); }
181 template<
class FVElementGeometry,
class ElementVolumeVariables>
183 const FVElementGeometry& fvGeometry,
184 const ElementVolumeVariables& elemVolVars,
185 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
187 this->bindScvf_(element, fvGeometry, elemVolVars, scvf);
188 return std::move(*
this);
192 template<
class FVElementGeometry,
class ElementVolumeVariables>
193 void bindScvf(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
194 const FVElementGeometry& fvGeometry,
195 const ElementVolumeVariables& elemVolVars,
196 const typename FVElementGeometry::SubControlVolumeFace& scvf) &
197 { this->bindScvf_(element, fvGeometry, elemVolVars, scvf); }
200 template<
class FVElementGeometry,
class ElementVolumeVariables>
201 void update(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
202 const FVElementGeometry& fvGeometry,
203 const ElementVolumeVariables& elemVolVars)
206 if (FluxVariablesCacheFiller::isSolDependent)
209 FluxVariablesCacheFiller filler(gridFluxVarsCachePtr_->problem());
212 for (
auto& cache : boundaryCacheData_.fluxVarCaches_)
213 cache.setUpdateStatus(
false);
216 for (
auto scvfIdx : boundaryCacheData_.cacheScvfIndices_)
218 const auto& scvf = fvGeometry.scvf(scvfIdx);
219 auto& scvfCache = boundaryCacheData_[scvf];
220 if (!scvfCache.isUpdated())
221 filler.fill(boundaryCacheData_, scvfCache, boundaryCacheData_.ivDataStorage_,
222 fvGeometry, elemVolVars, scvf);
228 template<
class SubControlVolumeFace>
230 {
return !isEmbeddedInBoundaryIV_(scvf) ? (*gridFluxVarsCachePtr_)[scvf] : boundaryCacheData_[scvf]; }
233 template<
class SubControlVolumeFace>
236 return isEmbeddedInBoundaryIV_(scvf)
237 ? boundaryCacheData_.ivDataStorage_.primaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]
238 : gridFluxVarsCachePtr_->primaryInteractionVolume(scvf);
242 template<
class SubControlVolumeFace>
245 return isEmbeddedInBoundaryIV_(scvf)
246 ? boundaryCacheData_.ivDataStorage_.primaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]
247 : gridFluxVarsCachePtr_->primaryDataHandle(scvf);
251 template<
class SubControlVolumeFace>
254 return isEmbeddedInBoundaryIV_(scvf)
255 ? boundaryCacheData_.ivDataStorage_.secondaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]
256 : gridFluxVarsCachePtr_->secondaryInteractionVolume(scvf);
260 template<
class SubControlVolumeFace>
263 return isEmbeddedInBoundaryIV_(scvf)
264 ? boundaryCacheData_.ivDataStorage_.secondaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]
265 : gridFluxVarsCachePtr_->secondaryDataHandle(scvf);
270 {
return *gridFluxVarsCachePtr_; }
276 template<
class FVElementGeometry,
class ElementVolumeVariables>
277 void bindElement_(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
278 const FVElementGeometry& fvGeometry,
279 const ElementVolumeVariables& elemVolVars)
280 { DUNE_THROW(Dune::NotImplemented,
"Local element binding of the flux variables cache in mpfa schemes"); }
283 template<
class FVElementGeometry,
class ElementVolumeVariables>
284 void bind_(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
285 const FVElementGeometry& fvGeometry,
286 const ElementVolumeVariables& elemVolVars)
288 boundaryCacheData_.clear();
291 std::size_t numPrimaryIv; numPrimaryIv = 0;
292 std::size_t numSecondaryIv; numSecondaryIv = 0;
293 std::size_t numCaches; numCaches = 0;
295 const auto& gridGeometry = fvGeometry.gridGeometry();
296 const auto& gridIvIndexSets = gridGeometry.gridInteractionVolumeIndexSets();
299 auto scvfHandled = [&] (
auto idx)
301 return std::find(boundaryCacheData_.cacheScvfIndices_.begin(),
302 boundaryCacheData_.cacheScvfIndices_.end(),
303 idx) != boundaryCacheData_.cacheScvfIndices_.end();
307 auto handleScvf = [&] (
const auto& scvf,
const auto& indexSet,
bool isSecondary)
309 const auto& scvfIndices = indexSet.gridScvfIndices();
310 if ( indexSet.nodalIndexSet().numBoundaryScvfs() > 0
311 && !std::any_of(scvfIndices.begin(), scvfIndices.end(), scvfHandled) )
313 boundaryCacheData_.cacheScvfIndices_.insert(boundaryCacheData_.cacheScvfIndices_.end(),
316 numCaches += scvfIndices.size();
317 if (isSecondary) numSecondaryIv++;
323 for (
const auto& scvf : scvfs(fvGeometry))
324 gridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex()) ?
325 handleScvf(scvf, gridIvIndexSets.secondaryIndexSet(scvf),
true) :
326 handleScvf(scvf, gridIvIndexSets.primaryIndexSet(scvf),
false) ;
331 const auto& assemblyMapI = gridGeometry.connectivityMap()[gridGeometry.elementMapper().index(element)];
333 for (
const auto& dataJ : assemblyMapI)
335 for (
const auto& scvfJIdx : dataJ.scvfsJ)
337 const auto& scvfJ = fvGeometry.scvf(scvfJIdx);
338 if (gridGeometry.vertexUsesSecondaryInteractionVolume(scvfJ.vertexIndex()))
339 handleScvf(scvfJ, gridIvIndexSets.secondaryIndexSet(scvfJ),
true);
341 handleScvf(scvfJ, gridIvIndexSets.primaryIndexSet(scvfJ),
false);
346 boundaryCacheData_.ivDataStorage_.primaryInteractionVolumes.reserve(numPrimaryIv);
347 boundaryCacheData_.ivDataStorage_.secondaryInteractionVolumes.reserve(numSecondaryIv);
348 boundaryCacheData_.ivDataStorage_.primaryDataHandles.reserve(numPrimaryIv);
349 boundaryCacheData_.ivDataStorage_.secondaryDataHandles.reserve(numSecondaryIv);
351 boundaryCacheData_.fluxVarCaches_.resize(numCaches);
352 for (
auto& cache : boundaryCacheData_.fluxVarCaches_)
353 cache.setUpdateStatus(
false);
355 FluxVariablesCacheFiller filler(gridFluxVarsCachePtr_->problem());
356 for (
auto scvfIdx : boundaryCacheData_.cacheScvfIndices_)
358 const auto& scvf = fvGeometry.scvf(scvfIdx);
359 auto& cache = boundaryCacheData_[scvf];
360 if (!cache.isUpdated())
361 filler.fill(boundaryCacheData_, cache, boundaryCacheData_.ivDataStorage_,
362 fvGeometry, elemVolVars, scvf,
true);
368 template<
class FVElementGeometry,
class ElementVolumeVariables>
369 void bindScvf_(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
370 const FVElementGeometry& fvGeometry,
371 const ElementVolumeVariables& elemVolVars,
372 const typename FVElementGeometry::SubControlVolumeFace& scvf)
373 { DUNE_THROW(Dune::NotImplemented,
"Scvf-local binding of the flux variables cache in mpfa schemes"); }
376 template<
class SubControlVolumeFace>
377 bool isEmbeddedInBoundaryIV_(
const SubControlVolumeFace& scvf)
const
379 const auto& gridGeometry = gridFluxVarsCachePtr_->problem().gridGeometry();
380 const auto& gridIvIndexSets = gridGeometry.gridInteractionVolumeIndexSets();
381 if (gridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex()))
382 return gridIvIndexSets.secondaryIndexSet(scvf).nodalIndexSet().numBoundaryScvfs() > 0;
384 return gridIvIndexSets.primaryIndexSet(scvf).nodalIndexSet().numBoundaryScvfs() > 0;
387 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
392 BoundaryCacheData boundaryCacheData_;
403 using FluxVariablesCacheFiller =
typename GFVC::Traits::FluxVariablesCacheFiller;
419 static constexpr bool cachingEnabled =
false;
425 : gridFluxVarsCachePtr_(&global) {}
432 template<
class FVElementGeometry,
class ElementVolumeVariables>
433 void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
434 const FVElementGeometry& fvGeometry,
435 const ElementVolumeVariables& elemVolVars) &
439 DUNE_THROW(Dune::NotImplemented,
"Local element binding of the flux variables cache in mpfa schemes");
447 template<
class FVElementGeometry,
class ElementVolumeVariables>
449 const FVElementGeometry& fvGeometry,
450 const ElementVolumeVariables& elemVolVars) &&
452 this->bindElement(element, fvGeometry, elemVolVars);
453 return std::move(*
this);
461 template<
class FVElementGeometry,
class ElementVolumeVariables>
462 void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
463 const FVElementGeometry& fvGeometry,
464 const ElementVolumeVariables& elemVolVars) &
469 const auto& problem = gridFluxVarsCache().problem();
470 const auto& gridGeometry = fvGeometry.gridGeometry();
473 const auto& assemblyMapI = gridGeometry.connectivityMap()[gridGeometry.elementMapper().index(element)];
476 unsigned int numNeighborScvfs = 0;
477 for (
const auto& dataJ : assemblyMapI)
478 numNeighborScvfs += dataJ.scvfsJ.size();
479 globalScvfIndices_.resize(fvGeometry.numScvf() + numNeighborScvfs);
483 for (
const auto& scvf : scvfs(fvGeometry))
484 globalScvfIndices_[i++] = scvf.index();
485 for (
const auto& dataJ : assemblyMapI)
486 for (
auto scvfIdx : dataJ.scvfsJ)
487 globalScvfIndices_[i++] = scvfIdx;
494 constexpr auto numIvEstimate = FVElementGeometry::maxNumElementScvfs
495 * GridFluxVariablesCache::Traits::maxLocalElementLevelDifference();
496 ivDataStorage_.primaryInteractionVolumes.reserve(numIvEstimate);
497 ivDataStorage_.secondaryInteractionVolumes.reserve(numIvEstimate);
498 ivDataStorage_.primaryDataHandles.reserve(numIvEstimate);
499 ivDataStorage_.secondaryDataHandles.reserve(numIvEstimate);
502 FluxVariablesCacheFiller filler(problem);
505 fluxVarsCache_.resize(globalScvfIndices_.size());
509 for (
const auto& scvf : scvfs(fvGeometry))
511 auto& scvfCache = fluxVarsCache_[i++];
512 if (!scvfCache.isUpdated())
513 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, scvf,
true);
516 for (
const auto& dataJ : assemblyMapI)
518 for (
const auto scvfIdx : dataJ.scvfsJ)
520 auto& scvfCache = fluxVarsCache_[i++];
521 if (!scvfCache.isUpdated())
522 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx),
true);
532 template<
class FVElementGeometry,
class ElementVolumeVariables>
534 const FVElementGeometry& fvGeometry,
535 const ElementVolumeVariables& elemVolVars) &&
537 this->bind(element, fvGeometry, elemVolVars);
538 return std::move(*
this);
546 template<
class FVElementGeometry,
class ElementVolumeVariables>
547 void bindScvf(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
548 const FVElementGeometry& fvGeometry,
549 const ElementVolumeVariables& elemVolVars,
550 const typename FVElementGeometry::SubControlVolumeFace& scvf) &
554 DUNE_THROW(Dune::NotImplemented,
"Scvf-local binding of the flux variables cache in mpfa schemes");
562 template<
class FVElementGeometry,
class ElementVolumeVariables>
564 const FVElementGeometry& fvGeometry,
565 const ElementVolumeVariables& elemVolVars,
566 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
568 this->bindScvf(element, fvGeometry, elemVolVars, scvf);
569 return std::move(*
this);
576 template<
class FVElementGeometry,
class ElementVolumeVariables>
577 void update(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
578 const FVElementGeometry& fvGeometry,
579 const ElementVolumeVariables& elemVolVars)
583 if (FluxVariablesCacheFiller::isSolDependent)
585 const auto& problem = gridFluxVarsCache().problem();
586 const auto& gridGeometry = fvGeometry.gridGeometry();
587 const auto& assemblyMapI = gridGeometry.connectivityMap()[gridGeometry.elementMapper().index(element)];
590 FluxVariablesCacheFiller filler(problem);
593 for (
auto& cache : fluxVarsCache_)
594 cache.setUpdateStatus(
false);
598 for (
const auto& scvf : scvfs(fvGeometry))
600 auto& scvfCache = fluxVarsCache_[i++];
601 if (!scvfCache.isUpdated())
602 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, scvf);
605 for (
const auto& dataJ : assemblyMapI)
607 for (
const auto scvfIdx : dataJ.scvfsJ)
609 auto& scvfCache = fluxVarsCache_[i++];
610 if (!scvfCache.isUpdated())
611 filler.fill(*
this, scvfCache, ivDataStorage_, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx));
618 template<class SubControlVolumeFace, typename std::enable_if_t<!std::is_integral<SubControlVolumeFace>::value,
int> = 0>
620 {
return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
624 {
return fluxVarsCache_[getLocalScvfIdx_(scvfIdx)]; }
627 template<class SubControlVolumeFace, typename std::enable_if_t<!std::is_integral<SubControlVolumeFace>::value,
int> = 0>
629 {
return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
633 {
return fluxVarsCache_[getLocalScvfIdx_(scvfIdx)]; }
636 template<
class SubControlVolumeFace>
638 {
return ivDataStorage_.primaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]; }
641 template<
class SubControlVolumeFace>
643 {
return ivDataStorage_.primaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]; }
646 template<
class SubControlVolumeFace>
648 {
return ivDataStorage_.secondaryInteractionVolumes[ (*this)[scvf].ivIndexInContainer() ]; }
651 template<
class SubControlVolumeFace>
653 {
return ivDataStorage_.secondaryDataHandles[ (*this)[scvf].ivIndexInContainer() ]; }
657 {
return *gridFluxVarsCachePtr_; }
660 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
665 fluxVarsCache_.clear();
666 globalScvfIndices_.clear();
667 ivDataStorage_.primaryInteractionVolumes.clear();
668 ivDataStorage_.secondaryInteractionVolumes.clear();
669 ivDataStorage_.primaryDataHandles.clear();
670 ivDataStorage_.secondaryDataHandles.clear();
674 unsigned int getLocalScvfIdx_(
const int scvfIdx)
const
676 auto it = std::find(globalScvfIndices_.begin(), globalScvfIndices_.end(), scvfIdx);
677 assert(it != globalScvfIndices_.end() &&
"Could not find the flux vars cache for scvfIdx");
682 std::vector<FluxVariablesCache> fluxVarsCache_;
683 std::vector<std::size_t> globalScvfIndices_;
686 using IVDataStorage = InteractionVolumeDataStorage<PrimaryInteractionVolume,
688 SecondaryInteractionVolume,
689 SecondaryIvDataHandle>;
690 IVDataStorage ivDataStorage_;
const SecondaryInteractionVolume & secondaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:647
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:563
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:642
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:577
const PrimaryInteractionVolume & primaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:637
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:448
typename GFVC::SecondaryIvDataHandle SecondaryIvDataHandle
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:412
typename GFVC::PrimaryIvDataHandle PrimaryIvDataHandle
export the data handle types used
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:411
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:652
typename GFVC::PrimaryInteractionVolume PrimaryInteractionVolume
export the interaction volume types
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:407
const GridFluxVariablesCache & gridFluxVarsCache() const
The global object we are a restriction of.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:656
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:433
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:533
CCMpfaElementFluxVariablesCache(const GridFluxVariablesCache &global)
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:424
typename GFVC::FluxVariablesCache FluxVariablesCache
export the flux variable cache type
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:415
GFVC GridFluxVariablesCache
export the type of the grid flux variables
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:422
typename GFVC::SecondaryInteractionVolume SecondaryInteractionVolume
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:408
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:462
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:547
The flux variables caches for an element with caching enabled.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:58
GFVC GridFluxVariablesCache
export the type of the grid flux variables
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:75
typename GFVC::FluxVariablesCache FluxVariablesCache
export the flux variable cache type
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:69
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:171
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:161
typename GFVC::PrimaryInteractionVolume PrimaryInteractionVolume
export the interaction volume types
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:61
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:193
const GridFluxVariablesCache & gridFluxVarsCache() const
The global object we are a restriction of.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:269
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:243
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:150
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:261
typename GFVC::SecondaryIvDataHandle SecondaryIvDataHandle
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:66
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:140
const SecondaryInteractionVolume & secondaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:252
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:182
const PrimaryInteractionVolume & primaryInteractionVolume(const SubControlVolumeFace &scvf) const
access to the interaction volume an scvf is embedded in
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:234
typename GFVC::PrimaryIvDataHandle PrimaryIvDataHandle
export the data handle types used
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:65
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:201
CCMpfaElementFluxVariablesCache(const GridFluxVariablesCache &global)
The constructor.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:130
typename GFVC::SecondaryInteractionVolume SecondaryInteractionVolume
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:62
The flux variables caches for an element.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:50
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:282
Structure to store interaction volumes and data handles.
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:32
std::vector< PrimaryIVDataHandle > primaryDataHandles
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:36
std::vector< SecondaryIV > secondaryInteractionVolumes
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:34
std::vector< PrimaryIV > primaryInteractionVolumes
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:33
std::vector< SecondaryIVDataHandle > secondaryDataHandles
Definition: discretization/cellcentered/mpfa/elementfluxvariablescache.hh:37