faMeshBoundaryHalo Class Reference

Class for obtaining halo face data for the boundary edges. The ordering follows that natural edge ordering of the underlying primitive patch. More...

Inheritance diagram for faMeshBoundaryHalo:
[legend]
Collaboration diagram for faMeshBoundaryHalo:
[legend]

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 labelListinputMeshFaces () 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 (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 labelListListsubMap () const
 From subsetted data back to original data. More...
 
labelListListsubMap ()
 From subsetted data back to original data. More...
 
const labelListListconstructMap () const
 From subsetted data to new reconstructed data. More...
 
labelListListconstructMap ()
 From subsetted data to new reconstructed data. More...
 
bool subHasFlip () const
 Does subMap include a sign. More...
 
boolsubHasFlip ()
 Does subMap include a sign. More...
 
bool constructHasFlip () const
 Does constructMap include a sign. More...
 
boolconstructHasFlip ()
 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 Public Member Functions inherited from mapDistributeBase
static List< labelPairschedule (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...
 
- 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)
 
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)
 
- Protected Attributes inherited from mapDistributeBase
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...
 

Detailed Description

Class for obtaining halo face data for the boundary edges. The ordering follows that natural edge ordering of the underlying primitive patch.

Note
The halo faces can be located on-processor or off-processor.
Source files

Definition at line 59 of file faMeshBoundaryHalo.H.

Constructor & Destructor Documentation

◆ faMeshBoundaryHalo() [1/2]

faMeshBoundaryHalo ( const label  comm = UPstream::worldComm)
explicit

Default construct.

Definition at line 43 of file faMeshBoundaryHalo.C.

◆ faMeshBoundaryHalo() [2/2]

faMeshBoundaryHalo ( const faMesh mesh)
explicit

Construct from mesh.

Definition at line 51 of file faMeshBoundaryHalo.C.

References faMeshBoundaryHalo::reset().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "faMeshBoundaryHalo"  )

◆ clear()

void clear ( )

Clear out all parameters.

Definition at line 63 of file faMeshBoundaryHalo.C.

◆ reset()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ haloSize()

Foam::label haloSize ( ) const

The local data size (output)

Definition at line 72 of file faMeshBoundaryHalo.C.

References UPstream::parRun().

Here is the call graph for this function:

◆ inputMeshFaces()

const labelList& inputMeshFaces ( ) const
inlinenoexcept

List of local input mesh faces required.

Note
will not correspond exactly to the boundary inside faces. Duplicates have been removed and it also contains the processor-local neighbour faces, which would otherwise not be handled by the distribute method.

Definition at line 103 of file faMeshBoundaryHalo.H.

◆ distributeSparse() [1/3]

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distributeSparse() [2/3]

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.

◆ distributeSparse() [3/3]

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().

Here is the call graph for this function:

The documentation for this class was generated from the following files: