Commit 425f00ca authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[tpfa][elemfluxvarcache] introduce update routine

we introduced an element flux variables cache update in the cclocaljacobian
to make use of the fact that the transmissibilities are potentially not solution
dependent. In that case this process is skipped.
parent 44b3cd61
......@@ -42,6 +42,9 @@ class CCTpfaElementFluxVariablesCache;
template<class TypeTag>
class CCTpfaElementFluxVariablesCache<TypeTag, true>
{
// the local jacobian needs to be able to update the cache during assembly
friend typename GET_PROP_TYPE(TypeTag, LocalJacobian);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using IndexType = typename GridView::IndexSet::IndexType;
......@@ -66,11 +69,6 @@ public:
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars) {}
// Specialization for the global caching being enabled - do nothing here
void update(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars) {}
// Specialization for the global caching being enabled - do nothing here
void bindScvf(const Element& element,
const FVElementGeometry& fvGeometry,
......@@ -87,6 +85,11 @@ public:
private:
const GlobalFluxVariablesCache* globalFluxVarsCachePtr_;
// Specialization for the global caching being enabled - do nothing here
void update(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars) {}
};
/*!
......@@ -96,6 +99,9 @@ private:
template<class TypeTag>
class CCTpfaElementFluxVariablesCache<TypeTag, false>
{
// the local jacobian needs to be able to update the cache during assembly
friend typename GET_PROP_TYPE(TypeTag, LocalJacobian);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using IndexType = typename GridView::IndexSet::IndexType;
......@@ -133,15 +139,6 @@ public:
}
}
// This function updates the transmissibilities after the solution has been deflected during jacobian assembly
void update(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars)
{
if (solDependentParams)
bind(element, fvGeometry, elemVolVars);
}
// This function is called by the CCLocalResidual before flux calculations during assembly.
// Prepares the transmissibilities of the scv faces in the stencil. The FvGeometries are assumed to be bound.
void bind(const Element& element,
......@@ -213,6 +210,15 @@ public:
private:
const GlobalFluxVariablesCache* globalFluxVarsCachePtr_;
// This function updates the transmissibilities after the solution has been deflected during jacobian assembly
void update(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars)
{
if (solDependentParams)
bind(element, fvGeometry, elemVolVars);
}
// get index of scvf in the local container
int getLocalScvfIdx_(const int scvfIdx) const
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment