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

UList.H File Reference

Go to the source code of this file.


Classes

class  UList< T >
 A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscript bounds checking, etc. More...
class  less
 Less function class that can be used for sorting. More...

Namespaces

namespace  Foam
 Namespace for OpenFOAM.

Defines

#define forAll(list, i)   for (Foam::label i=0; i<(list).size(); i++)
#define forAllReverse(list, i)   for (Foam::label i=(list).size()-1; i>=0; i--)
#define forAllIter(Container, container, iter)
#define forAllConstIter(Container, container, iter)

Functions

template<class T >
Ostream & operator<< (Ostream &, const UList< T > &)
template<class T >
void sort (UList< T > &)
template<class T , class Cmp >
void sort (UList< T > &, const Cmp &)
template<class T >
void stableSort (UList< T > &)
template<class T , class Cmp >
void stableSort (UList< T > &, const Cmp &)
template<class T >
void reverse (UList< T > &, const label n)
template<class T >
void reverse (UList< T > &)

Detailed Description

Original source file UList.H

Definition in file UList.H.


Define Documentation

#define forAll ( list,
i   )     for (Foam::label i=0; i<(list).size(); i++)

Loop across all elements in list

Usage
 forAll(anyList, i)
 {
      statements;
 }
See also:
forAllReverse

Definition at line 392 of file UList.H.

Referenced by MRFZones::absoluteFlux(), MRFZones::addCoriolis(), mapPatchChange::addedPatches(), porousZones::addResistance(), fvMatrix< Type >::addToInternalField(), pairGAMGAgglomeration::agglomerate(), GAMGAgglomeration::agglomerateLduAddressing(), face::areaInContact(), Foam::compressible::autoCreateAlphat(), Foam::incompressible::autoCreateNut(), autoHexMeshDriver::autoHexMeshDriver(), Foam::fvc::average(), Foam::bandCompression(), basicMultiComponentMixture::basicMultiComponentMixture(), primitiveMesh::calcCells(), enrichedPatch::calcEnrichedFaces(), nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut(), mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau(), LiquidEvaporation< CloudType >::calcXc(), mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus(), mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus(), timeActivatedExplicitMulticomponentPointSource::carrierFieldId(), cellModeller::cellModeller(), fvMotionSolver::cellMotionBoundaryTypes(), cellModel::centre(), primitiveMesh::checkEdgeAlignment(), primitiveMesh::checkEdgeLength(), primitiveMeshGeometry::checkFaceTwist(), primitiveMesh::checkMeshMotion(), PatchTools::checkOrientation(), PrimitivePatch< Face, FaceList, PointField, PointType >::checkPointManifold(), PrimitivePatch< Face, FaceList, PointField, PointType >::checkTopology(), MeshedSurface< Face >::checkZones(), polyBoundaryMesh::clearAddressing(), Foam::cmptAv(), Foam::cmptMag(), Foam::cmptMax(), Foam::cmptMin(), extendedFaceToCellStencil::collectData(), extendedCellToFaceStencil::collectData(), Foam::ListListOps::combine(), Pstream::combineGather(), pairGAMGAgglomeration::combineLevels(), CompactListList< T >::CompactListList(), face::compare(), removeFaces::compatibleRemoves(), Foam::ComplexField(), hexRef8::consistentSlowRefinement(), hexRef8::consistentUnrefinement(), MRFZones::correctBoundaryVelocity(), outletStabilised< Type >::correction(), linearUpwindV< Type >::correction(), linearUpwind< Type >::correction(), fvMatrix< Type >::D(), DiagonalMatrix< Type >::DiagonalMatrix(), mapDistribute::distribute(), Foam::resError::div(), PatchTools::edgeOwner(), systemCall::end(), spray::evolve(), extendedFaceToCellStencil::extendedFaceToCellStencil(), sampledCuttingPlane::faces(), sampledIsoSurfaceCell::faces(), sampledIsoSurface::faces(), distanceSurface::faces(), Time::findClosestTimeIndex(), Particle< ParticleType >::findFaces(), refinementSurfaces::findInside(), treeLeaf< Type >::findNearest(), searchableSurfacesQueries::findNearest(), treeDataPoint::findNearest(), treeDataEdge::findNearest(), Foam::findStrings(), Time::findTimes(), forAll(), FreeStream< CloudType >::FreeStream(), fvMeshLduAddressing::fvMeshLduAddressing(), Pstream::gather(), Pstream::gatherList(), Foam::gAverage(), removeCells::getExposedFaces(), boundaryMesh::getNearest(), hexRef8::getSplitPoints(), surfaceSets::getSurfaceSets(), triSurfaceTools::getVertexTriangles(), globalIndex::globalIndex(), Foam::handler(), HashSet< label, Hash< label > >::HashSet(), hhuMixtureThermo< MixtureType >::hhuMixtureThermo(), hhuCombustionThermo::huBoundaryTypes(), if(), ignition::igniting(), lduMatrix::initMatrixInterfaces(), spray::inject(), GAMGInterface::interfaceInternalField(), isoSurface::interpolate(), pointPatchInterpolation::interpolate(), surfaceInterpolationScheme< Type >::interpolate(), localMin< Type >::interpolate(), localMax< Type >::interpolate(), fvMeshSubset::interpolate(), volPointInterpolation::interpolateInternalField(), Foam::interpolatePointToCell(), Foam::interpolateXY(), Foam::invert(), cell::labels(), PhiScheme< Type, PhiLimiter >::limiter(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), liquidMixture::liquidMixture(), Pstream::listCombineGather(), Foam::mag(), Foam::magSqr(), Foam::fv::makeFvGradScheme(), cellMatcher::makeIdentity(), Pstream::mapCombineGather(), meshToMesh::mapField(), Foam::MapGeometricFields(), Foam::MapLagrangianFields(), PatchTools::markZone(), Foam::matchPoints(), cellToFaceStencil::merge(), cellToCellStencil::merge(), meshRefinement::mergePatchFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges(), triSurfaceTools::minEdge(), porousZone::modifyDdt(), NamedEnum< Enum, nEnum >::names(), surfaceFeatures::nearestEdges(), chemistrySolver< CompType, ThermoType >::New(), rhoChemistryModel::New(), psiChemistryModel::New(), surfaceLocation::normal(), octreeDataEdges::octreeDataEdges(), ODEChemistryModel< CompType, ThermoType >::ODEChemistryModel(), dlLibraryTable::open(), offsetOp< face >::operator()(), combineNsTransPs::operator()(), minEqOpFace::operator()(), Foam::operator<<(), Foam::operator==(), cell::opposingFaceLabel(), cyclicPolyPatch::order(), Foam::parseNASCoord(), fvPatch::patchInternalField(), phasePropertiesList::phasePropertiesList(), pointBoundaryMesh::pointBoundaryMesh(), primitiveMesh::pointInCellBB(), PatchToPatchInterpolation< FromPatch, ToPatch >::pointInterpolate(), Foam::polyMeshZipUpCells(), Foam::preservePatchTypes(), fvMeshDistribute::printFieldInfo(), procLduMatrix::procLduMatrix(), PrimitivePatch< Face, FaceList, PointField, PointType >::projectFaceCentres(), PrimitivePatch< Face, FaceList, PointField, PointType >::projectPoints(), PtrList< T >::PtrList(), PtrList< T >::read(), STARCD::readBoundary(), Foam::ReadFields(), meshRefinement::refineCandidates(), refinementSurfaces::refinementSurfaces(), MRFZones::relativeFlux(), MRFZones::relativeVelocity(), MeshedSurface< Face >::remapFaces(), Foam::renumber(), autoSnapDriver::repatchToSurface(), mapDistribute::schedule(), searchableSurfaces::searchableSurfaces(), solidMixture::solidMixture(), PatchTools::sortedEdgeFaces(), Foam::sqr(), PatchTools::subsetMap(), Foam::fvc::surfaceIntegrate(), PrimitivePatch< Face, FaceList, PointField, PointType >::surfaceType(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeList(), syncTools::syncFaceList(), syncTools::syncPointList(), Foam::T(), MeshedSurface< Face >::transcribe(), fft::transform(), Foam::transform(), cellClassification::trimCutCells(), edgeVertex::updateLabels(), USERD_get_gold_part_build_info(), USERD_get_nsided_conn(), USERD_get_part_element_ids_by_type(), USERD_get_part_elements_by_type(), USERD_set_filenames(), Foam::meshTools::visNormal(), meshReader::warnDuplicates(), extendedUpwindCellToFaceStencil::weightedSum(), reverseLinear< Type >::weights(), outletStabilised< Type >::weights(), midPoint< Type >::weights(), clippedLinear< Type >::weights(), PrimitivePatch< Face, FaceList, PointField, PointType >::whichEdge(), systemCall::write(), correlationFunction< Type >::writeAveraged(), pairPotential::writeEnergyAndForceTables(), ensightParts::writeField(), ensightPart::writeField(), VTKsurfaceFormatCore::writeHeader(), OFSsurfaceFormatCore::writeHeader(), coupledPolyPatch::writeOBJ(), triSurfaceTools::writeOBJ(), randomise::writeRandomField(), MeshedSurface< Face >::writeStats(), and graph::writeTable().

#define forAllReverse ( list,
i   )     for (Foam::label i=(list).size()-1; i>=0; i--)

Reverse loop across all elements in list

Usage
 forAllReverse(anyList, i)
 {
      statements;
 }
See also:
forAll

Definition at line 395 of file UList.H.

Referenced by GAMGAgglomeration::agglomerateLduAddressing().

#define forAllIter ( Container,
container,
iter   ) 

Value:

for                                                                        \
    (                                                                          \
        Container::iterator iter = (container).begin();                        \
        iter != (container).end();                                             \
        ++iter                                                                 \
    )
Iterate across all elements in the container object of type Container.
Usage
 forAll(ContainerType, container, iter)
 {
     statements;
 }
See also:
forAllConstIter

Definition at line 411 of file UList.H.

Referenced by if(), Foam::MapLagrangianFields(), and STARCD::readBoundary().

#define forAllConstIter ( Container,
container,
iter   ) 

Value:

for                                                                        \
    (                                                                          \
        Container::const_iterator iter = (container).begin();                  \
        iter != (container).end();                                             \
        ++iter                                                                 \
    )
Iterate across all elements in the container object of type Container with const access.
Usage
 forAllConstIter(ContainerType, container, iter)
 {
     statements;
 }
See also:
forAllIter

Definition at line 432 of file UList.H.

Referenced by primitiveMesh::checkEdgeAlignment(), hexRef8::consistentSlowRefinement(), forAllConstIter(), if(), Foam::parseNASCoord(), phaseProperties::phaseProperties(), Foam::ReadFields(), refinementSurfaces::refinementSurfaces(), searchableSurfaces::searchableSurfaces(), and meshReader::warnDuplicates().

Copyright © 2000-2009 OpenCFD Ltd