Skip to content
Snippets Groups Projects
Commit 7d37258b authored by Timo Koch's avatar Timo Koch
Browse files

[staggered][bugfix] Reinitialize maps in update

If update is called twice the connectivity map is wrong sinnce
we push additional entries in there, i.e. each node in the stencil
will appear twice.

This makes sure all vectors are correctly reinitalized in every update
parent 12961567
No related branches found
No related tags found
1 merge request!2815[gridgeometry][bugfix] Reinitialize maps in update
Pipeline #8192 canceled
+1
......@@ -63,10 +63,12 @@ public:
const auto numDofsCC = gridGeometry.gridView().size(0);
const auto numDofsFace = gridGeometry.gridView().size(1);
const auto numBoundaryFacets = gridGeometry.numBoundaryScvf();
cellCenterToCellCenterMap_.resize(numDofsCC);
cellCenterToFaceMap_.resize(numDofsCC);
faceToCellCenterMap_.resize(2*numDofsFace - numBoundaryFacets);
faceToFaceMap_.resize(2*numDofsFace - numBoundaryFacets);
// reinitialize maps
cellCenterToCellCenterMap_ = Map(numDofsCC);
cellCenterToFaceMap_ = Map(numDofsCC);
faceToCellCenterMap_ = Map(2*numDofsFace - numBoundaryFacets);
faceToFaceMap_ = Map(2*numDofsFace - numBoundaryFacets);
// restrict the FvGeometry locally
auto fvGeometry = localView(gridGeometry);
......
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