|
|
|
Foam::ListListOps Namespace ReferenceVarious utility functions to work on Lists of Lists (usually resulting from 'gather'ing and combining information from individual processors). More...
Detailed DescriptionVarious utility functions to work on Lists of Lists (usually resulting from 'gather'ing and combining information from individual processors).
The access of data is through an AccessOp so that data can be 'gather'ed in one go, minimizing communication, and then picked apart and recombined. Example: // Assuming myContainer defined which holds all the data I want to // transfer (say a pointField and a faceList). myContainer also defines // access operators to // access the individual elements, say myContainerPoints::operator(), // and myContainerFaces::operator() List<myContainer> gatheredData(Pstream::nProcs()); gatheredData[Pstream::myProcNo()] = myContainer(points, faces); // Gather data onto master Pstream::gatherList(gatheredData); // Combine pointField combinedPoints ( ListListOps::combine<pointField> ( gatheredData, myContainerPoints() ) ); // Combine and renumber (so combinedFaces indexes combinedPoints) // Extract sizes of individual lists labelList sizes ( ListListOps::subSizes(gatheredData, myContainerPoints()) ); // Renumber using user-defined operator offsetOp<face>() faceList combinedFaces ( ListListOps::combineOffset<faceList> ( gatheredData, sizes, myContainerFaces(), offsetOp<face>() ) );
Function DocumentationCombines sublists into one big list.
Definition at line 26 of file ListListOps.C. References forAll, Foam::sum(), and Foam::T().
Here is the call graph for this function:
![]()
Like combine but also offsets sublists based on passed sizes.
Definition at line 67 of file ListListOps.C.
| |||||||||||||||||||||||||||||||||||||||||||