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 DictionaryBase< UPtrList< T >, T >, PtrList< Foam::fvMesh >, PtrList< Foam::RBD::joint >, PtrList< Foam::List< char > >, PtrList< Foam::List >, PtrList< polyMeshModifier >, PtrList< pairPotential >, PtrList< functionObject >, PtrList< Foam::ignitionSite >, PtrList< Foam::diameterModels::nucleationModel >, PtrList< Foam::diameterModels::breakupModel >, PtrList< blockEdge >, PtrList< Foam::RBD::restraint >, PtrList< ModelType >, PtrList< extendedFeatureEdgeMesh >, PtrList< Foam::sixDoFRigidBodyMotionConstraint >, PtrList< const Foam::lduInterface >, PtrList< Foam::cellEdgeAddressingData >, PtrList< blockFace >, PtrList< Foam::RBD::subBody >, PtrList< porosityModel >, PtrList< Foam::indexedOctree >, PtrList< Foam::RBD::rigidBody >, PtrList< Foam::UPtrList >, PtrList< profileModel >, PtrList< Foam::fvFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::functionObjects::fieldAverageItem >, PtrList< Foam::FieldField< Foam::Field, scalar > >, PtrList< Foam::Field >, PtrList< searchableSurface >, PtrList< sampledSet >, PtrList< Foam::Time >, PtrList< Foam::liquidProperties >, PtrList< Foam::diameterModels::binaryBreakupModel >, PtrList< Foam::PtrList< Foam::dimensioned > >, PtrList< entry >, PtrList< parcelCloud >, PtrList< Foam::solidProperties >, PtrList< Foam::solver >, PtrList< Foam::DimensionedField >, PtrList< Foam::diameterModels::populationBalanceModel >, PtrList< Foam::fvMatrix >, PtrList< Foam::surfaceZonesInfo >, PtrList< Foam::patchToPatchStabilisation >, PtrList< Foam::diameterModels::IATEsource >, PtrList< sampledSurface >, PtrList< joint >, PtrList< Foam::coupledFacePair >, PtrList< Foam::procLduInterface >, PtrList< Foam::PrimitivePatch >, PtrList< Foam::dictionary >, PtrList< Foam::OFstream >, PtrList< ParticleForce< CloudType > >, PtrList< Foam::radiationModels::radiativeIntensityRay >, PtrList< Foam::sutherlandTransport >, PtrList< InjectionModel< CloudType > >, PtrList< Field< Type > >, PtrList< Foam::patchToPatch >, PtrList< Foam::coordSet >, PtrList< tetherPotential >, PtrList< fvPatchMapper >, PtrList< ZoneType >, PtrList< Foam::waveModel >, PtrList< Foam::sixDoFRigidBodyMotionRestraint >, PtrList< Foam::coordinateSystem >, PtrList< Foam::mappedInternalPatchBase >, PtrList< Foam::solidBodyMotionFunction >, PtrList< Foam::phaseInterface >, PtrList< Foam::decompositionConstraint >, PtrList< Foam::lduMatrix >, PtrList< pointPatchMapper >, PtrList< Foam::repatchPatch >, PtrList< Foam::diameterModels::driftModel >, PtrList< Foam::cellModel >, PtrList< blockVertex >, PtrList< CloudFunctionObject< CloudType > >, PtrList< Foam::indexedOctree< Foam::treeDataPoint > >, PtrList< Foam::pointFieldDecomposer::patchFieldDecomposer >, PtrList< Foam::HashSet >, PtrList< Foam::PtrList< Foam::lduInterfaceField > >, PtrList< Foam::Function2< scalar > >, PtrList< Reaction< ThermoType > >, PtrList< Foam::decompositionMethod >, PtrList< Foam::distributions::normal >, PtrList< Foam::diameterModels::coalescenceModel >, PtrList< Foam::dimensioned >, PtrList< ThermoType >, PtrList< meshingSurface >, PtrList< bodyMesh >, PtrList< Foam::indexedOctree< Foam::treeDataEdge > >, PtrList< Foam::ensightPart >, PtrList< Foam::GeometricBoundaryField >, PtrList< Foam::lduPrimitiveMesh >, PtrList< MRFZone >, and PtrList< T >.
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... | |
T * | operator() (const label) |
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 PtrList 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 65 of file UPtrList.H.
typedef T value_type |
Type of values the UPtrList contains.
Definition at line 181 of file UPtrList.H.
Type that can be used for storing into UPtrList::value_type objects.
Definition at line 184 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 188 of file UPtrList.H.
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 singleProcessorFaceSetsConstraint::add(), fvMeshAdder::add(), polyMeshAdder::add(), surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), snappyLayerDriver::addLayers(), meshRefinement::addMeshedPatch(), pointMesh::addPatch(), fvMeshTools::addPatch(), GAMGAgglomeration::agglomerateLduAddressing(), extendedEdgeMesh::allNearestFeatureEdges(), MomentumTransferPhaseSystem< BasePhaseSystem >::alphaDByAf(), attachPolyTopoChanger::attach(), AveragingMethod< Type >::AveragingMethod(), nearWallFields::calcAddressing(), addPatchCellLayer::calcSidePatch(), fvMotionSolver::cellMotionBoundaryTypes(), polyTopoChange::changeMesh(), polyBoundaryMesh::checkDefinition(), polyBoundaryMesh::checkParallelSync(), GAMGAgglomeration::compactLevels(), fvMeshStitcher::connect(), pointPatchDist::correct(), epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), omegaWallFunctionFvPatchScalarField::createAveragingWeights(), motionSmootherAlgo::curPoints(), cutPolyIsoSurface::cutPolyIsoSurface(), structuredDecomp::decompose(), decompositionMethod::decompose(), fvMeshDistribute::distribute(), snappyLayerDriver::doLayers(), engine::engine(), polyBoundaryMesh::findPatchIDs(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), surfaceZonesInfo::getAllClosedNamedSurfaces(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getUnclosedNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), GAMGProcAgglomeration::globalCellCells(), basicThermo::heBoundaryBaseTypes(), hexRef8Data::hexRef8Data(), LocalInteraction< CloudType >::info(), lduMatrix::initMatrixInterfaces(), singleCellFvMesh::interpolate(), volPointInterpolation::interpolateUnconstrained(), interRegionExplicitPorositySource::interRegionExplicitPorositySource(), rigidBodyModel::join(), layerParameters::layerParameters(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), LUscalarMatrix::LUscalarMatrix(), meshRefinement::makeDisplacementField(), polyTopoChange::makeMesh(), MRFPatchField::MRFzone(), polyTopoChanger::names(), polyBoundaryMesh::names(), MeshZones< ZoneType, MeshType >::names(), extendedEdgeMesh::nearestFeatureEdgeByType(), lduPrimitiveMesh::nonBlockingSchedule(), nonConformalBoundary::nonConformalNonCoupledPatchIDs(), processorRunTimes::nProcs(), Foam::operator<<(), PtrList< T >::operator=(), patchDistMethod::patchTypes(), polyBoundaryMesh::physicalTypes(), polyBoundaryMesh::polyBoundaryMesh(), polyMesh::polyMesh(), Foam::polyMeshUnMergeCyclics(), polyTopoChange::polyTopoChange(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), fvMeshDistribute::printMeshInfo(), PtrListDictionary< T >::PtrListDictionary(), repatchMesh::read(), polyMesh::readUpdate(), ensightParts::recalculate(), refinementHistory::refinementHistory(), refinementSurfaces::refinementSurfaces(), structuredRenumber::renumber(), pointBoundaryMesh::reset(), GeometricBoundaryField< Type, PatchField, GeoMesh >::reset(), filmCloudTransfer::resetFromCloudFields(), lduMatrix::residual(), triSurfaceMesh::sampleField(), sampledSurfaces::sampleType(), fvMeshSubset::setCellSubset(), polyBoundaryMesh::setGroup(), fvMeshSubset::setLargeCellSubset(), meshCutAndRemove::setRefinement(), removeCells::setRefinement(), singleCellFvMesh::singleCellFvMesh(), ensightParts::size(), phaseSystem::solve(), fvMeshToFvMesh::srcToTgt(), surfacePatchIOList::surfacePatchIOList(), surfZoneIOList::surfZoneIOList(), fvMesh::swap(), polyMesh::swap(), polyTopoChanger::types(), GeometricBoundaryField< Type, PatchField, GeoMesh >::types(), polyBoundaryMesh::types(), MeshZones< ZoneType, MeshType >::types(), lduMatrix::updateMatrixInterfaces(), UPtrListDictionary< T >::UPtrListDictionary(), Foam::vertices(), populationBalanceSizeDistribution::write(), OFstreamCollator::write(), polyBoundaryMesh::writeData(), ensightParts::writeField(), cellZoneSet::writeObject(), faceZoneSet::writeObject(), pointZoneSet::writeObject(), meshRefinement::zonify(), and subCycleFields< GeometricField >::~subCycleFields().
|
inline |
Return true if the UPtrList is empty (ie, size() is zero)
Definition at line 36 of file UPtrListI.H.
|
inline |
Return reference to the first element of the list.
Definition at line 43 of file UPtrListI.H.
Referenced by blendingMethod::constant().
|
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.
|
inline |
Return reference to the last element of the list.
Definition at line 64 of file UPtrListI.H.
void setSize | ( | const label | newSize | ) |
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 54 of file UPtrList.C.
References clear().
Referenced by fvMesh::curFields(), fvMesh::fields(), lduPrimitiveMesh::lduPrimitiveMesh(), phaseSystem::solve(), and UPtrListDictionary< T >::UPtrListDictionary().
|
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.
References setSize().
Referenced by phaseSystem::phaseSystem().
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.
|
inline |
Is element set.
Definition at line 78 of file UPtrListI.H.
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), GAMGAgglomeration::combineLevels(), GAMGAgglomeration::compactLevels(), UPtrList< T >::convert(), fvMesh::curFields(), fvMesh::fields(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), hexRef8Data::hexRef8Data(), lduMatrix::initMatrixInterfaces(), fvBoundaryMesh::interfaces(), GeometricBoundaryField< Type, PatchField, GeoMesh >::interfaces(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), Foam::operator<<(), phaseSystem::phaseSystem(), procLduMatrix::procLduMatrix(), lduMatrix::residual(), GeometricBoundaryField< Type, PatchField, GeoMesh >::scalarInterfaces(), nonBlockingGaussSeidelSmoother::smooth(), GaussSeidelSmoother::smooth(), symGaussSeidelSmoother::smooth(), phaseSystem::solve(), 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.
References Foam::T().
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.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, UList< T >::size(), and Foam::T().
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 sampledSets::sampleLocalType(), and sampledSurfaces::sampleLocalType().
Return element reference.
Definition at line 112 of file UPtrListI.H.
Return element const pointer.
Definition at line 128 of file UPtrListI.H.
Return element const pointer.
Definition at line 135 of file UPtrListI.H.
|
inline |
Return an iterator to begin traversing the UPtrList.
Definition at line 299 of file UPtrListI.H.
|
inline |
Return an iterator to end traversing the UPtrList.
Definition at line 307 of file UPtrListI.H.
References UList< T >::end().
|
inline |
Return an const_iterator to begin traversing the UPtrList.
Definition at line 512 of file UPtrListI.H.
References UList< T >::begin().
|
inline |
Return an const_iterator to end traversing the UPtrList.
Definition at line 520 of file UPtrListI.H.
References UList< T >::end().
|
inline |
Return an const_iterator to begin traversing the UPtrList.
Definition at line 496 of file UPtrListI.H.
References UList< T >::begin().
|
inline |
Return an const_iterator to end traversing the UPtrList.
Definition at line 504 of file UPtrListI.H.
References UList< T >::end().
Foam::UPtrList<T2> convert | ( | ) |
Definition at line 162 of file UPtrList.C.
References forAll, and UPtrList< T >::set().
Foam::UPtrList<const T2> convert | ( | ) | const |
Definition at line 175 of file UPtrList.C.
References forAll, and UPtrList< T >::set().
Declare friendship with the PtrList class.
Definition at line 69 of file UPtrList.H.
|
friend |
Definition at line 196 of file UPtrList.H.
Referenced by UPtrList< const lduInterface >::iterator::iterator().