Skip to content
Snippets Groups Projects
Commit ff8cdfa7 authored by Andrew Heather's avatar Andrew Heather
Browse files

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

parent da5048fd
Branches
No related merge requests found
...@@ -70,14 +70,15 @@ void Foam::mappedPatchBase::distribute ...@@ -70,14 +70,15 @@ void Foam::mappedPatchBase::distribute
} }
default: default:
{ {
const auto& map = this->map();
mapDistributeBase::distribute mapDistributeBase::distribute
( (
Pstream::defaultCommsType, Pstream::defaultCommsType,
map().schedule(), map.schedule(),
map().constructSize(), map.constructSize(),
map().subMap(), map.subMap(),
false, false,
map().constructMap(), map.constructMap(),
false, false,
lst, lst,
Type(Zero), Type(Zero),
...@@ -139,14 +140,15 @@ void Foam::mappedPatchBase::reverseDistribute ...@@ -139,14 +140,15 @@ void Foam::mappedPatchBase::reverseDistribute
default: default:
{ {
label cSize = sampleSize(); label cSize = sampleSize();
const auto& map = this->map();
mapDistributeBase::distribute mapDistributeBase::distribute
( (
Pstream::defaultCommsType, Pstream::defaultCommsType,
map().schedule(), map.schedule(),
cSize, cSize,
map().constructMap(), map.constructMap(),
false, false,
map().subMap(), map.subMap(),
false, false,
lst, lst,
Type(Zero), Type(Zero),
......
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