mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: mapDistribute : cleanup
This commit is contained in:
@ -440,15 +440,7 @@ void Foam::distributedTriSurfaceMesh::findLine
|
||||
// Exchange the segments
|
||||
// ~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
Pstream::nonBlocking, //Pstream::scheduled,
|
||||
List<labelPair>(0), //map.schedule(),
|
||||
map.constructSize(),
|
||||
map.subMap(), // what to send
|
||||
map.constructMap(), // what to receive
|
||||
allSegments
|
||||
);
|
||||
map.distribute(allSegments);
|
||||
|
||||
|
||||
// Do tests I need to do
|
||||
@ -490,21 +482,7 @@ void Foam::distributedTriSurfaceMesh::findLine
|
||||
// Exchange the intersections (opposite to segments)
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule // Note reverse schedule
|
||||
//(
|
||||
// map.constructMap(),
|
||||
// map.subMap()
|
||||
//),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
nOldAllSegments,
|
||||
map.constructMap(), // what to send
|
||||
map.subMap(), // what to receive
|
||||
intersections
|
||||
);
|
||||
map.reverseDistribute(nOldAllSegments, intersections);
|
||||
|
||||
|
||||
// Extract the hits
|
||||
@ -657,17 +635,7 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries
|
||||
// Send over queries
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule(),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
map.constructSize(),
|
||||
map.subMap(), // what to send
|
||||
map.constructMap(), // what to receive
|
||||
triangleIndex
|
||||
);
|
||||
map.distribute(triangleIndex);
|
||||
|
||||
|
||||
return mapPtr;
|
||||
@ -1594,28 +1562,8 @@ void Foam::distributedTriSurfaceMesh::findNearest
|
||||
// swap samples to local processor
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule(),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
map.constructSize(),
|
||||
map.subMap(), // what to send
|
||||
map.constructMap(), // what to receive
|
||||
allCentres
|
||||
);
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule(),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
map.constructSize(),
|
||||
map.subMap(), // what to send
|
||||
map.constructMap(), // what to receive
|
||||
allRadiusSqr
|
||||
);
|
||||
map.distribute(allCentres);
|
||||
map.distribute(allRadiusSqr);
|
||||
|
||||
|
||||
// Do my tests
|
||||
@ -1639,21 +1587,7 @@ void Foam::distributedTriSurfaceMesh::findNearest
|
||||
// Send back results
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule // note reverse schedule
|
||||
//(
|
||||
// map.constructMap(),
|
||||
// map.subMap()
|
||||
//),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
allSegmentMap.size(),
|
||||
map.constructMap(), // what to send
|
||||
map.subMap(), // what to receive
|
||||
allInfo
|
||||
);
|
||||
map.reverseDistribute(allSegmentMap.size(), allInfo);
|
||||
|
||||
|
||||
// Extract information
|
||||
@ -1892,21 +1826,7 @@ void Foam::distributedTriSurfaceMesh::getRegion
|
||||
// Send back results
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule // note reverse schedule
|
||||
//(
|
||||
// map.constructMap(),
|
||||
// map.subMap()
|
||||
//),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
info.size(),
|
||||
map.constructMap(), // what to send
|
||||
map.subMap(), // what to receive
|
||||
region
|
||||
);
|
||||
map.reverseDistribute(info.size(), region);
|
||||
}
|
||||
|
||||
|
||||
@ -1956,21 +1876,7 @@ void Foam::distributedTriSurfaceMesh::getNormal
|
||||
// Send back results
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
//Pstream::scheduled,
|
||||
//map.schedule // note reverse schedule
|
||||
//(
|
||||
// map.constructMap(),
|
||||
// map.subMap()
|
||||
//),
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
info.size(),
|
||||
map.constructMap(), // what to send
|
||||
map.subMap(), // what to receive
|
||||
normal
|
||||
);
|
||||
map.reverseDistribute(info.size(), normal);
|
||||
}
|
||||
|
||||
|
||||
@ -2024,15 +1930,7 @@ void Foam::distributedTriSurfaceMesh::getField
|
||||
// Send back results
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
map.distribute
|
||||
(
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
info.size(),
|
||||
map.constructMap(), // what to send
|
||||
map.subMap(), // what to receive
|
||||
values
|
||||
);
|
||||
map.reverseDistribute(info.size(), values);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -76,15 +76,7 @@ License
|
||||
// // Send back results
|
||||
// // ~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// map.distribute
|
||||
// (
|
||||
// Pstream::nonBlocking,
|
||||
// List<labelPair>(0),
|
||||
// info.size(),
|
||||
// map.constructMap(), // what to send
|
||||
// map.subMap(), // what to receive
|
||||
// values
|
||||
// );
|
||||
// map.reverseDistribute(info.size(), values);
|
||||
//}
|
||||
|
||||
|
||||
@ -115,15 +107,7 @@ void Foam::distributedTriSurfaceMesh::distributeFields
|
||||
|
||||
label oldSize = field.size();
|
||||
|
||||
map.distribute
|
||||
(
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(0),
|
||||
map.constructSize(),
|
||||
map.subMap(),
|
||||
map.constructMap(),
|
||||
field
|
||||
);
|
||||
map.distribute(field);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user