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

[staggered][localAssembler] Bugfix in calculation of residual

* take the full residual vector, not just its first component
parent daa99760
No related branches found
No related tags found
3 merge requests!617[WIP] Next,!576Feature/port staggered ff to next next,!571Cleanup/next
...@@ -139,11 +139,10 @@ public: ...@@ -139,11 +139,10 @@ public:
prevElemeFaceVars, prevElemeFaceVars,
curElemeFaceVars, curElemeFaceVars,
elemBcTypes, elemBcTypes,
elemFluxVarsCache)[0]; elemFluxVarsCache);
// treat the local residua of the face dofs: // treat the local residua of the face dofs:
// create a cache to reuse some results for the calculation of the derivatives // create a cache to reuse some results for the calculation of the derivatives
FaceSolutionVector faceResidualCache; FaceSolutionVector faceResidualCache;
faceResidualCache.resize(fvGeometry.numScvf()); faceResidualCache.resize(fvGeometry.numScvf());
faceResidualCache = 0.0; faceResidualCache = 0.0;
...@@ -159,7 +158,7 @@ public: ...@@ -159,7 +158,7 @@ public:
prevElemeFaceVars, prevElemeFaceVars,
curElemeFaceVars, curElemeFaceVars,
elemBcTypes, elemBcTypes,
elemFluxVarsCache)[0]; elemFluxVarsCache);
res[faceIdx][scvf.dofIndex()] += faceResidualCache[scvf.localFaceIdx()] ; res[faceIdx][scvf.dofIndex()] += faceResidualCache[scvf.localFaceIdx()] ;
} }
...@@ -179,9 +178,6 @@ public: ...@@ -179,9 +178,6 @@ public:
res[cellCenterIdx][cellCenterGlobalI], res[cellCenterIdx][cellCenterGlobalI],
faceResidualCache); faceResidualCache);
} }
/*! /*!
......
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