Commit 96e67973 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

allow for solution dependent fluxes when using global caching

this commit furthermore introduces that the problem is given to the global containers
for volume variables and flux variables in the constructor.
parent bc57df8b
...@@ -62,6 +62,8 @@ class CCLocalAssembler<TypeTag, ...@@ -62,6 +62,8 @@ class CCLocalAssembler<TypeTag,
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
static constexpr bool enableGlobalFluxVarsCache = GET_PROP_VALUE(TypeTag, EnableGlobalFluxVariablesCache);
public: public:
/*! /*!
...@@ -331,7 +333,10 @@ private: ...@@ -331,7 +333,10 @@ private:
// update the volume variables and the flux var cache // update the volume variables and the flux var cache
curVolVars.update(elemSol, problem, element, scv); curVolVars.update(elemSol, problem, element, scv);
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars); if (enableGlobalFluxVarsCache)
gridVariables.gridFluxVarsCache().updateElement(element, fvGeometry, curElemVolVars);
else
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars);
// calculate the residual with the deflected primary variables // calculate the residual with the deflected primary variables
if (!isGhost) if (!isGhost)
...@@ -390,7 +395,10 @@ private: ...@@ -390,7 +395,10 @@ private:
// update the volume variables and the flux var cache // update the volume variables and the flux var cache
curVolVars.update(elemSol, problem, element, scv); curVolVars.update(elemSol, problem, element, scv);
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars); if (enableGlobalFluxVarsCache)
gridVariables.gridFluxVarsCache().updateElement(element, fvGeometry, curElemVolVars);
else
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars);
// calculate the residual with the deflected primary variables and subtract it // calculate the residual with the deflected primary variables and subtract it
if (!isGhost) if (!isGhost)
...@@ -861,7 +869,6 @@ private: ...@@ -861,7 +869,6 @@ private:
// update the volume variables and the flux var cache // update the volume variables and the flux var cache
curVolVars.update(elemSol, problem, element, scv); curVolVars.update(elemSol, problem, element, scv);
elemFluxVarsCache.update(element, fvGeometry, curElemVolVars);
// calculate the residual with the deflected primary variables and subtract it // calculate the residual with the deflected primary variables and subtract it
if (!isGhost) if (!isGhost)
......
...@@ -58,27 +58,31 @@ class BoxGlobalFluxVariablesCache<TypeTag, true> ...@@ -58,27 +58,31 @@ class BoxGlobalFluxVariablesCache<TypeTag, true>
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
public: public:
void update(const Problem& problem, BoxGlobalFluxVariablesCache(const Problem& problem) : problemPtr_(&problem) {}
const FVGridGeometry& fvGridGeometry,
void update(const FVGridGeometry& fvGridGeometry,
const GridVolumeVariables& gridVolVars, const GridVolumeVariables& gridVolVars,
const SolutionVector& sol) const SolutionVector& sol,
bool forceUpdate = false)
{ {
problemPtr_ = &problem; // Here, we do not do anything unless it is a forced update
if (forceUpdate)
fluxVarsCache_.resize(fvGridGeometry.gridView().size(0));
for (const auto& element : elements(fvGridGeometry.gridView()))
{ {
auto eIdx = fvGridGeometry.elementMapper().index(element); fluxVarsCache_.resize(fvGridGeometry.gridView().size(0));
// bind the geometries and volume variables to the element (all the elements in stencil) for (const auto& element : elements(fvGridGeometry.gridView()))
auto fvGeometry = localView(fvGridGeometry); {
fvGeometry.bind(element); auto eIdx = fvGridGeometry.elementMapper().index(element);
// bind the geometries and volume variables to the element (all the elements in stencil)
auto elemVolVars = localView(gridVolVars); auto fvGeometry = localView(fvGridGeometry);
elemVolVars.bind(element, fvGeometry, sol); fvGeometry.bind(element);
fluxVarsCache_[eIdx].resize(fvGeometry.numScvf()); auto elemVolVars = localView(gridVolVars);
for (auto&& scvf : scvfs(fvGeometry)) elemVolVars.bind(element, fvGeometry, sol);
cache(eIdx, scvf.index()).update(problem, element, fvGeometry, elemVolVars, scvf);
fluxVarsCache_[eIdx].resize(fvGeometry.numScvf());
for (auto&& scvf : scvfs(fvGeometry))
cache(eIdx, scvf.index()).update(problem(), element, fvGeometry, elemVolVars, scvf);
}
} }
} }
...@@ -128,12 +132,12 @@ class BoxGlobalFluxVariablesCache<TypeTag, false> ...@@ -128,12 +132,12 @@ class BoxGlobalFluxVariablesCache<TypeTag, false>
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
public: public:
BoxGlobalFluxVariablesCache(const Problem& problem) : problemPtr_(&problem) {}
void update(const Problem& problem, void update(const FVGridGeometry& fvGridGeometry,
const FVGridGeometry& fvGridGeometry,
const GridVolumeVariables& gridVolVars, const GridVolumeVariables& gridVolVars,
const SolutionVector& sol) const SolutionVector& sol,
{ problemPtr_ = &problem; } bool forceUpdate = false) {}
/*! /*!
* \brief Return a local restriction of this global object * \brief Return a local restriction of this global object
......
...@@ -56,10 +56,10 @@ class BoxGlobalVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true> ...@@ -56,10 +56,10 @@ class BoxGlobalVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
public: public:
void update(const Problem& problem, const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) BoxGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
{
problemPtr_ = &problem;
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol)
{
volumeVariables_.resize(fvGridGeometry.gridView().size(0)); volumeVariables_.resize(fvGridGeometry.gridView().size(0));
for (const auto& element : elements(fvGridGeometry.gridView())) for (const auto& element : elements(fvGridGeometry.gridView()))
{ {
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
// update the volvars of the element // update the volvars of the element
volumeVariables_[eIdx].resize(fvGeometry.numScv()); volumeVariables_[eIdx].resize(fvGeometry.numScv());
for (auto&& scv : scvs(fvGeometry)) for (auto&& scv : scvs(fvGeometry))
volumeVariables_[eIdx][scv.indexInElement()].update(elemSol, problem, element, scv); volumeVariables_[eIdx][scv.indexInElement()].update(elemSol, problem(), element, scv);
} }
} }
...@@ -115,9 +115,9 @@ class BoxGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false> ...@@ -115,9 +115,9 @@ class BoxGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
public: public:
BoxGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
void update(const Problem& problem, const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) {}
{ problemPtr_ = &problem; }
/*! /*!
* \brief Return a local restriction of this global object * \brief Return a local restriction of this global object
......
...@@ -55,10 +55,10 @@ class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true> ...@@ -55,10 +55,10 @@ class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true>
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
public: public:
void update(const Problem& problem, const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) CCGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
{
problemPtr_ = &problem;
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol)
{
const auto numScv = fvGridGeometry.numScv(); const auto numScv = fvGridGeometry.numScv();
const auto numBoundaryScvf = fvGridGeometry.numBoundaryScvf(); const auto numBoundaryScvf = fvGridGeometry.numBoundaryScvf();
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
for (auto&& scv : scvs(fvGeometry)) for (auto&& scv : scvs(fvGeometry))
{ {
const ElementSolution elemSol({sol[scv.dofIndex()]}); const ElementSolution elemSol({sol[scv.dofIndex()]});
volumeVariables_[scv.dofIndex()].update(elemSol, problem, element, scv); volumeVariables_[scv.dofIndex()].update(elemSol, problem(), element, scv);
} }
// handle the boundary volume variables // handle the boundary volume variables
...@@ -82,15 +82,15 @@ public: ...@@ -82,15 +82,15 @@ public:
continue; continue;
// check if boundary is a pure dirichlet boundary // check if boundary is a pure dirichlet boundary
const auto bcTypes = problem.boundaryTypes(element, scvf); const auto bcTypes = problem().boundaryTypes(element, scvf);
if (bcTypes.hasOnlyDirichlet()) if (bcTypes.hasOnlyDirichlet())
{ {
const auto insideScvIdx = scvf.insideScvIdx(); const auto insideScvIdx = scvf.insideScvIdx();
const auto& insideScv = fvGeometry.scv(insideScvIdx); const auto& insideScv = fvGeometry.scv(insideScvIdx);
const ElementSolution dirichletPriVars({problem.dirichlet(element, scvf)}); const ElementSolution dirichletPriVars({problem().dirichlet(element, scvf)});
volumeVariables_[scvf.outsideScvIdx()].update(dirichletPriVars, volumeVariables_[scvf.outsideScvIdx()].update(dirichletPriVars,
problem, problem(),
element, element,
insideScv); insideScv);
} }
...@@ -132,7 +132,6 @@ public: ...@@ -132,7 +132,6 @@ public:
private: private:
const Problem* problemPtr_; const Problem* problemPtr_;
std::vector<VolumeVariables> volumeVariables_; std::vector<VolumeVariables> volumeVariables_;
}; };
...@@ -147,8 +146,9 @@ class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false> ...@@ -147,8 +146,9 @@ class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
public: public:
void update(const Problem& problem, const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) CCGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
{ problemPtr_ = &problem; }
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) {}
/*! /*!
* \brief Return a local restriction of this global object * \brief Return a local restriction of this global object
...@@ -163,7 +163,6 @@ public: ...@@ -163,7 +163,6 @@ public:
{ return *problemPtr_;} { return *problemPtr_;}
private: private:
const Problem* problemPtr_; const Problem* problemPtr_;
}; };
......
...@@ -82,7 +82,7 @@ public: ...@@ -82,7 +82,7 @@ public:
// access operators in the case of caching // access operators in the case of caching
const FluxVariablesCache& operator [](const SubControlVolumeFace& scvf) const const FluxVariablesCache& operator [](const SubControlVolumeFace& scvf) const
{ return (*globalFluxVarsCachePtr_)[scvf.index()]; } { return (*globalFluxVarsCachePtr_)[scvf]; }
//! The global object we are a restriction of //! The global object we are a restriction of
const GlobalFluxVariablesCache& globalFluxVarsCache() const const GlobalFluxVariablesCache& globalFluxVarsCache() const
...@@ -99,7 +99,8 @@ private: ...@@ -99,7 +99,8 @@ private:
template<class TypeTag> template<class TypeTag>
class CCMpfaElementFluxVariablesCache<TypeTag, false> class CCMpfaElementFluxVariablesCache<TypeTag, false>
{ {
// the flux variables cache filler needs to be friend to fill the matrices // the flux variables cache filler needs to be friend to fill
// the interaction volumes and data handles
friend CCMpfaFluxVariablesCacheFiller<TypeTag>; friend CCMpfaFluxVariablesCacheFiller<TypeTag>;
using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
...@@ -143,14 +144,11 @@ public: ...@@ -143,14 +144,11 @@ public:
clear_(); clear_();
// some references for convenience // some references for convenience
const auto& problem = globalFluxVarsCache().problem_(); const auto& problem = globalFluxVarsCache().problem();
const auto& fvGridGeometry = fvGeometry.fvGridGeometry(); const auto& fvGridGeometry = fvGeometry.fvGridGeometry();
// the global index the cache will be bound to
globalI_ = fvGridGeometry.elementMapper().index(element);
// the assembly map of the given element // the assembly map of the given element
const auto& assemblyMapI = fvGridGeometry.connectivityMap()[globalI_]; const auto& assemblyMapI = fvGridGeometry.connectivityMap()[fvGridGeometry.elementMapper().index(element)];
// reserve memory for scvf index container // reserve memory for scvf index container
unsigned int numNeighborScvfs = 0; unsigned int numNeighborScvfs = 0;
...@@ -186,7 +184,7 @@ public: ...@@ -186,7 +184,7 @@ public:
{ {
auto& scvfCache = fluxVarsCache_[i++]; auto& scvfCache = fluxVarsCache_[i++];
if (!scvfCache.isUpdated()) if (!scvfCache.isUpdated())
filler.fill(*this, scvfCache, element, fvGeometry, elemVolVars, scvf); filler.fill(*this, scvfCache, element, fvGeometry, elemVolVars, scvf, true);
} }
for (const auto& dataJ : assemblyMapI) for (const auto& dataJ : assemblyMapI)
...@@ -196,7 +194,7 @@ public: ...@@ -196,7 +194,7 @@ public:
{ {
auto& scvfCache = fluxVarsCache_[i++]; auto& scvfCache = fluxVarsCache_[i++];
if (!scvfCache.isUpdated()) if (!scvfCache.isUpdated())
filler.fill(*this, scvfCache, elementJ, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx)); filler.fill(*this, scvfCache, elementJ, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx), true);
} }
} }
} }
...@@ -210,24 +208,18 @@ public: ...@@ -210,24 +208,18 @@ public:
DUNE_THROW(Dune::NotImplemented, "Local element binding of the flux variables cache in mpfa schemes"); DUNE_THROW(Dune::NotImplemented, "Local element binding of the flux variables cache in mpfa schemes");
} }
// This function updates the transmissibilities (e.g. after the solution has been deflected) // This function is used to update the transmissibilities if the volume variables have changed
// Results in undefined behaviour if called before bind() or with a different element
void update(const Element& element, void update(const Element& element,
const FVElementGeometry& fvGeometry, const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars) const ElementVolumeVariables& elemVolVars)
{ {
// make sure this is not called for a different element than a previous bind()
assert(globalI_ == fvGeometry.gridFvGeometry().elementMapper().index(element)
&& "The element flux variables cache can only be updated for the element it was bound to");
// ask for solution dependency only once per simulation
static const bool isSolDependent = FluxVariablesCacheFiller::isSolutionDependent();
// update only if transmissibilities are solution-dependent // update only if transmissibilities are solution-dependent
if (isSolDependent) if (FluxVariablesCacheFiller::isSolDependent)
{ {
const auto& problem = globalFluxVarsCache().problem_(); const auto& problem = globalFluxVarsCache().problem();
const auto& fvGridGeometry = fvGeometry.fvGridGeometry(); const auto& fvGridGeometry = fvGeometry.fvGridGeometry();
const auto& assemblyMapI = fvGridGeometry.connectivityMap()[globalI_]; const auto& assemblyMapI = fvGridGeometry.connectivityMap()[fvGridGeometry.elementMapper().index(element)];
// helper class to fill flux variables caches // helper class to fill flux variables caches
FluxVariablesCacheFiller filler(problem); FluxVariablesCacheFiller filler(problem);
...@@ -242,7 +234,7 @@ public: ...@@ -242,7 +234,7 @@ public:
{ {
auto& scvfCache = fluxVarsCache_[i++]; auto& scvfCache = fluxVarsCache_[i++];
if (!scvfCache.isUpdated()) if (!scvfCache.isUpdated())
filler.update(*this, scvfCache, element, fvGeometry, elemVolVars, scvf); filler.fill(*this, scvfCache, element, fvGeometry, elemVolVars, scvf);
} }
for (const auto& dataJ : assemblyMapI) for (const auto& dataJ : assemblyMapI)
...@@ -252,7 +244,7 @@ public: ...@@ -252,7 +244,7 @@ public:
{ {
auto& scvfCache = fluxVarsCache_[i++]; auto& scvfCache = fluxVarsCache_[i++];
if (!scvfCache.isUpdated()) if (!scvfCache.isUpdated())
filler.update(*this, scvfCache, elementJ, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx)); filler.fill(*this, scvfCache, elementJ, fvGeometry, elemVolVars, fvGeometry.scvf(scvfIdx));
} }
} }
} }
...@@ -316,8 +308,6 @@ private: ...@@ -316,8 +308,6 @@ private:
return std::distance(globalScvfIndices_.begin(), it); return std::distance(globalScvfIndices_.begin(), it);
} }
// the global index of the actual bound element
IndexType globalI_;
// the local flux vars caches and the index set // the local flux vars caches and the index set
std::vector<FluxVariablesCache> fluxVarsCache_; std::vector<FluxVariablesCache> fluxVarsCache_;
......
...@@ -65,6 +65,10 @@ class CCMpfaFluxVariablesCacheFiller ...@@ -65,6 +65,10 @@ class CCMpfaFluxVariablesCacheFiller
static constexpr bool soldependentHeatConduction = GET_PROP_VALUE(TypeTag, SolutionDependentHeatConduction); static constexpr bool soldependentHeatConduction = GET_PROP_VALUE(TypeTag, SolutionDependentHeatConduction);
public: public:
static constexpr bool isSolDependent = (doAdvection && soldependentAdvection) ||
(doDiffusion && soldependentDiffusion) ||
(doHeatConduction && soldependentHeatConduction);
//! The constructor. Sets the problem pointer //! The constructor. Sets the problem pointer
CCMpfaFluxVariablesCacheFiller(const Problem& problem) : problemPtr_(&problem) {} CCMpfaFluxVariablesCacheFiller(const Problem& problem) : problemPtr_(&problem) {}
...@@ -77,7 +81,7 @@ public: ...@@ -77,7 +81,7 @@ public:
* \param fvGeometry The finite volume geometry * \param fvGeometry The finite volume geometry
* \param elemVolVars The element volume variables * \param elemVolVars The element volume variables
* \param scvf The corresponding sub-control volume face * \param scvf The corresponding sub-control volume face
* \param doSubCaches Array of bools indicating which sub caches have to be updated * \param forceUpdateAll if true, forces all caches to be updated (even the solution-independent ones)
*/ */
template<class FluxVariablesCacheContainer> template<class FluxVariablesCacheContainer>
void fill(FluxVariablesCacheContainer& fluxVarsCacheContainer, void fill(FluxVariablesCacheContainer& fluxVarsCacheContainer,
...@@ -86,7 +90,7 @@ public: ...@@ -86,7 +90,7 @@ public:
const FVElementGeometry& fvGeometry, const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars, const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf, const SubControlVolumeFace& scvf,
bool isUpdate = false) bool forceUpdateAll = false)
{ {
// Set pointers // Set pointers
elementPtr_ = &element; elementPtr_ = &element;
...@@ -98,7 +102,7 @@ public: ...@@ -98,7 +102,7 @@ public:
const auto& fvGridGeometry = fvGeometry.fvGridGeometry(); const auto& fvGridGeometry = fvGeometry.fvGridGeometry();
if (fvGridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex())) if (fvGridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex()))
{ {
if (!isUpdate) if (forceUpdateAll)
{ {
// the local index of the interaction volume to be created in its container // the local index of the interaction volume to be created in its container
const auto ivIndexInContainer = fluxVarsCacheContainer.secondaryInteractionVolumes_.size(); const auto ivIndexInContainer = fluxVarsCacheContainer.secondaryInteractionVolumes_.size();
...@@ -118,7 +122,7 @@ public: ...@@ -118,7 +122,7 @@ public:
*ivDataHandle_); *ivDataHandle_);
// fill the caches for all the scvfs in the interaction volume // fill the caches for all the scvfs in the interaction volume
fillCachesInInteractionVolume_(fluxVarsCacheContainer, *secondaryIv_, *ivDataHandle_, ivIndexInContainer); fillCachesInInteractionVolume_(fluxVarsCacheContainer, *secondaryIv_, *ivDataHandle_, ivIndexInContainer, true);
} }
else else
{ {
...@@ -127,12 +131,12 @@ public: ...@@ -127,12 +131,12 @@ public:
ivDataHandle_ = &fluxVarsCacheContainer.secondaryIvDataHandles_[ivIndexInContainer]; ivDataHandle_ = &fluxVarsCacheContainer.secondaryIvDataHandles_[ivIndexInContainer];
// fill the caches for all the scvfs in the interaction volume // fill the caches for all the scvfs in the interaction volume
fillCachesInInteractionVolume_(fluxVarsCacheContainer, *secondaryIv_, *ivDataHandle_, ivIndexInContainer, true); fillCachesInInteractionVolume_(fluxVarsCacheContainer, *secondaryIv_, *ivDataHandle_, ivIndexInContainer);
} }
} }
else else
{ {
if (!isUpdate) if (forceUpdateAll)
{ {
// the local index of the interaction volume to be created in its container // the local index of the interaction volume to be created in its container
const auto ivIndexInContainer = fluxVarsCacheContainer.primaryInteractionVolumes_.size(); const auto ivIndexInContainer = fluxVarsCacheContainer.primaryInteractionVolumes_.size();
...@@ -152,7 +156,7 @@ public: ...@@ -152,7 +156,7 @@ public:
*ivDataHandle_); *ivDataHandle_);
// fill the caches for all the scvfs in the interaction volume // fill the caches for all the scvfs in the interaction volume
fillCachesInInteractionVolume_(fluxVarsCacheContainer, *primaryIv_, *ivDataHandle_, ivIndexInContainer); fillCachesInInteractionVolume_(fluxVarsCacheContainer, *primaryIv_, *ivDataHandle_, ivIndexInContainer, true);
} }
else else
{ {
...@@ -161,36 +165,11 @@ public: ...@@ -161,36 +165,11 @@ public:
ivDataHandle_ = &fluxVarsCacheContainer.primaryIvDataHandles_[ivIndexInContainer]; ivDataHandle_ = &fluxVarsCacheContainer.primaryIvDataHandles_[ivIndexInContainer];
// fill the caches for all the scvfs in the interaction volume // fill the caches for all the scvfs in the interaction volume
fillCachesInInteractionVolume_(fluxVarsCacheContainer, *primaryIv_, *ivDataHandle_, ivIndexInContainer, true); fillCachesInInteractionVolume_(fluxVarsCacheContainer, *primaryIv_, *ivDataHandle_, ivIndexInContainer);
} }
} }
} }
/*!
* \brief function to update the flux variables caches during derivative calculation
*
* \copydoc fill
*/
template<class FluxVariablesCacheContainer>
void update(FluxVariablesCacheContainer& fluxVarsCacheContainer,
FluxVariablesCache& scvfFluxVarsCache,
const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf)
{
// forward to fill routine
fill(fluxVarsCacheContainer, scvfFluxVarsCache, element, fvGeometry, elemVolVars, scvf, true);
}
static bool isSolutionDependent()