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::commsTypes::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::commsTypes::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::commsTypes::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::commsTypes::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::commsTypes::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::commsTypes::nonBlocking) |
| Distribute data in processor order. Requires fld to be sized! 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(), 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 createShellMesh::calcPointRegions(), mapDistributeBase::exchangeAddressing(), globalIndex::globalIndex(), regionSplit::nLocalRegions(), minEqOp< labelPair >::operator()(), and SprayCloud< Foam::DSMCCloud >::penetration().


|
inline |
From local to global.
Definition at line 82 of file globalIndexI.H.
References UPstream::myProcNo().
Referenced by nearWallFields::calcAddressing(), decompositionMethod::calcCellCells(), createShellMesh::calcPointRegions(), viewFactor::calculate(), edgeCollapser::checkMeshQuality(), distributedTriSurfaceMesh::findNearest(), addPatchCellLayer::globalEdgeFaces(), cellToCellStencil::insertFaceCells(), cellToFaceStencil::insertFaceCells(), globalMeshData::mergePoints(), MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration(), NamedEnum< directionType, 3 >::names(), minEqOp< labelPair >::operator()(), viewFactor::read(), addPatchCellLayer::setRefinement(), and globalIndex::size().


|
inline |
Is on local processor.
Definition at line 95 of file globalIndexI.H.
References UPstream::myProcNo().
Referenced by decompositionMethod::calcCellCells(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcSidePatch(), and mapDistributeBase::renumber().


|
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(), NamedEnum< directionType, 3 >::names(), minEqOp< labelPair >::operator()(), and mapDistributeBase::renumber().


|
inline |
Global sum of localSizes.
Definition at line 66 of file globalIndexI.H.
References UList< T >::last(), and globalIndex::toGlobal().
Referenced by nearWallFields::calcAddressing(), distributedTriSurfaceMesh::globalSize(), regionSplit::nRegions(), minEqOp< labelPair >::operator()(), SprayCloud< Foam::DSMCCloud >::penetration(), and globalIndex::whichProcID().


|
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, Foam::findLower(), and globalIndex::size().
Referenced by mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcSidePatch(), NamedEnum< directionType, 3 >::names(), minEqOp< labelPair >::operator()(), and mapDistributeBase::renumber().


|
inline |
Start of proci data.
Definition at line 48 of file globalIndexI.H.
Referenced by globalIndex::globalIndex(), and SprayCloud< Foam::DSMCCloud >::penetration().

|
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< T >::begin(), UList< T >::byteSize(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), UList< T >::last(), Foam::blockMeshTools::read(), List< T >::setSize(), List< T >::size(), UList< T >::size(), and Foam::blockMeshTools::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 171 of file globalIndex.H.
References globalIndex::gather(), UPstream::msgType(), and UPstream::nonBlocking.

|
static |
Inplace collect data in processor order on master.
(== procIDs[0]). Needs offsets only on master.
Definition at line 184 of file globalIndexTemplates.C.
References globalIndex::scatter(), and List< T >::transfer().

|
inline |
Inplace collect data in processor order on master.
(== procIDs[0]). Needs offsets only on master.
Definition at line 202 of file globalIndex.H.
References globalIndex::gather(), UPstream::msgType(), UPstream::nonBlocking, and globalIndex::scatter().

|
static |
Distribute data in processor order. Requires fld to be sized!
Definition at line 206 of file globalIndexTemplates.C.
References UList< T >::begin(), UList< T >::byteSize(), UList< T >::deepCopy(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), Foam::blockMeshTools::read(), List< T >::size(), and Foam::blockMeshTools::write().
Referenced by globalIndex::gather(), and globalIndex::scatter().


|
inline |
Distribute data in processor order. Requires fld to be sized!
Definition at line 231 of file globalIndex.H.
References globalIndex::operator<<, globalIndex::operator>>, and globalIndex::scatter().

|
friend |
Referenced by globalIndex::scatter().
|
friend |
Referenced by globalIndex::scatter().
1.8.13