OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

globalMeshData Class Reference

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

Inheritance diagram for globalMeshData:
Collaboration diagram for globalMeshData:

List of all members.


Classes

class  plusEqOp

Public Member Functions

 ClassName ("globalMeshData")
 Runtime type information.
 globalMeshData (const polyMesh &mesh)
 Construct from mesh, derive rest (does parallel communication!).
 globalMeshData (const IOobject &io, const polyMesh &mesh)
 Old behaviour: read constructor given IOobject and a polyMesh.
 ~globalMeshData ()
void clearOut ()
 Remove all demand driven data.
const polyMeshmesh () const
 Return the mesh reference.
bool parallel () const
 Does the mesh contain processor patches? (also valid when.
const boundBoxbb () const
label nTotalPoints () const
 Return total number of points in decomposed mesh.
label nTotalFaces () const
 Return total number of faces in decomposed mesh.
label nTotalCells () const
 Return total number of cells in decomposed mesh.
const labelListprocessorPatches () const
 Return list of processor patch labels.
const labelListprocessorPatchIndices () const
 Return list of indices into processorPatches_ for each patch.
const labelListprocessorPatchNeighbours () const
 Return processorPatchIndices of the neighbours.
label nGlobalPoints () const
 Return number of globally shared points.
const labelListsharedPointLabels () const
 Return indices of local points that are globally shared.
const labelListsharedPointAddr () const
 Return addressing into the complete globally shared points.
const labelListsharedPointGlobalLabels () const
 Return shared point global labels. Tries to read.
pointField sharedPoints () const
 Collect coordinates of shared points on all processors.
pointField geometricSharedPoints () const
 Like sharedPoints but keeps cyclic points separate.
label nGlobalEdges () const
 Return number of globally shared edges. Demand-driven.
const labelListsharedEdgeLabels () const
 Return indices of local edges that are globally shared.
const labelListsharedEdgeAddr () const
 Return addressing into the complete globally shared edge.
void movePoints (const pointField &newPoints)
 Update for moving points.
void updateMesh ()
 Change global mesh data given a topological change. Does a.
bool write () const

Static Public Attributes

static const Foam::scalar matchTol_ = 1E-8
 Geomtric tolerance (fraction of bounding box).

Friends

Ostreamoperator<< (Ostream &, const globalMeshData &)

Detailed Description

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

Requires:

  • all processor patches to have correct ordering.
  • all processorPatches to have their transforms set ('makeTransforms')

The shared point addressing is quite interesting. It gives on each processor the vertices that cannot be set using a normal swap on processor patches. These are the vertices that are shared between more than 2 processors.

There is an issue with these shared vertices if they originate from cyclics (i.e. are now separated processor patches). They will all be mapped to the same global point (so even though the processor points are not on the same location) since topologically they are one and the same.

So if you ask for sharedPoints() you get only one of the coordinates of the topologically shared points.

All the hard work of these shared points is done by the globalPoints class.

Shared edges: similar to shared points gives on all processors the edges that are shared between more than two patches (i.e. the edges on which data cannot be synchronized by a straightforward edge data swap). Note that shared edges will use shared points but not all edges between shared points need to be shared edges (e.g. there might be an edge connecting two disconnected regions of shared points).

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.

Shared edge calculation is demand driven so always make sure to have your first call to one of the access functions synchronous amongst all processors!

Source files

Definition at line 91 of file globalMeshData.H.


Constructor & Destructor Documentation

globalMeshData ( const polyMesh mesh  ) 

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

Definition at line 431 of file globalMeshData.C.

globalMeshData ( const IOobject io,
const polyMesh mesh 
)

Old behaviour: read constructor given IOobject and a polyMesh.

reference. Only use this for testing!

Definition at line 455 of file globalMeshData.C.

~globalMeshData (  ) 

Definition at line 492 of file globalMeshData.C.


Member Function Documentation

ClassName ( "globalMeshData"   ) 

Runtime type information.

void clearOut (  ) 

Remove all demand driven data.

Definition at line 498 of file globalMeshData.C.

const polyMesh& mesh (  )  const [inline]

Return the mesh reference.

Definition at line 268 of file globalMeshData.H.

bool parallel (  )  const [inline]

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

not running parallel)

Definition at line 277 of file globalMeshData.H.

const boundBox& bb (  )  const [inline]

Definition at line 282 of file globalMeshData.H.

label nTotalPoints (  )  const [inline]

Return total number of points in decomposed mesh.

Definition at line 288 of file globalMeshData.H.

label nTotalFaces (  )  const [inline]

Return total number of faces in decomposed mesh.

Definition at line 294 of file globalMeshData.H.

Referenced by hexRef8::consistentSlowRefinement().

Here is the caller graph for this function:

label nTotalCells (  )  const [inline]

Return total number of cells in decomposed mesh.

Definition at line 300 of file globalMeshData.H.

Referenced by meshRefinement::refineCandidates().

Here is the caller graph for this function:

const labelList& processorPatches (  )  const [inline]

Return list of processor patch labels.

(size of list = number of processor patches)

Definition at line 312 of file globalMeshData.H.

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

const labelList& processorPatchNeighbours (  )  const [inline]

Return processorPatchIndices of the neighbours.

processor patches. -1 if not running parallel.

Definition at line 331 of file globalMeshData.H.

label nGlobalPoints (  )  const [inline]

Return number of globally shared points.

Definition at line 340 of file globalMeshData.H.

Referenced by globalPointPatch::sharedPointAddr(), and syncTools::syncPointList().

Here is the caller graph for this function:

const labelList& sharedPointLabels (  )  const [inline]

Return indices of local points that are globally shared.

Definition at line 346 of file globalMeshData.H.

Referenced by globalPointPatch::localPoints(), and syncTools::syncPointList().

Here is the caller graph for this function:

const labelList& sharedPointAddr (  )  const [inline]

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

Referenced by syncTools::syncPointList().

Here is the caller graph for this function:

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 511 of file globalMeshData.C.

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 557 of file globalMeshData.C.

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 638 of file globalMeshData.C.

Foam::label nGlobalEdges (  )  const

Return number of globally shared edges. Demand-driven.

calculation so call needs to be synchronous among processors!

Definition at line 673 of file globalMeshData.C.

Referenced by syncTools::syncEdgeList().

Here is the caller graph for this function:

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 683 of file globalMeshData.C.

Referenced by syncTools::syncEdgeList().

Here is the caller graph for this function:

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 693 of file globalMeshData.C.

Referenced by syncTools::syncEdgeList().

Here is the caller graph for this function:

void movePoints ( const pointField newPoints  ) 

Update for moving points.

Definition at line 703 of file globalMeshData.C.

void updateMesh (  ) 

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

full parallel analysis to determine shared points and boundaries.

Definition at line 711 of file globalMeshData.C.

Referenced by polyMesh::updateMesh().

Here is the caller graph for this function:

bool write (  )  const

Definition at line 935 of file globalMeshData.C.


Friends And Related Function Documentation

Ostream& operator<< ( Ostream ,
const globalMeshData  
) [friend]


Member Data Documentation

const Foam::scalar matchTol_ = 1E-8 [static]

Geomtric tolerance (fraction of bounding box).

Definition at line 240 of file globalMeshData.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd