Calculates a unique integer (label so might not have enough room - 2G max) for processor + local index. E.g. More...
Public Member Functions | |
globalIndex () | |
Construct null. More... | |
globalIndex (const label localSize) | |
Construct from local max size. Does communication with default. More... | |
globalIndex (const label localSize, const int tag, const label comm, const bool parallel) | |
Construct from local max size. Does communication with given. More... | |
globalIndex (const labelList &offsets) | |
Construct from components. More... | |
globalIndex (const Xfer< labelList > &offsets) | |
Construct from components. More... | |
globalIndex (Istream &is) | |
Construct from Istream. More... | |
labelList & | offsets () |
Change after construction. More... | |
label | localSize () const |
My local size. More... | |
label | toGlobal (const label i) const |
From local to global. More... | |
bool | isLocal (const label i) const |
Is on local processor. More... | |
label | toLocal (const label i) const |
From global to local on current processor. More... | |
label | size () const |
Global sum of localSizes. More... | |
label | localSize (const label procI) const |
Size of procI data. More... | |
label | toGlobal (const label procI, const label i) const |
From local to global on procI. More... | |
bool | isLocal (const label procI, const label i) const |
Is on processor procI. More... | |
label | toLocal (const label procI, const label i) const |
From global to local on procI. More... | |
label | whichProcID (const label i) const |
Which processor does global come from? Binary search. More... | |
label | offset (const label procI) const |
Start of procI data. More... | |
template<class Type > | |
void | gather (const label comm, const labelList &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::nonBlocking) const |
Collect data in processor order on master (== procIDs[0]). More... | |
template<class Type > | |
void | gather (const label comm, const labelList &procIDs, List< Type > &fld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::nonBlocking) const |
Inplace collect data in processor order on master. More... | |
template<class Type > | |
void | scatter (const label comm, const labelList &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::nonBlocking) const |
Distribute data in processor order. Requires fld to be sized! More... | |
Static Public Member Functions | |
template<class Type > | |
static void | gather (const labelUList &offsets, const label comm, const labelList &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::nonBlocking) |
Collect data in processor order on master (== procIDs[0]). More... | |
template<class Type > | |
static void | gather (const labelUList &offsets, const label comm, const labelList &procIDs, List< Type > &fld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::nonBlocking) |
Inplace collect data in processor order on master. More... | |
template<class Type > | |
static void | scatter (const labelUList &offsets, const label comm, const labelList &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::nonBlocking) |
Distribute data in processor order. Requires fld to be sized! More... | |
Private Attributes | |
labelList | offsets_ |
Start of procI. Size is nProcs()+1. (so like CompactListList) More... | |
Friends | |
Istream & | operator>> (Istream &is, globalIndex &gi) |
Ostream & | operator<< (Ostream &os, const globalIndex &gi) |
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local index. E.g.
globalIndex globalFaces(mesh.nFaces()); label globalFaceI = globalFaces.toGlobal(faceI);
Definition at line 63 of file globalIndex.H.
|
inline |
Construct null.
Definition at line 30 of file globalIndexI.H.
globalIndex | ( | const label | localSize | ) |
Construct from local max size. Does communication with default.
communicator and message tag.
Definition at line 68 of file globalIndex.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pstream::gatherList(), Foam::labelMax, globalIndex::localSize(), UPstream::msgType(), UPstream::myProcNo(), UPstream::nProcs(), globalIndex::offset(), globalIndex::offsets_, and Pstream::scatterList().
globalIndex | ( | const label | localSize, |
const int | tag, | ||
const label | comm, | ||
const bool | parallel | ||
) |
Construct from local max size. Does communication with given.
communicator and message tag
Definition at line 31 of file globalIndex.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::labelMax.
globalIndex | ( | const labelList & | offsets | ) |
Construct from components.
Definition at line 97 of file globalIndex.C.
|
inline |
Construct from components.
Definition at line 34 of file globalIndexI.H.
globalIndex | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 103 of file globalIndex.C.
|
inline |
Change after construction.
Definition at line 42 of file globalIndexI.H.
|
inline |
My local size.
Definition at line 60 of file globalIndexI.H.
References UPstream::myProcNo().
Referenced by globalMeshData::calcGlobalPointBoundaryCells(), globalMeshData::calcGlobalPointBoundaryFaces(), createShellMesh::calcPointRegions(), simpleGeomDecomp::decompose(), mapDistributeBase::exchangeAddressing(), globalIndex::globalIndex(), main(), regionSplit::nLocalRegions(), KinematicCloud< CloudType >::penetration(), printMeshData(), externalCoupledFunctionObject::readColumns(), externalCoupledFunctionObject::readLines(), CellZoneInjection< CloudType >::setPositions(), and streamLineBase::write().
|
inline |
From local to global.
Definition at line 82 of file globalIndexI.H.
References UPstream::myProcNo().
Referenced by nearWallFields::calcAddressing(), decompositionMethod::calcCellCells(), CFCFaceToCellStencil::calcCellStencil(), CFCCellToCellStencil::calcCellStencil(), globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::calcGlobalPointBoundaryCells(), globalMeshData::calcGlobalPointBoundaryFaces(), globalMeshData::calcGlobalPointEdges(), regionSplit::calcNonCompactRegionSplit(), localPointRegion::calcPointRegions(), createShellMesh::calcPointRegions(), regionSplit::calcRegionSplit(), patchSeedSet::calcSamples(), globalMeshData::calcSharedPoints(), viewFactor::calculate(), meshToMesh::calculate(), meshRefinement::consistentOrientation(), meshToMesh::distributeCells(), AMIInterpolation< SourcePatch, TargetPatch >::distributePatches(), refinementParameters::findCells(), distributedTriSurfaceMesh::findLine(), distributedTriSurfaceMesh::findNearest(), meshRefinement::getMasterEdges(), GAMGProcAgglomeration::globalCellCells(), addPatchCellLayer::globalEdgeFaces(), fluxSummary::initialiseCellZoneAndDirection(), viewFactor::insertMatrixElements(), main(), meshRefinement::markPatchZones(), globalMeshData::mergePoints(), MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration(), zoltanRenumber::renumber(), addPatchCellLayer::setRefinement(), multiLevelDecomp::subsetGlobalCellCells(), autoLayerDriver::truncateDisplacement(), indexedCell::unsortedVertexGlobalIndices(), sampledTriSurfaceMesh::update(), and AMIInterpolation< SourcePatch, TargetPatch >::update().
|
inline |
Is on local processor.
Definition at line 95 of file globalIndexI.H.
References UPstream::myProcNo().
Referenced by decompositionMethod::calcCellCells(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), regionSplit::calcRegionSplit(), refinementParameters::findCells(), fluxSummary::initialiseCellZoneAndDirection(), main(), mapDistributeBase::renumber(), and sampledTriSurfaceMesh::update().
|
inline |
From global to local on current processor.
FatalError if not on local processor.
Definition at line 117 of file globalIndexI.H.
References UPstream::myProcNo().
Referenced by decompositionMethod::calcCellCells(), mapDistributeBase::calcCompactAddressing(), globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::calcGlobalPointBoundaryCells(), globalMeshData::calcGlobalPointBoundaryFaces(), distributedTriSurfaceMesh::calcLocalQueries(), meshRefinement::consistentOrientation(), refinementParameters::findCells(), fluxSummary::initialiseCellZoneAndDirection(), main(), meshRefinement::markPatchZones(), mapDistributeBase::renumber(), and sampledTriSurfaceMesh::update().
|
inline |
Global sum of localSizes.
Definition at line 66 of file globalIndexI.H.
Referenced by nearWallFields::calcAddressing(), globalMeshData::calcSharedPoints(), simpleGeomDecomp::decompose(), distributedTriSurfaceMesh::globalSize(), regionSplit::nRegions(), KinematicCloud< CloudType >::penetration(), printMeshData(), externalCoupledFunctionObject::readColumns(), externalCoupledFunctionObject::readLines(), CellZoneInjection< CloudType >::setPositions(), and streamLineBase::write().
|
inline |
Size of procI data.
Definition at line 54 of file globalIndexI.H.
|
inline |
From local to global on procI.
Definition at line 73 of file globalIndexI.H.
|
inline |
From global to local on procI.
Definition at line 101 of file globalIndexI.H.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Which processor does global come from? Binary search.
Definition at line 123 of file globalIndexI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::findLower().
Referenced by mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::calcGlobalPointBoundaryCells(), globalMeshData::calcGlobalPointBoundaryFaces(), distributedTriSurfaceMesh::calcLocalQueries(), regionSplit::calcRegionSplit(), meshRefinement::consistentOrientation(), refinementParameters::findCells(), main(), meshRefinement::markPatchZones(), mapDistributeBase::renumber(), and multiLevelDecomp::subsetGlobalCellCells().
|
inline |
Start of procI data.
Definition at line 48 of file globalIndexI.H.
Referenced by simpleGeomDecomp::decompose(), globalIndex::globalIndex(), KinematicCloud< CloudType >::penetration(), and CellZoneInjection< CloudType >::setPositions().
|
static |
Collect data in processor order on master (== procIDs[0]).
Needs offsets only on master.
Definition at line 32 of file globalIndexTemplates.C.
References UList::assign(), UList< T >::begin(), UList< T >::byteSize(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), UList::last(), Foam::read(), List::setSize(), List::size(), and write().
Referenced by globalIndex::gather(), and GAMGAgglomeration::procAgglomerateRestrictAddressing().
|
inline |
Collect data in processor order on master (== procIDs[0]).
Needs offsets only on master.
Definition at line 170 of file globalIndex.H.
References fld(), globalIndex::gather(), and globalIndex::offsets_.
|
static |
Inplace collect data in processor order on master.
(== procIDs[0]). Needs offsets only on master.
Definition at line 176 of file globalIndexTemplates.C.
References fld().
|
inline |
Inplace collect data in processor order on master.
(== procIDs[0]). Needs offsets only on master.
Definition at line 199 of file globalIndex.H.
References fld(), globalIndex::gather(), and globalIndex::offsets_.
|
static |
Distribute data in processor order. Requires fld to be sized!
Definition at line 198 of file globalIndexTemplates.C.
References UList< T >::begin(), UList< T >::byteSize(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), Foam::read(), List::size(), and write().
Referenced by globalIndex::scatter().
|
inline |
Distribute data in processor order. Requires fld to be sized!
Definition at line 226 of file globalIndex.H.
References fld(), globalIndex::offsets_, and globalIndex::scatter().
|
friend |
|
friend |
|
private |
Start of procI. Size is nProcs()+1. (so like CompactListList)
Definition at line 68 of file globalIndex.H.
Referenced by globalIndex::gather(), globalIndex::globalIndex(), Foam::operator<<(), Foam::operator>>(), and globalIndex::scatter().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.