Various utility functions to work on Lists of Lists (usually resulting from 'gather'ing and combining information from individual processors) More...
Functions | |
template<class AccessType , class T , class AccessOp > | |
AccessType | combine (const List< T > &, AccessOp aop=accessOp< T >()) |
Combines sublists into one big list. More... | |
template<class T , class AccessOp > | |
labelList | subSizes (const List< T > &, AccessOp aop=accessOp< T >()) |
Gets sizes of sublists. More... | |
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. 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, minimising communication, and then picked apart and recombined.
Example:
Combines sublists into one big list.
Definition at line 34 of file ListListOps.C.
References forAll, Foam::sum(), and Foam::T().
Referenced by searchableSurfaceToFaceZone::applyToSet(), badQualityToFace::applyToSet(), badQualityToCell::applyToSet(), patchDistanceToCell::applyToSet(), boxToCell::applyToSet(), labelToPoint::applyToSet(), nearestToPoint::applyToSet(), labelToCell::applyToSet(), nearestToCell::applyToSet(), boxToFace::applyToSet(), labelToFace::applyToSet(), zoneToPoint::applyToSet(), zoneToCell::applyToSet(), nbrToCell::applyToSet(), patchToFace::applyToSet(), zoneToFace::applyToSet(), boxToPoint::applyToSet(), sphereToCell::applyToSet(), cylinderToFace::applyToSet(), cylinderToCell::applyToSet(), shapeToCell::applyToSet(), cylinderAnnulusToCell::applyToSet(), cylinderAnnulusToFace::applyToSet(), regionToFace::applyToSet(), cellToPoint::applyToSet(), faceToPoint::applyToSet(), pointToCell::applyToSet(), faceZoneToCell::applyToSet(), targetVolumeToCell::applyToSet(), faceToCell::applyToSet(), pointToFace::applyToSet(), cellToFace::applyToSet(), surfaceToPoint::applyToSet(), planeToFaceZone::applyToSet(), regionToCell::applyToSet(), surfaceToCell::applyToSet(), offsetOp< T >::operator()(), and InflationInjection< CloudType >::parcelsToInject().
Gets sizes of sublists.
Definition at line 61 of file ListListOps.C.
References combineOffset(), forAll, and List< T >::size().
Referenced by PatchTools::gatherAndMerge(), and offsetOp< T >::operator()().
AccessType combineOffset | ( | const List< T > & | lst, |
const labelList & | sizes, | ||
AccessOp | aop, | ||
OffsetOp | oop = offsetOp<T>() |
||
) |
Like combine but also offsets sublists based on passed sizes.
Definition at line 75 of file ListListOps.C.
References forAll, Foam::sum(), and Foam::T().
Referenced by offsetOp< T >::operator()(), and subSizes().