Skip to content
Snippets Groups Projects
Commit 87d0b4cc authored by Martin Schneider's avatar Martin Schneider
Browse files

[staggered] Use numFaces of intersection mapper

The number of subEntities is wrong for non-conforming
grids. Therefore, replace it with numFaces of the mapper.
parent afda7729
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!532Feature/improve global fv geometry
......@@ -116,6 +116,7 @@ public:
scvfs_.clear();
scvfIndicesOfScv_.clear();
elementMap_.clear();
intersectionMapper_.update();
// determine size of containers
IndexType numScvs = gridView_.size(0);
......@@ -137,9 +138,8 @@ public:
{
auto eIdx = problem.elementMapper().index(element);
// reserve memory for the localToGlobalScvfIdx map
auto numLocalFaces = element.subEntities(1);
auto numLocalFaces = intersectionMapper_.numFaces(element);
localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
......@@ -149,7 +149,7 @@ public:
// the element-wise index sets for finite volume geometry
std::vector<IndexType> scvfsIndexSet;
scvfsIndexSet.reserve(element.subEntities(1));
scvfsIndexSet.reserve(numLocalFaces);
GeometryHelper geometryHelper(element, gridView_);
......
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