84#ifndef Foam_globalMeshData_H
85#define Foam_globalMeshData_H
101template<
class T>
class EdgeMap;
188 globalPointTransformedBoundaryFacesPtr_;
197 globalPointTransformedBoundaryCellsPtr_;
210 mutable label nGlobalPoints_;
230 mutable label nGlobalEdges_;
246 static void countSharedEdges
254 void calcSharedPoints()
const;
257 void calcSharedEdges()
const;
260 void calcGlobalPointSlaves()
const;
268 void calcGlobalPointEdges
280 const label localPoint
284 void calcGlobalEdgeSlaves()
const;
287 void calcGlobalEdgeOrientation()
const;
296 void calcGlobalPointBoundaryFaces()
const;
299 void calcGlobalPointBoundaryCells()
const;
309 void calcGlobalCoPointSlaves()
const;
359 return !processorPatches_.empty();
366 return globalMeshPointAddr_;
373 return globalMeshFaceAddr_;
379 return globalMeshCellAddr_;
386 return globalMeshPointAddr_.totalSize();
393 return globalMeshFaceAddr_.totalSize();
408 return processorTopology_;
422 return processorPatches_;
430 return processorPatchIndices_;
437 return processorPatchNeighbours_;
517 template<
class Type,
class CombineOp,
class TransformOp>
525 const CombineOp& cop,
526 const TransformOp& top
530 template<
class Type,
class CombineOp>
550 template<
class Type,
class CombineOp,
class TransformOp>
554 const CombineOp& cop,
555 const TransformOp& top
654 const label nLocalCoarse,
671 const label nLocalCoarse,
711 const bitSet& selectedCells,
A packed storage of objects of type <T> using an offset table for access.
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable to objects of type <T> with a label key.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
label totalSize() const noexcept
The total addressed size, which corresponds to the end offset and also the sum of all localSizes.
const mapDistribute & globalCoPointSlavesMap() const
void movePoints(const pointField &newPoints)
Update for moving points.
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points list.
const globalIndex & globalMeshCellAddr() const noexcept
Global numbering for mesh cells.
const bitSet & globalEdgeOrientation() const
Is my edge same orientation as master edge.
const labelListList & globalPointTransformedBoundaryCells() const
globalMeshData(const globalMeshData &)=delete
No copy construct.
const labelListList & globalEdgeTransformedSlaves() const
const Map< label > & coupledPatchMeshEdgeMap() const
Return map from mesh edges to coupledPatch edges.
const labelList & sharedEdgeAddr() const
Return addressing into the complete globally shared edge list.
pointField geometricSharedPoints() const
Like sharedPoints but keeps cyclic points separate. (does geometric merging; uses matchTol_*bb as mer...
const labelList & processorPatches() const noexcept
Return list of processor patch labels.
static const Foam::scalar matchTol_
Geometric tolerance (fraction of bounding box).
const labelList & processorPatchIndices() const noexcept
Return list of indices into processorPatches_ for each patch.
label nGlobalPoints() const
Return number of globally shared points.
const mapDistribute & globalPointBoundaryCellsMap() const
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
const mapDistribute & globalPointBoundaryFacesMap() const
bool parallel() const noexcept
Does the mesh contain processor patches? (also valid when not running parallel).
const mapDistribute & globalPointSlavesMap() const
const labelList & processorPatchNeighbours() const noexcept
Return processorPatchIndices of the neighbours processor patches. -1 if not running parallel.
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
const labelListList & globalPointTransformedBoundaryFaces() const
const labelList & boundaryCells() const
From boundary cell to mesh cell.
const labelListList & globalPointBoundaryFaces() const
const mapDistribute & globalEdgeSlavesMap() const
const globalIndex & globalBoundaryFaceNumbering() const
Numbering of boundary faces is face-mesh.nInternalFaces().
static void syncData(List< Type > &elems, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
void operator=(const globalMeshData &)=delete
No copy assignment.
ClassName("globalMeshData")
Runtime type information.
label nGlobalEdges() const
Return number of globally shared edges.
const labelList & coupledPatchMeshEdges() const
Return map from coupledPatch edges to mesh edges.
~globalMeshData()
Destructor.
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
const labelList & sharedPointGlobalLabels() const
Return shared point global labels. Tries to read 'pointProcAddressing' and returns list or -1 if none...
const labelListList & globalCoPointSlaves() const
const globalIndex & globalMeshPointAddr() const noexcept
Global numbering for mesh points. Not compensated for duplicate points!
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.
pointField sharedPoints() const
Collect coordinates of shared points on all processors. (does parallel communication!...
label nTotalFaces() const noexcept
Total global number of mesh faces. Not compensated for duplicate faces!
const globalIndex & globalBoundaryCellNumbering() const
Numbering of boundary cells is according to boundaryCells().
const labelListList & globalPointSlaves() const
const globalIndex & globalEdgeNumbering() const
static void calcCellCells(const polyMesh &mesh, const labelUList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
const polyMesh & mesh() const noexcept
Return the mesh reference.
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
const labelList & sharedEdgeLabels() const
Return indices of local edges that are globally shared.
label nTotalPoints() const noexcept
Total global number of mesh points. Not compensated for duplicate points!
const labelListList & globalPointTransformedSlaves() const
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
label nTotalCells() const noexcept
Total global number of mesh cells.
void updateMesh()
Change global mesh data given a topological change. Does a.
const labelListList & globalPointBoundaryCells() const
void clearOut()
Remove all demand driven data.
const globalIndex & globalMeshFaceAddr() const noexcept
Global numbering for mesh faces. Not compensated for duplicate faces!
const labelListList & globalEdgeSlaves() const
const processorTopology & topology() const noexcept
The processor to processor topology.
const globalIndex & globalPointNumbering() const
Numbering of coupled points is according to coupledPatch.
Class containing processor-to-processor mapping information.
Mesh consisting of general polyhedral cells.
Determines/represents processor-processor connection. After instantiation contains the processor-proc...
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Pair< label > labelPair
A pair of labels.
List< labelPair > labelPairList
List of labelPair.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.