mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
REGRESSION: inconsistent constructMap order in meshToMesh::calcProcMap
- commit fb69a54bc3 accidentally changed the constructMap compact
order from linear ordering to local elements first order. Seems to
interact poorly with other bookkeeping so doing a partial revert,
but still replacing the old allGatherList with exchangeSizes.
Note:
the processorLOD method does actually use a constructMap with local
elements first ordering, so some inconsistency may still exist
there
This commit is contained in:
@ -212,27 +212,46 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert dynamicList to labelList
|
|
||||||
forAll(sendMap, proci)
|
|
||||||
{
|
|
||||||
sendMap[proci].transfer(dynSendMap[proci]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// debug printing
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "Of my " << tgt.nCells()
|
Pout<< "Of my " << tgt.nCells()
|
||||||
<< " target cells I need to send to:" << nl
|
<< " target cells I need to send to:" << nl
|
||||||
<< "\tproc\tcells" << endl;
|
<< "\tproc\tcells" << endl;
|
||||||
forAll(sendMap, proci)
|
forAll(dynSendMap, proci)
|
||||||
{
|
{
|
||||||
Pout<< '\t' << proci << '\t'
|
Pout<< '\t' << proci << '\t'
|
||||||
<< sendMap[proci].size() << endl;
|
<< dynSendMap[proci].size() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert DynamicList -> List
|
||||||
|
forAll(sendMap, proci)
|
||||||
|
{
|
||||||
|
sendMap[proci].transfer(dynSendMap[proci]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<mapDistribute>::New(std::move(sendMap));
|
|
||||||
|
labelList recvSizes;
|
||||||
|
Pstream::exchangeSizes(sendMap, recvSizes, UPstream::worldComm);
|
||||||
|
|
||||||
|
// Uses linear receive order
|
||||||
|
labelListList constructMap(UPstream::nProcs());
|
||||||
|
|
||||||
|
label constructSize = 0;
|
||||||
|
forAll(constructMap, proci)
|
||||||
|
{
|
||||||
|
const label len = recvSizes[proci];
|
||||||
|
constructMap[proci] = identity(len, constructSize);
|
||||||
|
constructSize += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoPtr<mapDistribute>::New
|
||||||
|
(
|
||||||
|
constructSize,
|
||||||
|
std::move(sendMap),
|
||||||
|
std::move(constructMap)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user