UPtrList< T > Class Template Reference

A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers - this is to be done elsewhere. The operator[] returns a reference to the object, not the pointer. More...

Inherited by PtrList< CloudFunctionObject< CloudType > >, PtrList< Field< Type > >, PtrList< PatchField< Type > >, PtrList< InjectionModel< CloudType > >, PtrList< fvPatchField< symmTensor > >, PtrList< fvPatchField< scalar > >, PtrList< MRFZone >, PtrList< pointPatchField< Type > >, PtrList< ParticleForce< CloudType > >, PtrList< joint >, PtrList< ZoneType >, PtrList< block >, PtrList< coalCloud >, PtrList< coordinateSystem >, PtrList< fa::option >, PtrList< entry >, PtrList< faPatchMapper >, PtrList< functionObject >, PtrList< fv::option >, PtrList< fvPatchMapper >, PtrList< pairPotential >, PtrList< pointPatchMapper >, PtrList< polyMeshModifier >, PtrList< porosityModel >, PtrList< profileModel >, PtrList< Reaction< ThermoType > >, PtrList< extendedFeatureEdgeMesh >, PtrList< force >, PtrList< injectionModel >, PtrList< pyrolysisModel >, PtrList< regionModelFunctionObject >, PtrList< transferModel >, PtrList< sampledSet >, PtrList< sampledSurface >, PtrList< searchableSurface >, PtrList< tetherPotential >, PtrList< fvPatchField< vector > >, PtrList< fvPatchField< tensor > >, PtrList< Foam::GeometricField >, PtrList< Foam::fvPatchField< scalar > >, PtrList< Foam::fvPatchField< Foam::Vector > >, PtrList< Foam::pointPatchField< Foam::Vector > >, PtrList< Field< Foam::Vector > >, PtrList< Field< scalar > >, PtrList< Foam::OFstream >, PtrList< Foam::Field >, PtrList< Foam::List >, PtrList< Foam::lduPrimitiveMesh >, PtrList< Foam::lduMatrix >, PtrList< Foam::PtrList< Foam::lduInterfaceField > >, PtrList< Foam::lduInterfaceField >, PtrList< Foam::UPtrList >, PtrList< Foam::FieldField< Foam::Field, scalar > >, PtrList< Foam::Field< scalar > >, PtrList< Foam::distributionModels::general >, PtrList< ParticleForce< KinematicCloud< Foam::DSMCCloud > > >, PtrList< CloudFunctionObject< KinematicCloud< Foam::DSMCCloud > > >, PtrList< InjectionModel< Foam::KinematicCloud< Foam::DSMCCloud > > >, PtrList< ParticleForce< KinematicCloud< CloudType > > >, PtrList< CloudFunctionObject< KinematicCloud< CloudType > > >, PtrList< Foam::Field< LUType > >, PtrList< fvsPatchField< scalar > >, PtrList< Foam::PatchInteractionModel< Foam::DSMCCloud > >, PtrList< Foam::List< char > >, PtrList< boundaryEntry >, PtrList< Foam::diameterModels::populationBalanceModel >, PtrList< Foam::RBD::rigidBody >, PtrList< Foam::RBD::subBody >, PtrList< Foam::RBD::joint >, PtrList< Foam::RBD::restraint >, PtrList< Foam::DimensionedField >, PtrList< Foam::patchInjectionBase >, PtrList< Foam::Reaction< ThermoType > >, PtrList< ThermoType >, PtrList< Foam::adjointSolver >, PtrList< Foam::Function1< scalar > >, PtrList< blockVertex >, PtrList< blockEdge >, PtrList< blockFace >, PtrList< Foam::entry >, PtrList< Foam::boundaryPatch >, PtrList< Foam::fvMeshSubset >, PtrList< Foam::cellModel >, PtrList< Foam::cellSizeAndAlignmentControl >, PtrList< pointPatchField< scalar > >, PtrList< Foam::extendedFeatureEdgeMesh >, PtrList< Foam::surfaceZonesInfo >, PtrList< Foam::dictionary >, PtrList< Foam::Field< label > >, PtrList< Foam::Field< Foam::Vector > >, PtrList< Foam::Field< Foam::SphericalTensor > >, PtrList< Foam::Field< Foam::SymmTensor > >, PtrList< Foam::Field< Foam::Tensor > >, PtrList< Foam::Function1< Type > >, PtrList< Foam::topoSetFaceSource >, PtrList< Foam::decompositionConstraint >, PtrList< Foam::diameterModels::IATEsource >, PtrList< Foam::PtrList< Foam::dimensioned > >, PtrList< Foam::dimensioned >, PtrList< Foam::diameterModels::coalescenceModel >, PtrList< Foam::diameterModels::breakupModel >, PtrList< Foam::diameterModels::binaryBreakupModel >, PtrList< Foam::diameterModels::driftModel >, PtrList< Foam::diameterModels::nucleationModel >, PtrList< Foam::diameterModels::sizeGroup >, PtrList< pointPatchField< vector > >, PtrList< Foam::motionSolver >, PtrList< const Foam::lduPrimitiveProcessorInterface >, PtrList< Foam::indexedOctree< Foam::treeDataEdge > >, PtrList< faPatchField< scalar > >, PtrList< Foam::faFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::faFieldDecomposer::processorAreaPatchFieldDecomposer >, PtrList< Foam::faFieldDecomposer::processorEdgePatchFieldDecomposer >, PtrList< Foam::GeometricField< scalar, Foam::faPatchField, Foam::areaMesh > >, PtrList< Foam::faPatchField< scalar > >, PtrList< Foam::GeometricField< scalar, Foam::faePatchField, Foam::edgeMesh > >, PtrList< Foam::faePatchField< scalar > >, PtrList< Foam::GeometricField< Foam::Vector, Foam::faPatchField, Foam::areaMesh > >, PtrList< Foam::faPatchField< Foam::Vector > >, PtrList< Foam::GeometricField< Foam::Vector, Foam::faePatchField, Foam::edgeMesh > >, PtrList< Foam::faePatchField< Foam::Vector > >, PtrList< Foam::GeometricField< Foam::SphericalTensor, Foam::faPatchField, Foam::areaMesh > >, PtrList< Foam::faPatchField< Foam::SphericalTensor > >, PtrList< Foam::GeometricField< Foam::SphericalTensor, Foam::faePatchField, Foam::edgeMesh > >, PtrList< Foam::faePatchField< Foam::SphericalTensor > >, PtrList< Foam::GeometricField< Foam::SymmTensor, Foam::faPatchField, Foam::areaMesh > >, PtrList< Foam::faPatchField< Foam::SymmTensor > >, PtrList< Foam::GeometricField< Foam::SymmTensor, Foam::faePatchField, Foam::edgeMesh > >, PtrList< Foam::faePatchField< Foam::SymmTensor > >, PtrList< Foam::GeometricField< Foam::Tensor, Foam::faPatchField, Foam::areaMesh > >, PtrList< Foam::faPatchField< Foam::Tensor > >, PtrList< Foam::GeometricField< Foam::Tensor, Foam::faePatchField, Foam::edgeMesh > >, PtrList< Foam::faePatchField< Foam::Tensor > >, PtrList< Foam::faMesh >, PtrList< Foam::IOList >, PtrList< Foam::Field< Type > >, PtrList< Foam::mapDistributeBase >, PtrList< Foam::functionObject >, PtrList< ParticleForce< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > >, PtrList< CloudFunctionObject< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > >, PtrList< Foam::functionObjects::runTimeControls::runTimeCondition >, PtrList< Foam::vtk::vtuCells >, PtrList< Foam::fvFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::fvFieldDecomposer::processorVolPatchFieldDecomposer >, PtrList< Foam::fvFieldDecomposer::processorSurfacePatchFieldDecomposer >, PtrList< Foam::DimensionedField< scalar, Foam::volMesh > >, PtrList< Foam::GeometricField< scalar, Foam::fvPatchField, Foam::volMesh > >, PtrList< Foam::GeometricField< scalar, Foam::fvsPatchField, Foam::surfaceMesh > >, PtrList< Foam::fvsPatchField< scalar > >, PtrList< Foam::DimensionedField< Foam::Vector, Foam::volMesh > >, PtrList< Foam::GeometricField< Foam::Vector, Foam::fvPatchField, Foam::volMesh > >, PtrList< Foam::GeometricField< Foam::Vector, Foam::fvsPatchField, Foam::surfaceMesh > >, PtrList< Foam::fvsPatchField< Foam::Vector > >, PtrList< Foam::DimensionedField< Foam::SphericalTensor, Foam::volMesh > >, PtrList< Foam::GeometricField< Foam::SphericalTensor, Foam::fvPatchField, Foam::volMesh > >, PtrList< Foam::fvPatchField< Foam::SphericalTensor > >, PtrList< Foam::GeometricField< Foam::SphericalTensor, Foam::fvsPatchField, Foam::surfaceMesh > >, PtrList< Foam::fvsPatchField< Foam::SphericalTensor > >, PtrList< Foam::DimensionedField< Foam::SymmTensor, Foam::volMesh > >, PtrList< Foam::GeometricField< Foam::SymmTensor, Foam::fvPatchField, Foam::volMesh > >, PtrList< Foam::fvPatchField< Foam::SymmTensor > >, PtrList< Foam::GeometricField< Foam::SymmTensor, Foam::fvsPatchField, Foam::surfaceMesh > >, PtrList< Foam::fvsPatchField< Foam::SymmTensor > >, PtrList< Foam::DimensionedField< Foam::Tensor, Foam::volMesh > >, PtrList< Foam::GeometricField< Foam::Tensor, Foam::fvPatchField, Foam::volMesh > >, PtrList< Foam::fvPatchField< Foam::Tensor > >, PtrList< Foam::GeometricField< Foam::Tensor, Foam::fvsPatchField, Foam::surfaceMesh > >, PtrList< Foam::fvsPatchField< Foam::Tensor > >, PtrList< Foam::fvMesh >, PtrList< Foam::fvMatrix< Type > >, PtrList< Foam::ignitionSite >, PtrList< Foam::implicitFunction >, PtrList< Foam::adjointSolverManager >, PtrList< Foam::incompressible::adjointSensitivity >, PtrList< Foam::fvPatchField< Type > >, PtrList< Foam::pointPatchField< Type > >, PtrList< Foam::fvsPatchField< Type > >, PtrList< Foam::PtrList< Foam::IOField< label > > >, PtrList< Foam::IOField< label > >, PtrList< Foam::PtrList< Foam::CompactIOField< Foam::Field< label >, label > > >, PtrList< Foam::CompactIOField< Foam::Field< label >, label > >, PtrList< Foam::PtrList< Foam::IOField< scalar > > >, PtrList< Foam::IOField< scalar > >, PtrList< Foam::PtrList< Foam::CompactIOField< Foam::Field< scalar >, scalar > > >, PtrList< Foam::CompactIOField< Foam::Field< scalar >, scalar > >, PtrList< Foam::PtrList< Foam::IOField< Foam::Vector > > >, PtrList< Foam::IOField< Foam::Vector > >, PtrList< Foam::PtrList< Foam::CompactIOField< Foam::Field< Foam::Vector >, Foam::Vector > > >, PtrList< Foam::CompactIOField< Foam::Field< Foam::Vector >, Foam::Vector > >, PtrList< Foam::PtrList< Foam::IOField< Foam::SphericalTensor > > >, PtrList< Foam::IOField< Foam::SphericalTensor > >, PtrList< Foam::PtrList< Foam::CompactIOField< Foam::Field< Foam::SphericalTensor >, Foam::SphericalTensor > > >, PtrList< Foam::CompactIOField< Foam::Field< Foam::SphericalTensor >, Foam::SphericalTensor > >, PtrList< Foam::PtrList< Foam::IOField< Foam::SymmTensor > > >, PtrList< Foam::IOField< Foam::SymmTensor > >, PtrList< Foam::PtrList< Foam::CompactIOField< Foam::Field< Foam::SymmTensor >, Foam::SymmTensor > > >, PtrList< Foam::CompactIOField< Foam::Field< Foam::SymmTensor >, Foam::SymmTensor > >, PtrList< Foam::PtrList< Foam::IOField< Foam::Tensor > > >, PtrList< Foam::IOField< Foam::Tensor > >, PtrList< Foam::PtrList< Foam::CompactIOField< Foam::Field< Foam::Tensor >, Foam::Tensor > > >, PtrList< Foam::CompactIOField< Foam::Field< Foam::Tensor >, Foam::Tensor > >, PtrList< const Foam::lduInterface >, PtrList< fvsPatchField< vector > >, PtrList< Foam::liquidProperties >, PtrList< Foam::AMIInterpolation >, PtrList< Foam::decompositionMethod >, PtrList< Foam::solidBodyMotionFunction >, PtrList< Foam::objective >, PtrList< Foam::primalSolver >, PtrList< Foam::PrimitivePatch >, PtrList< phaseModel >, PtrList< Foam::pointFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::GeometricField< scalar, Foam::pointPatchField, Foam::pointMesh > >, PtrList< Foam::pointPatchField< scalar > >, PtrList< Foam::GeometricField< Foam::Vector, Foam::pointPatchField, Foam::pointMesh > >, PtrList< Foam::GeometricField< Foam::SphericalTensor, Foam::pointPatchField, Foam::pointMesh > >, PtrList< Foam::pointPatchField< Foam::SphericalTensor > >, PtrList< Foam::GeometricField< Foam::SymmTensor, Foam::pointPatchField, Foam::pointMesh > >, PtrList< Foam::pointPatchField< Foam::SymmTensor > >, PtrList< Foam::GeometricField< Foam::Tensor, Foam::pointPatchField, Foam::pointMesh > >, PtrList< Foam::pointPatchField< Foam::Tensor > >, PtrList< Foam::pointMesh >, PtrList< Foam::PrimitivePatchInterpolation >, PtrList< pointZone >, PtrList< faceZone >, PtrList< cellZone >, PtrList< Foam::procLduInterface >, PtrList< Foam::Time >, PtrList< Foam::profilingInformation >, PtrList< GasThermo >, PtrList< Foam::radiation::radiativeIntensityRay >, PtrList< Foam::indexedOctree< Foam::treeDataPoint > >, PtrList< faPatchField< tensor > >, PtrList< faPatchField< vector > >, PtrList< faePatchField< scalar > >, PtrList< Foam::PtrList< Foam::AMIInterpolation > >, PtrList< bodyMesh >, PtrList< Foam::mappedPatchBase >, PtrList< Foam::coordSetWriter >, PtrList< Foam::coordSet >, PtrList< Foam::surfaceWriter >, PtrList< Foam::coordSystem::cartesian >, PtrList< Foam::cellSizeFunction >, PtrList< Foam::sixDoFRigidBodyMotionRestraint >, PtrList< Foam::sixDoFRigidBodyMotionConstraint >, PtrList< Foam::Reaction< SolidThermo > >, PtrList< SolidThermo >, PtrList< Foam::solidProperties >, PtrList< Foam::dimensionSet >, PtrList< Foam::interpolation< scalar > >, PtrList< Foam::interpolation< Foam::Vector > >, PtrList< Foam::triSurfaceMesh >, PtrList< Foam::indexedOctree >, PtrList< Foam::Function1< Foam::Vector > >, PtrList< Foam::Function1< Foam::SymmTensor > >, PtrList< Foam::Function1< TypeR > >, PtrList< Foam::NURBS3DVolume >, and PtrList< T >.

Classes

class  const_iterator
 Random-access iterator with const access. More...
 
struct  greater
 A UPtrList compare binary predicate for reverse sort order. More...
 
class  iterator
 Random-access iterator with non-const access. More...
 
struct  less
 
struct  value_compare
 

Public Types

typedef T value_type
 Type of values the list contains. More...
 
typedef Treference
 A non-const reference to the value_type. More...
 
typedef const Tconst_reference
 A const reference to the value_type. More...
 

Public Member Functions

constexpr UPtrList () noexcept
 Default construct. More...
 
 UPtrList (const label len)
 Construct with specified size, each element initialized to nullptr. More...
 
 UPtrList (const UPtrList< T > &list)
 Copy construct (shallow copies addresses) More...
 
 UPtrList (UPtrList< T > &&list)
 Move construct. More...
 
 UPtrList (UPtrList< T > &list, bool reuse)
 Construct as shallow copy or re-use as specified. More...
 
 UPtrList (PtrList< T > &list)
 Shallow copy from PtrList. More...
 
 UPtrList (const UList< T * > &list)
 Construct from UList of pointers (shallow copy) More...
 
 UPtrList (UList< T > &list)
 Construct from UList, taking the address of each list element. More...
 
label size () const noexcept
 The number of elements in the list. More...
 
bool empty () const noexcept
 True if the list is empty (ie, size() is zero) More...
 
Tfirst ()
 Return reference to the first element of the list. More...
 
const Tfirst () const
 Return reference to first element of the list. More...
 
Tlast ()
 Return reference to the last element of the list. More...
 
const Tlast () const
 Return reference to the last element of the list. More...
 
const Ttest (const label i) const
 
Tget (const label i)
 
const Tget (const label i) const
 
const Tset (const label i) const
 
void clear ()
 Set list size to zero. More...
 
void resize (const label newLen)
 Change the size of the list. More...
 
void setSize (const label n)
 Alias for resize() More...
 
label squeezeNull ()
 Squeeze out intermediate nullptr entries in the list of pointers. More...
 
void append (T *ptr)
 Append an element to the end of the list. More...
 
void append (UPtrList< T > &&other)
 Move append another list to the end of this list. More...
 
void swap (UPtrList< T > &list)
 Swap content. More...
 
void transfer (UPtrList< T > &list)
 Transfer contents into this list and annul the argument. More...
 
Tset (const label i, T *ptr)
 
void reorder (const labelUList &oldToNew, const bool check=false)
 
void sortOrder (const labelUList &order, const bool check=false)
 
void checkNonNull () const
 Check and raise FatalError if any nullptr exists in the list. More...
 
const Toperator[] (const label i) const
 Return const reference to the element. More...
 
Toperator[] (const label i)
 Return reference to the element. More...
 
const Toperator() (const label i) const
 Return const pointer to the element - same as get(). More...
 
void operator= (const UPtrList< T > &list)
 Copy assignment (shallow copies addresses) More...
 
void operator= (UPtrList< T > &&list)
 Move assignment. More...
 
T ** begin_ptr () noexcept
 Iterator to begin of raw pointers traversal (use with caution) More...
 
T ** end_ptr () noexcept
 Iterator beyond end of raw pointers traversal (use with caution) More...
 
iterator begin () noexcept
 Return an iterator to begin of UPtrList traversal. More...
 
iterator end () noexcept
 Return iterator beyond end of UPtrList traversal. More...
 
const_iterator cbegin () const noexcept
 Return const_iterator to begin of UPtrList traversal. More...
 
const_iterator cend () const noexcept
 Return const_iterator beyond end of UPtrList traversal. More...
 
const_iterator begin () const noexcept
 Return const_iterator to begin of UPtrList traversal. More...
 
const_iterator end () const noexcept
 Return const_iterator beyond end of UPtrList traversal. More...
 

Protected Member Functions

void setAddressableSize (const label n) noexcept
 Adjust addressable size. More...
 
 UPtrList (Detail::PtrListDetail< T > &&ptrs)
 Low-level move construct. More...
 

Protected Attributes

Detail::PtrListDetail< Tptrs_
 The list of pointers. More...
 

Friends

Ostreamoperator (Ostream &os, const UPtrList< T > &list)
 Write UPtrList to Ostream. More...
 

Detailed Description

template<class T>
class Foam::UPtrList< T >

A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers - this is to be done elsewhere. The operator[] returns a reference to the object, not the pointer.

Note
The class definition is such that it contains a list of pointers, but itself does not inherit from a list of pointers since this would wreak havoc later with inheritance resolution.
See also
Foam::PtrList Foam::PtrDynList
Source files

Definition at line 70 of file UPtrList.H.

Member Typedef Documentation

◆ value_type

typedef T value_type

Type of values the list contains.

Definition at line 97 of file UPtrList.H.

◆ reference

typedef T& reference

A non-const reference to the value_type.

Definition at line 100 of file UPtrList.H.

◆ const_reference

typedef const T& const_reference

A const reference to the value_type.

Definition at line 103 of file UPtrList.H.

Constructor & Destructor Documentation

◆ UPtrList() [1/9]

UPtrList ( Detail::PtrListDetail< T > &&  ptrs)
inlineexplicitprotected

Low-level move construct.

Definition at line 55 of file UPtrListI.H.

◆ UPtrList() [2/9]

constexpr UPtrList
inlineconstexprnoexcept

Default construct.

Definition at line 41 of file UPtrListI.H.

◆ UPtrList() [3/9]

UPtrList ( const label  len)
inlineexplicit

Construct with specified size, each element initialized to nullptr.

Definition at line 48 of file UPtrListI.H.

◆ UPtrList() [4/9]

UPtrList ( const UPtrList< T > &  list)
inline

Copy construct (shallow copies addresses)

Definition at line 62 of file UPtrListI.H.

◆ UPtrList() [5/9]

UPtrList ( UPtrList< T > &&  list)
inline

Move construct.

Definition at line 69 of file UPtrListI.H.

◆ UPtrList() [6/9]

UPtrList ( UPtrList< T > &  list,
bool  reuse 
)
inline

Construct as shallow copy or re-use as specified.

Definition at line 76 of file UPtrListI.H.

◆ UPtrList() [7/9]

UPtrList ( PtrList< T > &  list)
explicit

Shallow copy from PtrList.

The argument is non-const to reflect that the UPtrList can change the values (not the addresses) within the original list.

Definition at line 36 of file UPtrList.C.

◆ UPtrList() [8/9]

UPtrList ( const UList< T * > &  list)
inlineexplicit

Construct from UList of pointers (shallow copy)

Definition at line 83 of file UPtrListI.H.

◆ UPtrList() [9/9]

UPtrList ( UList< T > &  list)
inlineexplicit

Construct from UList, taking the address of each list element.

The argument is non-const to reflect that the UPtrList can change the values of the original list.

Definition at line 90 of file UPtrListI.H.

References UPtrList< T >::ptrs_.

Member Function Documentation

◆ setAddressableSize()

void setAddressableSize ( const label  n)
inlineprotectednoexcept

Adjust addressable size.

Definition at line 32 of file UPtrListI.H.

References n.

◆ size()

Foam::label size
inlinenoexcept

The number of elements in the list.

Definition at line 106 of file UPtrListI.H.

Referenced by polyMeshAdder::add(), singleProcessorFaceSets::add(), fvMeshAdder::add(), surfaceZonesInfo::addCellZone(), surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZone(), surfaceZonesInfo::addFaceZonesToMesh(), dynamicOversetFvMesh::addInterpolation(), snappyLayerDriver::addLayers(), snappyLayerDriver::addLayersSinglePass(), meshRefinement::addPatch(), meshRefinement::addPointZone(), GAMGAgglomeration::agglomerateLduAddressing(), cellToCellStencil::allCoupledFacesPatch(), extendedEdgeMesh::allNearestFeatureEdges(), meshRefinement::appendPatch(), Foam::FieldOps::assign(), attachPolyTopoChanger::attach(), AveragingMethod< Type >::AveragingMethod(), meshRefinement::blockLeakFaces(), nearWallFields::calcAddressing(), addPatchCellLayer::calcExtrudeInfo(), snappySnapDriver::calcNearestSurface(), viewFactor::calculate(), fvMotionSolver::cellMotionBoundaryTypes(), polyTopoChange::changeMesh(), polyBoundaryMesh::checkDefinition(), faBoundaryMesh::checkParallelSync(), polyBoundaryMesh::checkParallelSync(), GAMGAgglomeration::compactLevels(), optMeshMovementVolumetricBSplinesExternalMotionSolver::computeBoundaryMovement(), sensitivitySurface::computeDerivativesSize(), sensitivityVolBSplines::computeObjectiveContributions(), pointPatchDist::correct(), nearWallDist::correct(), wallDistData< TransferType >::correct(), inverseFaceDistanceDiffusivity::correct(), directionalPressureGradientExplicitSource::correct(), epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), omegaWallFunctionFvPatchScalarField::createAveragingWeights(), Foam::createReconstructMap(), Foam::createZeroBoundaryPointFieldPtr(), Foam::createZeroBoundaryPtr(), motionSmootherAlgo::curPoints(), volumetricBSplinesMotionSolver::curPoints(), structuredDecomp::decompose(), faMeshDecomposition::decomposeMesh(), adjointRASModel::diffusionCoeffVar1(), adjointSpalartAllmaras::diffusionCoeffVar1(), adjointRASModel::diffusionCoeffVar2(), fvMeshDistribute::distribute(), faMeshDistributor::distributeField(), snappyLayerDriver::doLayers(), snappySnapDriver::doSnap(), faBoundaryMesh::edgeFaces(), faBoundaryMesh::edgeLabels(), fvBoundaryMesh::faceCells(), polyBoundaryMesh::faceCells(), faMeshMapper::faMeshMapper(), patchProbes::findElements(), polyBoundaryMesh::findPatchIDs(), ZoneMesh< ZoneType, MeshType >::findZoneID(), volPointInterpolation::flatBoundaryField(), fvFieldReconstructor::fvFieldReconstructor(), fvMatrix< Type >::fvMatrix(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), surfaceZonesInfo::getAllClosedNamedSurfaces(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getStandaloneNamedSurfaces(), surfaceZonesInfo::getUnclosedNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), meshRefinement::getZones(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), basicThermo::heBoundaryBaseTypes(), hexRef8Data::hexRef8Data(), if(), injectionModelList::info(), transferModelList::info(), interRegionExplicitPorositySource::initialise(), viewFactor::initialise(), objectivePtLosses::initialize(), lduMatrix::initMatrixInterfaces(), faBoundaryMesh::interfaces(), fvBoundaryMesh::interfaces(), edgeInterpolationScheme< Type >::interpolate(), faMeshSubset::interpolate(), singleCellFvMesh::interpolate(), edgeInterpolationScheme< scalar >::interpolate(), regionModel::interRegionAMI(), rigidBodyModel::join(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), triSurfaceLoader::load(), fvMeshTools::loadOrCreateMesh(), faMeshTools::loadOrCreateMesh(), LUscalarMatrix::LUscalarMatrix(), meshRefinement::makeDisplacementField(), polyTopoChange::makeMesh(), fvMeshAdder::MapDimFields(), mapPolyMesh::mapPolyMesh(), meshToMesh::mapSrcToTgt(), fvMeshAdder::MapSurfaceFields(), meshToMesh::mapTgtToSrc(), fvMeshAdder::MapVolFields(), meshToMesh0::meshToMesh0(), regionModel::nbrCoupledPatchID(), extendedEdgeMesh::nearestFeatureEdgeByType(), processorTopology::New(), fvMeshTools::newMesh(), faMeshTools::newMesh(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), faMeshLduAddressing::nPatches(), Foam::operator<<(), PtrList< T >::operator=(), blockMesh::patchDicts(), polyMeshAdder::patchFacePairs(), lumpedPointDisplacementPointPatchVectorField::patchIds(), patchInjection::patchInjection(), faBoundaryMesh::patchRanges(), faBoundaryMesh::patchStarts(), adjointEikonalSolver::patchTypes(), patchDistMethod::patchTypes(), phaseModel::phaseModel(), pointFieldReconstructor::pointFieldReconstructor(), polyBoundaryMesh::polyBoundaryMesh(), polyline::polyline(), polyMesh::polyMesh(), polyTopoChange::polyTopoChange(), polyline::positionAndDirection(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), foamToVtkReportFields::print(), fvMeshDistribute::printMeshInfo(), polyMeshAdder::procPatchPairs(), PtrList< T >::PtrList(), PtrListDictionary< T >::PtrListDictionary(), sampledSurfaces::read(), boundaryMesh::read(), lagrangianFieldDecomposer::readFieldFields(), lagrangianFieldDecomposer::readFields(), fieldsDistributor::readFields(), faMeshTools::readProcAddressing(), fvMeshTools::readProcAddressing(), polyMesh::readUpdate(), faFieldReconstructor::reconstructField(), pointFieldReconstructor::reconstructField(), refinementHistory::refinementHistory(), refinementSurfaces::refinementSurfaces(), fvMeshTools::removeEmptyPatches(), structuredRenumber::renumber(), faFieldDecomposer::reset(), faMeshSubset::reset(), fvMeshSubset::reset(), Foam::rewritePatchLabels(), ReynoldsAnalogy::rho(), sampledPatchInternalField::sampleOnPoints(), searchableSurfaceCollection::searchableSurfaceCollection(), Foam::selectPatchFaces(), faBoundaryMesh::setGroup(), polyBoundaryMesh::setGroup(), ZoneMesh< ZoneType, MeshType >::setGroup(), removeCells::setRefinement(), meshCutAndRemove::setRefinement(), coordSetWriter::setTracks(), shortestPathSet::shortestPathSet(), Foam::shuffle(), singleCellFvMesh::singleCellFvMesh(), singleStepReactingMixture< ThermoType >::singleStepReactingMixture(), Foam::sortedOrder(), triSurface::sortedZones(), surfZoneIOList::surfZoneIOList(), syncTools::syncFaceList(), Foam::FieldOps::ternary(), Foam::FieldOps::ternarySelect(), blockMesh::topology(), streamLineBase::trimToBox(), GeometricBoundaryField< Type, PatchField, GeoMesh >::types(), trackingInverseDistance::update(), sampledFaceZone::update(), dynamicOversetFvMesh::updateAddressing(), optimisationType::updateGradientsAndValues(), lduPrimitiveMeshAssembly::updateMaps(), lduMatrix::updateMatrixInterfaces(), faMesh::updateMesh(), Foam::vertices(), wallLayerCells::wallLayerCells(), momentum::write(), sensitivityVolBSplines::write(), sensitivityVolBSplinesFI::write(), OFstreamCollator::write(), faBoundaryMesh::writeData(), polyBoundaryMesh::writeData(), externalCoupled::writeGeometry(), cellZoneSet::writeObject(), faceZoneSet::writeObject(), pointZoneSet::writeObject(), faMeshTools::writeProcAddressing(), fvMeshTools::writeProcAddressing(), Foam::ensightOutput::writeVolField(), and MRFZoneList::zeroFilter().

◆ empty()

bool empty
inlinenoexcept

True if the list is empty (ie, size() is zero)

Definition at line 113 of file UPtrListI.H.

Referenced by triSurfaceLoader::load(), fvMeshTools::newMesh(), faMeshTools::newMesh(), polyMesh::polyMesh(), Foam::redistributeLagrangian(), shapeOptimisation::shapeOptimisation(), optimisationType::updateGradientsAndValues(), and streamLineBase::writeToFile().

Here is the caller graph for this function:

◆ first() [1/2]

T & first
inline

Return reference to the first element of the list.

Definition at line 162 of file UPtrListI.H.

◆ first() [2/2]

const T & first
inline

Return reference to first element of the list.

Definition at line 169 of file UPtrListI.H.

◆ last() [1/2]

T & last
inline

Return reference to the last element of the list.

Definition at line 176 of file UPtrListI.H.

Referenced by polyline::polyline(), and fvMatrix< Type >::setInterfaces().

Here is the caller graph for this function:

◆ last() [2/2]

const T & last
inline

Return reference to the last element of the list.

Definition at line 183 of file UPtrListI.H.

◆ test()

const T * test ( const label  i) const
inline

Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking).

The return value can be tested as a bool.

Definition at line 120 of file UPtrListI.H.

Referenced by PtrDynList< T, SizeMin >::~PtrDynList().

Here is the caller graph for this function:

◆ get() [1/2]

T * get ( const label  i)
inline

Return pointer to element (can be nullptr), without bounds checking.

The return value can be tested as a bool.

Definition at line 127 of file UPtrListI.H.

Referenced by fvMeshAdder::add(), ZoneMesh< ZoneType, MeshType >::cfindZone(), RecycleInteraction< CloudType >::postEvolve(), and coordSetWriter::setTracks().

Here is the caller graph for this function:

◆ get() [2/2]

const T * get ( const label  i) const
inline

Return const pointer to element (can be nullptr), without bounds checking.

Definition at line 134 of file UPtrListI.H.

◆ set() [1/2]

const T * set ( const label  i) const
inline

Return const pointer to element (can be nullptr), without bounds checking - same as get().

The return value can be tested as a bool.

Definition at line 248 of file UPtrList.H.

Referenced by fvMeshAdder::add(), GAMGAgglomeration::agglomerateLduAddressing(), GAMGAgglomeration::combineLevels(), GAMGAgglomeration::compactLevels(), wallDistData< TransferType >::correct(), directionalMeshWave::correct(), meshWave::correct(), fvMatrix< Type >::createOrUpdateLduPrimitiveAssembly(), HashTable< T, Key, Hash >::csorted(), fvMeshDistribute::distribute(), faBoundaryMesh::edgeFaces(), faBoundaryMesh::edgeLabels(), fvBoundaryMesh::faceCells(), polyBoundaryMesh::faceCells(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), hexRef8Data::hexRef8Data(), viewFactor::initialise(), lduMatrix::initMatrixInterfaces(), faBoundaryMesh::interfaces(), fvBoundaryMesh::interfaces(), GeometricBoundaryField< Type, PatchField, GeoMesh >::interfaces(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), fvMeshAdder::MapDimFields(), fvMeshAdder::MapSurfaceFields(), fvMeshAdder::MapVolFields(), multiphaseSystem::multiphaseSystem(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), IOobjectList::objectsTypeImpl(), objectRegistry::objectsTypeImpl(), Foam::operator<<(), phaseSystem::phaseSystem(), procLduMatrix::procLduMatrix(), coordSetWriter::repackageFields(), GeometricBoundaryField< Type, PatchField, GeoMesh >::scalarInterfaces(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaceWithGaps::searchableSurfaceWithGaps(), fvMatrix< Type >::setInterfaces(), HashTable< T, Key, Hash >::sorted(), lduMatrix::sumA(), lduPrimitiveMeshAssembly::update(), dynamicOversetFvMesh::updateAddressing(), lduMatrix::updateMatrixInterfaces(), and dynamicOversetFvMesh::write().

Here is the caller graph for this function:

◆ clear()

void clear
inline

Set list size to zero.

Definition at line 141 of file UPtrListI.H.

◆ resize()

void resize ( const label  newLen)
inline

Change the size of the list.

New entries are initialized to nullptr.

Definition at line 190 of file UPtrListI.H.

Referenced by IOobjectList::objectsTypeImpl(), objectRegistry::objectsTypeImpl(), phaseSystem::phaseSystem(), and UPtrList< T >::setSize().

Here is the caller graph for this function:

◆ setSize()

void setSize ( const label  n)
inline

Alias for resize()

Definition at line 261 of file UPtrList.H.

References UPtrList< T >::resize().

Referenced by viewFactor::initialise(), lduPrimitiveMesh::lduPrimitiveMesh(), multiphaseSystem::multiphaseSystem(), searchableSurfaceCollection::searchableSurfaceCollection(), fvMatrix< Type >::setInterfaces(), lduPrimitiveMeshAssembly::update(), and dynamicOversetFvMesh::updateAddressing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ squeezeNull()

Foam::label squeezeNull

Squeeze out intermediate nullptr entries in the list of pointers.

Returns
the number of non-null entries

Definition at line 45 of file UPtrList.C.

References T.

Referenced by PtrDynList< Foam::Field< label > >::set().

Here is the caller graph for this function:

◆ append() [1/2]

void append ( T ptr)
inline

Append an element to the end of the list.

Definition at line 197 of file UPtrListI.H.

Referenced by lagrangianFieldDecomposer::readFieldFields(), and lagrangianReconstructor::reconstructFieldFields().

Here is the caller graph for this function:

◆ append() [2/2]

void append ( UPtrList< T > &&  other)
inline

Move append another list to the end of this list.

Definition at line 204 of file UPtrListI.H.

◆ swap()

void swap ( UPtrList< T > &  list)
inline

Swap content.

Definition at line 148 of file UPtrListI.H.

References UPtrList< T >::ptrs_.

◆ transfer()

void transfer ( UPtrList< T > &  list)
inline

Transfer contents into this list and annul the argument.

Definition at line 155 of file UPtrListI.H.

References UPtrList< T >::ptrs_.

◆ set() [2/2]

T * set ( const label  i,
T ptr 
)
inline

Set element to specified pointer and return the old list element, which can be a nullptr.

No-op if the new pointer value is identical to the current content.

Definition at line 212 of file UPtrListI.H.

◆ reorder()

void reorder ( const labelUList oldToNew,
const bool  check = false 
)

Reorder elements. Reordering must be unique (ie, shuffle).

Optionally check that all pointers have been set.

Definition at line 69 of file UPtrList.C.

References Foam::abort(), Foam::check(), PtrListDetail< T >::checkNonNull(), Foam::FatalError, FatalErrorInFunction, Foam::name(), Foam::nl, UList< T >::size(), and T.

Referenced by meshRefinement::addPatch(), LBFGS::pivotFields(), and fvMeshTools::reorderPatches().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sortOrder()

void sortOrder ( const labelUList order,
const bool  check = false 
)

Reorder elements according to new order mapping (newToOld). Reordering must be unique (ie, shuffle).

Optionally check that all pointers have been set.

Definition at line 118 of file UPtrList.C.

References Foam::abort(), Foam::check(), PtrListDetail< T >::checkNonNull(), Foam::FatalError, FatalErrorInFunction, Foam::name(), Foam::nl, UList< T >::size(), and T.

Referenced by Foam::shuffle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkNonNull()

void checkNonNull
inline

Check and raise FatalError if any nullptr exists in the list.

Definition at line 225 of file UPtrListI.H.

◆ operator[]() [1/2]

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

Return const reference to the element.

Definition at line 234 of file UPtrListI.H.

References T.

Referenced by forceList::correct(), injectionModelList::correct(), transferModelList::correct(), pyrolysisModelCollection::evolve(), pyrolysisModelCollection::evolveRegion(), pyrolysisModelCollection::info(), injectionModelList::info(), transferModelList::info(), pyrolysisModelCollection::preEvolveRegion(), coalCloudList::UTrans(), and MRFZoneList::zeroFilter().

Here is the caller graph for this function:

◆ operator[]() [2/2]

T & operator[] ( const label  i)
inline

Return reference to the element.

Definition at line 251 of file UPtrListI.H.

References T.

◆ operator()()

const T * operator() ( const label  i) const
inline

Return const pointer to the element - same as get().

Definition at line 268 of file UPtrListI.H.

◆ operator=() [1/2]

void operator= ( const UPtrList< T > &  list)
inline

Copy assignment (shallow copies addresses)

Definition at line 669 of file UPtrListI.H.

References UPtrList< T >::ptrs_.

◆ operator=() [2/2]

void operator= ( UPtrList< T > &&  list)
inline

Move assignment.

Definition at line 676 of file UPtrListI.H.

◆ begin_ptr()

T ** begin_ptr ( )
inlinenoexcept

Iterator to begin of raw pointers traversal (use with caution)

Definition at line 440 of file UPtrList.H.

References UPtrList< T >::ptrs_.

Referenced by Foam::sort().

Here is the caller graph for this function:

◆ end_ptr()

T ** end_ptr ( )
inlinenoexcept

Iterator beyond end of raw pointers traversal (use with caution)

Definition at line 443 of file UPtrList.H.

References UPtrList< T >::ptrs_.

Referenced by Foam::sort().

Here is the caller graph for this function:

◆ begin() [1/2]

Foam::UPtrList< T >::iterator begin
inlinenoexcept

Return an iterator to begin of UPtrList traversal.

Definition at line 620 of file UPtrListI.H.

Referenced by ZoneMesh< ZoneType, MeshType >::cfindZone().

Here is the caller graph for this function:

◆ end() [1/2]

Foam::UPtrList< T >::iterator end
inlinenoexcept

Return iterator beyond end of UPtrList traversal.

Definition at line 628 of file UPtrListI.H.

Referenced by ZoneMesh< ZoneType, MeshType >::cfindZone().

Here is the caller graph for this function:

◆ cbegin()

Foam::UPtrList< T >::const_iterator cbegin
inlinenoexcept

Return const_iterator to begin of UPtrList traversal.

Definition at line 636 of file UPtrListI.H.

◆ cend()

Foam::UPtrList< T >::const_iterator cend
inlinenoexcept

Return const_iterator beyond end of UPtrList traversal.

Definition at line 644 of file UPtrListI.H.

◆ begin() [2/2]

Foam::UPtrList< T >::const_iterator begin
inlinenoexcept

Return const_iterator to begin of UPtrList traversal.

Definition at line 652 of file UPtrListI.H.

◆ end() [2/2]

Foam::UPtrList< T >::const_iterator end
inlinenoexcept

Return const_iterator beyond end of UPtrList traversal.

Definition at line 660 of file UPtrListI.H.

Friends And Related Function Documentation

◆ operator

Ostream & operator ( Ostream os,
const UPtrList< T > &  list 
)
friend

Write UPtrList to Ostream.

Member Data Documentation

◆ ptrs_


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