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

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
 A UPtrList compare binary predicate for normal sort order. Null entries (if any) sort to the end. More...
 
struct  value_compare
 A wrapper for a binary comparison of values that interjects pointer dereferencing with null pointer guards. More...
 

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...
 
Tfront ()
 Reference to the first element of the list. More...
 
const Tfront () const
 Reference to first element of the list. More...
 
Tback ()
 Reference to the last element of the list. More...
 
const Tback () const
 Reference to the last element of the list. More...
 
const Ttest (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
const Tget (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
Tget (const label i)
 Return pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
const Tset (const label i) const
 Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie, with bounds checking). More...
 
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 push_back (T *ptr)
 Append an element to the end of the list. More...
 
void push_back (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)
 Set element to specified pointer and return the old list element, which can be a nullptr. More...
 
void reorder (const labelUList &oldToNew, const bool check=false)
 Reorder elements. Reordering must be unique (ie, shuffle). More...
 
void sortOrder (const labelUList &order, const bool check=false)
 Reorder elements according to new order mapping (newToOld). Reordering must be unique (ie, shuffle). More...
 
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...
 
 FOAM_DEPRECATED_FOR (2022-09, "get(), set() or test() methods") const T *operator()(const label i) const
 Deprecated(2022-09) - 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...
 
Tfirst ()
 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...
 
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...
 

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 100 of file HashTable.H.

Member Typedef Documentation

◆ value_type

typedef T value_type

Type of values the list contains.

Definition at line 101 of file UPtrList.H.

◆ reference

typedef T& reference

A non-const reference to the value_type.

Definition at line 106 of file UPtrList.H.

◆ const_reference

typedef const T& const_reference

A const reference to the value_type.

Definition at line 111 of file UPtrList.H.

Constructor & Destructor Documentation

◆ UPtrList() [1/9]

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

Low-level move construct.

Definition at line 48 of file UPtrListI.H.

◆ UPtrList() [2/9]

constexpr UPtrList ( )
inlinenoexcept

Default construct.

Definition at line 34 of file UPtrListI.H.

◆ UPtrList() [3/9]

UPtrList ( const label  len)
inlineexplicit

Construct with specified size, each element initialized to nullptr.

Definition at line 41 of file UPtrListI.H.

◆ UPtrList() [4/9]

UPtrList ( const UPtrList< T > &  list)
inline

Copy construct (shallow copies addresses)

Definition at line 55 of file UPtrListI.H.

◆ UPtrList() [5/9]

UPtrList ( UPtrList< T > &&  list)
inline

Move construct.

Definition at line 62 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 69 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 29 of file UPtrList.C.

◆ UPtrList() [8/9]

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

Construct from UList of pointers (shallow copy)

Definition at line 76 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 83 of file UPtrListI.H.

Member Function Documentation

◆ setAddressableSize()

void setAddressableSize ( const label  n)
inlineprotectednoexcept

Adjust addressable size.

Definition at line 25 of file UPtrListI.H.

◆ size()

Foam::label size ( ) const
inlinenoexcept

The number of elements in the list.

Definition at line 99 of file UPtrListI.H.

Referenced by MRFZoneList::active(), porosityModelList::active(), oversetFvMeshBase::active(), fvMeshAdder::add(), singleProcessorFaceSets::add(), polyMeshAdder::add(), surfaceZonesInfo::addCellZone(), surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZone(), surfaceZonesInfo::addFaceZonesToMesh(), oversetFvMeshBase::addInterpolation(), snappyLayerDriver::addLayers(), meshRefinement::addPatch(), meshRefinement::addPointZone(), GAMGAgglomeration::agglomerateLduAddressing(), zoneCellStencils::allCoupledFacesPatch(), cellToCellStencil::allCoupledFacesPatch(), extendedEdgeMesh::allNearestFeatureEdges(), meshRefinement::appendPatch(), attachPolyTopoChanger::attach(), meshRefinement::blockLeakFaces(), nearWallFields::calcAddressing(), addPatchCellLayer::calcExtrudeInfo(), snappySnapDriver::calcNearestSurface(), phaseSystem::calcPhi(), viewFactor::calculate(), polyTopoChange::changeMesh(), polyBoundaryMesh::checkDefinition(), faBoundaryMesh::checkParallelSync(), polyBoundaryMesh::checkParallelSync(), optMeshMovementVolumetricBSplinesExternalMotionSolver::computeBoundaryMovement(), sensitivitySurface::computeDerivativesSize(), sensitivityVolBSplines::computeObjectiveContributions(), inverseFaceDistanceDiffusivity::correct(), nearWallDist::correct(), injectionModelList::correct(), pointPatchDist::correct(), omegaWallFunctionFvPatchScalarField::createAveragingWeights(), epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), Foam::createReconstructMap(), Foam::createZeroBoundaryPointFieldPtr(), Foam::createZeroBoundaryPtr(), volumetricBSplinesMotionSolver::curPoints(), motionSmootherAlgo::curPoints(), structuredDecomp::decompose(), faMeshDecomposition::decomposeMesh(), adjointSpalartAllmaras::diffusionCoeffVar1(), adjointRASModel::diffusionCoeffVar1(), adjointRASModel::diffusionCoeffVar2(), fvMeshDistribute::distribute(), snappyLayerDriver::doLayers(), snappySnapDriver::doSnap(), faBoundaryMesh::edgeFaces(), faBoundaryMesh::edgeLabels(), extrudePatchMesh::extrudePatchMesh(), fvBoundaryMesh::faceCells(), polyBoundaryMesh::faceCells(), patchProbes::findElements(), ZoneMesh< cellZone, polyMesh >::findZoneID(), volPointInterpolation::flatBoundaryField(), fvFieldReconstructor::fvFieldReconstructor(), 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(), objectiveUniformityPatch::initialize(), lduMatrix::initMatrixInterfaces(), fvBoundaryMesh::interfaces(), faBoundaryMesh::interfaces(), edgeInterpolationScheme< scalar >::interpolate(), singleCellFvMesh::interpolate(), regionModel::interRegionAMI(), rigidBodyModel::join(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), triSurfaceLoader::load(), faMeshTools::loadOrCreateMesh(), fvMeshTools::loadOrCreateMesh(), LUscalarMatrix::LUscalarMatrix(), meshRefinement::makeDisplacementField(), polyTopoChange::makeMesh(), fvMeshAdder::MapDimFields(), mapPolyMesh::mapPolyMesh(), meshToMesh::mapSrcToTgt(), fvMeshAdder::MapSurfaceFields(), meshToMesh::mapTgtToSrc(), fvMeshAdder::MapVolFields(), MeshedSurface< Foam::face >::MeshedSurface(), regionModel::nbrCoupledPatchID(), extendedEdgeMesh::nearestFeatureEdgeByType(), faMeshTools::newMesh(), fvMeshTools::newMesh(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), zoneCellStencils::nonEmptyFacesPatch(), faMeshLduAddressing::nPatches(), Foam::operator<<(), PtrList< transferModel >::operator=(), blockMesh::patchDicts(), polyMeshAdder::patchFacePairs(), polyBoundaryMesh::patchID(), lumpedPointDisplacementPointPatchVectorField::patchIds(), boundaryMesh::patchify(), patchInjection::patchInjection(), faBoundaryMesh::patchRanges(), faBoundaryMesh::patchStarts(), adjointEikonalSolver::patchTypes(), pointFieldReconstructor::pointFieldReconstructor(), polyBoundaryMesh::polyBoundaryMesh(), polyline::polyline(), polyTopoChange::polyTopoChange(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), foamToVtkReportFields::print(), fvMeshDistribute::printMeshInfo(), polyMeshAdder::procPatchPairs(), PtrDynList< Foam::profilingInformation >::push_back(), boundaryMesh::read(), lagrangianFieldDecomposer::readFieldFields(), fieldsDistributor::readFields(), lagrangianFieldDecomposer::readFields(), polyMesh::readUpdate(), refinementHistory::refinementHistory(), fvMeshTools::removeEmptyPatches(), structuredRenumber::renumber(), fvMeshSubset::reset(), faFieldDecomposer::reset(), Foam::rewritePatchLabels(), ReynoldsAnalogy::rho(), Foam::selectPatchFaces(), faBoundaryMesh::setGroup(), ZoneMesh< cellZone, polyMesh >::setGroup(), polyBoundaryMesh::setGroup(), removeCells::setRefinement(), meshCutAndRemove::setRefinement(), coordSetWriter::setTracks(), Foam::shuffle(), singleCellFvMesh::singleCellFvMesh(), Foam::sortedOrder(), triSurface::sortedZones(), surfZoneIOList::surfZoneIOList(), syncTools::syncFaceList(), blockMesh::topology(), streamLineBase::trimToBox(), GeometricBoundaryField< Foam::vector, Foam::fvPatchField, Foam::volMesh >::types(), liquidFilmBase::Up(), trackingInverseDistance::update(), cellVolumeWeight::update(), sampledFaceZone::update(), inverseDistance::update(), oversetFvMeshBase::updateAddressing(), optimisationType::updateGradientsAndValues(), lduPrimitiveMeshAssembly::updateMaps(), lduMatrix::updateMatrixInterfaces(), faMesh::updateMesh(), liquidFilmBase::Uw(), Foam::vertices(), wallLayerCells::wallLayerCells(), sensitivityVolBSplines::write(), sensitivityVolBSplinesFI::write(), OFstreamCollator::write(), multiFieldValue::write(), faBoundaryMesh::writeData(), polyBoundaryMesh::writeData(), externalCoupled::writeGeometry(), cellZoneSet::writeObject(), pointZoneSet::writeObject(), faceZoneSet::writeObject(), gltfWriter::writeTemplate(), gltfWriter::writeTemplate_animate(), Foam::ensightOutput::writeVolField(), and ZoneMesh< cellZone, polyMesh >::ZoneMesh().

◆ empty()

bool empty ( ) const
inlinenoexcept

◆ front() [1/2]

T & front ( )
inline

Reference to the first element of the list.

Definition at line 175 of file UPtrListI.H.

Referenced by UPtrList< const Foam::UList >::first().

Here is the caller graph for this function:

◆ front() [2/2]

const T & front ( ) const
inline

Reference to first element of the list.

Definition at line 182 of file UPtrListI.H.

◆ back() [1/2]

T & back ( )
inline

Reference to the last element of the list.

Definition at line 189 of file UPtrListI.H.

Referenced by UPtrList< const Foam::UList >::last().

Here is the caller graph for this function:

◆ back() [2/2]

const T & back ( ) const
inline

Reference to the last element of the list.

Definition at line 196 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 113 of file UPtrListI.H.

Referenced by coordinateSystems::cfind(), and boundaryRadiationProperties::faceZoneIds().

Here is the caller graph for this function:

◆ get() [1/2]

const T * get ( 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 fvMeshAdder::add(), ZoneMesh< cellZone, polyMesh >::cfindZone(), Cloud< passivePositionParticle >::move(), RecycleInteraction< CloudType >::postEvolve(), coordSetWriter::setTracks(), and lduPrimitiveMeshAssembly::update().

Here is the caller graph for this function:

◆ get() [2/2]

T * get ( const label  i)
inline

Return 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 127 of file UPtrListI.H.

◆ set() [1/2]

const T * set ( const label  i) const
inline

◆ clear()

void clear ( )
inline

Set list size to zero.

Definition at line 154 of file UPtrListI.H.

Referenced by gltfWriter::writeTemplate_animate().

Here is the caller graph for this function:

◆ resize()

void resize ( const label  newLen)
inline

Change the size of the list.

New entries are initialized to nullptr.

Definition at line 203 of file UPtrListI.H.

Referenced by UPtrList< const Foam::UList >::setSize().

Here is the caller graph for this function:

◆ setSize()

void setSize ( const label  n)
inline

Alias for resize()

Definition at line 337 of file UPtrList.H.

Referenced by viewFactor::initialise(), fvMatrix< Type >::setInterfaces(), and oversetFvMeshBase::updateAddressing().

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 38 of file UPtrList.C.

◆ push_back() [1/2]

void push_back ( T ptr)
inline

Append an element to the end of the list.

Definition at line 210 of file UPtrListI.H.

Referenced by UPtrList< const Foam::UList >::append().

Here is the caller graph for this function:

◆ push_back() [2/2]

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

Move append another list to the end of this list.

Definition at line 217 of file UPtrListI.H.

◆ swap()

void swap ( UPtrList< T > &  list)
inline

Swap content.

Definition at line 161 of file UPtrListI.H.

◆ transfer()

void transfer ( UPtrList< T > &  list)
inline

Transfer contents into this list and annul the argument.

Definition at line 168 of file UPtrListI.H.

Referenced by wallDistData< TransferType >::correct(), directionalMeshWave::correct(), and meshWave::correct().

Here is the caller graph for this function:

◆ 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 141 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 62 of file UPtrList.C.

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

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 111 of file UPtrList.C.

Referenced by Foam::shuffle().

Here is the caller graph for this function:

◆ checkNonNull()

void checkNonNull ( ) const
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

◆ operator[]() [2/2]

T & operator[] ( const label  i)
inline

Return reference to the element.

Definition at line 251 of file UPtrListI.H.

◆ FOAM_DEPRECATED_FOR()

FOAM_DEPRECATED_FOR ( 2022-  09,
get(),
set() or test() methods"   
) const
inline

Deprecated(2022-09) - same as get()

Deprecated:
(2022-09) - use get(), set() or test() methods

Definition at line 416 of file UPtrList.H.

◆ operator=() [1/2]

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

Copy assignment (shallow copies addresses)

Definition at line 662 of file UPtrListI.H.

◆ operator=() [2/2]

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

Move assignment.

Definition at line 669 of file UPtrListI.H.

◆ begin_ptr()

T** begin_ptr ( )
inlinenoexcept

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

Definition at line 567 of file UPtrList.H.

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 572 of file UPtrList.H.

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 613 of file UPtrListI.H.

Referenced by ZoneMesh< cellZone, polyMesh >::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 621 of file UPtrListI.H.

Referenced by ZoneMesh< cellZone, polyMesh >::cfindZone().

Here is the caller graph for this function:

◆ cbegin()

Foam::UPtrList< T >::const_iterator cbegin ( ) const
inlinenoexcept

Return const_iterator to begin of UPtrList traversal.

Definition at line 629 of file UPtrListI.H.

◆ cend()

Foam::UPtrList< T >::const_iterator cend ( ) const
inlinenoexcept

Return const_iterator beyond end of UPtrList traversal.

Definition at line 637 of file UPtrListI.H.

◆ begin() [2/2]

Foam::UPtrList< T >::const_iterator begin ( ) const
inlinenoexcept

Return const_iterator to begin of UPtrList traversal.

Definition at line 645 of file UPtrListI.H.

◆ end() [2/2]

Foam::UPtrList< T >::const_iterator end ( ) const
inlinenoexcept

Return const_iterator beyond end of UPtrList traversal.

Definition at line 653 of file UPtrListI.H.

◆ first() [1/2]

T& first ( )
inline

Reference to the first element of the list.

FOAM_DEPRECATED_FOR(2022-10, "front()")

Definition at line 625 of file UPtrList.H.

◆ first() [2/2]

const T& first ( ) const
inline

Return reference to first element of the list.

FOAM_DEPRECATED_FOR(2022-10, "front()")

Definition at line 632 of file UPtrList.H.

◆ last() [1/2]

T& last ( )
inline

Return reference to the last element of the list.

FOAM_DEPRECATED_FOR(2022-10, "back()")

Definition at line 639 of file UPtrList.H.

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

Here is the caller graph for this function:

◆ last() [2/2]

const T& last ( ) const
inline

Return reference to the last element of the list.

FOAM_DEPRECATED_FOR(2022-10, "back()")

Definition at line 646 of file UPtrList.H.

◆ append() [1/2]

void append ( T ptr)
inline

Append an element to the end of the list.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 653 of file UPtrList.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.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 660 of file UPtrList.H.

Friends And Related Function Documentation

◆ operator

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

Write UPtrList to Ostream.

Member Data Documentation

◆ ptrs_

Detail::PtrListDetail<T> ptrs_
protected

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