OpenFOAM logo
Open Source CFD Toolkit

label.H File Reference


Detailed Description

View label.H
License
This file is part of OpenFOAM.

OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A label is an int if INT_MAX is large enough otherwise a long.
A readLabel function is defined so that label can be constructed from
Istream.

Definition in file label.H.

Go to the source code of this file.

Namespaces

namespace  Foam

Classes

class  pTraits< label >

Defines

#define MAXMIN(retType, type1, type2)

Typedefs

typedef long label

Functions

label readLabel (Istream &is)
label pow (label a, label b)
 Raise one label to the power of another.
label nCr (label n, label r)
 Evaluate nCr : values of n and r <= 12.
label factorial (label n)
 Evaluate n! : n <= 12.
char max (const char s1, const char s2)
char min (const char s1, const char s2)
short max (const short s1, const short s2)
short min (const short s1, const short s2)
int max (const int s1, const int s2)
int min (const int s1, const int s2)
long max (const long s1, const long s2)
long min (const long s1, const long s2)
unsigned char max (const unsigned char s1, const unsigned char s2)
unsigned char min (const unsigned char s1, const unsigned char s2)
unsigned short max (const unsigned short s1, const unsigned short s2)
unsigned short min (const unsigned short s1, const unsigned short s2)
unsigned int max (const unsigned int s1, const unsigned int s2)
unsigned int min (const unsigned int s1, const unsigned int s2)
unsigned long max (const unsigned long s1, const unsigned long s2)
unsigned long min (const unsigned long s1, const unsigned long s2)
long max (const int s1, const long s2)
long min (const int s1, const long s2)
long max (const long s1, const int s2)
long min (const long s1, const int s2)
label mag (const label l)
label sign (const label s)
label pos (const label s)
label neg (const label s)

Variables

const label labelMax = LONG_MAX
const label labelMin = LONG_MIN


Define Documentation

#define MAXMIN retType,
type1,
type2   ) 
 

Value:

\
inline retType max(const type1 s1, const type2 s2) \
{                                                  \
    return (s1 > s2)? s1: s2;                      \
}                                                  \
                                                   \
inline retType min(const type1 s1, const type2 s2) \
{                                                  \
    return (s1 < s2)? s1: s2;                      \
}

Definition at line 151 of file label.H.


Typedef Documentation

typedef long label
 

Definition at line 76 of file label.H.

Referenced by octreeDataTriSurface::allBb(), meshWave::allCellInfo(), PointEdgeWave::allEdgeInfo(), meshWave::allFaceInfo(), PointEdgeWave::allPointInfo(), amgCoupledInterface::amgCoupledInterface(), polyAddFace::appended(), areaMesh::areaMesh(), parallelInfo::bb(), tetPolyMeshFaceDecomp::boundary(), tetPolyMeshCellDecomp::boundary(), GeometricField::boundaryField(), cell::cell(), veryInhomogeneousMixture::cellMixture(), inhomogeneousMixture::cellMixture(), homogeneousMixture::cellMixture(), egrMixture::cellMixture(), dieselMixture::cellMixture(), pureMixture::cellMixture(), veryInhomogeneousMixture::cellProducts(), inhomogeneousMixture::cellProducts(), egrMixture::cellProducts(), dieselMixture::cellProducts(), veryInhomogeneousMixture::cellReactants(), inhomogeneousMixture::cellReactants(), egrMixture::cellReactants(), dieselMixture::cellReactants(), polyMesh::cellZones(), centreEdge::centreEdge(), triangle::classify(), pointZone::clone(), faceZone::clone(), cellZone::clone(), polyPatch::clone(), wallPolyPatch::clone(), wedgePolyPatch::clone(), symmetryPolyPatch::clone(), emptyPolyPatch::clone(), cellModel::clone(), Matrix::clone(), FixedList::clone(), topoSet::clone(), indexedParticle::clone(), polyRemovePoint::clone(), polyRemoveFace::clone(), polyRemoveCell::clone(), polyModifyPoint::clone(), polyModifyCell::clone(), cellLooper::clone(), cellShape::collapsedFaces(), hMixtureThermo::composition(), hhuMixtureThermo::composition(), IOstream::compression(), speciesTable::contains(), fvPatch::coupled(), wallPointData::data(), structuredScalars2D::DataRow(), octree< octreeDataPoint >::deepestLevel(), diagonalEdge::diagonalEdge(), faceMapper::direct(), fvMeshSubset::patchFieldSubset::directAddressing(), directionInfo::directionInfo(), DynamicList::DynamicList(), edge::edge(), edgeMesh::edgeMesh(), edgeVertex::edgeToEVert(), elementMesh::elementMesh(), emptyFvPatch::emptyFvPatch(), HashTable::end(), regionInfo::enterDomain(), cellInfo::enterDomain(), wallNormalInfo::enterDomain(), spray::evaporationSource(), surfaceFeatures::externalStart(), boundaryMesh::extraEdges(), polyTopoChange::faceBalance(), faceEdge::faceEdge(), fvMatrix::faceFluxCorrectionPtr(), faMatrix::faceFluxCorrectionPtr(), polyModifyFace::faceID(), diagonalEdge::faceLabel(), directPolyTopoChange::faceNeighbour(), directPolyTopoChange::faceOwner(), cellShape::faces(), cellCuts::faceSplitCut(), UList::fcIndex(), FixedList::fcIndex(), surfaceFeatures::featureEdges(), surfaceFeatures::featurePoints(), FixedList::FixedList(), error::functionName(), GeoMesh< fvMesh >::GeoMesh(), PackedList::get(), hThermo::h(), FixedList::Hash::Hash(), objectHit::hit(), hhuCombustionThermo::hu(), particle::inCell(), polyPatch::initUpdateTopology(), surfaceFeatures::internalStart(), centreEdge::interpolate(), IOerror::ioStartLineNumber(), edgeVertex::isEdge(), polyModifyFace::isInPatch(), polyAddFace::isInPatch(), PrimitivePatch< face, IndirectList, const pointField & >::isInternalEdge(), polyAddPoint::isInZone(), polyAddCell::isInZone(), token::isLabel(), edgeSurface::isSurfaceEdge(), janafThermo::janafThermo(), HashTable::Iterator::key(), entry::keyword(), labelledTri::labelledTri(), lduAddressing::lduAddressing(), directionInfo::leaveDomain(), token::lineNumber(), Matrix::m(), Foam::mag(), Map< labelList >::Map(), polyAddFace::masterEdgeID(), polyAddCell::masterEdgeID(), polyAddCell::masterFaceID(), polyAddFace::masterPointID(), polyAddCell::masterPointID(), messageStream::maxErrors(), ZoneMesh< faceZone >::mesh(), polyBoundaryMesh::mesh(), parallelInfo::mesh(), mapPolyMesh::mesh(), octreeDataFace::mesh(), meshSearch::mesh(), cellDistFuncs::mesh(), cellClassification::mesh(), polyTopoChanger::mesh(), cellShape::meshEdges(), meshEdgeCuts::meshEdges(), cellShape::meshFaces(), octreeDataFace::meshFaces(), Matrix::n(), directionInfo::n(), faceTetPolyPatchFaceDecomp::name(), ZoneID< faceZone >::name(), polyPatchID::name(), faceZone::name(), globalProcessorPointPatch::name(), primitiveEntry::name(), dictionaryEntry::name(), dictionary::name(), tetPolyMeshFaceDecomp::nCells(), tetPolyMeshCellDecomp::nCells(), polyModifyFace::newFace(), polyAddFace::newFace(), polyAddPoint::newPoint(), PtrList< faPatch >::nextFree(), wedgeMatcher::nMaxVertPerFace(), tetWedgeMatcher::nMaxVertPerFace(), tetMatcher::nMaxVertPerFace(), pyrMatcher::nMaxVertPerFace(), prismMatcher::nMaxVertPerFace(), hexMatcher::nMaxVertPerFace(), mapAddedPolyMesh::nOldCells(), globalPoints::nPatchPoints(), PrimitivePatch< face, IndirectList, const pointField & >::nPoints(), pointMesh::nPoints(), surfaceFeatures::nRegionEdges(), octree< octreeDataPoint >::octreeBb(), mapAddedPolyMesh::oldPatchMap(), polyAddFace::onlyInZone(), pTraits< label >::operator label(), reference::operator unsigned int(), tetPolyMeshFaceDecomp::operator()(), tetPolyMeshCellDecomp::operator()(), Hash< FixedList< T, Size > >::operator()(), pointMesh::operator()(), accessOp::operator()(), FixedList::Hash::operator()(), DynamicList::operator()(), Foam::operator+(), janafThermo::operator+=(), Foam::operator-(), janafThermo::operator-=(), Foam::operator<<(), PackedList::operator[](), structuredVectors2D::origin(), structuredScalars2D::origin(), polyModifyFace::owner(), polyAddFace::owner(), PackedList::PackedList(), particle::patch(), patchDataWave::patchData(), triSurface::patches(), meshToMesh::patchFieldInterpolator::patchFieldInterpolator(), fvMeshSubset::patchFieldSubset::patchFieldSubset(), polyPatch::patchSlice(), polyTopoChange::pointBalance(), polyAddCell::polyAddCell(), polyAddFace::polyAddFace(), polyModifyFace::polyModifyFace(), Foam::pos(), ProcessorTopology< polyPatch, processorPolyPatch >::procPatchMap(), PtrMap::PtrMap(), pyramidEdge::pyramidEdge(), regionInfo::region(), polyModifyPoint::removeFromZone(), polyModifyFace::removeFromZone(), polyModifyCell::removeFromZone(), UList::rend(), FixedList::rend(), basicThermo::rho(), regionInfo::sameGeometry(), cellInfo::sameGeometry(), wallNormalInfo::sameGeometry(), directionInfo::sameGeometry(), PackedList::set(), octree< octreeDataPoint >::setLeaves(), amgSymSolver::setMaxCycles(), amgSymSolver::setMaxLevels(), amgSymSolver::setPostSweeps(), PointEdgeWave::setPropagationTol(), geomCellLooper::setSnapTol(), parallelInfo::sharedPointLabels(), Foam::sign(), faceTetPolyPatchFaceDecomp::size(), tetPointMesh::size(), elementMesh::size(), pointMesh::size(), GeoMesh< fvMesh >::size(), lduAddressing::size(), UList::size(), FixedList::size(), DynamicList::size(), octreeDataTriSurface::size(), octreeDataPoint::size(), octreeDataFace::size(), octreeDataEdges::size(), octreeDataCell::size(), volMesh::size(), surfaceMesh::size(), edgeMesh::size(), areaMesh::size(), octreeDataFaceList::size(), lduMatrix::solverPerformance::solverPerformance(), tetFemMatrix::source(), surfaceMesh::surfaceMesh(), pointSet::sync(), cellSet::sync(), tetCell::tetCell(), tetPointMesh::tetPointMesh(), octree< octreeDataPoint >::topNode(), regionInfo::transform(), pointEdgePoint::transform(), cellInfo::transform(), wallNormalInfo::transform(), treeBoundBox::treeBoundBox(), triFace::triFace(), triSurfaceGeoMesh::triSurfaceGeoMesh(), motionSmoother::twoDCorrector(), cellInfo::type(), UList::UList(), IOstream::version(), volMesh::volMesh(), wallPointYPlus::wallPointYPlus(), coord2D::x(), structuredScalars2D::xjump(), structuredVectors2D::xnum(), structuredScalars2D::xnum(), structuredScalars2D::yskip(), polyModifyFace::zoneID(), polyAddFace::zoneID(), cellMatcher::~cellMatcher(), coord2D::~coord2D(), FieldMapper::~FieldMapper(), interpolation< vector >::~interpolation(), morphFieldMapper::~morphFieldMapper(), ODE::~ODE(), particle< passiveParticle >::~particle(), pointPatch::~pointPatch(), regionSplit::~regionSplit(), repatchPolyTopoChanger::~repatchPolyTopoChanger(), tetPolyPatchCellDecomp::~tetPolyPatchCellDecomp(), and tetPolyPatchFaceDecomp::~tetPolyPatchFaceDecomp().


Function Documentation

label factorial label  n  ) 
 

Evaluate n! : n <= 12.

label mag const label  l  )  [inline]
 

Definition at line 176 of file label.H.

References Foam::label.

long max const long  s1,
const int  s2
[inline]
 

Definition at line 173 of file label.H.

long max const int  s1,
const long  s2
[inline]
 

Definition at line 172 of file label.H.

unsigned long max const unsigned long  s1,
const unsigned long  s2
[inline]
 

Definition at line 171 of file label.H.

unsigned int max const unsigned int  s1,
const unsigned int  s2
[inline]
 

Definition at line 170 of file label.H.

unsigned short max const unsigned short  s1,
const unsigned short  s2
[inline]
 

Definition at line 169 of file label.H.

unsigned char max const unsigned char  s1,
const unsigned char  s2
[inline]
 

Definition at line 168 of file label.H.

long max const long  s1,
const long  s2
[inline]
 

Definition at line 167 of file label.H.

int max const int  s1,
const int  s2
[inline]
 

Definition at line 166 of file label.H.

short max const short  s1,
const short  s2
[inline]
 

Definition at line 165 of file label.H.

char max const char  s1,
const char  s2
[inline]
 

Definition at line 164 of file label.H.

long min const long  s1,
const int  s2
[inline]
 

Definition at line 173 of file label.H.

long min const int  s1,
const long  s2
[inline]
 

Definition at line 172 of file label.H.

unsigned long min const unsigned long  s1,
const unsigned long  s2
[inline]
 

Definition at line 171 of file label.H.

unsigned int min const unsigned int  s1,
const unsigned int  s2
[inline]
 

Definition at line 170 of file label.H.

unsigned short min const unsigned short  s1,
const unsigned short  s2
[inline]
 

Definition at line 169 of file label.H.

unsigned char min const unsigned char  s1,
const unsigned char  s2
[inline]
 

Definition at line 168 of file label.H.

long min const long  s1,
const long  s2
[inline]
 

Definition at line 167 of file label.H.

int min const int  s1,
const int  s2
[inline]
 

Definition at line 166 of file label.H.

short min const short  s1,
const short  s2
[inline]
 

Definition at line 165 of file label.H.

char min const char  s1,
const char  s2
[inline]
 

Definition at line 164 of file label.H.

label nCr label  n,
label  r
 

Evaluate nCr : values of n and r <= 12.

label neg const label  s  )  [inline]
 

Definition at line 191 of file label.H.

label pos const label  s  )  [inline]
 

Definition at line 186 of file label.H.

References Foam::label.

label pow label  a,
label  b
 

Raise one label to the power of another.

label readLabel Istream &  is  )  [inline]
 

Definition at line 81 of file label.H.

Referenced by objectHit::objectHit().

label sign const label  s  )  [inline]
 

Definition at line 181 of file label.H.

References Foam::label.


Variable Documentation

const label labelMax = LONG_MAX [static]
 

Definition at line 78 of file label.H.

const label labelMin = LONG_MIN [static]
 

Definition at line 79 of file label.H.

For further information go to www.openfoam.org