Various utility functions to work on Lists of Lists (usually resulting from 'gather'ing and combining information from individual processors). More...
Functions | |
| template<class T, class Addr, class AccessOp> | |
| labelList | subSizes (const IndirectListBase< T, Addr > &lists, AccessOp aop) |
| Return the sizes of the sub-lists. | |
| template<class IntListType> | |
| void | inplaceRenumber (const labelUList &oldToNew, IntListType &lists) |
| Inplace renumber the values (not the indices) of a list of lists. | |
| template<class T, class AccessOp> | |
| labelList | subSizes (const UList< T > &lists, AccessOp aop=accessOp< T >()) |
| Return the sizes of the sub-lists. | |
| template<class T, class AccessOp> | |
| label | sumSizes (const UList< T > &lists, AccessOp aop=accessOp< T >()) |
| The total size of all sub-lists. | |
| template<class AccessType, class T, class AccessOp> | |
| AccessType | combine (const UList< T > &lists, AccessOp aop=accessOp< T >()) |
| Combines sub-lists into a single list. | |
| template<class AccessType, class T, class AccessOp, class OffsetOp> | |
| AccessType | combineOffset (const UList< T > &lists, const labelUList &offsets, AccessOp aop, OffsetOp oop=offsetOp< T >()) |
| Like combine but also offsets sublists based on passed sizes. | |
Various 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:
| labelList subSizes | ( | const IndirectListBase< T, Addr > & | lists, |
| AccessOp | aop ) |
Return the sizes of the sub-lists.
Definition at line 66 of file ensightOutput.H.
References UList< T >::begin(), IndirectListBase< T, Addr >::size(), and Foam::T().

| void inplaceRenumber | ( | const labelUList & | oldToNew, |
| IntListType & | lists ) |
Inplace renumber the values (not the indices) of a list of lists.
Negative IntListType elements are left untouched.
Definition at line 91 of file ensightOutput.H.
Referenced by ensightFaces::write().

| labelList subSizes | ( | const UList< T > & | lists, |
| AccessOp | aop = accessOp< T >() ) |
Return the sizes of the sub-lists.
| label sumSizes | ( | const UList< T > & | lists, |
| AccessOp | aop = accessOp< T >() ) |
The total size of all sub-lists.
| AccessType combine | ( | const UList< T > & | lists, |
| AccessOp | aop = accessOp<T>() ) |
Combines sub-lists into a single list.
Definition at line 61 of file ListListOps.C.
References Foam::T().
Referenced by mappedPatchBase::collectSamples(), fieldValue::combineFields(), sizeDistribution::combineFields(), InjectedParticleDistributionInjection< CloudType >::initialise(), InjectedParticleInjection< CloudType >::initialise(), InflationInjection< CloudType >::parcelsToInject(), ParSortableList< Type >::sort(), extendedEdgeMesh::sortPointsAndEdges(), FacePostProcessing< CloudType >::write(), ParticleHistogram< CloudType >::write(), and ParticlePostProcessing< CloudType >::write().


| AccessType combineOffset | ( | const UList< T > & | lists, |
| const labelUList & | offsets, | ||
| AccessOp | aop, | ||
| OffsetOp | oop = offsetOp<T>() ) |
Like combine but also offsets sublists based on passed sizes.
Definition at line 91 of file ListListOps.C.
References UList< T >::begin(), and Foam::T().
