Skip to content
Snippets Groups Projects
Commit 7575218b authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[compositional][privarSwitch] Always update volVars in case of caching

* The check for visited was too early
parent 452489ff
No related branches found
No related tags found
Loading
...@@ -139,20 +139,21 @@ public: ...@@ -139,20 +139,21 @@ public:
for (auto&& scv : scvs(fvGeometry)) for (auto&& scv : scvs(fvGeometry))
{ {
// Update volVars on which grounds we decide
// if we need to switch the primary variables
auto&& volVars = curGlobalVolVars.volVars(eIdx, scv.indexInElement());
volVars.update(curElemSol, problem, element, scv);
auto dofIdxGlobal = scv.dofIndex(); auto dofIdxGlobal = scv.dofIndex();
if (!visited_[dofIdxGlobal]) if (!visited_[dofIdxGlobal])
{ {
// Note this implies that volume variables don't differ // Note this implies that volume variables don't differ
// in any sub control volume associated with the dof! // in any sub control volume associated with the dof!
visited_[dofIdxGlobal] = true; visited_[dofIdxGlobal] = true;
// Compute temporary volVars on which grounds we decide
// if we need to switch the primary variables
auto&& volVars = curGlobalVolVars.volVars(eIdx, scv.indexInElement());
volVars.update(curElemSol, problem, element, scv);
if (asImp_().update_(curSol[dofIdxGlobal], volVars, dofIdxGlobal, scv.dofPosition())) if (asImp_().update_(curSol[dofIdxGlobal], volVars, dofIdxGlobal, scv.dofPosition()))
switched = true; switched = true;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment