A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used for subscript bounds checking, etc. More...
Inherited by PtrList< T >, PtrList< blockEdge >, PtrList< blockFace >, PtrList< blockVertex >, PtrList< bodyMesh >, PtrList< cellZone >, PtrList< CloudFunctionObject< CloudType > >, PtrList< CloudFunctionObject< MomentumCloud< CloudType > > >, PtrList< CloudFunctionObject< MomentumCloud< Foam::DSMCCloud > > >, PtrList< const Foam::lduInterface >, PtrList< diffusiveMassTransferModel >, PtrList< DimensionedField< scalar, triSurfacePointGeoMesh > >, PtrList< dragModel >, PtrList< ejectionModel >, PtrList< entry >, PtrList< extendedFeatureEdgeMesh >, PtrList< faceZone >, PtrList< Field< Type > >, PtrList< Foam::AMIInterpolation >, PtrList< Foam::cellModel >, PtrList< Foam::cellSizeAndAlignmentControl >, PtrList< Foam::cellSizeFunction >, PtrList< Foam::coordinateSystem >, PtrList< Foam::coordSet >, PtrList< Foam::coupledFacePair >, 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::ensightPart >, PtrList< Foam::extendedFeatureEdgeMesh >, PtrList< Foam::Field >, PtrList< Foam::Field< LUType > >, PtrList< Foam::Field< scalar > >, PtrList< Foam::Field< Type > >, PtrList< Foam::FieldField< Foam::Field, scalar > >, PtrList< Foam::Function2< scalar > >, PtrList< Foam::functionObjects::fieldAverageItem >, PtrList< Foam::fvFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::fvMesh >, PtrList< Foam::fvPatchField< Foam::Vector > >, PtrList< Foam::fvPatchField< scalar > >, PtrList< Foam::fvPatchField< Type > >, PtrList< Foam::fvsPatchField< Foam::FvWallInfoData > >, PtrList< Foam::fvsPatchField< Type > >, PtrList< Foam::GeometricBoundaryField >, PtrList< Foam::HashSet >, PtrList< Foam::ignitionSite >, PtrList< Foam::indexedOctree >, PtrList< Foam::indexedOctree< Foam::treeDataEdge > >, PtrList< Foam::indexedOctree< Foam::treeDataPoint > >, PtrList< Foam::lduMatrix >, PtrList< Foam::lduPrimitiveMesh >, PtrList< Foam::liquidProperties >, PtrList< Foam::List >, PtrList< Foam::List< char > >, PtrList< Foam::mappedPatchBase >, PtrList< Foam::OFstream >, PtrList< Foam::phaseInterface >, PtrList< Foam::pimpleNoLoopControl >, PtrList< Foam::pointFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::pointMesh >, PtrList< Foam::pointPatchField< Foam::Vector > >, PtrList< Foam::pointPatchField< scalar > >, PtrList< Foam::pointPatchField< Type > >, PtrList< Foam::PrimitivePatch >, PtrList< Foam::procLduInterface >, PtrList< Foam::PtrList< Foam::dimensioned > >, PtrList< Foam::PtrList< Foam::lduInterfaceField > >, PtrList< Foam::radiationModels::radiativeIntensityRay >, PtrList< Foam::RBD::joint >, PtrList< Foam::RBD::restraint >, PtrList< Foam::RBD::rigidBody >, PtrList< Foam::RBD::subBody >, PtrList< Foam::repatchPatch >, PtrList< Foam::sixDoFRigidBodyMotionConstraint >, PtrList< Foam::sixDoFRigidBodyMotionRestraint >, PtrList< Foam::solidBodyMotionFunction >, PtrList< Foam::solidNoLoopControl >, PtrList< Foam::solidProperties >, PtrList< Foam::surfaceZonesInfo >, PtrList< Foam::Time >, PtrList< Foam::UPtrList >, PtrList< Foam::waveModel >, PtrList< force >, PtrList< functionObject >, PtrList< fvConstraint >, PtrList< fvModel >, PtrList< fvPatchField< scalar > >, PtrList< fvPatchField< symmTensor > >, PtrList< fvPatchField< tensor > >, PtrList< fvPatchField< vector > >, PtrList< fvPatchMapper >, PtrList< fvsPatchField< scalar > >, PtrList< fvsPatchField< vector > >, PtrList< heatTransferModel >, PtrList< InjectionModel< CloudType > >, PtrList< InjectionModel< Foam::MomentumCloud< CloudType > > >, PtrList< InjectionModel< Foam::MomentumCloud< Foam::DSMCCloud > > >, PtrList< joint >, PtrList< liftModel >, PtrList< ModelType >, PtrList< MRFZone >, PtrList< pairPotential >, PtrList< parcelCloud >, PtrList< ParticleForce< CloudType > >, PtrList< ParticleForce< MomentumCloud< CloudType > > >, PtrList< ParticleForce< MomentumCloud< Foam::DSMCCloud > > >, PtrList< PatchField< Type > >, PtrList< phaseTransferModel >, PtrList< pointPatchField< scalar > >, PtrList< pointPatchField< Type > >, PtrList< pointPatchField< vector > >, PtrList< pointPatchMapper >, PtrList< pointZone >, PtrList< polyMeshModifier >, PtrList< porosityModel >, PtrList< profileModel >, PtrList< Reaction< Foam::sutherlandTransport > >, PtrList< Reaction< ThermoType > >, PtrList< regionModelFunctionObject >, PtrList< sampledSet >, PtrList< sampledSurface >, PtrList< searchableSurface >, PtrList< tetherPotential >, PtrList< ThermoType >, PtrList< transferModel >, PtrList< turbulentDispersionModel >, PtrList< virtualMassModel >, PtrList< wallLubricationModel >, and PtrList< ZoneType >.
Classes | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
class | iterator |
An STL iterator. More... | |
Public Types | |
typedef T | value_type |
Type of values the UPtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into UPtrList::value_type objects. More... | |
typedef const T & | const_reference |
Type that can be used for storing into constant UPtrList::value_type. More... | |
Public Member Functions | |
UPtrList () | |
Null Constructor. More... | |
UPtrList (const label) | |
Construct with size specified. More... | |
UPtrList (UPtrList< T > &, bool reuse) | |
Construct as copy or re-use as specified. More... | |
label | size () const |
Return the number of elements in the UPtrList. More... | |
bool | empty () const |
Return true if the UPtrList is empty (ie, size() is zero) More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | resize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | clear () |
Clear the UPtrList, i.e. set size to zero. More... | |
void | transfer (UPtrList< T > &) |
Transfer the contents of the argument UPtrList into this. More... | |
bool | set (const label) const |
Is element set. More... | |
T * | set (const label, T *) |
Set element. Return old element (can be nullptr). More... | |
void | reorder (const labelUList &oldToNew) |
Reorders elements. Ordering does not have to be done in. More... | |
void | shuffle (const labelUList &newToOld) |
Reorders elements. Ordering does not have to be done in. More... | |
template<class T2 > | |
UPtrList< T2 > | convert () |
Convert to list of different pointer type. More... | |
template<class T2 > | |
UPtrList< const T2 > | convert () const |
Convert to list of different pointer type. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
iterator | begin () |
Return an iterator to begin traversing the UPtrList. More... | |
iterator | end () |
Return an iterator to end traversing the UPtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the UPtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the UPtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the UPtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the UPtrList. More... | |
template<class T2 > | |
Foam::UPtrList< T2 > | convert () |
template<class T2 > | |
Foam::UPtrList< const T2 > | convert () const |
Friends | |
class | PtrList< T > |
Declare friendship with the UPtrList class. More... | |
class | iterator |
Ostream & | operator (Ostream &, const UPtrList< T > &) |
Write UPtrList to Ostream. More... | |
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used for subscript bounds checking, etc.
The element operator [] returns a reference to the object rather than a pointer. Storage is not allocated during construction or use but is supplied to the constructor as an argument.
Definition at line 54 of file UPtrList.H.
typedef T value_type |
Type of values the UPtrList contains.
Definition at line 178 of file UPtrList.H.
Type that can be used for storing into UPtrList::value_type objects.
Definition at line 181 of file UPtrList.H.
typedef const T& const_reference |
Type that can be used for storing into constant UPtrList::value_type.
objects
Definition at line 185 of file UPtrList.H.
UPtrList | ( | ) |
Null Constructor.
Definition at line 31 of file UPtrList.C.
Construct with size specified.
Definition at line 38 of file UPtrList.C.
Construct as copy or re-use as specified.
Definition at line 45 of file UPtrList.C.
|
inline |
Return the number of elements in the UPtrList.
Definition at line 29 of file UPtrListI.H.
Referenced by MRFZoneList::absolute(), singleProcessorFaceSetsConstraint::add(), fvMeshAdder::add(), polyMeshAdder::add(), surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), snappyLayerDriver::addLayers(), meshRefinement::addMeshedPatch(), fvMeshTools::addPatch(), pointMesh::addPatch(), polyMesh::addPatch(), GAMGAgglomeration::agglomerateLduAddressing(), extendedEdgeMesh::allNearestFeatureEdges(), patchFluxToFace::applyToSet(), attachPolyTopoChanger::attach(), Foam::average(), interpolationCellPointWallModified< Type >::calcPointField(), addPatchCellLayer::calcSidePatch(), polyTopoChange::changeMesh(), repatchPolyTopoChanger::changePatchID(), searchableSurfaces::checkClosed(), polyBoundaryMesh::checkDefinition(), polyBoundaryMesh::checkParallelSync(), searchableSurfaces::checkSizes(), profileModelList::connectBlades(), pointPatchDist::correct(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::correct(), Foam::CorrectPhi(), epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), omegaWallFunctionFvPatchScalarField::createAveragingWeights(), motionSmootherAlgo::curPoints(), structuredDecomp::decompose(), domainDecomposition::decompose(), decompositionMethod::decompose(), fvMeshDistribute::distribute(), snappyLayerDriver::doLayers(), ejectionModelList::ejectionModelList(), engine::engine(), Foam::facePointN(), polyBoundaryMesh::findPatchIDs(), forceList::forceList(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), Foam::gAverage(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::GeometricBoundaryField(), surfaceZonesInfo::getAllClosedNamedSurfaces(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getUnclosedNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), GAMGProcAgglomeration::globalCellCells(), basicThermo::heBoundaryBaseTypes(), hexRef8Data::hexRef8Data(), ejectionModelList::info(), transferModelList::info(), lduMatrix::initMatrixInterfaces(), fvBoundaryMesh::interfaces(), singleCellFvMesh::interpolate(), volPointInterpolation::interpolateUnconstrained(), interRegionExplicitPorositySource::interRegionExplicitPorositySource(), rigidBodyModel::join(), layerParameters::layerParameters(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), LUscalarMatrix::LUscalarMatrix(), meshRefinement::makeDisplacementField(), polyTopoChange::makeMesh(), meshToMesh::mapAndOpTgtToSrc(), meshToMesh::mapSrcToTgt(), fvMeshAdder::MapSurfaceFields(), meshToMesh::mapTgtToSrc(), fvMeshAdder::MapVolFields(), Foam::max(), Foam::meshEdge(), MeshedSurface< Foam::face >::MeshedSurface(), meshTriangulation::meshTriangulation(), MeshZones< cellZone, polyMesh >::MeshZones(), Foam::min(), polyTopoChanger::names(), MeshZones< cellZone, polyMesh >::names(), polyBoundaryMesh::names(), regionModel::nbrCoupledPatchID(), extendedEdgeMesh::nearestFeatureEdgeByType(), FieldField< Foam::fvPatchField, scalar >::NewCalculatedType(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), nonConformalBoundary::nonConformalNonCoupledPatchIDs(), AMIInterpolation::normaliseWeights(), potential::nPairPotentials(), processorRunTimes::nProcs(), procLess::operator()(), listPlusEqOp< T >::operator()(), Foam::operator<<(), PtrList< transferModel >::operator=(), phaseSystem::otherPhase(), patchEjection::patchEjection(), patchDistMethod::patchTypes(), polyBoundaryMesh::physicalTypes(), polyBoundaryMesh::polyBoundaryMesh(), polyMesh::polyMesh(), Foam::polyMeshUnMergeCyclics(), Foam::polyMeshZipUpCells(), polyTopoChange::polyTopoChange(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), fvMeshDistribute::printCoupleInfo(), fvMeshDistribute::printMeshInfo(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::q(), nonUnityLewisEddyDiffusivity< TurbulenceThermophysicalTransportModel >::q(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::q(), thermalBaffleModel::read(), kOmegaSSTSato< BasicMomentumTransportModel >::read(), repatchMesh::read(), polyMesh::readUpdate(), ensightParts::recalculate(), refinementHistory::refinementHistory(), refinementFeatures::regionEdgeTrees(), MRFZoneList::relative(), SloanRenumber::renumber(), structuredRenumber::renumber(), pointBoundaryMesh::reset(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::reset(), lduMatrix::residual(), triSurfaceMesh::sampleField(), sampledSets::sampleLocalType(), sampledSurfaces::sampleType(), fvMeshSubset::setCellSubset(), polyBoundaryMesh::setGroup(), fvMeshSubset::setLargeCellSubset(), removeCells::setRefinement(), meshCutAndRemove::setRefinement(), singleCellFvMesh::singleCellFvMesh(), ensightParts::size(), pairPatchAgglomeration::size(), GAMGAgglomeration::size(), rigidBodyMeshMotion::solve(), Foam::sum(), Foam::sumMag(), AMIInterpolation::sumWeights(), surfacePatchIOList::surfacePatchIOList(), surfZoneIOList::surfZoneIOList(), ParticleStressModel::tau(), rigidBodyMeshMotion::topoChange(), polyTopoChanger::types(), MeshZones< cellZone, polyMesh >::types(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::types(), polyBoundaryMesh::types(), lduMatrix::updateMatrixInterfaces(), Foam::vertices(), wallLayerCells::wallLayerCells(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), OFstreamCollator::write(), polyBoundaryMesh::writeData(), ensightParts::writeField(), cellZoneSet::writeObject(), pointZoneSet::writeObject(), faceZoneSet::writeObject(), searchableSurfaces::writeStats(), meshRefinement::zonify(), externalCoupledMixedFvPatchField< scalar >::~externalCoupledMixedFvPatchField(), subCycleFields< GeometricField >::~subCycleFields(), and thermalBaffle::~thermalBaffle().
|
inline |
Return true if the UPtrList is empty (ie, size() is zero)
Definition at line 36 of file UPtrListI.H.
Referenced by NamedEnum< compressibleField, 8 >::names(), and pimpleMultiRegionControl::time().
|
inline |
Return reference to the first element of the list.
Definition at line 43 of file UPtrListI.H.
Referenced by functionObjectList::findDict(), and functionObjectList::readFunctionObject().
|
inline |
Return reference to first element of the list.
Definition at line 50 of file UPtrListI.H.
|
inline |
Return reference to the last element of the list.
Definition at line 57 of file UPtrListI.H.
Referenced by composite::jcalc().
|
inline |
Return reference to the last element of the list.
Definition at line 64 of file UPtrListI.H.
void setSize | ( | const label | newSize | ) |
|
inline |
Reset size of UPtrList. This can only be used to set the size.
of an empty UPtrList, extend a UPtrList, remove entries from the end of a UPtrList
Definition at line 71 of file UPtrListI.H.
Referenced by kOmegaSSTSato< BasicMomentumTransportModel >::read().
void clear | ( | ) |
Clear the UPtrList, i.e. set size to zero.
Definition at line 80 of file UPtrList.C.
Transfer the contents of the argument UPtrList into this.
UPtrList and annul the argument list
Definition at line 87 of file UPtrList.C.
Is element set.
Definition at line 78 of file UPtrListI.H.
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), GAMGAgglomeration::combineLevels(), UPtrList< Foam::diameterModels::sizeGroup >::convert(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), lduMatrix::initMatrixInterfaces(), fvBoundaryMesh::interfaces(), lduPrimitiveMesh::lduPrimitiveMesh(), LUscalarMatrix::LUscalarMatrix(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), Foam::operator<<(), procLduMatrix::procLduMatrix(), kOmegaSSTSato< BasicMomentumTransportModel >::read(), lduMatrix::residual(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::scalarInterfaces(), symGaussSeidelSmoother::smooth(), GaussSeidelSmoother::smooth(), nonBlockingGaussSeidelSmoother::smooth(), lduMatrix::sumA(), lduMatrix::updateMatrixInterfaces(), and domainDecomposition::writeComplete().
Set element. Return old element (can be nullptr).
No checks on new element
Definition at line 85 of file UPtrListI.H.
void reorder | ( | const labelUList & | oldToNew | ) |
Reorders elements. Ordering does not have to be done in.
ascending or descending order. Reordering has to be unique. (is shuffle)
Definition at line 94 of file UPtrList.C.
void shuffle | ( | const labelUList & | newToOld | ) |
Reorders elements. Ordering does not have to be done in.
ascending or descending order. Reordering has to be unique. Note: can create unset elements
Definition at line 142 of file UPtrList.C.
UPtrList<T2> convert | ( | ) |
Convert to list of different pointer type.
UPtrList<const T2> convert | ( | ) | const |
Convert to list of different pointer type.
Return element const reference.
Definition at line 96 of file UPtrListI.H.
Referenced by MRFZoneList::addCoriolis(), porosityModelList::addResistance(), parcelCloudList::ap(), MRFZoneList::centrifugalAcceleration(), profileModelList::connectBlades(), forceList::correct(), transferModelList::correct(), ejectionModelList::correct(), MRFZoneList::correctBoundaryVelocity(), MRFZoneList::DDt(), parcelCloudList::distribute(), functionObjectList::end(), parcelCloudList::Ep(), parcelCloudList::evolve(), functionObjectList::execute(), pointBoundaryMesh::findIndices(), parcelCloudList::hsCoeff(), parcelCloudList::hsTrans(), ejectionModelList::info(), transferModelList::info(), parcelCloudList::info(), MRFZoneList::makeAbsolute(), MRFZoneList::makeRelative(), functionObjectList::mapMesh(), pointBoundaryMesh::movePoints(), functionObjectList::movePoints(), regionModelFunctionObjectList::postEvolveRegion(), regionModelFunctionObjectList::preEvolveRegion(), porosityModelList::read(), MRFZoneList::read(), refinementFeatures::regionEdgeTrees(), MRFZoneList::relative(), parcelCloudList::Sh(), parcelCloudList::sigmap(), parcelCloudList::Srho(), functionObjectList::start(), parcelCloudList::storeGlobalPositions(), parcelCloudList::SU(), parcelCloudList::SYi(), parcelCloudList::theta(), pointBoundaryMesh::topoChange(), functionObjectList::topoChange(), parcelCloudList::UCoeff(), MRFZoneList::update(), parcelCloudList::UTrans(), porosityModelList::writeData(), and MRFZoneList::writeData().
Return element reference.
Definition at line 112 of file UPtrListI.H.
Return element const pointer.
Definition at line 128 of file UPtrListI.H.
|
inline |
Return an iterator to begin traversing the UPtrList.
Definition at line 292 of file UPtrListI.H.
Referenced by LUscalarMatrix::LUscalarMatrix().
|
inline |
Return an iterator to end traversing the UPtrList.
Definition at line 300 of file UPtrListI.H.
Referenced by searchableSurfaces::checkIntersection(), and searchableSurfaces::regionNames().
|
inline |
Return an const_iterator to begin traversing the UPtrList.
Definition at line 505 of file UPtrListI.H.
|
inline |
Return an const_iterator to end traversing the UPtrList.
Definition at line 513 of file UPtrListI.H.
|
inline |
Return an const_iterator to begin traversing the UPtrList.
Definition at line 489 of file UPtrListI.H.
|
inline |
Return an const_iterator to end traversing the UPtrList.
Definition at line 497 of file UPtrListI.H.
Foam::UPtrList<T2> convert | ( | ) |
Definition at line 163 of file UPtrList.C.
Foam::UPtrList<const T2> convert | ( | ) | const |
Definition at line 176 of file UPtrList.C.
Declare friendship with the UPtrList class.
Definition at line 77 of file UPtrList.H.
|
friend |
Definition at line 192 of file UPtrList.H.