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... | |
![]() | |
ClassName ("mapDistributeBase") | |
mapDistributeBase (const label comm=UPstream::worldComm) | |
Construct null. More... | |
mapDistributeBase (const mapDistributeBase &map) | |
Copy construct. More... | |
mapDistributeBase (mapDistributeBase &&map) | |
Move construct. More... | |
mapDistributeBase (const label constructSize, labelListList &&subMap, labelListList &&constructMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
Construct from components. More... | |
mapDistributeBase (const labelUList &sendProcs, const labelUList &recvProcs, const label comm=UPstream::worldComm) | |
Construct from reverse addressing: per data item the send. More... | |
mapDistributeBase (const globalIndex &, labelList &elements, List< Map< label >> &compactMap, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) | |
Construct from list of (possibly) remote elements in globalIndex. More... | |
mapDistributeBase (const globalIndex &, labelListList &cellCells, List< Map< label >> &compactMap, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) | |
Special variant that works with the info sorted into bins. More... | |
mapDistributeBase (labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
Construct from my elements to send. Assumes layout is my elements. More... | |
mapDistributeBase (Istream &is) | |
Construct from Istream. More... | |
label | constructSize () const |
Constructed data size. More... | |
label & | constructSize () |
Constructed data size. More... | |
const labelListList & | subMap () const |
From subsetted data back to original data. More... | |
labelListList & | subMap () |
From subsetted data back to original data. More... | |
const labelListList & | constructMap () const |
From subsetted data to new reconstructed data. More... | |
labelListList & | constructMap () |
From subsetted data to new reconstructed data. More... | |
bool | subHasFlip () const |
Does subMap include a sign. More... | |
bool & | subHasFlip () |
Does subMap include a sign. More... | |
bool | constructHasFlip () const |
Does constructMap include a sign. More... | |
bool & | constructHasFlip () |
Does constructMap include a sign. More... | |
label | comm () const |
const List< labelPair > & | schedule () const |
Return a schedule. Demand driven. See above. More... | |
void | transfer (mapDistributeBase &rhs) |
Transfer the contents of the argument and annul the argument. More... | |
void | compact (const boolList &elemIsUsed, const int tag=UPstream::msgType()) |
Compact maps. Gets per field a bool whether it is used (locally) More... | |
void | compact (const boolList &elemIsUsed, const label localSize, labelList &oldToNewSub, labelList &oldToNewConstruct, const int tag=UPstream::msgType()) |
Compact all maps and layout. Returns compaction maps for. More... | |
template<class T > | |
void | distribute (List< T > &fld, const int tag=UPstream::msgType()) const |
Distribute data using default commsType. More... | |
template<class T , class negateOp > | |
void | distribute (List< T > &fld, const negateOp &negOp, const int tag=UPstream::msgType()) const |
Distribute data using default commsType. More... | |
template<class T > | |
void | distribute (DynamicList< T > &fld, const int tag=UPstream::msgType()) const |
Distribute data using default commsType. More... | |
template<class T > | |
void | reverseDistribute (const label constructSize, List< T > &, const int tag=UPstream::msgType()) const |
Reverse distribute data using default commsType. More... | |
template<class T > | |
void | reverseDistribute (const label constructSize, const T &nullValue, List< T > &fld, const int tag=UPstream::msgType()) const |
Reverse distribute data using default commsType. More... | |
template<class T > | |
void | send (PstreamBuffers &, const List< T > &) const |
Do all sends using PstreamBuffers. More... | |
template<class T > | |
void | receive (PstreamBuffers &, List< T > &) 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 | updateMesh (const mapPolyMesh &) |
Correct for topo change. More... | |
void | operator= (const mapDistributeBase &rhs) |
Copy assignment. More... | |
void | operator= (mapDistributeBase &&rhs) |
Move assignment. More... | |
Additional Inherited Members | |
![]() | |
static List< labelPair > | schedule (const labelListList &subMap, const labelListList &constructMap, const int tag, const label comm=UPstream::worldComm) |
Calculate a 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... | |
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 > &, const negateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Distribute data. Note:schedule only used for. 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 > &, const T &nullValue, const CombineOp &cop, const negateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Distribute data. If multiple processors writing to same. More... | |
![]() | |
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 void | checkReceivedSize (const label proci, const label expectedSize, const label receivedSize) |
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 > &fld, const label index, const bool hasFlip, const negateOp &negOp) |
![]() | |
label | constructSize_ |
Size of reconstructed data. More... | |
labelListList | subMap_ |
Maps from subsetted data back to original data. More... | |
labelListList | constructMap_ |
Maps from subsetted data to new reconstructed data. More... | |
bool | subHasFlip_ |
Whether subMap includes flip or not. More... | |
bool | constructHasFlip_ |
Whether constructMap includes flip or not. More... | |
label | comm_ |
Communicator to use for parallel operations. More... | |
autoPtr< List< labelPair > > | schedulePtr_ |
Schedule. More... | |
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(), UPstream::myProcNo(), UPstream::nProcs(), UPstream::parRun(), and List< T >::resize().
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 36 of file faMeshBoundaryHaloTemplates.C.
References UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld, forAll, UList< T >::size(), and Foam::Zero.
Referenced by faMeshBoundaryHalo::distributeSparse().
void distributeSparse | ( | List< Type > & | fld, |
const labelUList & | sparseInputLocations | ||
) | const |
Distribute sparse data.
On output it is adjusted.
Definition at line 91 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 faMeshBoundaryHalo::distributeSparse().