Public Member Functions | Private Member Functions | Private Attributes
InteractionLists< ParticleType > Class Template Reference

Builds direct interaction list, specifying which local (real) cells are potentially in range of each other. More...

Inheritance diagram for InteractionLists< ParticleType >:
Inheritance graph
[legend]
Collaboration diagram for InteractionLists< ParticleType >:
Collaboration graph
[legend]

Public Member Functions

 InteractionLists (const polyMesh &mesh)
 Construct null from mesh. More...
 
 InteractionLists (const polyMesh &mesh, scalar maxDistance, Switch writeCloud=false, const word &UName="U")
 Construct and call function to create all information from. More...
 
 ~InteractionLists ()
 
void sendReferredData (const List< DynamicList< ParticleType * > > &cellOccupancy, PstreamBuffers &pBufs)
 Prepare and send referred particles and wall data,. More...
 
void receiveReferredData (PstreamBuffers &pBufs, const label startReq=0)
 Receive referred data. More...
 
const polyMeshmesh () const
 Return access to the mesh. More...
 
const mapDistributecellMap () const
 Return access to the cellMap. More...
 
const mapDistributewallFaceMap () const
 Return access to the wallFaceMap. More...
 
const labelListListdil () const
 Return access to the direct interaction list. More...
 
const labelListListdwfil () const
 Return access to the direct wall face interaction list. More...
 
const labelListListril () const
 Return access to the referred interaction list. More...
 
const labelListListrilInverse () const
 Return access to the inverse referred interaction list. More...
 
const labelListListrwfil () const
 Return access to the referred wall face interaction list. More...
 
const labelListListrwfilInverse () const
 Return access to the inverse referred wall face. More...
 
const List< labelPair > & cellIndexAndTransformToDistribute () const
 Return access to the cellIndexAndTransformToDistribute list. More...
 
const List< labelPair > & wallFaceIndexAndTransformToDistribute () const
 Return access to the wallFaceIndexAndTransformToDistribute list. More...
 
const List< referredWallFace > & referredWallFaces () const
 Return access to the referred wall faces. More...
 
const wordUName () const
 Return the name of the velocity field. More...
 
const List< vector > & referredWallData () const
 Return access to the referred wall data. More...
 
const List< IDLList< ParticleType > > & referredParticles () const
 Return access to the referred particle container. More...
 
List< IDLList< ParticleType > > & referredParticles ()
 Return non-const access to the referred particle container. More...
 

Private Member Functions

void buildInteractionLists ()
 Construct all interaction lists. More...
 
void findExtendedProcBbsInRange (const treeBoundBox &procBb, const List< treeBoundBox > &allExtendedProcBbs, const globalIndexAndTransform &globalTransforms, List< treeBoundBox > &extendedProcBbsInRange, List< label > &extendedProcBbsTransformIndex, List< label > &extendedProcBbsOrigProc)
 Find the other processors which have interaction range. More...
 
void buildMap (autoPtr< mapDistribute > &mapPtr, const List< label > &toProc)
 Build the mapDistribute from information about which entry. More...
 
void prepareParticlesToRefer (const List< DynamicList< ParticleType * > > &cellOccupancy)
 Fill the referredParticles container with particles that. More...
 
void prepareParticleToBeReferred (ParticleType *particle, labelPair iat)
 Prepare particle to be referred. More...
 
void fillReferredParticleCloud ()
 Fill the referredParticles so that it will be written out. More...
 
void prepareWallDataToRefer ()
 Populate the referredWallData container with data that. More...
 
void writeReferredWallFaces () const
 Write the referred wall faces out for debug. More...
 
 InteractionLists (const InteractionLists &)
 Disallow default bitwise copy construct. More...
 
void operator= (const InteractionLists &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const polyMeshmesh_
 Reference to mesh. More...
 
Cloud< ParticleType > cloud_
 Dummy cloud to give to particles. More...
 
const Switch writeCloud_
 Switch controlling whether or not the cloud gets populated. More...
 
autoPtr< mapDistributecellMapPtr_
 mapDistribute to exchange referred particles into referred cells More...
 
autoPtr< mapDistributewallFaceMapPtr_
 mapDistribute to exchange wall face data More...
 
scalar maxDistance_
 Maximum distance over which interactions will be detected. More...
 
labelListList dil_
 Direct interaction list. More...
 
labelListList dwfil_
 Wall faces on this processor that are in interaction range. More...
 
labelListList ril_
 Referred interaction list - which real cells are to be. More...
 
labelListList rilInverse_
 Inverse addressing for referred cells, specifies which. More...
 
labelListList rwfil_
 Which real cells on this on this processor are in. More...
 
labelListList rwfilInverse_
 Inverse addressing for referred wall faces, specifies. More...
 
List< labelPaircellIndexAndTransformToDistribute_
 Which cells are to be sent via the cellMap, and an index. More...
 
List< labelPairwallFaceIndexAndTransformToDistribute_
 Which wallFaces are to be sent via the wallFaceMap, and an index. More...
 
List< referredWallFacereferredWallFaces_
 Referred wall faces. More...
 
const word UName_
 Velocity field name, default to "U". More...
 
List< vectorreferredWallData_
 Referred wall face velocity field values;. More...
 
List< IDLList< ParticleType > > referredParticles_
 Referred particle container. More...
 

Detailed Description

template<class ParticleType>
class Foam::InteractionLists< ParticleType >

Builds direct interaction list, specifying which local (real) cells are potentially in range of each other.

Builds referred interaction list, specifying which cells are required to provide interactions across coupled patches (cyclic or processor). Generates referred cells, and refers particles to the correct processor, applying the appropriate transform.

Simultaneous communication and computation is possible using:

PstreamBuffers pBufs(Pstream::nonBlocking);
label startOfRequests = Pstream::nRequests();
il_.sendReferredData(cellOccupancy_, pBufs);
// Do other things
il_.receiveReferredData(pBufs, startOfRequests);

Requiring data:

List<DynamicList<typename CloudType::parcelType*> > cellOccupancy_;
Source files

Definition at line 79 of file InteractionLists.H.

Constructor & Destructor Documentation

◆ InteractionLists() [1/3]

InteractionLists ( const InteractionLists< ParticleType > &  )
private

Disallow default bitwise copy construct.

◆ InteractionLists() [2/3]

InteractionLists ( const polyMesh mesh)

Construct null from mesh.

Definition at line 1099 of file InteractionLists.C.

◆ InteractionLists() [3/3]

InteractionLists ( const polyMesh mesh,
scalar  maxDistance,
Switch  writeCloud = false,
const word UName = "U" 
)

Construct and call function to create all information from.

the mesh

Definition at line 1122 of file InteractionLists.C.

◆ ~InteractionLists()

Definition at line 1153 of file InteractionLists.C.

Member Function Documentation

◆ buildInteractionLists()

void buildInteractionLists
private

Construct all interaction lists.

Definition at line 37 of file InteractionLists.C.

◆ findExtendedProcBbsInRange()

void findExtendedProcBbsInRange ( const treeBoundBox procBb,
const List< treeBoundBox > &  allExtendedProcBbs,
const globalIndexAndTransform globalTransforms,
List< treeBoundBox > &  extendedProcBbsInRange,
List< label > &  extendedProcBbsTransformIndex,
List< label > &  extendedProcBbsOrigProc 
)
private

Find the other processors which have interaction range.

extended bound boxes in range

Definition at line 637 of file InteractionLists.C.

◆ buildMap()

void buildMap ( autoPtr< mapDistribute > &  mapPtr,
const List< label > &  toProc 
)
private

Build the mapDistribute from information about which entry.

is to be sent to which processor

Definition at line 829 of file InteractionLists.C.

◆ prepareParticlesToRefer()

void prepareParticlesToRefer ( const List< DynamicList< ParticleType * > > &  cellOccupancy)
private

Fill the referredParticles container with particles that.

will be referred

Definition at line 916 of file InteractionLists.C.

◆ prepareParticleToBeReferred()

void prepareParticleToBeReferred ( ParticleType *  particle,
labelPair  iat 
)
private

Prepare particle to be referred.

Definition at line 959 of file InteractionLists.C.

◆ fillReferredParticleCloud()

void fillReferredParticleCloud
private

Fill the referredParticles so that it will be written out.

Definition at line 984 of file InteractionLists.C.

◆ prepareWallDataToRefer()

void prepareWallDataToRefer
private

Populate the referredWallData container with data that.

will be referred.

Definition at line 1006 of file InteractionLists.C.

◆ writeReferredWallFaces()

void writeReferredWallFaces
private

Write the referred wall faces out for debug.

Definition at line 1052 of file InteractionLists.C.

◆ operator=()

void operator= ( const InteractionLists< ParticleType > &  )
private

Disallow default bitwise assignment.

◆ sendReferredData()

void sendReferredData ( const List< DynamicList< ParticleType * > > &  cellOccupancy,
PstreamBuffers pBufs 
)

Prepare and send referred particles and wall data,.

nonBlocking communication

Definition at line 1161 of file InteractionLists.C.

◆ receiveReferredData()

void receiveReferredData ( PstreamBuffers pBufs,
const label  startReq = 0 
)

Receive referred data.

Definition at line 1209 of file InteractionLists.C.

◆ mesh()

const Foam::polyMesh & mesh
inline

Return access to the mesh.

Definition at line 31 of file InteractionListsI.H.

◆ cellMap()

const Foam::mapDistribute & cellMap
inline

Return access to the cellMap.

Definition at line 39 of file InteractionListsI.H.

◆ wallFaceMap()

const Foam::mapDistribute & wallFaceMap
inline

Return access to the wallFaceMap.

Definition at line 47 of file InteractionListsI.H.

◆ dil()

const Foam::labelListList & dil
inline

Return access to the direct interaction list.

Definition at line 54 of file InteractionListsI.H.

◆ dwfil()

const Foam::labelListList & dwfil
inline

Return access to the direct wall face interaction list.

Definition at line 62 of file InteractionListsI.H.

◆ ril()

const Foam::labelListList & ril
inline

Return access to the referred interaction list.

Definition at line 69 of file InteractionListsI.H.

◆ rilInverse()

const Foam::labelListList & rilInverse
inline

Return access to the inverse referred interaction list.

Definition at line 77 of file InteractionListsI.H.

◆ rwfil()

const Foam::labelListList & rwfil
inline

Return access to the referred wall face interaction list.

Definition at line 84 of file InteractionListsI.H.

◆ rwfilInverse()

const Foam::labelListList & rwfilInverse
inline

Return access to the inverse referred wall face.

interaction list

Definition at line 92 of file InteractionListsI.H.

◆ cellIndexAndTransformToDistribute()

const Foam::List< Foam::labelPair > & cellIndexAndTransformToDistribute
inline

Return access to the cellIndexAndTransformToDistribute list.

Definition at line 100 of file InteractionListsI.H.

◆ wallFaceIndexAndTransformToDistribute()

const Foam::List< Foam::labelPair > & wallFaceIndexAndTransformToDistribute
inline

Return access to the wallFaceIndexAndTransformToDistribute list.

Definition at line 109 of file InteractionListsI.H.

◆ referredWallFaces()

const Foam::List< Foam::referredWallFace > & referredWallFaces
inline

Return access to the referred wall faces.

Definition at line 117 of file InteractionListsI.H.

◆ UName()

const Foam::word & UName
inline

Return the name of the velocity field.

Definition at line 124 of file InteractionListsI.H.

◆ referredWallData()

const Foam::List< Foam::vector > & referredWallData
inline

Return access to the referred wall data.

Definition at line 132 of file InteractionListsI.H.

◆ referredParticles() [1/2]

Foam::List< Foam::IDLList< ParticleType > > & referredParticles
inline

Return access to the referred particle container.

Definition at line 140 of file InteractionListsI.H.

◆ referredParticles() [2/2]

List<IDLList<ParticleType> >& referredParticles ( )
inline

Return non-const access to the referred particle container.

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Reference to mesh.

Definition at line 84 of file InteractionLists.H.

◆ cloud_

Cloud<ParticleType> cloud_
private

Dummy cloud to give to particles.

Definition at line 87 of file InteractionLists.H.

◆ writeCloud_

const Switch writeCloud_
private

Switch controlling whether or not the cloud gets populated.

with the referred particles, hence gets written out

Definition at line 91 of file InteractionLists.H.

◆ cellMapPtr_

autoPtr<mapDistribute> cellMapPtr_
private

mapDistribute to exchange referred particles into referred cells

Definition at line 94 of file InteractionLists.H.

◆ wallFaceMapPtr_

autoPtr<mapDistribute> wallFaceMapPtr_
private

mapDistribute to exchange wall face data

Definition at line 97 of file InteractionLists.H.

◆ maxDistance_

scalar maxDistance_
private

Maximum distance over which interactions will be detected.

Definition at line 100 of file InteractionLists.H.

◆ dil_

labelListList dil_
private

Direct interaction list.

Definition at line 103 of file InteractionLists.H.

◆ dwfil_

labelListList dwfil_
private

Wall faces on this processor that are in interaction range.

of each each cell (direct wall face interaction list)

Definition at line 107 of file InteractionLists.H.

◆ ril_

labelListList ril_
private

Referred interaction list - which real cells are to be.

supplied with particle interactions from the referred particle container with the same index.

Definition at line 112 of file InteractionLists.H.

◆ rilInverse_

labelListList rilInverse_
private

Inverse addressing for referred cells, specifies which.

referred cells (indices of entries in the ril_ and referredParticles_ lists) interact with the real cell indexed in this container.

Definition at line 118 of file InteractionLists.H.

◆ rwfil_

labelListList rwfil_
private

Which real cells on this on this processor are in.

interaction range of each referred wall face (referred wall face interaction list)

Definition at line 123 of file InteractionLists.H.

◆ rwfilInverse_

labelListList rwfilInverse_
private

Inverse addressing for referred wall faces, specifies.

which referred wall faces interact with the real cells indexed in this container.

Definition at line 128 of file InteractionLists.H.

◆ cellIndexAndTransformToDistribute_

List<labelPair> cellIndexAndTransformToDistribute_
private

Which cells are to be sent via the cellMap, and an index.

specifying how they should be transformed.

Definition at line 132 of file InteractionLists.H.

◆ wallFaceIndexAndTransformToDistribute_

List<labelPair> wallFaceIndexAndTransformToDistribute_
private

Which wallFaces are to be sent via the wallFaceMap, and an index.

specifying how they should be transformed.

Definition at line 136 of file InteractionLists.H.

◆ referredWallFaces_

List<referredWallFace> referredWallFaces_
private

Referred wall faces.

Definition at line 139 of file InteractionLists.H.

◆ UName_

const word UName_
private

Velocity field name, default to "U".

Definition at line 142 of file InteractionLists.H.

◆ referredWallData_

List<vector> referredWallData_
private

Referred wall face velocity field values;.

Definition at line 145 of file InteractionLists.H.

◆ referredParticles_

List<IDLList<ParticleType> > referredParticles_
private

Referred particle container.

Definition at line 148 of file InteractionLists.H.


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