diff --git a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh index b9969e58190abe0996ba2ee210d8277b7e4e2e81..f29ba01a9175f47102a3947d0e002118d1ae1439 100644 --- a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh @@ -251,11 +251,11 @@ private: scvs_.resize(numScvs); scvfs_.reserve(numScvf); scvfIndicesOfScv_.resize(numScvs); - hasBoundaryScvf_.resize(numScvs, false); + hasBoundaryScvf_.assign(numScvs, false); // Some methods require to use a second type of interaction volume, e.g. // around vertices on the boundary or branching points (surface grids) - secondaryInteractionVolumeVertices_.resize(numVert, false); + secondaryInteractionVolumeVertices_.assign(numVert, false); // find vertices on processor boundaries const auto isGhostVertex = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper()); @@ -639,7 +639,7 @@ private: // Some methods require to use a second type of interaction volume, e.g. // around vertices on the boundary or branching points (surface grids) const auto numVert = this->gridView().size(dim); - secondaryInteractionVolumeVertices_.resize(numVert, false); + secondaryInteractionVolumeVertices_.assign(numVert, false); // find vertices on processor boundaries HERE!! isGhostVertex_ = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper()); diff --git a/dumux/discretization/staggered/freeflow/connectivitymap.hh b/dumux/discretization/staggered/freeflow/connectivitymap.hh index 75efceeeb61c7c0b0160303346495816b01a58f2..26215028bbd7ee5ed4313be195cf68355280263b 100644 --- a/dumux/discretization/staggered/freeflow/connectivitymap.hh +++ b/dumux/discretization/staggered/freeflow/connectivitymap.hh @@ -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); diff --git a/dumux/discretization/staggered/fvgridgeometry.hh b/dumux/discretization/staggered/fvgridgeometry.hh index 496317c4baa831ea524941802c1ecce0de2a773a..ca051c30715da487b84f2b8a60050ac321fb2cc5 100644 --- a/dumux/discretization/staggered/fvgridgeometry.hh +++ b/dumux/discretization/staggered/fvgridgeometry.hh @@ -384,6 +384,7 @@ private: scvs_.clear(); scvfs_.clear(); scvfIndicesOfScv_.clear(); + localToGlobalScvfIndices_.clear(); // determine size of containers std::size_t numScvs = this->gridView().size(0); @@ -396,7 +397,7 @@ private: scvfs_.reserve(numScvf); scvfIndicesOfScv_.resize(numScvs); localToGlobalScvfIndices_.resize(numScvs); - hasBoundaryScvf_.resize(numScvs, false); + hasBoundaryScvf_.assign(numScvs, false); // Build the scvs and scv faces GridIndexType scvfIdx = 0; @@ -453,7 +454,7 @@ private: scvfIndicesOfScv_[eIdx] = scvfsIndexSet; } - // build the connectivity map for an effecient assembly + // build the connectivity map for an efficient assembly connectivityMap_.update(*this); } @@ -666,6 +667,7 @@ private: // clear containers (necessary after grid refinement) scvfIndicesOfScv_.clear(); neighborVolVarIndices_.clear(); + localToGlobalScvfIndices_.clear(); numScvs_ = numCellCenterDofs(); numScvf_ = 0;