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. More... | |
template<class IntListType > | |
void | inplaceRenumber (const labelUList &oldToNew, IntListType &lists) |
Inplace renumber the values (not the indices) of a list of lists. More... | |
template<class T , class AccessOp > | |
labelList | subSizes (const UList< T > &lists, AccessOp aop=accessOp< T >()) |
Return the sizes of the sub-lists. More... | |
template<class T , class AccessOp > | |
label | sumSizes (const UList< T > &lists, AccessOp aop=accessOp< T >()) |
The total size of all sub-lists. More... | |
template<class AccessType , class T , class AccessOp > | |
AccessType | combine (const UList< T > &lists, AccessOp aop=accessOp< T >()) |
Combines sub-lists into a single list. More... | |
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. 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:
labelList Foam::ListListOps::subSizes | ( | const IndirectListBase< T, Addr > & | lists, |
AccessOp | aop | ||
) |
Return the sizes of the sub-lists.
Definition at line 66 of file ensightOutput.H.
References IndirectListBase< T, Addr >::size(), and Foam::T().
void Foam::ListListOps::inplaceRenumber | ( | const labelUList & | oldToNew, |
IntListType & | lists | ||
) |
Inplace renumber the values (not the indices) of a list of lists.
Inplace renumber the values (not the indices) of a list.
Negative IntListType elements are left untouched.
Definition at line 88 of file ensightOutput.H.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), cellTable::combine(), ABAQUSCore::readHelper::compact_nodes(), STARCDMeshReader::cullPoints(), fvMeshDistribute::distribute(), PatchTools::gatherAndMerge(), isoSurface::isoSurface(), isoSurfaceCell::isoSurfaceCell(), surfaceIntersection::mergePoints(), foamVtkMeshMaps::renumberCells(), foamVtkMeshMaps::renumberPoints(), extendedEdgeMesh::setFromStatus(), extendedEdgeMesh::sortPointsAndEdges(), meshRefinement::splitFacesUndo(), duplicatePoints::updateMesh(), combineFaces::updateMesh(), tetDecomposer::updateMesh(), FacePostProcessing< CloudType >::write(), ensightFaces::write(), and externalCoupled::writeGeometry().
Return the sizes of the sub-lists.
The total size of all sub-lists.
Combines sub-lists into a single list.
Definition at line 69 of file ListListOps.C.
References T.
Referenced by badQualityToCell::applyToSet(), badQualityToFace::applyToSet(), regionsToCell::applyToSet(), boundaryToCell::applyToSet(), boundaryToFace::applyToSet(), nbrToCell::applyToSet(), nearestToPoint::applyToSet(), nearestToCell::applyToSet(), haloToCell::applyToSet(), shapeToCell::applyToSet(), sphereToFace::applyToSet(), sphereToPoint::applyToSet(), sphereToCell::applyToSet(), regionToFace::applyToSet(), searchableSurfaceToCell::applyToSet(), searchableSurfaceToFace::applyToSet(), searchableSurfaceToPoint::applyToSet(), cylinderToPoint::applyToSet(), targetVolumeToCell::applyToSet(), cylinderAnnulusToFace::applyToSet(), cylinderToFace::applyToSet(), cylinderToCell::applyToSet(), rotatedBoxToCell::applyToSet(), cylinderAnnulusToCell::applyToSet(), regionToCell::applyToSet(), surfaceToPoint::applyToSet(), surfaceToCell::applyToSet(), InflationInjection< CloudType >::parcelsToInject(), syncTools::syncEdgeMap(), and syncTools::syncPointMap().
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 99 of file ListListOps.C.
References UList< T >::begin(), and T.