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)
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 67 of file ensightOutput.H.
References Foam::output(), 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 within a list.
Negative IntListType elements are left untouched.
Definition at line 92 of file ensightOutput.H.
References Foam::input().
Referenced by fvMeshAdder::add(), polyMeshAdder::add(), fvMeshPrimitiveLduAddressing::addAddressing(), cellTable::combine(), ABAQUSCore::readHelper::compact_nodes(), STARCDMeshReader::cullPoints(), PatchTools::gatherAndMerge(), isoSurfaceCell::isoSurfaceCell(), isoSurfacePoint::isoSurfacePoint(), 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 62 of file ListListOps.C.
References Foam::output(), and T.
Referenced by badQualityToCell::applyToSet(), badQualityToFace::applyToSet(), regionsToCell::applyToSet(), boundaryToCell::applyToSet(), boundaryToFace::applyToSet(), nbrToCell::applyToSet(), nearestToPoint::applyToSet(), nearestToCell::applyToSet(), patchToCell::applyToSet(), clipPlaneToPoint::applyToSet(), clipPlaneToCell::applyToSet(), clipPlaneToFace::applyToSet(), searchableSurfaceToPoint::applyToSet(), patchToFace::applyToSet(), searchableSurfaceToCell::applyToSet(), haloToCell::applyToSet(), searchableSurfaceToFace::applyToSet(), shapeToCell::applyToSet(), sphereToFace::applyToSet(), sphereToPoint::applyToSet(), sphereToCell::applyToSet(), boxToPoint::applyToSet(), boxToFace::applyToSet(), boxToCell::applyToSet(), holeToFace::applyToSet(), rotatedBoxToCell::applyToSet(), regionToFace::applyToSet(), targetVolumeToCell::applyToSet(), faceToPoint::applyToSet(), cylinderToPoint::applyToSet(), cylinderToFace::applyToSet(), cylinderToCell::applyToSet(), zoneToCell::applyToSet(), zoneToPoint::applyToSet(), zoneToFace::applyToSet(), planeToFaceZone::applyToSet(), cellToPoint::applyToSet(), regionToCell::applyToSet(), pointToCell::applyToSet(), pointToFace::applyToSet(), surfaceToPoint::applyToSet(), cellToFace::applyToSet(), faceToCell::applyToSet(), faceZoneToCell::applyToSet(), surfaceToCell::applyToSet(), faMeshDistributor::distribute(), 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 92 of file ListListOps.C.
References UList< T >::begin(), Foam::output(), and T.