OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

mapDistribute Class Reference

Class containing processor-to-processor mapping information. More...

Collaboration diagram for mapDistribute:

List of all members.


Public Member Functions

 mapDistribute (const label constructSize, const labelListList &subMap, const labelListList &constructMap)
 Construct from components.
 mapDistribute (const label constructSize, labelListList &subMap, labelListList &constructMap, const bool reUse)
 (optionally destructively) construct from components
 mapDistribute (const labelList &sendProcs, const labelList &recvProcs)
 Construct from reverse addressing: per data item the send.
 mapDistribute (const mapDistribute &)
 Construct copy.
label constructSize () const
 Constructed data size.
label & constructSize ()
 Constructed data size.
const labelListList & subMap () const
 From subsetted data back to original data.
labelListList & subMap ()
 From subsetted data back to original data.
const labelListList & constructMap () const
 From subsetted data to new reconstructed data.
labelListList & constructMap ()
 From subsetted data to new reconstructed data.
const List< labelPair > & schedule () const
 Return a schedule. Demand driven. See above.
void compact (const boolList &elemIsUsed)
 Compact maps. Gets per field a bool whether it is used (locally).
template<class T >
void distribute (List< T > &fld) const
 Distribute data using default commsType.
void updateMesh (const mapPolyMesh &)
 Correct for topo change.
void operator= (const mapDistribute &)

Static Public Member Functions

static List< labelPair > schedule (const labelListList &subMap, const labelListList &constructMap)
 Calculate a schedule. See above.
template<class T >
static void distribute (const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const labelListList &constructMap, List< T > &)
 Distribute data. Note:schedule only used for Pstream::scheduled.
template<class T , class CombineOp >
static void distribute (const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const labelListList &constructMap, List< T > &, const CombineOp &cop, const T &nullValue)
 Distribute data. If multiple processors writing to same.

Detailed Description

Class containing processor-to-processor mapping information.

We store mapping from the bits-to-send to the complete starting list (subXXXMap) and from the received bits to their location in the new list (constructXXXMap).

Note: Schedule is a list of processor pairs (one send, one receive. One of them will be myself) which forms a scheduled (i.e. non-buffered) exchange. See distribute on how to use it. Note2: number of items send on one processor have to equal the number of items received on the other processor.

Source files

Definition at line 61 of file mapDistribute.H.


Constructor & Destructor Documentation

mapDistribute ( const label  constructSize,
const labelListList &  subMap,
const labelListList &  constructMap 
)

Construct from components.

Definition at line 164 of file mapDistribute.C.

mapDistribute ( const label  constructSize,
labelListList &  subMap,
labelListList &  constructMap,
const bool  reUse 
)

(optionally destructively) construct from components

Definition at line 179 of file mapDistribute.C.

mapDistribute ( const labelList &  sendProcs,
const labelList &  recvProcs 
)

Construct from reverse addressing: per data item the send.

processor and the receive processor. All processors get same data.

Definition at line 194 of file mapDistribute.C.

mapDistribute ( const mapDistribute &  map  ) 

Construct copy.

Definition at line 267 of file mapDistribute.C.


Member Function Documentation

label constructSize (  )  const [inline]

Constructed data size.

Definition at line 118 of file mapDistribute.H.

Referenced by extendedFaceToCellStencil::collectData(), and extendedCellToFaceStencil::collectData().

Here is the caller graph for this function:

label& constructSize (  )  [inline]

Constructed data size.

Definition at line 124 of file mapDistribute.H.

const labelListList& subMap (  )  const [inline]

From subsetted data back to original data.

Definition at line 130 of file mapDistribute.H.

labelListList& subMap (  )  [inline]

From subsetted data back to original data.

Definition at line 136 of file mapDistribute.H.

const labelListList& constructMap (  )  const [inline]

From subsetted data to new reconstructed data.

Definition at line 142 of file mapDistribute.H.

labelListList& constructMap (  )  [inline]

From subsetted data to new reconstructed data.

Definition at line 148 of file mapDistribute.H.

Foam::List< Foam::labelPair > schedule ( const labelListList &  subMap,
const labelListList &  constructMap 
) [static]

const Foam::List< Foam::labelPair > & schedule (  )  const

Return a schedule. Demand driven. See above.

Definition at line 144 of file mapDistribute.C.

void compact ( const boolList &  elemIsUsed  ) 

Compact maps. Gets per field a bool whether it is used (locally).

and works out itself what this side and sender side can remove from maps.

Definition at line 278 of file mapDistribute.C.

void distribute ( const Pstream::commsTypes  commsType,
const List< labelPair > &  schedule,
const label  constructSize,
const labelListList &  subMap,
const labelListList &  constructMap,
List< T > &  field,
const CombineOp &  cop,
const T &  nullValue 
) [inline, static]

Distribute data. If multiple processors writing to same.

position adds contributions using cop.

Definition at line 326 of file mapDistributeTemplates.C.

void distribute ( List< T > &  fld  )  const [inline]

Distribute data using default commsType.

Definition at line 208 of file mapDistribute.H.

References mapDistribute::distribute(), and Pstream::nonBlocking.

Here is the call graph for this function:

void updateMesh ( const mapPolyMesh &   )  [inline]

Correct for topo change.

Definition at line 253 of file mapDistribute.H.

void operator= ( const mapDistribute &  rhs  ) 

Definition at line 418 of file mapDistribute.C.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd