ENH: use local ref to map() to avoid excessive rebuilding during topo changes

This commit is contained in:
Andrew Heather 2022-10-25 14:41:56 +01:00
parent da5048fd70
commit ff8cdfa7de

View File

@ -70,14 +70,15 @@ void Foam::mappedPatchBase::distribute
}
default:
{
const auto& map = this->map();
mapDistributeBase::distribute
(
Pstream::defaultCommsType,
map().schedule(),
map().constructSize(),
map().subMap(),
map.schedule(),
map.constructSize(),
map.subMap(),
false,
map().constructMap(),
map.constructMap(),
false,
lst,
Type(Zero),
@ -139,14 +140,15 @@ void Foam::mappedPatchBase::reverseDistribute
default:
{
label cSize = sampleSize();
const auto& map = this->map();
mapDistributeBase::distribute
(
Pstream::defaultCommsType,
map().schedule(),
map.schedule(),
cSize,
map().constructMap(),
map.constructMap(),
false,
map().subMap(),
map.subMap(),
false,
lst,
Type(Zero),