Commit 9025a4d6 authored by mattijs's avatar mattijs
Browse files

BUG: decompositionMethod: enforce explicitConnections to be on same proc

parent 01901e9c
......@@ -884,6 +884,51 @@ Foam::labelList Foam::decompositionMethod::decompose
);
// Implement the explicitConnections since above decompose
// does not know about them
forAll(explicitConnections, i)
{
const labelPair& baffle = explicitConnections[i];
label f0 = baffle.first();
label f1 = baffle.second();
if (!blockedFace[f0] && !blockedFace[f1])
{
// Note: what if internal faces and owner and neighbour on
// different processor? So for now just push owner side
// proc
const label procI = finalDecomp[mesh.faceOwner()[f0]];
finalDecomp[mesh.faceOwner()[f1]] = procI;
if (mesh.isInternalFace(f1))
{
finalDecomp[mesh.faceNeighbour()[f1]] = procI;
}
}
else if (blockedFace[f0] != blockedFace[f1])
{
FatalErrorIn
(
"labelList decompose\n"
"(\n"
" const polyMesh&,\n"
" const scalarField&,\n"
" const boolList&,\n"
" const PtrList<labelList>&,\n"
" const labelList&,\n"
" const List<labelPair>&\n"
")"
) << "On explicit connection between faces " << f0
<< " and " << f1
<< " the two blockedFace status are not equal : "
<< blockedFace[f0] << " and " << blockedFace[f1]
<< exit(FatalError);
}
}
// For specifiedProcessorFaces rework the cellToProc to enforce
// all on one processor since we can't guarantee that the input
// to regionSplit was a single region.
......
......@@ -266,13 +266,16 @@ public:
);
// Decompose a mesh with constraints:
// - blockedFace : whether owner and neighbour should be on
// - blockedFace : whether owner and neighbour should be on same
// processor
// - specifiedProcessorFaces, specifiedProcessor : sets of faces
// that should go to same processor (as specified in
// specifiedProcessor, can be -1)
// - explicitConnections : connections between baffle faces
// (blockedFace should be false on these). Owner and
// neighbour on same processor.
// Set all to zero size to have unconstrained decomposition.
labelList decompose
virtual labelList decompose
(
const polyMesh& mesh,
const scalarField& cellWeights,
......
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