Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
globalPoints Class Reference

Calculates points shared by more than two processor patches or cyclic patches. More...

Collaboration diagram for globalPoints:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("globalPoints")
 Declare name of the class and its debug switch. More...
 
 globalPoints (const polyMesh &mesh, const bool keepAllPoints, const bool mergeSeparated)
 Construct from mesh. More...
 
 globalPoints (const polyMesh &mesh, const indirectPrimitivePatch &coupledPatch, const bool keepAllPoints, const bool mergeSeparated)
 Construct from mesh and patch of coupled faces. Difference with. More...
 
const globalIndexglobalIndices () const
 Global numbering of untransformed (mesh or patch) points. More...
 
const globalIndexAndTransformglobalTransforms () const
 Global numbering of transformed (mesh or patch) points. More...
 
const labelListListpointPoints () const
 Non-transformed connected points per point (in mapDistribute. More...
 
labelListListpointPoints ()
 Non-transformed connected points per point (in mapDistribute. More...
 
const labelListListtransformedPointPoints () const
 Transformed points per point (in mapDistribute indices) More...
 
labelListListtransformedPointPoints ()
 Transformed points per point (in mapDistribute indices) More...
 
const mapDistributemap () const
 Corresponding map. More...
 
mapDistributemap ()
 Corresponding map. More...
 
const Map< label > & meshToProcPoint () const
 From (mesh or patch) point to index in procPoints. More...
 
const DynamicList< labelPairList > & procPoints () const
 procPoints is per point the connected points (in More...
 

Private Member Functions

label findSamePoint (const labelPairList &allInfo, const labelPair &info) const
 Find index of same processor+index. More...
 
labelPairList addSendTransform (const label patchI, const labelPairList &info) const
 
void addToSend (const polyPatch &, const label patchPointI, const labelPairList &, DynamicList< label > &patchFaces, DynamicList< label > &indexInFace, DynamicList< labelPairList > &allInfo) const
 Add information about patchPointI in relative indices to send. More...
 
bool mergeInfo (const labelPairList &nbrInfo, const label localPointI, labelPairList &myInfo) const
 Merge info from neighbour into my data. More...
 
bool storeInitialInfo (const labelPairList &nbrInfo, const label localPointI)
 Store (and merge) info for meshPointI. More...
 
bool mergeInfo (const labelPairList &nbrInfo, const label localPointI)
 Store (and merge) info for meshPointI. More...
 
void printProcPoint (const labelList &patchToMeshPoint, const labelPair &pointInfo) const
 Debug printing. More...
 
void printProcPoints (const labelList &patchToMeshPoint, const labelPairList &pointInfo) const
 
void initOwnPoints (const Map< label > &meshToPatchPoint, const bool allPoints, labelHashSet &changedPoints)
 Initialize procPoints_ to my patch points. allPoints = true: More...
 
void sendPatchPoints (const bool mergeSeparated, const Map< label > &, PstreamBuffers &, const labelHashSet &) const
 Send subset of procPoints to neighbours. More...
 
void receivePatchPoints (const bool mergeSeparated, const Map< label > &, const labelList &, PstreamBuffers &, labelHashSet &)
 Receive neighbour points and merge into my procPoints. More...
 
void remove (const labelList &patchToMeshPoint, const Map< label > &)
 Remove entries of size 2 where meshPoint is in provided Map. More...
 
void calculateSharedPoints (const Map< label > &, const labelList &, const bool keepAllPoints, const bool mergeSeparated)
 Do all calculations. More...
 
 globalPoints (const globalPoints &)
 Disallow default bitwise copy construct. More...
 
void operator= (const globalPoints &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static label countPatchPoints (const polyBoundaryMesh &)
 Count all points on processorPatches. Is all points for which. More...
 
static label meshToLocalPoint (const Map< label > &meshToPatchPoint, const label meshPointI)
 From mesh point to 'local point'. Is the mesh point itself. More...
 
static label localToMeshPoint (const labelList &patchToMeshPoint, const label localPointI)
 Opposite of meshToLocalPoint. More...
 
static labelList reverseMeshPoints (const cyclicPolyPatch &)
 Return mesh points of other side in same order as my meshPoints. More...
 

Private Attributes

const polyMeshmesh_
 Mesh reference. More...
 
globalIndex globalIndices_
 Global numbering of untransformed points. More...
 
const globalIndexAndTransform globalTransforms_
 Global numbering of transformed points. More...
 
const label nPatchPoints_
 Sum of points on processor patches (unfiltered, point on 2 patches. More...
 
DynamicList< labelPairListprocPoints_
 All points on boundaries and their corresponding connected points. More...
 
Map< labelmeshToProcPoint_
 Map from mesh (or patch) point to index in procPoints. More...
 
labelListList pointPoints_
 Non-transformed connected points per point (in mapDistribute. More...
 
labelListList transformedPointPoints_
 Transformed points per point (in mapDistribute indices) More...
 
autoPtr< mapDistributemap_
 Corresponding map. More...
 

Detailed Description

Calculates points shared by more than two processor patches or cyclic patches.

Is used in globalMeshData. (this info is needed for point/edge communication where processor swaps are not enough to exchange data)

Works purely topological and using local communication only. Needs:

Works by constructing equivalence lists for all the points on processor patches. These list are in globalIndexAndTransform numbering E.g.

      ((7 93)(4 731)(3 114))

means point 93 on proc7 is connected to point 731 on proc4 and 114 on proc3. It then assigns the lowest numbered processor to be the local 'master' and constructs a mapDistribute to send all data to this master.

Algorithm:

At this point one will have complete point-point connectivity for all points on processor patches. Now (optionally) remove point equivalences of size 2. These are just normal points shared between two neighbouring procPatches.

Note: the data held is either mesh point labels (construct from mesh only) or patch point labels (construct from mesh and patch).

Source files

Definition at line 100 of file globalPoints.H.

Constructor & Destructor Documentation

◆ globalPoints() [1/3]

globalPoints ( const globalPoints )
private

Disallow default bitwise copy construct.

◆ globalPoints() [2/3]

globalPoints ( const polyMesh mesh,
const bool  keepAllPoints,
const bool  mergeSeparated 
)

Construct from mesh.

keepAllPoints = false : filter out points that are on two neighbouring coupled patches only (so can be swapped) mergeSeparated: true : merge coupled points across separated patches. false : do not merge across coupled separated patches.

Definition at line 1092 of file globalPoints.C.

◆ globalPoints() [3/3]

globalPoints ( const polyMesh mesh,
const indirectPrimitivePatch coupledPatch,
const bool  keepAllPoints,
const bool  mergeSeparated 
)

Construct from mesh and patch of coupled faces. Difference with.

construct from mesh only is that this stores the meshToProcPoint, procPoints as patch local point labels instead of mesh point labels.

Definition at line 1121 of file globalPoints.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::meshPointMap(), and PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints().

Here is the call graph for this function:

Member Function Documentation

◆ countPatchPoints()

Foam::label countPatchPoints ( const polyBoundaryMesh patches)
staticprivate

Count all points on processorPatches. Is all points for which.

information is collected.

Definition at line 45 of file globalPoints.C.

References polyPatch::coupled(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), and patches.

Here is the call graph for this function:

◆ findSamePoint()

Foam::label findSamePoint ( const labelPairList allInfo,
const labelPair info 
) const
private

Find index of same processor+index.

Definition at line 64 of file globalPoints.C.

References forAll.

◆ addSendTransform()

Foam::labelPairList addSendTransform ( const label  patchI,
const labelPairList info 
) const
private

Definition at line 88 of file globalPoints.C.

References forAll, and List::size().

Here is the call graph for this function:

◆ addToSend()

void addToSend ( const polyPatch pp,
const label  patchPointI,
const labelPairList knownInfo,
DynamicList< label > &  patchFaces,
DynamicList< label > &  indexInFace,
DynamicList< labelPairList > &  allInfo 
) const
private

Add information about patchPointI in relative indices to send.

buffers (patchFaces, indexInFace etc.)

Definition at line 132 of file globalPoints.C.

References DynamicList::append(), f(), Foam::findIndex(), forAll, patchIdentifier::index(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), patchFaces(), pFaces, and PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces().

Here is the call graph for this function:

◆ mergeInfo() [1/2]

bool mergeInfo ( const labelPairList nbrInfo,
const label  localPointI,
labelPairList myInfo 
) const
private

Merge info from neighbour into my data.

Definition at line 166 of file globalPoints.C.

References forAll, List::setSize(), List::size(), and List::transfer().

Here is the call graph for this function:

◆ meshToLocalPoint()

Foam::label meshToLocalPoint ( const Map< label > &  meshToPatchPoint,
const label  meshPointI 
)
staticprivate

From mesh point to 'local point'. Is the mesh point itself.

if meshToPatchPoint is empty.

Definition at line 241 of file globalPoints.C.

◆ localToMeshPoint()

Foam::label localToMeshPoint ( const labelList patchToMeshPoint,
const label  localPointI 
)
staticprivate

Opposite of meshToLocalPoint.

Definition at line 256 of file globalPoints.C.

References List::size().

Here is the call graph for this function:

◆ storeInitialInfo()

bool storeInitialInfo ( const labelPairList nbrInfo,
const label  localPointI 
)
private

Store (and merge) info for meshPointI.

Definition at line 321 of file globalPoints.C.

◆ mergeInfo() [2/2]

bool mergeInfo ( const labelPairList nbrInfo,
const label  localPointI 
)
private

Store (and merge) info for meshPointI.

Definition at line 273 of file globalPoints.C.

◆ printProcPoint()

void printProcPoint ( const labelList patchToMeshPoint,
const labelPair pointInfo 
) const
private

Debug printing.

Definition at line 352 of file globalPoints.C.

References Foam::Pout.

◆ printProcPoints()

void printProcPoints ( const labelList patchToMeshPoint,
const labelPairList pointInfo 
) const
private

Definition at line 377 of file globalPoints.C.

References Foam::endl(), forAll, and Foam::Pout.

Here is the call graph for this function:

◆ initOwnPoints()

void initOwnPoints ( const Map< label > &  meshToPatchPoint,
const bool  allPoints,
labelHashSet changedPoints 
)
private

Initialize procPoints_ to my patch points. allPoints = true:

seed with all patch points, = false: only boundaryPoints().

Definition at line 392 of file globalPoints.C.

References Foam::DelaunayMeshTools::allPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::boundaryPoints(), polyPatch::coupled(), forAll, HashSet< Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), and patches.

Here is the call graph for this function:

◆ sendPatchPoints()

void sendPatchPoints ( const bool  mergeSeparated,
const Map< label > &  meshToPatchPoint,
PstreamBuffers pBufs,
const labelHashSet changedPoints 
) const
private

◆ receivePatchPoints()

void receivePatchPoints ( const bool  mergeSeparated,
const Map< label > &  meshToPatchPoint,
const labelList patchToMeshPoint,
PstreamBuffers pBufs,
labelHashSet changedPoints 
)
private

◆ remove()

void remove ( const labelList patchToMeshPoint,
const Map< label > &  directNeighbours 
)
private

Remove entries of size 2 where meshPoint is in provided Map.

Used to remove normal face-face connected points.

Definition at line 727 of file globalPoints.C.

References forAllConstIter(), and List::size().

Here is the call graph for this function:

◆ reverseMeshPoints()

Foam::labelList reverseMeshPoints ( const cyclicPolyPatch pp)
staticprivate

Return mesh points of other side in same order as my meshPoints.

Definition at line 838 of file globalPoints.C.

References forAll, cyclicPolyPatch::neighbPatch(), and PrimitivePatch< Face, FaceList, PointField, PointType >::points().

Here is the call graph for this function:

◆ calculateSharedPoints()

void calculateSharedPoints ( const Map< label > &  meshToPatchPoint,
const labelList patchToMeshPoint,
const bool  keepAllPoints,
const bool  mergeSeparated 
)
private

Do all calculations.

Definition at line 860 of file globalPoints.C.

References Foam::endl(), PstreamBuffers::finishedSends(), forAllConstIter(), Foam::Pout, Foam::reduce(), List::setSize(), List::size(), HashTable::size(), Foam::sort(), and Foam::transform().

Here is the call graph for this function:

◆ operator=()

void operator= ( const globalPoints )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "globalPoints"  )

Declare name of the class and its debug switch.

◆ globalIndices()

const globalIndex& globalIndices ( ) const
inline

Global numbering of untransformed (mesh or patch) points.

Definition at line 309 of file globalPoints.H.

References globalPoints::globalIndices_.

◆ globalTransforms()

const globalIndexAndTransform& globalTransforms ( ) const
inline

Global numbering of transformed (mesh or patch) points.

Definition at line 315 of file globalPoints.H.

References globalPoints::globalTransforms_.

◆ pointPoints() [1/2]

const labelListList& pointPoints ( ) const
inline

Non-transformed connected points per point (in mapDistribute.

indices)

Definition at line 322 of file globalPoints.H.

Referenced by globalMeshData::calcGlobalCoPointSlaves(), globalMeshData::calcGlobalPointSlaves(), and globalMeshData::calcSharedPoints().

Here is the caller graph for this function:

◆ pointPoints() [2/2]

labelListList& pointPoints ( )
inline

Non-transformed connected points per point (in mapDistribute.

indices)

Definition at line 329 of file globalPoints.H.

◆ transformedPointPoints() [1/2]

const labelListList& transformedPointPoints ( ) const
inline

Transformed points per point (in mapDistribute indices)

Definition at line 335 of file globalPoints.H.

References globalPoints::transformedPointPoints_.

Referenced by globalMeshData::calcGlobalPointSlaves(), and globalMeshData::calcSharedPoints().

Here is the caller graph for this function:

◆ transformedPointPoints() [2/2]

labelListList& transformedPointPoints ( )
inline

Transformed points per point (in mapDistribute indices)

Definition at line 341 of file globalPoints.H.

References globalPoints::transformedPointPoints_.

◆ map() [1/2]

const mapDistribute& map ( ) const
inline

Corresponding map.

Definition at line 347 of file globalPoints.H.

References globalPoints::map_.

Referenced by globalMeshData::calcGlobalCoPointSlaves(), globalMeshData::calcGlobalPointSlaves(), and globalMeshData::calcSharedPoints().

Here is the caller graph for this function:

◆ map() [2/2]

mapDistribute& map ( )
inline

Corresponding map.

Definition at line 353 of file globalPoints.H.

References globalPoints::map_.

◆ meshToProcPoint()

const Map<label>& meshToProcPoint ( ) const
inline

From (mesh or patch) point to index in procPoints.

Definition at line 359 of file globalPoints.H.

References globalPoints::meshToProcPoint_.

◆ procPoints()

const DynamicList<labelPairList>& procPoints ( ) const
inline

procPoints is per point the connected points (in

globalTransformAndIndex point numbers)

Definition at line 366 of file globalPoints.H.

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Mesh reference.

Definition at line 105 of file globalPoints.H.

◆ globalIndices_

globalIndex globalIndices_
private

Global numbering of untransformed points.

Definition at line 108 of file globalPoints.H.

Referenced by globalPoints::globalIndices().

◆ globalTransforms_

const globalIndexAndTransform globalTransforms_
private

Global numbering of transformed points.

Definition at line 111 of file globalPoints.H.

Referenced by globalPoints::globalTransforms().

◆ nPatchPoints_

const label nPatchPoints_
private

Sum of points on processor patches (unfiltered, point on 2 patches.

counts as 2)

Definition at line 115 of file globalPoints.H.

◆ procPoints_

DynamicList<labelPairList> procPoints_
private

All points on boundaries and their corresponding connected points.

on other processors.

Definition at line 119 of file globalPoints.H.

◆ meshToProcPoint_

Map<label> meshToProcPoint_
private

Map from mesh (or patch) point to index in procPoints.

Definition at line 122 of file globalPoints.H.

Referenced by globalPoints::meshToProcPoint().

◆ pointPoints_

labelListList pointPoints_
private

Non-transformed connected points per point (in mapDistribute.

indices)

Definition at line 129 of file globalPoints.H.

◆ transformedPointPoints_

labelListList transformedPointPoints_
private

Transformed points per point (in mapDistribute indices)

Definition at line 132 of file globalPoints.H.

Referenced by globalPoints::transformedPointPoints().

◆ map_

autoPtr<mapDistribute> map_
private

Corresponding map.

Definition at line 135 of file globalPoints.H.

Referenced by globalPoints::map().


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