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

globalIndex Class Reference

Calculates a unique integer (label so might not have enough room - 2G max) for processor + local index. E.g. More...

Collaboration diagram for globalIndex:

List of all members.


Public Member Functions

 globalIndex (const label localSize)
 Construct from local max size.
 globalIndex (Istream &is)
 Construct from Istream.
label localSize () const
 my local size
label toGlobal (const label i) const
 From local to global.
bool isLocal (const label i) const
 Is on local processor.
label toLocal (const label i) const
 From global to local on current processor.
label size () const
 Global sum of localSizes.
label localSize (const label procI) const
 Size of procI data.
label toGlobal (const label procI, const label i) const
 From local to global on procI.
bool isLocal (const label procI, const label i) const
 Is on processor procI.
label toLocal (const label procI, const label i) const
 From global to local on procI.
label whichProcID (const label i) const
 Which processor does global come from? Binary search.
label offset (const label procI) const
 Start of procI data.

Friends

Istream & operator>> (Istream &is, globalIndex &gi)
Ostream & operator<< (Ostream &os, const globalIndex &gi)

Detailed Description

Calculates a unique integer (label so might not have enough room - 2G max) for processor + local index. E.g.

globalIndex globalFaces(mesh.nFaces()); label globalFaceI = globalFaces.toGlobal(faceI);

Source files

Definition at line 57 of file globalIndex.H.


Constructor & Destructor Documentation

globalIndex ( const label  localSize  ) 

Construct from local max size.

Definition at line 22 of file globalIndex.C.

References FatalErrorIn, forAll, Pstream::gatherList(), Pstream::myProcNo(), Pstream::nProcs(), globalIndex::offset(), and Pstream::scatterList().

Here is the call graph for this function:

globalIndex ( Istream &  is  ) 

Construct from Istream.

Definition at line 50 of file globalIndex.C.


Member Function Documentation

Foam::label localSize (  )  const [inline]

my local size

Definition at line 45 of file globalIndexI.H.

Foam::label toGlobal ( const label  i  )  const [inline]

From local to global.

Definition at line 67 of file globalIndexI.H.

Referenced by globalIndex::isLocal().

Here is the caller graph for this function:

bool isLocal ( const label  i  )  const [inline]

Is on local processor.

Definition at line 82 of file globalIndexI.H.

Foam::label toLocal ( const label  i  )  const [inline]

From global to local on current processor.

FatalError if not on local processor.

Definition at line 104 of file globalIndexI.H.

Foam::label size (  )  const [inline]

Global sum of localSizes.

Definition at line 51 of file globalIndexI.H.

Referenced by distributedTriSurfaceMesh::hasVolumeType().

Here is the caller graph for this function:

Foam::label localSize ( const label  procI  )  const [inline]

Size of procI data.

Definition at line 34 of file globalIndexI.H.

Foam::label toGlobal ( const label  procI,
const label  i 
) const [inline]

From local to global on procI.

Definition at line 58 of file globalIndexI.H.

References Pstream::nProcs().

Here is the call graph for this function:

bool isLocal ( const label  procI,
const label  i 
) const [inline]

Is on processor procI.

Is on local processor.

Definition at line 74 of file globalIndexI.H.

References Pstream::myProcNo(), and globalIndex::toGlobal().

Here is the call graph for this function:

Foam::label toLocal ( const label  procI,
const label  i 
) const [inline]

From global to local on procI.

Definition at line 88 of file globalIndexI.H.

Foam::label whichProcID ( const label  i  )  const [inline]

Which processor does global come from? Binary search.

Definition at line 110 of file globalIndexI.H.

Foam::label offset ( const label  procI  )  const [inline]

Start of procI data.

Definition at line 28 of file globalIndexI.H.

Referenced by globalIndex::globalIndex().

Here is the caller graph for this function:


Friends And Related Function Documentation

Istream& operator>> ( Istream &  is,
globalIndex &  gi 
) [friend]

Ostream& operator<< ( Ostream &  os,
const globalIndex &  gi 
) [friend]


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