Calculates points shared by more than two processor patches or cyclic patches. More...
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 globalIndex & | globalIndices () const |
Global numbering of untransformed (mesh or patch) points. More... | |
const globalIndexAndTransform & | globalTransforms () const |
Global numbering of transformed (mesh or patch) points. More... | |
const labelListList & | pointPoints () const |
Non-transformed connected points per point (in mapDistribute. More... | |
labelListList & | pointPoints () |
Non-transformed connected points per point (in mapDistribute. More... | |
const labelListList & | transformedPointPoints () const |
Transformed points per point (in mapDistribute indices) More... | |
labelListList & | transformedPointPoints () |
Transformed points per point (in mapDistribute indices) More... | |
const mapDistribute & | map () const |
Corresponding map. More... | |
mapDistribute & | map () |
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 polyMesh & | mesh_ |
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< labelPairList > | procPoints_ |
All points on boundaries and their corresponding connected points. More... | |
Map< label > | meshToProcPoint_ |
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< mapDistribute > | map_ |
Corresponding map. More... | |
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).
Definition at line 100 of file globalPoints.H.
|
private |
Disallow default bitwise copy construct.
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 | ( | 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().
|
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.
|
private |
Find index of same processor+index.
Definition at line 64 of file globalPoints.C.
References forAll.
|
private |
Definition at line 88 of file globalPoints.C.
References forAll, and List::size().
|
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().
|
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().
|
staticprivate |
From mesh point to 'local point'. Is the mesh point itself.
if meshToPatchPoint is empty.
Definition at line 241 of file globalPoints.C.
|
staticprivate |
Opposite of meshToLocalPoint.
Definition at line 256 of file globalPoints.C.
References List::size().
|
private |
Store (and merge) info for meshPointI.
Definition at line 321 of file globalPoints.C.
|
private |
Store (and merge) info for meshPointI.
Definition at line 273 of file globalPoints.C.
|
private |
Definition at line 377 of file globalPoints.C.
References Foam::endl(), forAll, and Foam::Pout.
|
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.
|
private |
Send subset of procPoints to neighbours.
Definition at line 480 of file globalPoints.C.
References Foam::endl(), forAll, HashTable::found(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), patchIdentifier::name(), processorPolyPatch::neighbProcNo(), PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), patches, patchFaces(), and Foam::Pout.
|
private |
Receive neighbour points and merge into my procPoints.
Definition at line 572 of file globalPoints.C.
References HashTable::clear(), Foam::endl(), f(), forAll, patchIdentifier::index(), HashSet< Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), patchIdentifier::name(), cyclicPolyPatch::neighbPatchID(), processorPolyPatch::neighbProcNo(), patches, patchFaces(), and Foam::Pout.
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().
|
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().
|
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().
|
private |
Disallow default bitwise assignment.
ClassName | ( | "globalPoints" | ) |
Declare name of the class and its debug switch.
|
inline |
Global numbering of untransformed (mesh or patch) points.
Definition at line 309 of file globalPoints.H.
References globalPoints::globalIndices_.
|
inline |
Global numbering of transformed (mesh or patch) points.
Definition at line 315 of file globalPoints.H.
References globalPoints::globalTransforms_.
|
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().
|
inline |
Non-transformed connected points per point (in mapDistribute.
indices)
Definition at line 329 of file globalPoints.H.
|
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().
|
inline |
Transformed points per point (in mapDistribute indices)
Definition at line 341 of file globalPoints.H.
References globalPoints::transformedPointPoints_.
|
inline |
Corresponding map.
Definition at line 347 of file globalPoints.H.
References globalPoints::map_.
Referenced by globalMeshData::calcGlobalCoPointSlaves(), globalMeshData::calcGlobalPointSlaves(), and globalMeshData::calcSharedPoints().
|
inline |
From (mesh or patch) point to index in procPoints.
Definition at line 359 of file globalPoints.H.
References globalPoints::meshToProcPoint_.
|
inline |
procPoints is per point the connected points (in
globalTransformAndIndex point numbers)
Definition at line 366 of file globalPoints.H.
|
private |
Mesh reference.
Definition at line 105 of file globalPoints.H.
|
private |
Global numbering of untransformed points.
Definition at line 108 of file globalPoints.H.
Referenced by globalPoints::globalIndices().
|
private |
Global numbering of transformed points.
Definition at line 111 of file globalPoints.H.
Referenced by globalPoints::globalTransforms().
|
private |
Sum of points on processor patches (unfiltered, point on 2 patches.
counts as 2)
Definition at line 115 of file globalPoints.H.
|
private |
All points on boundaries and their corresponding connected points.
on other processors.
Definition at line 119 of file globalPoints.H.
Map from mesh (or patch) point to index in procPoints.
Definition at line 122 of file globalPoints.H.
Referenced by globalPoints::meshToProcPoint().
|
private |
Non-transformed connected points per point (in mapDistribute.
indices)
Definition at line 129 of file globalPoints.H.
|
private |
Transformed points per point (in mapDistribute indices)
Definition at line 132 of file globalPoints.H.
Referenced by globalPoints::transformedPointPoints().
|
private |
Corresponding map.
Definition at line 135 of file globalPoints.H.
Referenced by globalPoints::map().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.