ENH: refine mapDistribute methods

- additional distribute/reverseDistribute with specified commsType.
  Improves flexibility.

- distribute with nullValue

- support move construct mapDistribute from mapDistributeBase

- refactor handling of schedules (as whichSchedule method) to
  simplify code.

- renumberMap helper for working with compact sub maps
  and renumberVisit for handling walk-ordered compaction.

COMP: make mapDistributeBase data private

- accessor methods are available - direct access is unnecessary
- mapDistribute : inherit mapDistributeBase constructors

STYLE: use List<labelPair>::null() for schedule placeholders

- clearer that they are doing nothing
This commit is contained in:
Mark Olesen
2022-05-11 21:29:13 +02:00
parent ae0ef3efed
commit 60e07d1f93
21 changed files with 1899 additions and 1048 deletions

View File

@ -1452,7 +1452,7 @@ void Foam::distributedTriSurfaceMesh::surfaceSide
mapDistributeBase::distribute
(
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
List<labelPair>::null(),
nearestInfo.size(),
map.constructMap(),
map.constructHasFlip(),
@ -1481,7 +1481,7 @@ void Foam::distributedTriSurfaceMesh::surfaceSide
//mapDistributeBase::distribute
//(
// Pstream::commsTypes::nonBlocking,
// List<labelPair>(0),
// List<labelPair>::null(),
// nearestInfo.size(),
// map.constructMap(),
// map.constructHasFlip(),
@ -3306,7 +3306,7 @@ void Foam::distributedTriSurfaceMesh::findNearest
mapDistributeBase::distribute
(
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
List<labelPair>::null(),
samples.size(),
map1.constructMap(),
map1.constructHasFlip(),
@ -3467,7 +3467,7 @@ void Foam::distributedTriSurfaceMesh::findNearest
mapDistributeBase::distribute
(
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
List<labelPair>::null(),
samples.size(),
map2.constructMap(),
map2.constructHasFlip(),
@ -4338,7 +4338,7 @@ void Foam::distributedTriSurfaceMesh::getVolumeType
mapDistributeBase::distribute
(
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
List<labelPair>::null(),
samples.size(),
map.constructMap(),
map.constructHasFlip(),
@ -4374,7 +4374,7 @@ void Foam::distributedTriSurfaceMesh::getVolumeType
//mapDistributeBase::distribute
//(
// Pstream::commsTypes::nonBlocking,
// List<labelPair>(0),
// List<labelPair>::null(),
// samples.size(),
// map.constructMap(),
// map.constructHasFlip(),