Commit 84af8ef7 authored by mattijs's avatar mattijs
Browse files

BUG: cyclics handled inconsistently

parent b9032abd
......@@ -289,16 +289,25 @@ void Foam::decompositionMethod::calcCSR
forAll(pbm, patchI)
{
if (isA<cyclicPolyPatch>(pbm[patchI]))
if
(
isA<cyclicPolyPatch>(pbm[patchI])
&& refCast<const cyclicPolyPatch>(pbm[patchI]).owner()
)
{
const unallocLabelList& faceCells = pbm[patchI].faceCells();
const cyclicPolyPatch& cycPatch = refCast<const cyclicPolyPatch>
(
pbm[patchI]
);
label sizeby2 = faceCells.size()/2;
const unallocLabelList& faceCells = cycPatch.faceCells();
const unallocLabelList& nbrCells =
cycPatch.neighbPatch().faceCells();
for (label faceI=0; faceI<sizeby2; faceI++)
forAll(faceCells, facei)
{
label own = faceCells[faceI];
label nei = faceCells[faceI + sizeby2];
label own = faceCells[facei];
label nei = nbrCells[facei];
if (cellPair.insert(edge(own, nei)))
{
......@@ -370,8 +379,11 @@ void Foam::decompositionMethod::calcCSR
label own = faceCells[facei];
label nei = nbrCells[facei];
adjncy[xadj[own] + nFacesPerCell[own]++] = nei;
adjncy[xadj[nei] + nFacesPerCell[nei]++] = own;
if (cellPair.insert(edge(own, nei)))
{
adjncy[xadj[own] + nFacesPerCell[own]++] = nei;
adjncy[xadj[nei] + nFacesPerCell[nei]++] = own;
}
}
}
}
......
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