Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
UList< T > Class Template Reference

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...

Inherited by List< T >, pTraits< UList< T > >, SubList< T >, List< bool >, List< cell >, List< cellCutType >, List< cellShape >, List< cellZone * >, List< CGAL::indexedVertex >, List< char >, List< CloudFunctionObject< CloudType > * >, List< CloudFunctionObject< KinematicCloud< CloudType > > * >, List< CloudFunctionObject< KinematicCloud< Foam::DSMCCloud > > * >, List< coalCloud * >, List< const Foam::cellModel * >, List< const Foam::lduInterface * >, List< const Foam::UList * >, List< const label * >, List< const lduInterface * >, List< const lduInterfaceField * >, List< const LduInterfaceField< Type > * >, List< coordinateSystem * >, List< curvedEdge * >, List< edge >, List< engineValve * >, List< entry * >, List< extendedFeatureEdgeMesh * >, List< Face >, List< faceList >, List< faceZone * >, List< Field< scalar > >, List< Field< Type > * >, List< Field< Type > >, List< Foam::AMIInterpolation * >, List< Foam::boundaryPatch * >, List< Foam::boundBox >, List< Foam::cellModel * >, List< Foam::cellSizeAndAlignmentControl * >, List< Foam::cellSizeFunction * >, List< Foam::coordinateSystem * >, List< Foam::coordSet * >, List< Foam::coupledFacePair * >, List< Foam::decompositionMethod * >, List< Foam::diameterModels::IATEsource * >, List< Foam::dictionary * >, List< Foam::dictionary >, List< Foam::dimensioned * >, List< Foam::DimensionedField< scalar, Foam::volMesh > * >, List< Foam::DynamicList< char > >, List< Foam::DynamicList< DSMCParcel< ParcelType > * > >, List< Foam::DynamicList< Foam::List > >, List< Foam::DynamicList< Foam::molecule * > >, List< Foam::DynamicList< Foam::string > >, List< Foam::DynamicList< Foam::Vector > >, List< Foam::DynamicList< label > >, List< Foam::DynamicList< ParcelType * > >, List< Foam::DynamicList< parcelType * > >, List< Foam::DynamicList< scalar > >, List< Foam::ensightPart * >, List< Foam::extendedFeatureEdgeMesh * >, List< Foam::face >, List< Foam::faceSets >, List< Foam::Field * >, List< Foam::Field >, List< Foam::Field< Foam::Vector > >, List< Foam::Field< LUType > * >, List< Foam::Field< scalar > * >, List< Foam::Field< Type > * >, List< Foam::fieldAverageItem >, List< Foam::FieldField< Foam::Field, scalar > * >, List< Foam::FixedList< label, 3 > >, List< Foam::FixedList< scalar, 2 > >, List< Foam::FixedList< scalar, 3 > >, List< Foam::fvFieldDecomposer::patchFieldDecomposer * >, List< Foam::fvFieldDecomposer::processorSurfacePatchFieldDecomposer * >, List< Foam::fvFieldDecomposer::processorVolPatchFieldDecomposer * >, List< Foam::fvMesh * >, List< Foam::GeometricField * >, List< Foam::gradingDescriptors >, List< Foam::IDLList< Foam::molecule > >, List< Foam::IDLList< ParticleType > >, List< Foam::IDLList< typename Foam::DSMCCloud::parcelType > >, List< Foam::ignitionSite * >, List< Foam::indexedOctree * >, List< Foam::indexedOctree::node >, List< Foam::indexedOctree< Foam::treeDataEdge > * >, List< Foam::indexedOctree< Foam::treeDataPoint > * >, List< Foam::interpolation< Foam::Vector > * >, List< Foam::interpolation< scalar > * >, List< Foam::IOList * >, List< Foam::lduMatrix * >, List< Foam::lduPrimitiveMesh * >, List< Foam::liquidProperties * >, List< Foam::List * >, List< Foam::List >, List< Foam::List< Foam::face > >, List< Foam::List< Foam::Field< scalar > > >, List< Foam::List< Foam::List< scalar > > >, List< Foam::List< Foam::meshReader::cellFaceIdentifier > >, List< Foam::List< Foam::treeBoundBox > >, List< Foam::List< Foam::Vector > >, List< Foam::List< Key > >, List< Foam::List< label > >, List< Foam::List< scalar > >, List< Foam::List< T > >, List< Foam::mappedPatchBase * >, List< Foam::molecule::constantProperties >, List< Foam::objectHit >, List< Foam::objectMap >, List< Foam::OFstream * >, List< Foam::PackedBoolList >, List< Foam::Pair >, List< Foam::Pair< label > >, List< Foam::PatchInteractionModel< Foam::DSMCCloud > * >, List< Foam::phaseProperties >, List< Foam::pointConstraint >, List< Foam::pointFieldDecomposer::patchFieldDecomposer * >, List< Foam::pointMesh * >, List< Foam::PrimitivePatch * >, List< Foam::procLduInterface * >, List< Foam::PtrList< Foam::AMIInterpolation > * >, List< Foam::PtrList< Foam::fvMatrix > >, List< Foam::PtrList< Foam::lduInterfaceField > * >, List< Foam::radiation::radiativeIntensityRay * >, List< Foam::Reaction::specieCoeffs >, List< Foam::Reaction< SolidThermo > * >, List< Foam::Reaction< ThermoType > * >, List< Foam::referredWallFace >, List< Foam::searchableSurface * >, List< Foam::SHA1Digest >, List< Foam::sixDoFRigidBodyMotionConstraint * >, List< Foam::sixDoFRigidBodyMotionRestraint * >, List< Foam::solidBodyMotionFunction * >, List< Foam::solidProperties * >, List< Foam::solutionControl::fieldData >, List< Foam::surfaceZonesInfo * >, List< Foam::surfZone >, List< Foam::surfZoneIdentifier >, List< Foam::Tensor >, List< Foam::Time * >, List< Foam::token >, List< Foam::Tuple2< Foam::Vector, Foam::Vector > >, List< Foam::Tuple2< Foam::word, Foam::Tuple2< bool, scalar > > >, List< Foam::Tuple2< Foam::word, Foam::word > >, List< Foam::Tuple2< Foam::word, scalar > >, List< Foam::Tuple2< label, Foam::List< Foam::List > > >, List< Foam::Tuple2< label, scalar > >, List< Foam::Tuple2< mapType, Foam::List > >, List< Foam::Tuple2< scalar, Foam::fileName > >, List< Foam::Tuple2< scalar, scalar > >, List< Foam::Tuple2< scalar, Type > >, List< Foam::Tuple2< Type, scalar > >, List< Foam::Tuple2< Type, Type > >, List< Foam::UPtrList * >, List< Foam::Vector >, List< Foam::VectorSpace >, List< Foam::vectorTensorTransform >, List< Foam::volumeType >, List< Foam::word >, List< force * >, List< functionObject * >, List< fvPatchMapper * >, List< GasThermo * >, List< geometricSurfacePatch >, List< gradingDescriptor >, List< injectionModel * >, List< InjectionModel< CloudType > * >, List< InjectionModel< Foam::KinematicCloud< CloudType > > * >, List< InjectionModel< Foam::KinematicCloud< Foam::DSMCCloud > > * >, List< instant >, List< int >, List< kinematicParcelInjectionData >, List< label >, List< labelledTri >, List< labelList >, List< labelListList >, List< lduScheduleEntry >, List< List< pointIndexHit > >, List< List< scalar > >, List< mergeInfo >, List< MRFZone * >, List< option * >, List< pairPotential * >, List< ParticleForce< CloudType > * >, List< ParticleForce< KinematicCloud< CloudType > > * >, List< ParticleForce< KinematicCloud< Foam::DSMCCloud > > * >, List< PatchField< Type > * >, List< patchInteractionData >, List< phaseModel * >, List< pointPatchMapper * >, List< pointZone * >, List< polyDecomp >, List< polyMeshModifier * >, List< porosityModel * >, List< profileModel * >, List< pyrolysisModel * >, List< reactingMultiphaseParcelInjectionData >, List< reactingParcelInjectionData >, List< Reaction< ThermoType > * >, List< refineCell >, List< refineMode >, List< regionModelFunctionObject * >, List< sampledSet * >, List< sampledSurface * >, List< scalar >, List< scalarField >, List< scalarList >, List< scalarRange >, List< searchableSurface * >, List< sideVolumeType >, List< simpleRegIOobject * >, List< SolidThermo * >, List< string >, List< substance >, List< surfAndLabel >, List< T * >, List< tetherPotential * >, List< ThermoType * >, List< treeBoundBox >, List< Tuple2< scalar, List< Tuple2< scalar, scalar > > > >, List< Tuple2< scalar, List< Tuple2< scalar, Type > > > >, List< Tuple2< scalar, scalar > >, List< Tuple2< scalar, Type > >, List< typename DSMCParcel< ParcelType >::constantProperties >, List< typename ParcelType::constantProperties >, List< unsigned int >, List< vector >, List< vectorField >, List< volatileData >, List< vtkTextActor * >, List< word >, List< wordRe >, List< ZoneType * >, and SubList< point >.

Classes

class  greater
 Greater function class that can be used for sorting. More...
 
class  less
 Less function class that can be used for sorting. More...
 

Public Types

typedef T value_type
 Type of values the UList contains. More...
 
typedef Treference
 Type that can be used for storing into. More...
 
typedef const Tconst_reference
 Type that can be used for storing into. More...
 
typedef label difference_type
 The type that can represent the difference between any two. More...
 
typedef label size_type
 The type that can represent the size of a UList. More...
 
typedef Titerator
 Random access iterator for traversing UList. More...
 
typedef const Tconst_iterator
 Random access iterator for traversing UList. More...
 
typedef Treverse_iterator
 Reverse iterator for reverse traversal of UList. More...
 
typedef const Tconst_reverse_iterator
 Reverse iterator for reverse traversal of constant UList. More...
 

Public Member Functions

 UList ()
 Null constructor. More...
 
 UList (T *__restrict__ v, label size)
 Construct from components. More...
 
label fcIndex (const label i) const
 Return the forward circular index, i.e. the next index. More...
 
label rcIndex (const label i) const
 Return the reverse circular index, i.e. the previous index. More...
 
std::streamsize byteSize () const
 Return the binary size in number of characters of the UList. More...
 
const Tcdata () const
 Return a const pointer to the first data element,. More...
 
Tdata ()
 Return a pointer to the first data element,. More...
 
Tfirst ()
 Return the first element of the list. More...
 
const Tfirst () const
 Return first element of the list. More...
 
Tlast ()
 Return the last element of the list. More...
 
const Tlast () const
 Return the last element of the list. More...
 
void checkStart (const label start) const
 Check start is within valid range (0 ... size-1). More...
 
void checkSize (const label size) const
 Check size is within valid range (0 ... size). More...
 
void checkIndex (const label i) const
 Check index i is within valid range (0 ... size-1). More...
 
void writeEntry (Ostream &) const
 Write the UList as a dictionary entry. More...
 
void writeEntry (const word &keyword, Ostream &) const
 Write the UList as a dictionary entry with keyword. More...
 
void assign (const UList< T > &)
 Assign elements to those from UList. More...
 
Toperator[] (const label)
 Return element of UList. More...
 
const Toperator[] (const label) const
 Return element of constant UList. More...
 
 operator const Foam::List< T > & () const
 Allow cast to a const List<T>&. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 
iterator begin ()
 Return an iterator to begin traversing the UList. More...
 
iterator end ()
 Return an iterator to end traversing the UList. More...
 
const_iterator cbegin () const
 Return const_iterator to begin traversing the constant UList. More...
 
const_iterator cend () const
 Return const_iterator to end traversing the constant UList. More...
 
const_iterator begin () const
 Return const_iterator to begin traversing the constant UList. More...
 
const_iterator end () const
 Return const_iterator to end traversing the constant UList. More...
 
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the UList. More...
 
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the UList. More...
 
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList. More...
 
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing the UList. More...
 
const_reverse_iterator rbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList. More...
 
const_reverse_iterator rend () const
 Return const_reverse_iterator to end reverse traversing the UList. More...
 
label size () const
 Return the number of elements in the UList. More...
 
label max_size () const
 Return size of the largest possible UList. More...
 
bool empty () const
 Return true if the UList is empty (ie, size() is zero). More...
 
void swap (UList< T > &)
 Swap two ULists of the same type in constant time. More...
 
bool operator== (const UList< T > &) const
 Equality operation on ULists of the same type. More...
 
bool operator!= (const UList< T > &) const
 The opposite of the equality operation. Takes linear time. More...
 
bool operator< (const UList< T > &) const
 Compare two ULists lexicographically. Takes linear time. More...
 
bool operator> (const UList< T > &) const
 Compare two ULists lexicographically. Takes linear time. More...
 
bool operator<= (const UList< T > &) const
 Return true if !(a > b). Takes linear time. More...
 
bool operator>= (const UList< T > &) const
 Return true if !(a < b). Takes linear time. More...
 
template<>
const bool & operator[] (const label i) const
 

Static Public Member Functions

static const UList< T > & null ()
 Return a null UList. More...
 

Friends

class List< T >
 Declare friendship with the List class. More...
 
class SubList< T >
 Declare friendship with the SubList class. More...
 
Ostreamoperator (Ostream &, const UList< T > &)
 
Istreamoperator>> (Istream &, UList< T > &)
 Read UList contents from Istream. Requires size to have been set. More...
 

Detailed Description

template<class T>
class Foam::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.

Storage is not allocated during construction or use but is supplied to the constructor as an argument. This type of list is particularly useful for lists that refer to parts of existing lists such as SubList.

Source files

Definition at line 60 of file HashTable.H.

Member Typedef Documentation

typedef T value_type

Type of values the UList contains.

Definition at line 229 of file UList.H.

typedef T& reference

Type that can be used for storing into.

UList::value_type objects.

Definition at line 233 of file UList.H.

typedef const T& const_reference

Type that can be used for storing into.

constant UList::value_type objects

Definition at line 237 of file UList.H.

The type that can represent the difference between any two.

UList iterator objects.

Definition at line 241 of file UList.H.

typedef label size_type

The type that can represent the size of a UList.

Definition at line 244 of file UList.H.

typedef T* iterator

Random access iterator for traversing UList.

Definition at line 250 of file UList.H.

typedef const T* const_iterator

Random access iterator for traversing UList.

Definition at line 262 of file UList.H.

typedef T* reverse_iterator

Reverse iterator for reverse traversal of UList.

Definition at line 280 of file UList.H.

typedef const T* const_reverse_iterator

Reverse iterator for reverse traversal of constant UList.

Definition at line 292 of file UList.H.

Constructor & Destructor Documentation

UList ( )
inline

Null constructor.

Definition at line 33 of file UListI.H.

Referenced by UList< T >::greater::operator()().

Here is the caller graph for this function:

UList ( T *__restrict__  v,
label  size 
)
inline

Construct from components.

Definition at line 41 of file UListI.H.

Member Function Documentation

const Foam::UList< T > & null ( )
inlinestatic
Foam::label fcIndex ( const label  i) const
inline

Return the forward circular index, i.e. the next index.

which returns to the first at the end of the list

Definition at line 58 of file UListI.H.

References UList< T >::size().

Referenced by pointMVCWeight::calcWeights(), tetOverlapVolume::cellCellOverlapMinDecomp(), tetOverlapVolume::cellCellOverlapVolumeMinDecomp(), primitiveMesh::checkCommonOrder(), primitiveMesh::checkEdgeLength(), primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), edgeCollapser::checkMeshQuality(), polyMeshGeometry::checkTriangleTwist(), wallBoundedParticle::crossDiagonalEdge(), face::edgeDirection(), primitiveMeshTools::faceConcavity(), face::faceEdge(), primitiveMesh::faceEdges(), mappedPatchBase::facePoint(), polyMeshTetDecomposition::faceTetIndices(), isoSurface::generateFaceTriPoints(), hexRef8::getAnchorLevel(), edgeFaceCirculator::getMinIndex(), combineFaces::getOutsideFace(), face::inertia(), face::nextLabel(), minEqOpFace::operator()(), listPlusEqOp< T >::operator()(), ifEqEqOp< value >::operator()(), UList< T >::greater::operator()(), triSurfaceTools::otherEdges(), treeDataFace::overlaps(), OBJsurfaceFormat< Face >::read(), VTKsurfaceFormat< Face >::read(), OFFsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), autoSnapDriver::repatchToSurface(), faceCollapser::setRefinement(), createShellMesh::setRefinement(), tetDecomposer::setRefinement(), addPatchCellLayer::setRefinement(), meshRefinement::splitFaces(), syncTools::syncEdgeMap(), tetIndices::tetIndices(), particle< Type >::tetNeighbour(), wallBoundedParticle::trackToEdge(), particle< Type >::trackToFace(), polyMeshTetDecomposition::triangleTetIndices(), MeshedSurface< Face >::triangulate(), triSurfaceTools::triangulateFaceCentre(), patchEdgeFaceRegions::updateEdge(), and patchEdgeFaceRegions::updateFace().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::label rcIndex ( const label  i) const
inline
std::streamsize byteSize ( ) const

Return the binary size in number of characters of the UList.

if the element is a primitive type i.e. contiguous<T>() == true. Note that is of type streamsize since used in stream ops

Definition at line 92 of file UList.C.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and T.

Referenced by mapDistribute::distribute(), globalIndex::gather(), Pstream::gatherList(), List< T >::List(), Pstream::listCombineGather(), Pstream::listCombineScatter(), UList< T >::greater::operator()(), processorLduInterface::receive(), globalIndex::scatter(), and processorLduInterface::send().

Here is the call graph for this function:

Here is the caller graph for this function:

const T * cdata ( ) const
inline

Return a const pointer to the first data element,.

similar to the STL front() method and the string::data() method This can be used (with caution) when interfacing with C code.

Definition at line 145 of file UListI.H.

Referenced by UList< T >::greater::operator()(), and PackedList< nBits >::write().

Here is the caller graph for this function:

T * data ( )
inline

Return a pointer to the first data element,.

similar to the STL front() method and the string::data() method This can be used (with caution) when interfacing with C code.

Definition at line 152 of file UListI.H.

Referenced by patchDataWave< TransferType >::correct(), decompositionMethod::decompose(), List< T >::List(), UList< T >::greater::operator()(), PackedList< nBits >::read(), structuredRenumber::renumber(), and UList< T >::writeEntry().

Here is the caller graph for this function:

T & first ( )
inline

Return the first element of the list.

Definition at line 117 of file UListI.H.

References UList< T >::operator[]().

Referenced by bladeModel::bladeModel(), TableBase< Type >::check(), interpolationTable< Type >::check(), primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceWeights(), TableBase< Type >::checkMaxBounds(), edgeCollapser::checkMeshQuality(), TableBase< Type >::checkMinBounds(), interpolation2DTable< Type >::checkOrder(), polyMeshGeometry::checkVolRatio(), TableBase< Type >::convertTimeBase(), meshRefinement::createZoneBaffles(), simpleControl::criteriaSatisfied(), pimpleControl::criteriaSatisfied(), Distribution< Type >::cumulativeNormalised(), Distribution< Type >::cumulativeRaw(), displacementInterpolationMotionSolver::displacementInterpolationMotionSolver(), primitiveMeshTools::faceConcavity(), patchProbes::findElements(), mappedPatchBase::findSamples(), interpolation2DTable< Type >::interpolation2DTable(), TableBase< Type >::interpolator(), cell::labels(), distribution::median(), Distribution< Type >::median(), meshRefinement::mergeBaffles(), distribution::normalised(), Distribution< Type >::normalised(), distribution::normalisedShifted(), procLess::operator()(), listPlusEqOp< T >::operator()(), UList< T >::greater::operator()(), interpolation2DTable< Type >::operator()(), interpolationTable< Type >::operator()(), Distribution< Type >::operator=(), ParticleCollector< CloudType >::ParticleCollector(), KinematicCloud< CloudType >::penetration(), BSpline::position(), CatmullRomSpline::position(), polyLine::position(), interpolationTable< Type >::rateOfChange(), distribution::raw(), Distribution< Type >::raw(), tabulated6DoFAcceleration::read(), tabulated6DoFMotion::read(), ITstream::rewind(), decompositionMethod::setConstraints(), primitiveEntry::startLineNumber(), Distribution< Type >::write(), pairPotential::writeEnergyAndForceTables(), residuals::writeResidual(), TableBase< Type >::x(), interpolation2DTable< Type >::Xi(), and RaviPetersen::~RaviPetersen().

Here is the call graph for this function:

const T & first ( ) const
inline

Return first element of the list.

Definition at line 124 of file UListI.H.

References UList< T >::operator[]().

Here is the call graph for this function:

T & last ( )
inline

Return the last element of the list.

Definition at line 131 of file UListI.H.

References UList< T >::operator[](), and UList< T >::size().

Referenced by masterCoarsestGAMGProcAgglomeration::agglomerate(), eagerGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), polyLine::calcParam(), triSurface::checkEdges(), primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), TableBase< Type >::checkMaxBounds(), edgeCollapser::checkMeshQuality(), TableBase< Type >::checkMinBounds(), MeshedSurface< Face >::checkZones(), surfMesh::checkZones(), processorLduInterface::compressedReceive(), processorLduInterface::compressedSend(), pimpleControl::criteriaSatisfied(), face::edges(), edgeSurface::edgeSurface(), primitiveEntry::endLineNumber(), primitiveMeshTools::faceConcavity(), Time::findClosestTime(), searchableBox::findLineAll(), globalIndex::gather(), FreeStream< CloudType >::inflow(), distribution::insertMissingKeys(), linearInterpolationWeights::integrationWeights(), lduPrimitiveMesh::lduPrimitiveMesh(), List< T >::List(), procLess::operator()(), UList< T >::greater::operator()(), Foam::operator<<(), KinematicCloud< CloudType >::penetration(), BSpline::position(), CatmullRomSpline::position(), polyLine::position(), GAMGAgglomeration::procAgglomerateRestrictAddressing(), ITstream::read(), Time::setControls(), surfaceFeatures::setFromStatus(), hexRef8::setInstance(), Reaction< ReactionThermo >::setLRhs(), createShellMesh::setRefinement(), addPatchCellLayer::setRefinement(), globalIndex::size(), TableBase< Type >::value(), and RaviPetersen::~RaviPetersen().

Here is the call graph for this function:

Here is the caller graph for this function:

const T & last ( ) const
inline

Return the last element of the list.

Definition at line 138 of file UListI.H.

References UList< T >::operator[](), and UList< T >::size().

Here is the call graph for this function:

void checkStart ( const label  start) const
inline

Check start is within valid range (0 ... size-1).

Definition at line 73 of file UListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::max().

Referenced by UList< T >::greater::operator()(), and SubList< T >::SubList().

Here is the call graph for this function:

Here is the caller graph for this function:

void checkSize ( const label  size) const
inline

Check size is within valid range (0 ... size).

Definition at line 86 of file UListI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Referenced by UList< T >::greater::operator()(), and SubList< T >::SubList().

Here is the call graph for this function:

Here is the caller graph for this function:

void checkIndex ( const label  i) const
inline

Check index i is within valid range (0 ... size-1).

Definition at line 99 of file UListI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Referenced by UList< T >::greater::operator()(), and UList< T >::operator[]().

Here is the call graph for this function:

Here is the caller graph for this function:

void writeEntry ( Ostream os) const
void writeEntry ( const word keyword,
Ostream os 
) const
void assign ( const UList< T > &  a)

Assign elements to those from UList.

Definition at line 37 of file UList.C.

References Foam::abort(), Foam::FatalError, FatalErrorIn, List_ACCESS, List_CONST_ACCESS, List_ELEM, List_END_FOR_ALL, List_FOR_ALL, and T.

Referenced by UList< T >::greater::operator()(), globalIndex::scatter(), and GAMGSolver::solve().

Here is the call graph for this function:

Here is the caller graph for this function:

T & operator[] ( const label  i)
inline

Return element of UList.

Definition at line 163 of file UListI.H.

References UList< T >::checkIndex().

Referenced by labelRanges::add(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::append(), triSurfaceMesh::boundingSpheres(), face::centre(), face::collapse(), cellClassification::fillHangingCells(), cellClassification::fillRegionEdges(), cellClassification::fillRegionPoints(), UList< T >::first(), triSurfaceMesh::getRegion(), distributedTriSurfaceMesh::getRegion(), cellClassification::growSurface(), hashedWordList::hashedWordList(), sortLabelledTri::indices(), interpolationLookUpTable< Type >::interpolationLookUpTable(), gradingDescriptors::inv(), UList< T >::last(), List< T >::List(), interpolationLookUpTable< Type >::lookUp(), thirdBodyEfficiencies::M(), edgeIntersections::merge(), mixture::mixture(), face::nextLabel(), face::normal(), UList< T >::greater::operator()(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::operator()(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::operator()(), List< T >::operator=(), PackedList< nBits >::operator=(), hashedWordList::operator[](), interpolationLookUpTable< Type >::operator[](), cellShape::points(), face::points(), face::prevLabel(), probes::probe(), ITstream::read(), labelRanges::remove(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::remove(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::remove(), PackedList< nBits >::resize(), SortableList< T >::reverseSort(), scalarRanges::selected(), timeSelector::selected(), PackedList< nBits >::setCapacity(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::setSize(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::setSize(), SortableList< T >::sort(), sortLabelledTri::sortLabelledTri(), cellClassification::trimCutCells(), thirdBodyEfficiencies::write(), primitiveEntry::write(), and triSurface::writeStats().

Here is the call graph for this function:

const T & operator[] ( const label  i) const
inline

Return element of constant UList.

Note that the bool specialization adds lazy evaluation so reading an out-of-range element returns false without any ill-effects

Definition at line 195 of file UListI.H.

References UList< T >::checkIndex().

Here is the call graph for this function:

operator const Foam::List< T > & ( ) const
inline

Allow cast to a const List<T>&.

Definition at line 206 of file UListI.H.

void operator= ( const T t)
Foam::UList< T >::iterator begin ( )
inline

Return an iterator to begin traversing the UList.

Definition at line 216 of file UListI.H.

Referenced by lduMatrix::Amul(), TDILUPreconditioner< Type, DType, LUType >::calcInvD(), DICPreconditioner::calcReciprocalD(), DILUPreconditioner::calcReciprocalD(), mapDistribute::compact(), processorLduInterface::compressedReceive(), processorLduInterface::compressedSend(), triSurfaceTools::delaunay2D(), mapDistribute::distribute(), globalIndex::gather(), Pstream::gatherList(), lduMatrix::H(), lduMatrix::H1(), Pstream::listCombineGather(), Pstream::listCombineScatter(), LUscalarMatrix::LUscalarMatrix(), UList< T >::operator<(), noPreconditioner::precondition(), DICPreconditioner::precondition(), DILUPreconditioner::precondition(), diagonalPreconditioner::precondition(), FDICPreconditioner::precondition(), DILUPreconditioner::preconditionT(), ITstream::print(), processorLduInterface::receive(), lduMatrix::residual(), globalIndex::scatter(), processorLduInterface::send(), Foam::shuffle(), GaussSeidelSmoother::smooth(), symGaussSeidelSmoother::smooth(), TGaussSeidelSmoother< Type, DType, LUType >::smooth(), DILUSmoother::smooth(), DICSmoother::smooth(), FDICSmoother::smooth(), nonBlockingGaussSeidelSmoother::smooth(), PBiCICG< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PBiCG::solve(), PCG::solve(), Foam::sort(), Foam::stableSort(), lduMatrix::sumA(), TGaussSeidelSmoother< Type, DType, LUType >::TGaussSeidelSmoother(), lduMatrix::Tmul(), fft::transform(), ensightBinaryStream::write(), and UOPstream::~UOPstream().

Here is the caller graph for this function:

Foam::UList< T >::iterator end ( )
inline
Foam::UList< T >::const_iterator cbegin ( ) const
inline

Return const_iterator to begin traversing the constant UList.

Definition at line 230 of file UListI.H.

Foam::UList< T >::const_iterator cend ( ) const
inline

Return const_iterator to end traversing the constant UList.

Definition at line 251 of file UListI.H.

Foam::UList< T >::const_iterator begin ( ) const
inline

Return const_iterator to begin traversing the constant UList.

Definition at line 223 of file UListI.H.

Foam::UList< T >::const_iterator end ( ) const
inline

Return const_iterator to end traversing the constant UList.

Definition at line 244 of file UListI.H.

Foam::UList< T >::iterator rbegin ( )
inline

Return reverse_iterator to begin reverse traversing the UList.

Definition at line 258 of file UListI.H.

Referenced by ITstream::print().

Here is the caller graph for this function:

Foam::UList< T >::iterator rend ( )
inline

Return reverse_iterator to end reverse traversing the UList.

Definition at line 279 of file UListI.H.

Foam::UList< T >::const_iterator crbegin ( ) const
inline

Return const_reverse_iterator to begin reverse traversing the UList.

Definition at line 272 of file UListI.H.

Foam::UList< T >::const_iterator crend ( ) const
inline

Return const_reverse_iterator to end reverse traversing the UList.

Definition at line 293 of file UListI.H.

Foam::UList< T >::const_iterator rbegin ( ) const
inline

Return const_reverse_iterator to begin reverse traversing the UList.

Definition at line 265 of file UListI.H.

Foam::UList< T >::const_iterator rend ( ) const
inline

Return const_reverse_iterator to end reverse traversing the UList.

Definition at line 286 of file UListI.H.

Foam::label size ( ) const
inline

Return the number of elements in the UList.

Definition at line 299 of file UListI.H.

Referenced by isoSurface::adaptPatchFields(), fvMatrix< Type >::addToInternalField(), MeshedSurface< Face >::addZones(), pairGAMGAgglomeration::agglomerate(), GAMGAgglomeration::agglomerateLduAddressing(), List< T >::append(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::append(), Field< Type >::autoMap(), fvPatchField< Type >::autoMap(), coupledPolyPatch::calcFaceTol(), edgeCollapser::checkMeshQuality(), GAMGAgglomeration::checkRestriction(), Foam::cmptAv(), Foam::cmptMag(), Foam::cmptMax(), Foam::cmptMin(), meshRefinement::collectAndPrint(), GAMGAgglomeration::compactLevels(), Foam::ComplexField(), processorLduInterface::compressedReceive(), processorLduInterface::compressedSend(), Keyed< T >::createList(), directFvPatchFieldMapper::directFvPatchFieldMapper(), directPointPatchFieldMapper::directPointPatchFieldMapper(), Foam::duplicateOrder(), HashTable< T, Key, Hash >::erase(), regionSizeDistribution::extractData(), FaceCellWave< Type, TrackingData >::FaceCellWave(), lduMatrix::faceH(), LduMatrix< Type, DType, LUType >::faceH(), Foam::facePointN(), UList< T >::fcIndex(), FixedList< T, Size >::FixedList(), globalIndex::gather(), Foam::gAverage(), meshRefinement::gAverage(), coupledPolyPatch::getAnchorPoints(), Foam::Im(), Foam::ImComplexField(), Foam::inplaceSubset(), cyclicAMIGAMGInterface::internalFieldTransfer(), cyclicACMIGAMGInterface::internalFieldTransfer(), regionCoupledFvPatch::internalFieldTransfer(), regionCoupledWallFvPatch::internalFieldTransfer(), surfaceInterpolationScheme< Type >::interpolate(), AMIInterpolation< SourcePatch, TargetPatch >::interpolateToSource(), AMIInterpolation< SourcePatch, TargetPatch >::interpolateToTarget(), Foam::inv(), cell::labels(), UList< T >::last(), lduPrimitiveMesh::lduPrimitiveMesh(), LduMatrix< Type, DType, LUType >::lower(), Foam::mag(), Foam::magSqr(), Field< Type >::map(), Foam::matchPoints(), Foam::max(), Foam::mergePoints(), MeshedSurface< Face >::MeshedSurface(), LduMatrix< Type, DType, LUType >::negSumDiag(), lduMatrix::negSumDiag(), procLess::operator()(), UList< T >::greater::operator()(), UIndirectList< T >::operator=(), BiIndirectList< T >::operator=(), PackedBoolList::operator=(), FixedList< T, Size >::operator=(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::operator=(), PackedList< nBits >::operator=(), directFieldMapper::patchFieldSubset(), Polynomial< PolySize >::Polynomial(), Foam::pow(), UList< T >::rcIndex(), Foam::Re(), OBJsurfaceFormat< Face >::read(), OFFsurfaceFormat< Face >::read(), Foam::ReComplexField(), fvFieldReconstructor::reconstructFvSurfaceField(), fvFieldReconstructor::reconstructFvVolumeField(), Foam::ReImSum(), UnsortedMeshedSurface< Face >::remapFaces(), cuttingPlane::remapFaces(), MeshedSurface< Face >::remapFaces(), ensightPart::renumber(), UPtrList< T >::reorder(), PtrList< T >::reorder(), Foam::reverse(), CompactListList< T, Container >::setSize(), UnsortedMeshedSurface< Face >::setZones(), directFieldMapper::size(), directPointPatchFieldMapper::size(), directFvPatchFieldMapper::size(), Foam::sortedOrder(), Foam::sqr(), Foam::stabilise(), Foam::subset(), fvMatrix< Type >::subtractFromInternalField(), Foam::sumCmptProd(), LduMatrix< Type, DType, LUType >::sumDiag(), lduMatrix::sumDiag(), LduMatrix< Type, DType, LUType >::sumMagOffDiag(), lduMatrix::sumMagOffDiag(), Foam::sumProd(), Foam::sumSqr(), syncTools::swapBoundaryCellList(), syncTools::swapBoundaryCellPositions(), syncTools::syncBoundaryFaceList(), meshRefinement::testSyncBoundaryFaceList(), lduMesh::thisDb(), Foam::transformList(), UnsortedMeshedSurface< Face >::UnsortedMeshedSurface(), sampledPatch::update(), LduMatrix< Type, DType, LUType >::upper(), ensightPartFaces::writeConnectivity(), VTKedgeFormat::writeEdges(), UList< T >::writeEntry(), ensightPart::writeField(), WRLsurfaceFormatCore::writeHeader(), OFSsurfaceFormatCore::writeHeader(), AC3DsurfaceFormatCore::writeHeader(), coupledPolyPatch::writeOBJ(), Foam::meshTools::writeOBJ(), ensightPart::writeScalarField(), VTKsurfaceFormatCore::writeTail(), ensightPart::writeVectorField(), and ensightPartCells::~ensightPartCells().

Foam::label max_size ( ) const
inline

Return size of the largest possible UList.

Definition at line 306 of file UListI.H.

References Foam::labelMax.

bool empty ( ) const
inline

Return true if the UList is empty (ie, size() is zero).

Definition at line 313 of file UListI.H.

Referenced by DynamicID< pointZoneMesh >::active(), labelRanges::add(), indexedOctree< Foam::treeDataFace >::bb(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::bb(), block::boundaryPatches(), boundBox::boundBox(), cellVolumeWeightMethod::calculateAddressing(), cellMapper::cellMapper(), block::cells(), blockMesh::cells(), triSurface::checkEdges(), edgeCollapser::checkMeshQuality(), primitiveMesh::checkPoints(), labelRanges::const_iterator::const_iterator(), boundBox::contains(), boundBox::containsAny(), dynamicCode::copyOrCreateFiles(), hexCellLooper::cut(), fvSchemes::d2dt2Scheme(), fvSchemes::ddtScheme(), fvSchemes::divScheme(), edgeSurface::edgeSurface(), primitiveEntry::endLineNumber(), faceMapper::faceMapper(), searchableSurfacesQueries::findAllIntersections(), Foam::findEtcFiles(), coordinateSystems::findIndex(), ZoneMesh< ZoneType, MeshType >::findIndex(), polyBoundaryMesh::findIndex(), triSurfaceRegionSearch::findNearest(), searchableSurfacesQueries::findNearest(), fvSchemes::gradScheme(), Distribution< Type >::index(), DynamicID< pointZoneMesh >::index(), cyclicACMIPolyPatch::initPatchFaceAreas(), fvSchemes::interpolationScheme(), intersectedSurface::intersectedSurface(), fvSchemes::laplacianScheme(), meshTriangulation::meshTriangulation(), cellCuts::nonAnchorPoints(), Distribution< Type >::normalised(), dlLibraryTable::open(), listPlusEqOp< T >::operator()(), cellToCellStencil::unionEqOp::operator()(), cellToFaceStencil::unionEqOp::operator()(), Foam::operator<<(), triSurfaceMesh::overlaps(), coupledPolyPatch::parallel(), ParticleErosion< CloudType >::ParticleErosion(), blockMesh::patches(), patchInteractionDataList::patchInteractionDataList(), boundaryMesh::patchNames(), PatchPostProcessing< CloudType >::PatchPostProcessing(), polyBoundaryMesh::patchSet(), pointMapper::pointMapper(), block::points(), blockMesh::points(), polynomialFunction::polynomialFunction(), Distribution< Type >::raw(), boundaryMesh::readTriSurface(), triSurfaceMesh::regions(), labelRanges::remove(), timeSelector::select0(), Reaction< ReactionThermo >::setLRhs(), combineFaces::setUnrefinement(), fvSchemes::snGradScheme(), primitiveEntry::startLineNumber(), surfaceIntersection::surfaceIntersection(), particle< Type >::trackToFace(), treeBoundBox::treeBoundBox(), MeshedSurface< Face >::triangulate(), sampledPlane::update(), and walkPatch::walkPatch().

void swap ( UList< T > &  a)

Swap two ULists of the same type in constant time.

Definition at line 82 of file UList.C.

References Foam::Swap().

Here is the call graph for this function:

bool operator== ( const UList< T > &  a) const

Equality operation on ULists of the same type.

Returns true when the ULists are elementwise equal (using UList::value_type::operator==). Takes linear time.

Definition at line 144 of file UList.C.

References Foam::equal(), List_CONST_ACCESS, List_ELEM, List_END_FOR_ALL, List_FOR_ALL, and T.

Here is the call graph for this function:

bool operator!= ( const UList< T > &  a) const

The opposite of the equality operation. Takes linear time.

Definition at line 165 of file UList.C.

References Foam::operator==().

Here is the call graph for this function:

bool operator< ( const UList< T > &  a) const

Compare two ULists lexicographically. Takes linear time.

Definition at line 172 of file UList.C.

References UList< T >::begin(), and UList< T >::end().

Here is the call graph for this function:

bool operator> ( const UList< T > &  a) const

Compare two ULists lexicographically. Takes linear time.

Definition at line 203 of file UList.C.

References UList< T >::operator.

bool operator<= ( const UList< T > &  a) const

Return true if !(a > b). Takes linear time.

Definition at line 210 of file UList.C.

References Foam::operator>().

Here is the call graph for this function:

bool operator>= ( const UList< T > &  a) const

Return true if !(a < b). Takes linear time.

Definition at line 217 of file UList.C.

References Foam::operator<().

Here is the call graph for this function:

const bool & operator[] ( const label  i) const
inline

Definition at line 177 of file UListI.H.

Friends And Related Function Documentation

friend class List< T >
friend

Declare friendship with the List class.

Definition at line 86 of file UList.H.

friend class SubList< T >
friend

Declare friendship with the SubList class.

Definition at line 89 of file UList.H.

Ostream& operator ( Ostream ,
const UList< T > &   
)
friend
Istream& operator>> ( Istream ,
UList< T > &   
)
friend

Read UList contents from Istream. Requires size to have been set.

before.


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