Commit a35aac59 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[tpfa][globalfvgeom] fix bug for hanging nodes

for hanging nodes accessing the localscvfindexset was wrong, as indexInInside()
might be the same for two different intersections.
parent 425f00ca
......@@ -278,19 +278,28 @@ public:
std::vector<IndexType> neighborVolVarIndexSet;
scvfsIndexSet.reserve(numLocalFaces);
neighborVolVarIndexSet.reserve(numLocalFaces);
unsigned int localFaceIdx = 0;
for (const auto& intersection : intersections(gridView_, element))
{
// inner sub control volume faces
if (intersection.neighbor())
{
scvfsIndexSet.push_back(numScvf_++);
neighborVolVarIndexSet.push_back(problem.elementMapper().index(intersection.outside()));
auto nIdx = problem.elementMapper().index(intersection.outside());
neighborVolVarIndexSet.push_back(nIdx);
// increment counter
localFaceIdx++;
}
// boundary sub control volume faces
else if (intersection.boundary())
{
scvfsIndexSet.push_back(numScvf_++);
neighborVolVarIndexSet.push_back(numScvs_ + numBoundaryScvf_++);
// increment counter
localFaceIdx++;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment