Class for obtaining halo face data for the boundary edges. The ordering follows that natural edge ordering of the underlying primitive patch. More...
Public Member Functions | |
ClassName ("faMeshBoundaryHalo") | |
faMeshBoundaryHalo (const label comm=UPstream::worldComm) | |
Default construct. More... | |
faMeshBoundaryHalo (const faMesh &mesh) | |
Construct from mesh. More... | |
void | clear () |
Clear out all parameters. More... | |
void | reset (const faMesh &mesh) |
Redefine map and connectivity for a mesh. More... | |
label | haloSize () const |
The local data size (output) More... | |
const labelList & | inputMeshFaces () const noexcept |
List of local input mesh faces required. More... | |
template<class Type > | |
void | distributeSparse (List< Type > &fld, const labelUList &sparseInputLocations, const labelUList &compactOutputMapping) const |
Distribute sparse data. More... | |
template<class Type > | |
void | distributeSparse (List< Type > &fld, const labelUList &sparseInputLocations) const |
Distribute sparse data. More... | |
template<class Type > | |
void | distributeSparse (List< Type > &fld) const |
Distribute sparse data. More... | |
Public Member Functions inherited from mapDistributeBase | |
ClassName ("mapDistributeBase") | |
mapDistributeBase () | |
Default construct (uses worldComm) More... | |
mapDistributeBase (const label comm) | |
Default construct with specified communicator. More... | |
mapDistributeBase (const mapDistributeBase &map) | |
Copy construct. More... | |
mapDistributeBase (mapDistributeBase &&map) | |
Move construct. More... | |
mapDistributeBase (const dictionary &dict, const label comm=UPstream::worldComm) | |
Read construct from dictionary. More... | |
mapDistributeBase (const label constructSize, labelListList &&subMap, labelListList &&constructMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
Move construct from components. More... | |
mapDistributeBase (const labelUList &sendProcs, const labelUList &recvProcs, const label comm=UPstream::worldComm) | |
mapDistributeBase (const globalIndex &, labelList &elements, List< Map< label > > &compactMap, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) | |
mapDistributeBase (const globalIndex &, labelListList &cellCells, List< Map< label > > &compactMap, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) | |
mapDistributeBase (labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
Construct from my elements to send. More... | |
mapDistributeBase (Istream &is) | |
Construct from Istream. More... | |
label | constructSize () const noexcept |
Constructed data size. More... | |
label & | constructSize () noexcept |
Constructed data size. More... | |
const labelListList & | subMap () const noexcept |
From subsetted data back to original data. More... | |
labelListList & | subMap () noexcept |
From subsetted data back to original data. More... | |
const labelListList & | constructMap () const noexcept |
From subsetted data to new reconstructed data. More... | |
labelListList & | constructMap () noexcept |
From subsetted data to new reconstructed data. More... | |
bool | subHasFlip () const noexcept |
Does subMap include a sign. More... | |
bool & | subHasFlip () noexcept |
Does subMap include a sign. More... | |
bool | constructHasFlip () const noexcept |
Does constructMap include a sign. More... | |
bool & | constructHasFlip () noexcept |
Does constructMap include a sign. More... | |
label | comm () const noexcept |
The communicator used. More... | |
label | nMaps () const noexcept |
The number of sub-lists within the maps. More... | |
labelList | subMapSizes () const |
The sizes of the subMap lists. More... | |
labelList | constructMapSizes () const |
The sizes of the constructMap lists. More... | |
const List< labelPair > & | schedule () const |
Return a schedule. Demand driven. See above. More... | |
const List< labelPair > & | whichSchedule (const UPstream::commsTypes commsType) const |
void | clear () |
Reset to zero size, only retaining communicator. More... | |
void | transfer (mapDistributeBase &rhs) |
Transfer the contents of the argument and annul the argument. More... | |
void | compactLocalData (const bitSet &allowedLocalElems, const int tag=UPstream::msgType(), const bool doRenumber=false) |
void | compactRemoteData (const bitSet &allowedRemoteElems, const int tag=UPstream::msgType(), const bool doRenumber=false) |
void | compactLocalData (const bitSet &allowedLocalElems, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType()) |
void | compactRemoteData (const bitSet &allowedRemoteElems, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType()) |
void | compactData (const labelUList &localElements, const labelUList &remoteElements, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType()) |
void | compactLocalData (const labelUList &localElements, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType()) |
void | compactRemoteData (const labelUList &remoteElements, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType()) |
template<class T > | |
void | distribute (List< T > &values, const int tag=UPstream::msgType()) const |
template<class T > | |
void | distribute (DynamicList< T > &values, const int tag=UPstream::msgType()) const |
template<class T , class NegateOp > | |
void | distribute (List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const |
template<class T , class NegateOp > | |
void | distribute (const Pstream::commsTypes commsType, List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const |
template<class T , class NegateOp > | |
void | distribute (const Pstream::commsTypes commsType, const T &nullValue, List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const |
template<class T > | |
void | reverseDistribute (const label constructSize, List< T > &values, const int tag=UPstream::msgType()) const |
template<class T > | |
void | reverseDistribute (const label constructSize, const T &nullValue, List< T > &values, const int tag=UPstream::msgType()) const |
template<class T > | |
void | reverseDistribute (const Pstream::commsTypes commsType, const label constructSize, List< T > &values, const int tag=UPstream::msgType()) const |
template<class T , class NegateOp > | |
void | reverseDistribute (const Pstream::commsTypes commsType, const label constructSize, List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const |
template<class T > | |
void | reverseDistribute (const Pstream::commsTypes commsType, const label constructSize, const T &nullValue, List< T > &values, const int tag=UPstream::msgType()) const |
template<class T > | |
void | send (PstreamBuffers &pBufs, const List< T > &field) const |
Do all sends using PstreamBuffers. More... | |
template<class T > | |
void | receive (PstreamBuffers &pBufs, List< T > &field) const |
Do all receives using PstreamBuffers. More... | |
void | printLayout (Ostream &os) const |
Debug: print layout. Can only be used on maps with sorted. More... | |
void | operator= (const mapDistributeBase &rhs) |
Copy assignment. More... | |
void | operator= (mapDistributeBase &&rhs) |
Move assignment. More... | |
InfoProxy< mapDistributeBase > | info () const |
Info proxy to print summary information to a stream. More... | |
void | readDict (const dictionary &dict) |
Read entries from dictionary format. More... | |
void | writeEntries (Ostream &os) const |
Write entries in dictionary format. More... | |
void | updateMesh (const mapPolyMesh &) |
No correction for topo change. More... | |
void | compact (const boolList &remoteElemUsed, const int tag=UPstream::msgType()) |
void | compact (const boolList &remoteElemUsed, const label localSize, labelList &oldToNewSub, labelList &oldToNewConstruct, const int tag=UPstream::msgType()) |
template<class T , class NegateOp > | |
Foam::List< T > | accessAndFlip (const UList< T > &values, const labelUList &indices, const bool hasFlip, const NegateOp &negOp) |
Additional Inherited Members | |
Static Public Member Functions inherited from mapDistributeBase | |
static bool | hasFlipAddressing (const labelUList &map) |
static bool | hasFlipAddressing (const labelListList &maps) |
static label | countUnmapped (const labelUList &elements, const labelListList &maps, const bool hasFlip) |
Count the number of unmapped elements. More... | |
static List< labelPair > | schedule (const labelListList &subMap, const labelListList &constructMap, const int tag, const label comm=UPstream::worldComm) |
Calculate a communication schedule. See above. More... | |
static label | renumber (const globalIndex &, const List< Map< label > > &compactMap, const label globalElement) |
Helper for construct from globalIndex. Renumbers element. More... | |
static label | renumberMap (labelListList &mapElements, const labelUList &oldToNew, const bool hasFlip) |
template<class T , class NegateOp > | |
static void | distribute (const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &field, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Distribute data with specified negate operator (for flips). More... | |
template<class T , class CombineOp , class NegateOp > | |
static void | distribute (const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &field, const T &nullValue, const CombineOp &cop, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Distribute data with specified combine operation. More... | |
Protected Member Functions inherited from mapDistributeBase | |
void | calcCompactAddressing (const globalIndex &globalNumbering, const labelUList &elements, List< Map< label > > &compactMap) const |
Construct per processor compact addressing of the global elements. More... | |
void | calcCompactAddressing (const globalIndex &globalNumbering, const labelListList &elements, List< Map< label > > &compactMap) const |
void | exchangeAddressing (const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label > > &compactMap, labelList &compactStart) |
void | exchangeAddressing (const int tag, const globalIndex &globalNumbering, labelListList &elements, List< Map< label > > &compactMap, labelList &compactStart) |
Static Protected Member Functions inherited from mapDistributeBase | |
static void | checkReceivedSize (const label proci, const label expectedSize, const label receivedSize) |
Fatal if expected and received size are not equal. More... | |
static label | getMappedSize (const labelListList &maps, const bool hasFlip) |
Scan the maps for the max addressed index. More... | |
static void | exchangeMasks (const UList< bitSet > &sendMasks, UList< bitSet > &recvMasks, const int tag, const label comm) |
Synchronize send/recv mask buffers as a 'copy' operation. More... | |
static void | unionCombineMasks (UList< bitSet > &sendMasks, UList< bitSet > &recvMasks, const int tag, const label comm) |
template<class T , class CombineOp , class NegateOp > | |
static void | flipAndCombine (const labelUList &map, const bool hasFlip, const UList< T > &rhs, const CombineOp &cop, const NegateOp &negOp, List< T > &lhs) |
template<class T , class NegateOp > | |
static T | accessAndFlip (const UList< T > &values, const label index, const bool hasFlip, const NegateOp &negOp) |
template<class T , class NegateOp > | |
static List< T > | accessAndFlip (const UList< T > &values, const labelUList &indices, const bool hasFlip, const NegateOp &negOp) |
Class for obtaining halo face data for the boundary edges. The ordering follows that natural edge ordering of the underlying primitive patch.
Definition at line 59 of file faMeshBoundaryHalo.H.
|
explicit |
Default construct.
Definition at line 43 of file faMeshBoundaryHalo.C.
|
explicit |
Construct from mesh.
Definition at line 51 of file faMeshBoundaryHalo.C.
References faMeshBoundaryHalo::reset().
ClassName | ( | "faMeshBoundaryHalo" | ) |
void clear | ( | ) |
Clear out all parameters.
Definition at line 63 of file faMeshBoundaryHalo.C.
void reset | ( | const faMesh & | mesh | ) |
Redefine map and connectivity for a mesh.
Definition at line 85 of file faMeshBoundaryHalo.C.
References forAll, HashSet< Key, Hash >::insert(), UPstream::msgType(), processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), List< T >::resize(), UList< T >::size(), HashTable< T, Key, Hash >::sortedToc(), and globalIndex::toGlobal().
Referenced by faMesh::boundaryHaloMap(), and faMeshBoundaryHalo::faMeshBoundaryHalo().
Foam::label haloSize | ( | ) | const |
The local data size (output)
Definition at line 72 of file faMeshBoundaryHalo.C.
References UPstream::parRun().
|
inlinenoexcept |
List of local input mesh faces required.
Definition at line 103 of file faMeshBoundaryHalo.H.
void distributeSparse | ( | List< Type > & | fld, |
const labelUList & | sparseInputLocations, | ||
const labelUList & | compactOutputMapping | ||
) | const |
Distribute sparse data.
On output it is adjusted.
Definition at line 35 of file faMeshBoundaryHaloTemplates.C.
References mapDistributeBase::constructSize(), UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, UPstream::parRun(), UList< T >::size(), and Foam::Zero.
void distributeSparse | ( | List< Type > & | fld, |
const labelUList & | sparseInputLocations | ||
) | const |
Distribute sparse data.
On output it is adjusted.
Definition at line 90 of file faMeshBoundaryHaloTemplates.C.
References fld().
void distributeSparse | ( | List< Type > & | fld | ) | const |
Distribute sparse data.
The input field one enty per sparse id (inputMeshFaces). On output it will have for the input sparse The input field contains location.
Definition at line 101 of file faMeshBoundaryHaloTemplates.C.
References fld().