mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: decompositionMethod: numbering across coupled boundaries
This commit is contained in:
@ -236,8 +236,8 @@ void Foam::decompositionMethod::calcCellCells
|
|||||||
label globalNei = globalNeighbour[bFaceI];
|
label globalNei = globalNeighbour[bFaceI];
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
globalAgglom.isLocal(globalNei)
|
!globalAgglom.isLocal(globalNei)
|
||||||
&& globalAgglom.toLocal(globalNei) != own
|
|| globalAgglom.toLocal(globalNei) != own
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nFacesPerCell[own]++;
|
nFacesPerCell[own]++;
|
||||||
@ -285,10 +285,11 @@ void Foam::decompositionMethod::calcCellCells
|
|||||||
label own = agglom[faceOwner[faceI]];
|
label own = agglom[faceOwner[faceI]];
|
||||||
|
|
||||||
label globalNei = globalNeighbour[bFaceI];
|
label globalNei = globalNeighbour[bFaceI];
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
globalAgglom.isLocal(globalNei)
|
!globalAgglom.isLocal(globalNei)
|
||||||
&& globalAgglom.toLocal(globalNei) != own
|
|| globalAgglom.toLocal(globalNei) != own
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
m[offsets[own] + nFacesPerCell[own]++] = globalNei;
|
m[offsets[own] + nFacesPerCell[own]++] = globalNei;
|
||||||
@ -304,15 +305,15 @@ void Foam::decompositionMethod::calcCellCells
|
|||||||
// Check for duplicates connections between cells
|
// Check for duplicates connections between cells
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
// Done as postprocessing step since we now have cellCells.
|
// Done as postprocessing step since we now have cellCells.
|
||||||
label startIndex = 0;
|
|
||||||
label newIndex = 0;
|
label newIndex = 0;
|
||||||
labelHashSet nbrCells;
|
labelHashSet nbrCells;
|
||||||
forAll(cellCells, cellI)
|
forAll(cellCells, cellI)
|
||||||
{
|
{
|
||||||
nbrCells.clear();
|
nbrCells.clear();
|
||||||
nbrCells.insert(cellI);
|
nbrCells.insert(globalAgglom.toGlobal(cellI));
|
||||||
|
|
||||||
label& endIndex = cellCells.offsets()[cellI+1];
|
label startIndex = cellCells.offsets()[cellI];
|
||||||
|
label endIndex = cellCells.offsets()[cellI+1];
|
||||||
|
|
||||||
for (label i = startIndex; i < endIndex; i++)
|
for (label i = startIndex; i < endIndex; i++)
|
||||||
{
|
{
|
||||||
@ -321,9 +322,7 @@ void Foam::decompositionMethod::calcCellCells
|
|||||||
cellCells.m()[newIndex++] = cellCells.m()[i];
|
cellCells.m()[newIndex++] = cellCells.m()[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cellCells.offsets()[cellI+1] = newIndex;
|
||||||
startIndex = endIndex;
|
|
||||||
endIndex = newIndex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cellCells.m().setSize(newIndex);
|
cellCells.m().setSize(newIndex);
|
||||||
|
|||||||
@ -371,29 +371,6 @@ Foam::label Foam::ptscotchDecomp::decompose
|
|||||||
Pout<< "ptscotchDecomp : entering with xadj:" << xadj.size() << endl;
|
Pout<< "ptscotchDecomp : entering with xadj:" << xadj.size() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "nProcessors_:" << nProcessors_ << endl;
|
|
||||||
|
|
||||||
globalIndex globalCells(xadj.size()-1);
|
|
||||||
|
|
||||||
Pout<< "Xadj:" << endl;
|
|
||||||
for (label cellI = 0; cellI < xadj.size()-1; cellI++)
|
|
||||||
{
|
|
||||||
Pout<< "cell:" << cellI
|
|
||||||
<< " global:" << globalCells.toGlobal(cellI)
|
|
||||||
<< " connected to:" << endl;
|
|
||||||
label start = xadj[cellI];
|
|
||||||
label end = xadj[cellI+1];
|
|
||||||
for (label i = start; i < end; i++)
|
|
||||||
{
|
|
||||||
Pout<< " cell:" << adjncy[i] << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Pout<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dump graph
|
// Dump graph
|
||||||
if (decompositionDict_.found("ptscotchCoeffs"))
|
if (decompositionDict_.found("ptscotchCoeffs"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user