Various utility functions to work on Lists of Lists (usually resulting from 'gather'ing and combining information from individual processors) More...
Various utility functions to work on Lists of Lists (usually resulting from 'gather'ing and combining information from individual processors)
- combine :
takes (elements of) sublists and appends them into one big list.
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:
Functions | |
template<class AccessType , class T , class AccessOp > | |
AccessType | combine (const List< T > &, AccessOp aop=accessOp< T >()) |
Combines sublists into one big list. | |
template<class T , class AccessOp > | |
labelList | subSizes (const List< T > &, AccessOp aop=accessOp< T >()) |
Gets sizes of sublists. | |
template<class AccessType , class T , class AccessOp , class OffsetOp > | |
AccessType | combineOffset (const List< T > &, const labelList &sizes, AccessOp aop, OffsetOp oop=offsetOp< T >()) |
Like combine but also offsets sublists based on passed sizes. |
Combines sublists into one big list.
Definition at line 34 of file ListListOps.C.
References forAll, Foam::sum(), and Foam::T().
Referenced by boundaryToFace::applyToSet(), labelToCell::applyToSet(), nearestToCell::applyToSet(), labelToFace::applyToSet(), labelToPoint::applyToSet(), nearestToPoint::applyToSet(), boxToFace::applyToSet(), patchToFace::applyToSet(), zoneToFace::applyToSet(), boxToPoint::applyToSet(), nbrToCell::applyToSet(), zoneToCell::applyToSet(), zoneToPoint::applyToSet(), regionToCell::applyToSet(), boxToCell::applyToSet(), sphereToCell::applyToSet(), shapeToCell::applyToSet(), cylinderToCell::applyToSet(), rotatedBoxToCell::applyToSet(), cylinderAnnulusToCell::applyToSet(), pointToCell::applyToSet(), cellToPoint::applyToSet(), faceToPoint::applyToSet(), faceZoneToCell::applyToSet(), pointToFace::applyToSet(), faceToCell::applyToSet(), cellToFace::applyToSet(), surfaceToPoint::applyToSet(), surfaceToCell::applyToSet(), syncTools::syncEdgeMap(), and syncTools::syncPointMap().
Gets sizes of sublists.
Definition at line 61 of file ListListOps.C.
References forAll, and List< T >::size().
Referenced by sampledSurfaces::update().