Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
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]

Classes

struct  ListPlusEqOp
 

Public Member Functions

 ClassName ("globalMeshData")
 
 globalMeshData (const polyMesh &mesh)
 
 ~globalMeshData ()
 
void clearOut ()
 
const polyMeshmesh () const noexcept
 
bool parallel () const
 
label nTotalPoints () const noexcept
 
label nTotalFaces () const noexcept
 
label nTotalCells () const noexcept
 
const labelListprocessorPatches () const noexcept
 
const labelListprocessorPatchIndices () const noexcept
 
const labelListprocessorPatchNeighbours () const noexcept
 
label nGlobalPoints () const
 
const labelListsharedPointLabels () const
 
const labelListsharedPointAddr () const
 
const labelListsharedPointGlobalLabels () const
 
pointField sharedPoints () const
 
pointField geometricSharedPoints () const
 
label nGlobalEdges () const
 
const labelListsharedEdgeLabels () const
 
const labelListsharedEdgeAddr () const
 
const indirectPrimitivePatchcoupledPatch () const
 
const labelListcoupledPatchMeshEdges () const
 
const Map< label > & coupledPatchMeshEdgeMap () const
 
const globalIndexAndTransformglobalTransforms () const
 
const globalIndexglobalPointNumbering () const
 
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
 
const globalIndexglobalEdgeNumbering () const
 
const labelListListglobalEdgeSlaves () const
 
const labelListListglobalEdgeTransformedSlaves () const
 
const mapDistributeglobalEdgeSlavesMap () const
 
const bitSetglobalEdgeOrientation () const
 
const labelListListglobalCoPointSlaves () const
 
const mapDistributeglobalCoPointSlavesMap () const
 
const globalIndexglobalBoundaryFaceNumbering () const
 
const labelListListglobalPointBoundaryFaces () const
 
const labelListListglobalPointTransformedBoundaryFaces () const
 
const mapDistributeglobalPointBoundaryFacesMap () const
 
const labelListboundaryCells () const
 
const globalIndexglobalBoundaryCellNumbering () const
 
const labelListListglobalPointBoundaryCells () const
 
const labelListListglobalPointTransformedBoundaryCells () const
 
const mapDistributeglobalPointBoundaryCellsMap () const
 
autoPtr< globalIndexmergePoints (labelList &pointToGlobal, labelList &uniquePoints) const
 
autoPtr< globalIndexmergePoints (const labelList &meshPoints, const Map< label > &meshPointMap, labelList &pointToGlobal, labelList &uniqueMeshPoints) const
 
void movePoints (const pointField &newPoints)
 
void updateMesh ()
 
- Public Member Functions inherited from ProcessorTopology< Container, ProcPatch >
 ProcessorTopology (const Container &patches, const label comm)
 
const labelListprocPatchMap () const
 
const lduSchedulepatchSchedule () const
 
- Public Member Functions inherited from List
constexpr List () noexcept
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const List< T > &a)
 
 List (const UList< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
template<unsigned N>
 List (const UList< T > &list, const FixedList< label, N > &indices)
 
template<unsigned N>
 List (const FixedList< T, N > &list)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
template<class Addr >
 List (const IndirectListBase< T, Addr > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
template<int SizeMin>
 List (DynamicList< T, SizeMin > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 
 ~List ()
 
void clear ()
 
void resize (const label len)
 
void resize (const label len, const T &val)
 
void resize_nocopy (const label len)
 
void setSize (const label n)
 
void setSize (const label n, const T &val)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
template<class Addr >
void append (const IndirectListBase< T, Addr > &list)
 
label appendUniq (const T &val)
 
void transfer (List< T > &list)
 
template<int SizeMin>
void transfer (DynamicList< T, SizeMin > &list)
 
void transfer (SortableList< T > &list)
 
TnewElmt (const label i)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
template<class Addr >
void operator= (const IndirectListBase< T, Addr > &list)
 
template<unsigned N>
void operator= (const FixedList< T, N > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (List< T > &&list)
 
template<int SizeMin>
void operator= (DynamicList< T, SizeMin > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
IstreamreadList (Istream &is)
 
void shallowCopy (const UList< T > &)=delete
 
template<class TypeT = T>
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 
template<class T >
 List (const label len)
 
template<class T >
 List (const label len, const T &val)
 
template<class T >
 List (const label len, const Foam::zero)
 
template<class T >
 List (const Foam::one, const T &val)
 
template<class T >
 List (const Foam::one, T &&val)
 
template<class T >
 List (const Foam::one, const Foam::zero)
 
template<class T >
 List (const UList< T > &a)
 
template<class T >
 List (const List< T > &a)
 
template<class T >
 List (List< T > &a, bool reuse)
 
template<class T >
 List (const UList< T > &list, const labelUList &indices)
 
template<class T >
 List (const PtrList< T > &list)
 
template<class T >
 List (const SLList< T > &list)
 
template<class T >
 List (std::initializer_list< T > list)
 
template<class T >
 List (List< T > &&list)
 
template<class T >
 List (SortableList< T > &&list)
 
template<class T >
 List (SLList< T > &&list)
 
template<class T >
void transfer (List< T > &list)
 
template<class T >
void transfer (SortableList< T > &list)
 
template<class T >
void operator= (const UList< T > &a)
 
template<class T >
void operator= (const List< T > &list)
 
template<class T >
void operator= (const SLList< T > &list)
 
template<class T >
void operator= (std::initializer_list< T > list)
 
template<class T >
void operator= (List< T > &&list)
 
template<class T >
void operator= (SortableList< T > &&list)
 
template<class T >
void operator= (SLList< T > &&list)
 
IstreamreadList (Istream &is)
 
template<class T >
constexpr List () noexcept
 
void resize (const label newLen)
 
template<class T >
void append (const T &val)
 
template<class T >
void append (T &&val)
 
template<class T >
void append (const UList< T > &list)
 
template<class T >
void operator= (const T &val)
 
template<class T >
void operator= (const Foam::zero)
 
template<class T >
 List (Istream &is)
 
IstreamreadList (Istream &is)
 

Static Public Member Functions

template<class Type , class CombineOp , class TransformOp >
static void syncData (List< Type > &elems, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
 
template<class Type , class CombineOp >
static void syncData (List< Type > &elems, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const CombineOp &cop)
 
- Static Public Member Functions inherited from ProcessorTopology< Container, ProcPatch >
static lduSchedule nonBlockingSchedule (const Container &patches)
 
- Static Public Member Functions inherited from List
static const List< T > & null ()
 

Static Public Attributes

static const Foam::scalar matchTol_ = 1e-8
 

Additional Inherited Members

- Public Types inherited from List
typedef SubList< TsubList
 

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 103 of file globalMeshData.H.

Constructor & Destructor Documentation

◆ globalMeshData()

globalMeshData ( const polyMesh mesh)

Definition at line 1739 of file globalMeshData.C.

References globalMeshData::updateMesh().

Here is the call graph for this function:

◆ ~globalMeshData()

Definition at line 1763 of file globalMeshData.C.

Member Function Documentation

◆ ClassName()

ClassName ( "globalMeshData"  )

◆ clearOut()

void clearOut ( )

Definition at line 1769 of file globalMeshData.C.

◆ mesh()

const polyMesh& mesh ( ) const
inlinenoexcept

Definition at line 340 of file globalMeshData.H.

◆ parallel()

bool parallel ( ) const
inline

Definition at line 347 of file globalMeshData.H.

◆ nTotalPoints()

label nTotalPoints ( ) const
inlinenoexcept

Definition at line 354 of file globalMeshData.H.

◆ nTotalFaces()

label nTotalFaces ( ) const
inlinenoexcept

Definition at line 361 of file globalMeshData.H.

◆ nTotalCells()

label nTotalCells ( ) const
inlinenoexcept

◆ processorPatches()

const labelList& processorPatches ( ) const
inlinenoexcept

Definition at line 377 of file globalMeshData.H.

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

Here is the caller graph for this function:

◆ processorPatchIndices()

const labelList& processorPatchIndices ( ) const
inlinenoexcept

Definition at line 385 of file globalMeshData.H.

◆ processorPatchNeighbours()

const labelList& processorPatchNeighbours ( ) const
inlinenoexcept

Definition at line 392 of file globalMeshData.H.

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

Here is the caller graph for this function:

◆ nGlobalPoints()

Foam::label nGlobalPoints ( ) const

Definition at line 1979 of file globalMeshData.C.

Referenced by syncTools::syncPointMap().

Here is the caller graph for this function:

◆ sharedPointLabels()

const Foam::labelList & sharedPointLabels ( ) const

Definition at line 1989 of file globalMeshData.C.

Referenced by polyMeshAdder::findSharedPoints(), syncTools::syncEdgeMap(), and syncTools::syncPointMap().

Here is the caller graph for this function:

◆ sharedPointAddr()

const Foam::labelList & sharedPointAddr ( ) const

Definition at line 1999 of file globalMeshData.C.

Referenced by polyMeshAdder::findSharedPoints(), syncTools::syncEdgeMap(), and syncTools::syncPointMap().

Here is the caller graph for this function:

◆ sharedPointGlobalLabels()

const Foam::labelList & sharedPointGlobalLabels ( ) const

Definition at line 1821 of file globalMeshData.C.

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

Here is the call graph for this function:

◆ sharedPoints()

Foam::pointField sharedPoints ( ) const

Definition at line 1872 of file globalMeshData.C.

References UPstream::blocking, forAll, UPstream::master(), UPstream::masterNo(), pointLabels(), and UPstream::subProcs().

Here is the call graph for this function:

◆ geometricSharedPoints()

Foam::pointField geometricSharedPoints ( ) const

Definition at line 1951 of file globalMeshData.C.

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

Here is the call graph for this function:

◆ nGlobalEdges()

Foam::label nGlobalEdges ( ) const

Definition at line 2009 of file globalMeshData.C.

◆ sharedEdgeLabels()

const Foam::labelList & sharedEdgeLabels ( ) const

Definition at line 2019 of file globalMeshData.C.

◆ sharedEdgeAddr()

const Foam::labelList & sharedEdgeAddr ( ) const

Definition at line 2029 of file globalMeshData.C.

◆ coupledPatch()

const Foam::indirectPrimitivePatch & coupledPatch ( ) const

◆ coupledPatchMeshEdges()

const Foam::labelList & coupledPatchMeshEdges ( ) const

Definition at line 2100 of file globalMeshData.C.

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

Here is the caller graph for this function:

◆ coupledPatchMeshEdgeMap()

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

Definition at line 2120 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 > &  elems,
const labelListList slaves,
const labelListList transformedSlaves,
const mapDistribute slavesMap,
const globalIndexAndTransform transforms,
const CombineOp &  cop,
const TransformOp &  top 
)
static

Definition at line 30 of file globalMeshDataTemplates.C.

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

Referenced by addPatchCellLayer::calcExtrudeInfo(), PatchTools::edgeNormals(), syncTools::syncEdgeList(), and syncTools::syncPointList().

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

◆ syncData() [2/2]

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

Definition at line 95 of file globalMeshDataTemplates.C.

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

Here is the call graph for this function:

◆ globalPointNumbering()

const Foam::globalIndex & globalPointNumbering ( ) const

Definition at line 2139 of file globalMeshData.C.

References nPoints, and globalIndex::reset().

Here is the call graph for this function:

◆ globalPointSlaves()

const Foam::labelListList & globalPointSlaves ( ) const

Definition at line 2163 of file globalMeshData.C.

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

Here is the caller graph for this function:

◆ globalPointTransformedSlaves()

const Foam::labelListList & globalPointTransformedSlaves ( ) const

Definition at line 2173 of file globalMeshData.C.

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

Here is the caller graph for this function:

◆ globalPointSlavesMap()

const Foam::mapDistribute & globalPointSlavesMap ( ) const

Definition at line 2184 of file globalMeshData.C.

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

Here is the caller graph for this function:

◆ syncPointData()

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

Definition at line 152 of file globalMeshDataTemplates.C.

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

Referenced by syncTools::syncPointList().

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

◆ globalEdgeNumbering()

const Foam::globalIndex & globalEdgeNumbering ( ) const

Definition at line 2194 of file globalMeshData.C.

References globalIndex::reset().

Here is the call graph for this function:

◆ globalEdgeSlaves()

const Foam::labelListList & globalEdgeSlaves ( ) const

Definition at line 2207 of file globalMeshData.C.

Referenced by addPatchCellLayer::calcExtrudeInfo(), PatchTools::edgeNormals(), syncTools::getMasterEdges(), and syncTools::syncEdgeList().

Here is the caller graph for this function:

◆ globalEdgeTransformedSlaves()

const Foam::labelListList & globalEdgeTransformedSlaves ( ) const

Definition at line 2217 of file globalMeshData.C.

Referenced by addPatchCellLayer::calcExtrudeInfo(), PatchTools::edgeNormals(), syncTools::getMasterEdges(), and syncTools::syncEdgeList().

Here is the caller graph for this function:

◆ globalEdgeSlavesMap()

const Foam::mapDistribute & globalEdgeSlavesMap ( ) const

Definition at line 2238 of file globalMeshData.C.

Referenced by addPatchCellLayer::calcExtrudeInfo(), PatchTools::edgeNormals(), and syncTools::syncEdgeList().

Here is the caller graph for this function:

◆ globalEdgeOrientation()

const Foam::bitSet & globalEdgeOrientation ( ) const

Definition at line 2228 of file globalMeshData.C.

Referenced by syncTools::syncEdgeList().

Here is the caller graph for this function:

◆ globalCoPointSlaves()

const Foam::labelListList & globalCoPointSlaves ( ) const

Definition at line 2346 of file globalMeshData.C.

Referenced by globalIndexAndTransform::globalIndexAndTransform(), and pointConstraints::syncUntransformedData().

Here is the caller graph for this function:

◆ globalCoPointSlavesMap()

const Foam::mapDistribute & globalCoPointSlavesMap ( ) const

Definition at line 2356 of file globalMeshData.C.

Referenced by globalIndexAndTransform::globalIndexAndTransform(), and pointConstraints::syncUntransformedData().

Here is the caller graph for this function:

◆ globalBoundaryFaceNumbering()

const Foam::globalIndex & globalBoundaryFaceNumbering ( ) const

Definition at line 2248 of file globalMeshData.C.

◆ globalPointBoundaryFaces()

const Foam::labelListList & globalPointBoundaryFaces ( ) const

Definition at line 2259 of file globalMeshData.C.

◆ globalPointTransformedBoundaryFaces()

const Foam::labelListList & globalPointTransformedBoundaryFaces ( ) const

Definition at line 2271 of file globalMeshData.C.

◆ globalPointBoundaryFacesMap()

const Foam::mapDistribute & globalPointBoundaryFacesMap ( ) const

Definition at line 2281 of file globalMeshData.C.

◆ boundaryCells()

const Foam::labelList & boundaryCells ( ) const

Definition at line 2292 of file globalMeshData.C.

◆ globalBoundaryCellNumbering()

const Foam::globalIndex & globalBoundaryCellNumbering ( ) const

Definition at line 2302 of file globalMeshData.C.

◆ globalPointBoundaryCells()

const Foam::labelListList & globalPointBoundaryCells ( ) const

Definition at line 2313 of file globalMeshData.C.

◆ globalPointTransformedBoundaryCells()

const Foam::labelListList & globalPointTransformedBoundaryCells ( ) const

Definition at line 2325 of file globalMeshData.C.

◆ globalPointBoundaryCellsMap()

const Foam::mapDistribute & globalPointBoundaryCellsMap ( ) const

Definition at line 2335 of file globalMeshData.C.

◆ mergePoints() [1/2]

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

◆ mergePoints() [2/2]

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

◆ movePoints()

void movePoints ( const pointField newPoints)

Definition at line 2715 of file globalMeshData.C.

◆ updateMesh()

void updateMesh ( )

Member Data Documentation

◆ matchTol_

const scalar matchTol_ = 1e-8
static

Definition at line 319 of file globalMeshData.H.


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