Data Structures | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
globalMeshData Class Reference

Various mesh related information for a parallel run. Upon construction, constructs all info using parallel communication. More...

Inheritance diagram for globalMeshData:
Inheritance graph
[legend]
Collaboration diagram for globalMeshData:
Collaboration graph
[legend]

Data Structures

class  ListPlusEqOp
 

Public Member Functions

 ClassName ("globalMeshData")
 Runtime type information. More...
 
 globalMeshData (const polyMesh &mesh)
 Construct from mesh, derive rest (does parallel communication!) More...
 
 ~globalMeshData ()
 Destructor. More...
 
void clearOut ()
 Remove all demand driven data. More...
 
const polyMeshmesh () const
 Return the mesh reference. More...
 
bool parallel () const
 Does the mesh contain processor patches? (also valid when. More...
 
label nTotalPoints () const
 Return total number of points in decomposed mesh. Not. More...
 
label nTotalFaces () const
 Return total number of faces in decomposed mesh. Not. More...
 
label nTotalCells () const
 Return total number of cells in decomposed mesh. More...
 
const labelListprocessorPatches () const
 Return list of processor patch labels. More...
 
const labelListprocessorPatchIndices () const
 Return list of indices into processorPatches_ for each patch. More...
 
const labelListprocessorPatchNeighbours () const
 Return processorPatchIndices of the neighbours. More...
 
label nGlobalPoints () const
 Return number of globally shared points. More...
 
const labelListsharedPointLabels () const
 Return indices of local points that are globally shared. More...
 
const labelListsharedPointAddr () const
 Return addressing into the complete globally shared points. More...
 
const labelListsharedPointGlobalLabels () const
 Return shared point global labels. Tries to read. More...
 
pointField sharedPoints () const
 Collect coordinates of shared points on all processors. More...
 
pointField geometricSharedPoints () const
 Like sharedPoints but keeps cyclic points separate. More...
 
label nGlobalEdges () const
 Return number of globally shared edges. Demand-driven. More...
 
const labelListsharedEdgeLabels () const
 Return indices of local edges that are globally shared. More...
 
const labelListsharedEdgeAddr () const
 Return addressing into the complete globally shared edge. More...
 
const indirectPrimitivePatchcoupledPatch () const
 Return patch of all coupled faces. More...
 
const labelListcoupledPatchMeshEdges () const
 Return map from coupledPatch edges to mesh edges. More...
 
const Map< label > & coupledPatchMeshEdgeMap () const
 Return map from mesh edges to coupledPatch edges. More...
 
const globalIndexAndTransformglobalTransforms () const
 Global transforms numbering. More...
 
const globalIndexglobalPointNumbering () const
 Numbering of coupled points is according to coupledPatch. More...
 
const labelListListglobalPointSlaves () const
 
const labelListListglobalPointTransformedSlaves () const
 
const mapDistributeglobalPointSlavesMap () const
 
template<class Type , class CombineOp , class TransformOp >
void syncPointData (List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
 Helper to synchronise coupled patch point data. More...
 
const globalIndexglobalEdgeNumbering () const
 
const labelListListglobalEdgeSlaves () const
 
const labelListListglobalEdgeTransformedSlaves () const
 
const mapDistributeglobalEdgeSlavesMap () const
 
const PackedBoolListglobalEdgeOrientation () const
 Is my edge same orientation as master edge. More...
 
const labelListListglobalCoPointSlaves () const
 
const mapDistributeglobalCoPointSlavesMap () const
 
const globalIndexglobalBoundaryFaceNumbering () const
 Numbering of boundary faces is face-mesh.nInternalFaces() More...
 
const labelListListglobalPointBoundaryFaces () const
 
const labelListListglobalPointTransformedBoundaryFaces () const
 
const mapDistributeglobalPointBoundaryFacesMap () const
 
const labelListboundaryCells () const
 From boundary cell to mesh cell. More...
 
const globalIndexglobalBoundaryCellNumbering () const
 Numbering of boundary cells is according to boundaryCells() More...
 
const labelListListglobalPointBoundaryCells () const
 
const labelListListglobalPointTransformedBoundaryCells () const
 
const mapDistributeglobalPointBoundaryCellsMap () const
 
autoPtr< globalIndexmergePoints (labelList &pointToGlobal, labelList &uniquePoints) const
 Helper for merging (collocated!) mesh point data. More...
 
autoPtr< globalIndexmergePoints (const labelList &meshPoints, const Map< label > &meshPointMap, labelList &pointToGlobal, labelList &uniqueMeshPoints) const
 Helper for merging (collocated!) patch point data. More...
 
void movePoints (const pointField &newPoints)
 Update for moving points. More...
 
void updateMesh ()
 Change global mesh data given a topological change. Does a. More...
 
- Public Member Functions inherited from ProcessorTopology< Container, ProcPatch >
 ProcessorTopology (const Container &patches, const label comm)
 Construct from boundaryMesh. More...
 
const labelListprocPatchMap () const
 From neighbour processor to index in boundaryMesh. Local information. More...
 
const lduSchedulepatchSchedule () const
 Order in which the patches should be initialised/evaluated. More...
 
- Public Member Functions inherited from List
 List ()
 Null constructor. More...
 
 List (const label)
 Construct with given size. More...
 
 List (const label, const T &)
 Construct with given size and value for all elements. More...
 
 List (const List< T > &)
 Copy constructor. More...
 
 List (const Xfer< List< T > > &)
 Construct by transferring the parameter contents. More...
 
 List (List< T > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< T > &, const labelUList &mapAddressing)
 Construct as subset. More...
 
template<class InputIterator >
 List (InputIterator first, InputIterator last)
 Construct given start and end iterators. More...
 
template<unsigned Size>
 List (const FixedList< T, Size > &)
 Construct as copy of FixedList<T, Size> More...
 
 List (const PtrList< T > &)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< T > &)
 Construct as copy of SLList<T> More...
 
 List (const UIndirectList< T > &)
 Construct as copy of UIndirectList<T> More...
 
 List (const BiIndirectList< T > &)
 Construct as copy of BiIndirectList<T> More...
 
 List (Istream &)
 Construct from Istream. More...
 
autoPtr< List< T > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
label size () const
 Return the number of elements in the UList. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void resize (const label, const T &)
 Alias for setSize(const label, const T&) More...
 
void setSize (const label)
 Reset size of List. More...
 
void setSize (const label, const T &)
 Reset size of List and value for new elements. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const T &)
 Append an element at the end of the list. More...
 
void append (const UList< T > &)
 Append a List at the end of this list. More...
 
void append (const UIndirectList< T > &)
 Append a UIndirectList at the end of this list. More...
 
void transfer (List< T > &)
 Transfer the contents of the argument List into this list. More...
 
template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
void transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (SortableList< T > &)
 Transfer the contents of the argument List into this list. More...
 
Xfer< List< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
TnewElmt (const label)
 Return subscript-checked element of UList. More...
 
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time. More...
 
void operator= (const List< T > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time. More...
 
void operator= (const UIndirectList< T > &)
 Assignment from UIndirectList operator. Takes linear time. More...
 
void operator= (const BiIndirectList< T > &)
 Assignment from BiIndirectList operator. Takes linear time. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 
template<class T >
 List (const label s)
 
template<class T >
 List (const label s, const T &a)
 
template<class T >
 List (const List< T > &a)
 
template<class T >
 List (const Xfer< List< T > > &lst)
 
template<class T >
 List (List< T > &a, bool reUse)
 
template<class T >
 List (const UList< T > &a, const labelUList &map)
 
template<class T >
 List (const PtrList< T > &lst)
 
template<class T >
 List (const SLList< T > &lst)
 
template<class T >
 List (const UIndirectList< T > &lst)
 
template<class T >
 List (const BiIndirectList< T > &lst)
 
template<class T >
void transfer (List< T > &a)
 
template<class T >
void transfer (SortableList< T > &a)
 
template<class T >
 List ()
 
template<class T >
 List (Istream &is)
 

Static Public Member Functions

template<class Type , class CombineOp , class TransformOp >
static void syncData (List< Type > &pointData, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
 Helper: synchronise data with transforms. More...
 
template<class Type , class CombineOp >
static void syncData (List< Type > &pointData, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const CombineOp &cop)
 Helper: synchronise data without transforms. More...
 
- Static Public Member Functions inherited from ProcessorTopology< Container, ProcPatch >
static lduSchedule nonBlockingSchedule (const Container &patches)
 Calculate non-blocking (i.e. unscheduled) schedule. More...
 
- Static Public Member Functions inherited from List
static const List< T > & null ()
 Return a null List. More...
 

Static Public Attributes

static const Foam::scalar matchTol_ = 1e-8
 Geometric tolerance (fraction of bounding box) More...
 

Private Member Functions

void initProcAddr ()
 Set up processor patch addressing. More...
 
void calcSharedPoints () const
 Calculate shared point addressing. More...
 
void calcSharedEdges () const
 Calculate shared edge addressing. More...
 
void calcGlobalPointSlaves () const
 Calculate global point addressing. More...
 
void calcPointConnectivity (List< labelPairList > &) const
 Calculate connected points. More...
 
void calcGlobalPointEdges (labelListList &globalPointEdges, List< labelPairList > &globalPointPoints) const
 Calculate pointEdges and pointPoints addressing. More...
 
label findTransform (const labelPairList &info, const labelPair &remotePoint, const label localPoint) const
 Look up remote and local point and find using info the. More...
 
void calcGlobalEdgeSlaves () const
 Calculate global edge addressing. More...
 
void calcGlobalEdgeOrientation () const
 Calculate orientation w.r.t. edge master. More...
 
void calcPointBoundaryFaces (labelListList &) const
 Calculate coupled point to uncoupled boundary faces. Local only. More...
 
void calcGlobalPointBoundaryFaces () const
 Calculate global point to global boundary face addressing. More...
 
void calcGlobalPointBoundaryCells () const
 Calculate global point to global boundary cell addressing. More...
 
void calcGlobalCoPointSlaves () const
 
 globalMeshData (const globalMeshData &)
 Disallow default bitwise copy construct. More...
 
void operator= (const globalMeshData &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static void countSharedEdges (const EdgeMap< labelList > &, EdgeMap< label > &, label &)
 Helper function for shared edge addressing. More...
 

Private Attributes

const polyMeshmesh_
 Reference to mesh. More...
 
label nTotalPoints_
 Total number of points in the complete mesh. More...
 
label nTotalFaces_
 Total number of faces in the complete mesh. More...
 
label nTotalCells_
 Total number of cells in the complete mesh. More...
 
labelList processorPatches_
 List of processor patch labels. More...
 
labelList processorPatchIndices_
 List of indices into processorPatches_ for each patch. More...
 
labelList processorPatchNeighbours_
 processorPatchIndices_ of the neighbours processor patches More...
 
autoPtr< indirectPrimitivePatchcoupledPatchPtr_
 Patch of coupled faces. Additional patch edge to mesh edges. More...
 
autoPtr< labelListcoupledPatchMeshEdgesPtr_
 
autoPtr< Map< label > > coupledPatchMeshEdgeMapPtr_
 
autoPtr< globalIndexglobalPointNumberingPtr_
 Global numbering for coupledPatch points. More...
 
autoPtr< globalIndexAndTransformglobalTransformsPtr_
 Global numbering for transforms. More...
 
autoPtr< labelListListglobalPointSlavesPtr_
 
autoPtr< labelListListglobalPointTransformedSlavesPtr_
 
autoPtr< mapDistributeglobalPointSlavesMapPtr_
 
autoPtr< globalIndexglobalEdgeNumberingPtr_
 
autoPtr< labelListListglobalEdgeSlavesPtr_
 
autoPtr< labelListListglobalEdgeTransformedSlavesPtr_
 
autoPtr< PackedBoolListglobalEdgeOrientationPtr_
 
autoPtr< mapDistributeglobalEdgeSlavesMapPtr_
 
autoPtr< globalIndexglobalBoundaryFaceNumberingPtr_
 
autoPtr< labelListListglobalPointBoundaryFacesPtr_
 
autoPtr< labelListListglobalPointTransformedBoundaryFacesPtr_
 
autoPtr< mapDistributeglobalPointBoundaryFacesMapPtr_
 
autoPtr< labelListboundaryCellsPtr_
 
autoPtr< globalIndexglobalBoundaryCellNumberingPtr_
 
autoPtr< labelListListglobalPointBoundaryCellsPtr_
 
autoPtr< labelListListglobalPointTransformedBoundaryCellsPtr_
 
autoPtr< mapDistributeglobalPointBoundaryCellsMapPtr_
 
autoPtr< labelListListglobalCoPointSlavesPtr_
 
autoPtr< mapDistributeglobalCoPointSlavesMapPtr_
 
label nGlobalPoints_
 Total number of global points. More...
 
autoPtr< labelListsharedPointLabelsPtr_
 Indices of local points that are globally shared. More...
 
autoPtr< labelListsharedPointAddrPtr_
 Indices of globally shared points in the master list. More...
 
autoPtr< labelListsharedPointGlobalLabelsPtr_
 Shared point global labels. More...
 
label nGlobalEdges_
 Total number of global edges. More...
 
autoPtr< labelListsharedEdgeLabelsPtr_
 Indices of local edges that are globally shared. More...
 
autoPtr< labelListsharedEdgeAddrPtr_
 Indices of globally shared edge in the master list. More...
 

Additional Inherited Members

- Public Types inherited from List
typedef SubList< TsubList
 Declare type of subList. More...
 
- Protected Member Functions inherited from List
void size (const label)
 Override size to be inconsistent with allocated storage. More...
 

Detailed Description

Various mesh related information for a parallel run. Upon construction, constructs all info using parallel communication.

Requires:

The shared point and edge addressing calculates addressing for points and edges on coupled patches. In the 'old' way a distinction was made between points/edges that are only on two processors and those that are on multiple processors. The problem is that those on multiple processors do not allow any transformations and require a global reduction on the master processor.

The alternative is to have an exchange schedule (through a 'mapDistribute') which sends all point/edge data (no distinction is made between those on two and those on more than two coupled patches) to the local 'master'. This master then does any calculation and sends the result back to the 'slave' points/edges. This only needs to be done on points on coupled faces. Any transformation is done using a predetermined set of transformations - since transformations have to be space filling only a certain number of transformation is supported.

The exchange needs

Note
  • compared to 17x nTotalFaces, nTotalPoints do not compensate for shared points since this would trigger full connectivity analysis
  • most calculation is demand driven and uses parallel communication so make sure to invoke on all processors at the same time
  • old sharedEdge calculation: currently an edge is considered shared if it uses two shared points and is used more than once. This is not correct on processor patches but it only slightly overestimates the number of shared edges. Doing full analysis of how many patches use the edge would be too complicated
See also
mapDistribute globalIndexAndTransform
Source files

Definition at line 106 of file globalMeshData.H.

Constructor & Destructor Documentation

◆ globalMeshData() [1/2]

globalMeshData ( const globalMeshData )
private

Disallow default bitwise copy construct.

◆ globalMeshData() [2/2]

globalMeshData ( const polyMesh mesh)

Construct from mesh, derive rest (does parallel communication!)

Definition at line 1741 of file globalMeshData.C.

References globalMeshData::updateMesh().

Here is the call graph for this function:

◆ ~globalMeshData()

Destructor.

Definition at line 1765 of file globalMeshData.C.

Member Function Documentation

◆ initProcAddr()

void initProcAddr ( )
private

◆ countSharedEdges()

void countSharedEdges ( const EdgeMap< labelList > &  procSharedEdges,
EdgeMap< label > &  globalShared,
label sharedEdgeI 
)
staticprivate

Helper function for shared edge addressing.

Definition at line 256 of file globalMeshData.C.

References Foam::e, HashTable::find(), forAllConstIter(), and HashTable::insert().

Here is the call graph for this function:

◆ calcSharedPoints()

void calcSharedPoints ( ) const
private

◆ calcSharedEdges()

void calcSharedEdges ( ) const
private

◆ calcGlobalPointSlaves()

void calcGlobalPointSlaves ( ) const
private

Calculate global point addressing.

Definition at line 531 of file globalMeshData.C.

References Foam::endl(), globalPoints::map(), globalPoints::pointPoints(), Foam::Pout, globalPoints::transformedPointPoints(), List::xfer(), and mapDistribute::xfer().

Here is the call graph for this function:

◆ calcPointConnectivity()

void calcPointConnectivity ( List< labelPairList > &  allPointConnectivity) const
private

◆ calcGlobalPointEdges()

void calcGlobalPointEdges ( labelListList globalPointEdges,
List< labelPairList > &  globalPointPoints 
) const
private

Calculate pointEdges and pointPoints addressing.

Definition at line 650 of file globalMeshData.C.

References globalIndexAndTransform::encode(), forAll, globalIndexAndTransform::index(), UPstream::myProcNo(), n, globalIndexAndTransform::processor(), List::setSize(), List::size(), and globalIndex::toGlobal().

Here is the call graph for this function:

◆ findTransform()

Foam::label findTransform ( const labelPairList info,
const labelPair remotePoint,
const label  localPoint 
) const
private

Look up remote and local point and find using info the.

transforms to go from remotePoint to localPoint

Definition at line 812 of file globalMeshData.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, globalIndexAndTransform::index(), UPstream::myProcNo(), globalIndexAndTransform::processor(), and globalIndexAndTransform::transformIndex().

Here is the call graph for this function:

◆ calcGlobalEdgeSlaves()

void calcGlobalEdgeSlaves ( ) const
private

◆ calcGlobalEdgeOrientation()

void calcGlobalEdgeOrientation ( ) const
private

Calculate orientation w.r.t. edge master.

Definition at line 1082 of file globalMeshData.C.

References Pair::compare(), mapDistributeBase::constructSize(), Foam::e, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::labelMax, Foam::Pout, and List::setSize().

Here is the call graph for this function:

◆ calcPointBoundaryFaces()

void calcPointBoundaryFaces ( labelListList pointBoundaryFaces) const
private

Calculate coupled point to uncoupled boundary faces. Local only.

Definition at line 1205 of file globalMeshData.C.

References polyPatch::coupled(), f(), forAll, nPoints, List::setSize(), and polyPatch::start().

Here is the call graph for this function:

◆ calcGlobalPointBoundaryFaces()

void calcGlobalPointBoundaryFaces ( ) const
private

Calculate global point to global boundary face addressing.

Definition at line 1283 of file globalMeshData.C.

References List::clear(), globalIndexAndTransform::encode(), Foam::endl(), Foam::findIndex(), forAll, globalIndex::localSize(), n, nPoints, UPstream::nProcs(), Foam::Pout, List::setSize(), List::size(), globalIndex::toGlobal(), globalIndex::toLocal(), and globalIndex::whichProcID().

Here is the call graph for this function:

◆ calcGlobalPointBoundaryCells()

void calcGlobalPointBoundaryCells ( ) const
private

◆ calcGlobalCoPointSlaves()

void calcGlobalCoPointSlaves ( ) const
private

Definition at line 1702 of file globalMeshData.C.

References Foam::endl(), globalPoints::map(), globalPoints::pointPoints(), Foam::Pout, List::xfer(), and mapDistribute::xfer().

Here is the call graph for this function:

◆ operator=()

void operator= ( const globalMeshData )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "globalMeshData"  )

Runtime type information.

◆ clearOut()

void clearOut ( )

Remove all demand driven data.

Definition at line 1771 of file globalMeshData.C.

◆ mesh()

const polyMesh& mesh ( ) const
inline

Return the mesh reference.

Definition at line 367 of file globalMeshData.H.

References globalMeshData::mesh_.

◆ parallel()

bool parallel ( ) const
inline

Does the mesh contain processor patches? (also valid when.

not running parallel)

Definition at line 374 of file globalMeshData.H.

◆ nTotalPoints()

label nTotalPoints ( ) const
inline

Return total number of points in decomposed mesh. Not.

compensated for duplicate points!

Definition at line 381 of file globalMeshData.H.

Referenced by medialAxisMeshMover::calculateDisplacement(), doCommand(), printMesh(), and medialAxisMeshMover::update().

Here is the caller graph for this function:

◆ nTotalFaces()

label nTotalFaces ( ) const
inline

Return total number of faces in decomposed mesh. Not.

compensated for duplicate faces!

Definition at line 388 of file globalMeshData.H.

Referenced by doCommand(), and printMesh().

Here is the caller graph for this function:

◆ nTotalCells()

label nTotalCells ( ) const
inline

◆ processorPatches()

const labelList& processorPatches ( ) const
inline

Return list of processor patch labels.

(size of list = number of processor patches)

Definition at line 404 of file globalMeshData.H.

Referenced by FaceCellWave< Type, int >::handleProcPatches(), Cloud< streamLineParticle >::move(), and printMeshData().

Here is the caller graph for this function:

◆ processorPatchIndices()

const labelList& processorPatchIndices ( ) const
inline

Return list of indices into processorPatches_ for each patch.

Index = -1 for non-processor parches. (size of list = number of patches)

Definition at line 412 of file globalMeshData.H.

Referenced by Cloud< streamLineParticle >::move().

Here is the caller graph for this function:

◆ processorPatchNeighbours()

const labelList& processorPatchNeighbours ( ) const
inline

Return processorPatchIndices of the neighbours.

processor patches. -1 if not running parallel.

Definition at line 419 of file globalMeshData.H.

Referenced by Cloud< streamLineParticle >::move().

Here is the caller graph for this function:

◆ nGlobalPoints()

Foam::label nGlobalPoints ( ) const

Return number of globally shared points.

Definition at line 1986 of file globalMeshData.C.

Referenced by syncTools::syncPointMap(), syncPoints(), and isoSurface::syncUnseparatedPoints().

Here is the caller graph for this function:

◆ sharedPointLabels()

const Foam::labelList & sharedPointLabels ( ) const

Return indices of local points that are globally shared.

Definition at line 1996 of file globalMeshData.C.

Referenced by syncTools::syncEdgeMap(), syncTools::syncPointMap(), syncPoints(), and isoSurface::syncUnseparatedPoints().

Here is the caller graph for this function:

◆ sharedPointAddr()

const Foam::labelList & sharedPointAddr ( ) const

Return addressing into the complete globally shared points.

list Note: It is assumed that a (never constructed) complete list of globally shared points exists. The set of shared points on the current processor is a subset of all shared points. Shared point addressing gives the index in the list of all globally shared points for each of the locally shared points.

Definition at line 2006 of file globalMeshData.C.

Referenced by syncTools::syncEdgeMap(), syncTools::syncPointMap(), syncPoints(), and isoSurface::syncUnseparatedPoints().

Here is the caller graph for this function:

◆ sharedPointGlobalLabels()

const Foam::labelList & sharedPointGlobalLabels ( ) const

Return shared point global labels. Tries to read.

'pointProcAddressing' and returns list or -1 if none available.

Definition at line 1824 of file globalMeshData.C.

References Foam::endl(), forAll, IOobject::headerOk(), IOobject::MUST_READ, pointLabels(), and Foam::Pout.

Here is the call graph for this function:

◆ sharedPoints()

Foam::pointField sharedPoints ( ) const

Collect coordinates of shared points on all processors.

(does parallel communication!) Note: not valid for cyclicParallel since shared cyclic points are merged into single global point. (use geometricSharedPoints instead)

Definition at line 1875 of file globalMeshData.C.

References UPstream::blocking, UPstream::firstSlave(), forAll, UPstream::lastSlave(), UPstream::master(), UPstream::masterNo(), pointLabels(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ geometricSharedPoints()

Foam::pointField geometricSharedPoints ( ) const

Like sharedPoints but keeps cyclic points separate.

(does geometric merging; uses matchTol_*bb as merging tolerance) Use sharedPoints() instead.

Definition at line 1958 of file globalMeshData.C.

References Foam::combineReduce(), and Foam::mergePoints().

Here is the call graph for this function:

◆ nGlobalEdges()

Foam::label nGlobalEdges ( ) const

Return number of globally shared edges. Demand-driven.

calculation so call needs to be synchronous among processors!

Definition at line 2016 of file globalMeshData.C.

◆ sharedEdgeLabels()

const Foam::labelList & sharedEdgeLabels ( ) const

Return indices of local edges that are globally shared.

Demand-driven calculation so call needs to be synchronous among processors!

Definition at line 2026 of file globalMeshData.C.

◆ sharedEdgeAddr()

const Foam::labelList & sharedEdgeAddr ( ) const

Return addressing into the complete globally shared edge.

list. The set of shared edges on the current processor is a subset of all shared edges. Shared edge addressing gives the index in the list of all globally shared edges for each of the locally shared edges. Demand-driven calculation so call needs to be synchronous among processors!

Definition at line 2036 of file globalMeshData.C.

◆ coupledPatch()

const Foam::indirectPrimitivePatch & coupledPatch ( ) const

◆ coupledPatchMeshEdges()

const Foam::labelList & coupledPatchMeshEdges ( ) const

Return map from coupledPatch edges to mesh edges.

Definition at line 2107 of file globalMeshData.C.

Referenced by syncTools::getMasterEdges(), autoLayerDriver::handleNonManifolds(), and syncTools::syncEdgeList().

Here is the caller graph for this function:

◆ coupledPatchMeshEdgeMap()

const Foam::Map< Foam::label > & coupledPatchMeshEdgeMap ( ) const

Return map from mesh edges to coupledPatch edges.

Definition at line 2127 of file globalMeshData.C.

References forAll, and Foam::constant::atomic::me.

Referenced by syncTools::syncEdgeList().

Here is the caller graph for this function:

◆ globalTransforms()

const Foam::globalIndexAndTransform & globalTransforms ( ) const

◆ syncData() [1/2]

void syncData ( List< Type > &  pointData,
const labelListList slaves,
const labelListList transformedSlaves,
const mapDistribute slavesMap,
const globalIndexAndTransform transforms,
const CombineOp &  cop,
const TransformOp &  top 
)
static

Helper: synchronise data with transforms.

Definition at line 34 of file globalMeshDataTemplates.C.

References mapDistribute::distribute(), forAll, mapDistribute::reverseDistribute(), and List::size().

Referenced by addPatchCellLayer::calcExtrudeInfo(), PatchTools::edgeNormals(), createShellMesh::syncEdges(), and PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::syncEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncData() [2/2]

void syncData ( List< Type > &  pointData,
const labelListList slaves,
const labelListList transformedSlaves,
const mapDistribute slavesMap,
const CombineOp &  cop 
)
static

Helper: synchronise data without transforms.

Definition at line 107 of file globalMeshDataTemplates.C.

References mapDistribute::distribute(), forAll, mapDistribute::reverseDistribute(), and List::size().

Here is the call graph for this function:

◆ globalPointNumbering()

const Foam::globalIndex & globalPointNumbering ( ) const

Numbering of coupled points is according to coupledPatch.

Definition at line 2146 of file globalMeshData.C.

References nPoints.

◆ globalPointSlaves()

const Foam::labelListList & globalPointSlaves ( ) const

◆ globalPointTransformedSlaves()

const Foam::labelListList & globalPointTransformedSlaves ( ) const

Definition at line 2180 of file globalMeshData.C.

Referenced by syncTools::getMasterPoints(), main(), PatchTools::pointNormals(), and syncTools::syncPointList().

Here is the caller graph for this function:

◆ globalPointSlavesMap()

const Foam::mapDistribute & globalPointSlavesMap ( ) const

◆ syncPointData()

void syncPointData ( List< Type > &  pointData,
const CombineOp &  cop,
const TransformOp &  top 
) const

Helper to synchronise coupled patch point data.

Definition at line 172 of file globalMeshDataTemplates.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints().

Here is the call graph for this function:

◆ globalEdgeNumbering()

const Foam::globalIndex & globalEdgeNumbering ( ) const

Definition at line 2201 of file globalMeshData.C.

◆ globalEdgeSlaves()

const Foam::labelListList & globalEdgeSlaves ( ) const

◆ globalEdgeTransformedSlaves()

const Foam::labelListList & globalEdgeTransformedSlaves ( ) const

◆ globalEdgeSlavesMap()

const Foam::mapDistribute & globalEdgeSlavesMap ( ) const

◆ globalEdgeOrientation()

const Foam::PackedBoolList & globalEdgeOrientation ( ) const

Is my edge same orientation as master edge.

Definition at line 2235 of file globalMeshData.C.

Referenced by createShellMesh::syncEdges(), and PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::syncEdges().

Here is the caller graph for this function:

◆ globalCoPointSlaves()

const Foam::labelListList & globalCoPointSlaves ( ) const

Definition at line 2353 of file globalMeshData.C.

Referenced by volPointInterpolation::pushUntransformedData(), and pointConstraints::syncUntransformedData().

Here is the caller graph for this function:

◆ globalCoPointSlavesMap()

const Foam::mapDistribute & globalCoPointSlavesMap ( ) const

Definition at line 2363 of file globalMeshData.C.

Referenced by volPointInterpolation::pushUntransformedData(), and pointConstraints::syncUntransformedData().

Here is the caller graph for this function:

◆ globalBoundaryFaceNumbering()

const Foam::globalIndex & globalBoundaryFaceNumbering ( ) const

Numbering of boundary faces is face-mesh.nInternalFaces()

Definition at line 2255 of file globalMeshData.C.

◆ globalPointBoundaryFaces()

const Foam::labelListList & globalPointBoundaryFaces ( ) const

Definition at line 2266 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ globalPointTransformedBoundaryFaces()

const Foam::labelListList & globalPointTransformedBoundaryFaces ( ) const

Definition at line 2278 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ globalPointBoundaryFacesMap()

const Foam::mapDistribute & globalPointBoundaryFacesMap ( ) const

Definition at line 2288 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ boundaryCells()

const Foam::labelList & boundaryCells ( ) const

From boundary cell to mesh cell.

Definition at line 2299 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ globalBoundaryCellNumbering()

const Foam::globalIndex & globalBoundaryCellNumbering ( ) const

Numbering of boundary cells is according to boundaryCells()

Definition at line 2309 of file globalMeshData.C.

◆ globalPointBoundaryCells()

const Foam::labelListList & globalPointBoundaryCells ( ) const

Definition at line 2320 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ globalPointTransformedBoundaryCells()

const Foam::labelListList & globalPointTransformedBoundaryCells ( ) const

Definition at line 2332 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ globalPointBoundaryCellsMap()

const Foam::mapDistribute & globalPointBoundaryCellsMap ( ) const

Definition at line 2342 of file globalMeshData.C.

Referenced by main().

Here is the caller graph for this function:

◆ mergePoints() [1/2]

Foam::autoPtr< Foam::globalIndex > mergePoints ( labelList pointToGlobal,
labelList uniquePoints 
) const

Helper for merging (collocated!) mesh point data.

Determines:

  • my unique indices
  • global numbering over all unique indices
  • the global number for all local points (so this will be local for my unique points)

Definition at line 2374 of file globalMeshData.C.

References mapDistributeBase::constructSize(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), mapDistribute::reverseDistribute(), List::setSize(), List::size(), and globalIndex::toGlobal().

Referenced by extractSurface(), and externalCoupledFunctionObject::writeGeometry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mergePoints() [2/2]

Foam::autoPtr< Foam::globalIndex > mergePoints ( const labelList meshPoints,
const Map< label > &  meshPointMap,
labelList pointToGlobal,
labelList uniqueMeshPoints 
) const

Helper for merging (collocated!) patch point data.

Takes maps from: local points to/from mesh. Determines

  • my unique points. These are mesh point indices, not patch point indices.
  • global numbering over all unique indices.
  • the global number for all local points.

Definition at line 2508 of file globalMeshData.C.

References mapDistributeBase::constructSize(), mapDistribute::distribute(), forAll, Foam::labelMax, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPointMap(), PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), mapDistribute::reverseDistribute(), List::setSize(), List::size(), and globalIndex::toGlobal().

Here is the call graph for this function:

◆ movePoints()

void movePoints ( const pointField newPoints)

Update for moving points.

Definition at line 2722 of file globalMeshData.C.

◆ updateMesh()

void updateMesh ( )

Change global mesh data given a topological change. Does a.

full parallel analysis to determine shared points and boundaries.

Definition at line 2732 of file globalMeshData.C.

References UPstream::allocateCommunicator(), Foam::endl(), UPstream::freeCommunicator(), Foam::identity(), UPstream::msgType(), UPstream::nProcs(), Foam::Pout, Foam::returnReduce(), and UPstream::worldComm.

Referenced by globalMeshData::globalMeshData().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Reference to mesh.

Definition at line 114 of file globalMeshData.H.

Referenced by globalMeshData::initProcAddr(), and globalMeshData::mesh().

◆ nTotalPoints_

label nTotalPoints_
private

Total number of points in the complete mesh.

Definition at line 120 of file globalMeshData.H.

◆ nTotalFaces_

label nTotalFaces_
private

Total number of faces in the complete mesh.

Definition at line 123 of file globalMeshData.H.

◆ nTotalCells_

label nTotalCells_
private

Total number of cells in the complete mesh.

Definition at line 126 of file globalMeshData.H.

Referenced by globalMeshData::nTotalCells().

◆ processorPatches_

labelList processorPatches_
private

List of processor patch labels.

(size of list = number of processor patches)

Definition at line 133 of file globalMeshData.H.

Referenced by globalMeshData::initProcAddr().

◆ processorPatchIndices_

labelList processorPatchIndices_
private

List of indices into processorPatches_ for each patch.

Index = -1 for non-processor patches. (size of list = number of patches)

Definition at line 138 of file globalMeshData.H.

Referenced by globalMeshData::initProcAddr().

◆ processorPatchNeighbours_

labelList processorPatchNeighbours_
private

processorPatchIndices_ of the neighbours processor patches

Definition at line 141 of file globalMeshData.H.

Referenced by globalMeshData::initProcAddr().

◆ coupledPatchPtr_

autoPtr<indirectPrimitivePatch> coupledPatchPtr_
mutableprivate

Patch of coupled faces. Additional patch edge to mesh edges.

correspondence: points: meshPoints(), meshPointMap() edges : meshEdges(), meshEdgeMap()

Definition at line 153 of file globalMeshData.H.

◆ coupledPatchMeshEdgesPtr_

autoPtr<labelList> coupledPatchMeshEdgesPtr_
mutableprivate

Definition at line 154 of file globalMeshData.H.

◆ coupledPatchMeshEdgeMapPtr_

autoPtr<Map<label> > coupledPatchMeshEdgeMapPtr_
mutableprivate

Definition at line 155 of file globalMeshData.H.

◆ globalPointNumberingPtr_

autoPtr<globalIndex> globalPointNumberingPtr_
mutableprivate

Global numbering for coupledPatch points.

Definition at line 158 of file globalMeshData.H.

◆ globalTransformsPtr_

autoPtr<globalIndexAndTransform> globalTransformsPtr_
mutableprivate

Global numbering for transforms.

Definition at line 161 of file globalMeshData.H.

◆ globalPointSlavesPtr_

autoPtr<labelListList> globalPointSlavesPtr_
mutableprivate

Definition at line 165 of file globalMeshData.H.

◆ globalPointTransformedSlavesPtr_

autoPtr<labelListList> globalPointTransformedSlavesPtr_
mutableprivate

Definition at line 166 of file globalMeshData.H.

◆ globalPointSlavesMapPtr_

autoPtr<mapDistribute> globalPointSlavesMapPtr_
mutableprivate

Definition at line 167 of file globalMeshData.H.

◆ globalEdgeNumberingPtr_

autoPtr<globalIndex> globalEdgeNumberingPtr_
mutableprivate

Definition at line 171 of file globalMeshData.H.

◆ globalEdgeSlavesPtr_

autoPtr<labelListList> globalEdgeSlavesPtr_
mutableprivate

Definition at line 172 of file globalMeshData.H.

◆ globalEdgeTransformedSlavesPtr_

autoPtr<labelListList> globalEdgeTransformedSlavesPtr_
mutableprivate

Definition at line 173 of file globalMeshData.H.

◆ globalEdgeOrientationPtr_

autoPtr<PackedBoolList> globalEdgeOrientationPtr_
mutableprivate

Definition at line 174 of file globalMeshData.H.

◆ globalEdgeSlavesMapPtr_

autoPtr<mapDistribute> globalEdgeSlavesMapPtr_
mutableprivate

Definition at line 175 of file globalMeshData.H.

◆ globalBoundaryFaceNumberingPtr_

autoPtr<globalIndex> globalBoundaryFaceNumberingPtr_
mutableprivate

Definition at line 180 of file globalMeshData.H.

◆ globalPointBoundaryFacesPtr_

autoPtr<labelListList> globalPointBoundaryFacesPtr_
mutableprivate

Definition at line 181 of file globalMeshData.H.

◆ globalPointTransformedBoundaryFacesPtr_

autoPtr<labelListList> globalPointTransformedBoundaryFacesPtr_
mutableprivate

Definition at line 183 of file globalMeshData.H.

◆ globalPointBoundaryFacesMapPtr_

autoPtr<mapDistribute> globalPointBoundaryFacesMapPtr_
mutableprivate

Definition at line 184 of file globalMeshData.H.

◆ boundaryCellsPtr_

autoPtr<labelList> boundaryCellsPtr_
mutableprivate

Definition at line 188 of file globalMeshData.H.

◆ globalBoundaryCellNumberingPtr_

autoPtr<globalIndex> globalBoundaryCellNumberingPtr_
mutableprivate

Definition at line 189 of file globalMeshData.H.

◆ globalPointBoundaryCellsPtr_

autoPtr<labelListList> globalPointBoundaryCellsPtr_
mutableprivate

Definition at line 190 of file globalMeshData.H.

◆ globalPointTransformedBoundaryCellsPtr_

autoPtr<labelListList> globalPointTransformedBoundaryCellsPtr_
mutableprivate

Definition at line 192 of file globalMeshData.H.

◆ globalPointBoundaryCellsMapPtr_

autoPtr<mapDistribute> globalPointBoundaryCellsMapPtr_
mutableprivate

Definition at line 193 of file globalMeshData.H.

◆ globalCoPointSlavesPtr_

autoPtr<labelListList> globalCoPointSlavesPtr_
mutableprivate

Definition at line 197 of file globalMeshData.H.

◆ globalCoPointSlavesMapPtr_

autoPtr<mapDistribute> globalCoPointSlavesMapPtr_
mutableprivate

Definition at line 198 of file globalMeshData.H.

◆ nGlobalPoints_

label nGlobalPoints_
mutableprivate

Total number of global points.

Definition at line 205 of file globalMeshData.H.

◆ sharedPointLabelsPtr_

autoPtr<labelList> sharedPointLabelsPtr_
mutableprivate

Indices of local points that are globally shared.

Definition at line 208 of file globalMeshData.H.

◆ sharedPointAddrPtr_

autoPtr<labelList> sharedPointAddrPtr_
mutableprivate

Indices of globally shared points in the master list.

This list contains all the shared points in the mesh

Definition at line 212 of file globalMeshData.H.

◆ sharedPointGlobalLabelsPtr_

autoPtr<labelList> sharedPointGlobalLabelsPtr_
mutableprivate

Shared point global labels.

Global point index for every local shared point. Only valid if constructed with this information or if pointProcAddressing read.

Definition at line 218 of file globalMeshData.H.

◆ nGlobalEdges_

label nGlobalEdges_
mutableprivate

Total number of global edges.

Definition at line 225 of file globalMeshData.H.

◆ sharedEdgeLabelsPtr_

autoPtr<labelList> sharedEdgeLabelsPtr_
mutableprivate

Indices of local edges that are globally shared.

Definition at line 228 of file globalMeshData.H.

◆ sharedEdgeAddrPtr_

autoPtr<labelList> sharedEdgeAddrPtr_
mutableprivate

Indices of globally shared edge in the master list.

This list contains all the shared edges in the mesh

Definition at line 232 of file globalMeshData.H.

◆ matchTol_

const scalar matchTol_ = 1e-8
static

Geometric tolerance (fraction of bounding box)

Definition at line 346 of file globalMeshData.H.


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