DynamicList< T, SizeMin > Class Template Reference

A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects. More...

Public Member Functions

constexpr DynamicList () noexcept
 Default construct, an empty list without allocation. More...
 
 DynamicList (const label len)
 Construct an empty list with given reserve size. More...
 
 DynamicList (const label len, const T &val)
 Construct with given size and value for all elements. More...
 
 DynamicList (const label len, const Foam::zero)
 Construct with given size initializing all elements to zero. More...
 
 DynamicList (const DynamicList< T, SizeMin > &lst)
 Copy construct. More...
 
template<int AnySizeMin>
 DynamicList (const DynamicList< T, AnySizeMin > &lst)
 Copy construct from DynamicList with different sizing parameters. More...
 
 DynamicList (const UList< T > &lst)
 Construct from UList. Size set to UList size. More...
 
template<unsigned N>
 DynamicList (const FixedList< T, N > &lst)
 Construct from a FixedList. More...
 
 DynamicList (std::initializer_list< T > lst)
 Construct from an initializer list. Size set to list size. More...
 
template<class Addr >
 DynamicList (const IndirectListBase< T, Addr > &lst)
 Construct from IndirectList. Size set to addressing size. More...
 
 DynamicList (DynamicList< T, SizeMin > &&lst)
 Move construct. More...
 
template<int AnySizeMin>
 DynamicList (DynamicList< T, AnySizeMin > &&lst)
 Move construct with different sizing parameters. More...
 
 DynamicList (List< T > &&lst)
 Move construct from List. More...
 
 DynamicList (SortableList< T > &&lst)
 Move construct from SortableList. More...
 
 DynamicList (Istream &is)
 Construct from Istream. Size set to size of list read. More...
 
label capacity () const noexcept
 Size of the underlying storage. More...
 
std::streamsize capacity_bytes () const noexcept
 Number of contiguous bytes of the underlying storage. More...
 
void setCapacity (const label len)
 Alter the size of the underlying storage. More...
 
void setCapacity_nocopy (const label len)
 
void setCapacity_unsafe (const label len) noexcept
 
void reserve (const label len)
 
void reserve_nocopy (const label len)
 
void resize (const label len)
 
void resize (const label len, const T &val)
 Alter addressable size and fill new entries with constant value. More...
 
void resize_nocopy (const label len)
 
void setSize (const label n)
 Same as resize() More...
 
void setSize (const label n, const T &val)
 Same as resize() More...
 
void clear () noexcept
 Clear the addressed list, i.e. set the size to zero. More...
 
void clearStorage ()
 Clear the list and delete storage. More...
 
label expandStorage () noexcept
 Expand the addressable size to fit the allocated capacity. More...
 
void shrinkStorage ()
 Shrink the allocated space to the number of elements used. More...
 
DynamicList< T, SizeMin > & shrink ()
 Shrink the allocated space to the number of elements used. More...
 
template<int AnySizeMin>
void swap (DynamicList< T, AnySizeMin > &other)
 Swap content, independent of sizing parameter. More...
 
void transfer (List< T > &list)
 Transfer contents of the argument List into this. More...
 
template<int AnySizeMin>
void transfer (DynamicList< T, AnySizeMin > &list)
 Transfer contents of any sized DynamicList into this. More...
 
void transfer (SortableList< T > &list)
 Transfer contents of the argument SortableList into this. More...
 
DynamicList< T, SizeMin > & append (const T &val)
 Append an element to the end of this list. More...
 
DynamicList< T, SizeMin > & append (T &&val)
 Move append an element. More...
 
DynamicList< T, SizeMin > & append (const UList< T > &lst)
 Append another list to the end of this list. More...
 
template<unsigned N>
DynamicList< T, SizeMin > & append (const FixedList< T, N > &lst)
 Append a FixedList to the end of this list. More...
 
DynamicList< T, SizeMin > & append (std::initializer_list< T > lst)
 Append an initializer list at the end of this list. More...
 
template<class Addr >
DynamicList< T, SizeMin > & append (const IndirectListBase< T, Addr > &lst)
 Append a IndirectList at the end of this list. More...
 
DynamicList< T, SizeMin > & append (List< T > &&lst)
 Move append list. More...
 
DynamicList< T, SizeMin > & append (DynamicList< T, SizeMin > &&lst)
 Move append list. More...
 
template<int AnySizeMin>
DynamicList< T, SizeMin > & append (DynamicList< T, AnySizeMin > &&lst)
 Move append list. More...
 
DynamicList< T, SizeMin > & append (SortableList< T > &&lst)
 Move append list. More...
 
label appendUniq (const T &val)
 Append an element if not already in the list. More...
 
T remove ()
 Remove and return the last element. Fatal on an empty list. More...
 
T remove (const label idx, const bool fast=false)
 Remove and return the specified element. Fatal on an empty list. More...
 
label remove (const labelRange &range)
 Remove a (start,size) subset from the list. More...
 
label remove (std::initializer_list< label > start_size)
 Remove a (start,size) subset from the list. More...
 
label subset (const labelRange &range)
 Retain a (start,size) subset from the list. More...
 
label subset (std::initializer_list< label > start_size)
 Retain a (start,size) subset from List. More...
 
Toperator() (const label i)
 Return non-const access to an element, resizing list if needed. More...
 
void operator= (const T &val)
 Assignment of all addressed entries to the given value. More...
 
void operator= (const Foam::zero)
 Assignment of all entries to zero. More...
 
void operator= (const UList< T > &lst)
 Assignment to UList. More...
 
template<unsigned N>
void operator= (const FixedList< T, N > &lst)
 Assignment to FixedList. More...
 
void operator= (const DynamicList< T, SizeMin > &lst)
 Assignment to DynamicList. More...
 
template<int AnySizeMin>
void operator= (const DynamicList< T, AnySizeMin > &lst)
 Assignment from DynamicList with different sizing parameters. More...
 
void operator= (std::initializer_list< T > lst)
 Assignment from initializer list. More...
 
template<class Addr >
void operator= (const IndirectListBase< T, Addr > &lst)
 Assignment from IndirectList. More...
 
void operator= (List< T > &&lst)
 Move assignment. More...
 
void operator= (DynamicList< T, SizeMin > &&lst)
 Move assignment. More...
 
template<int AnySizeMin>
void operator= (DynamicList< T, AnySizeMin > &&lst)
 Move assignment. More...
 
void operator= (SortableList< T > &&lst)
 Move assignment. More...
 
IstreamreadList (Istream &is)
 Read from Istream, discarding existing contents. More...
 
template<unsigned N>
Foam::DynamicList< T, SizeMin > & append (const FixedList< T, N > &lst)
 
template<class Addr>
Foam::DynamicList< T, SizeMin > & append (const IndirectListBase< T, Addr > &lst)
 
template<int AnySizeMin>
Foam::DynamicList< T, SizeMin > & append (DynamicList< T, AnySizeMin > &&lst)
 

Static Public Member Functions

static constexpr label min_size () noexcept
 Normal lower capacity limit - the SizeMin template parameter. More...
 

Friends

Istreamoperator>> (Istream &is, DynamicList< T, SizeMin > &list)
 Use the readList() method to read contents from Istream. More...
 
Ostreamoperator (Ostream &os, const DynamicList< T, SizeMin > &list)
 Write to Ostream. More...
 

Detailed Description

template<class T, int SizeMin = 16>
class Foam::DynamicList< T, SizeMin >

A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.

Internal storage is a compact array and the list can be shrunk to compact storage. The increase of list size uses a doubling strategy, with the SizeMin template parameter dictating a lower bound.

Source files

Definition at line 55 of file DynamicList.H.

Constructor & Destructor Documentation

◆ DynamicList() [1/15]

constexpr DynamicList ( )
inlineconstexprnoexcept

Default construct, an empty list without allocation.

Definition at line 138 of file DynamicListI.H.

◆ DynamicList() [2/15]

DynamicList ( const label  len)
inlineexplicit

Construct an empty list with given reserve size.

Definition at line 146 of file DynamicListI.H.

◆ DynamicList() [3/15]

DynamicList ( const label  len,
const T val 
)
inline

Construct with given size and value for all elements.

Definition at line 157 of file DynamicListI.H.

◆ DynamicList() [4/15]

DynamicList ( const label  len,
const Foam::zero   
)
inline

Construct with given size initializing all elements to zero.

Definition at line 169 of file DynamicListI.H.

◆ DynamicList() [5/15]

DynamicList ( const DynamicList< T, SizeMin > &  lst)
inline

Copy construct.

Definition at line 181 of file DynamicListI.H.

◆ DynamicList() [6/15]

DynamicList ( const DynamicList< T, AnySizeMin > &  lst)
inline

Copy construct from DynamicList with different sizing parameters.

Definition at line 193 of file DynamicListI.H.

◆ DynamicList() [7/15]

DynamicList ( const UList< T > &  lst)
inlineexplicit

Construct from UList. Size set to UList size.

Also constructs from DynamicList with different sizing parameters.

Definition at line 204 of file DynamicListI.H.

◆ DynamicList() [8/15]

DynamicList ( const FixedList< T, N > &  lst)
inlineexplicit

Construct from a FixedList.

Definition at line 216 of file DynamicListI.H.

◆ DynamicList() [9/15]

DynamicList ( std::initializer_list< T lst)
inlineexplicit

Construct from an initializer list. Size set to list size.

Definition at line 227 of file DynamicListI.H.

◆ DynamicList() [10/15]

DynamicList ( const IndirectListBase< T, Addr > &  lst)
inlineexplicit

Construct from IndirectList. Size set to addressing size.

Definition at line 239 of file DynamicListI.H.

◆ DynamicList() [11/15]

DynamicList ( DynamicList< T, SizeMin > &&  lst)
inline

Move construct.

Definition at line 250 of file DynamicListI.H.

◆ DynamicList() [12/15]

DynamicList ( DynamicList< T, AnySizeMin > &&  lst)
inline

Move construct with different sizing parameters.

Definition at line 263 of file DynamicListI.H.

◆ DynamicList() [13/15]

DynamicList ( List< T > &&  lst)
inline

Move construct from List.

Definition at line 275 of file DynamicListI.H.

◆ DynamicList() [14/15]

DynamicList ( SortableList< T > &&  lst)

Move construct from SortableList.

◆ DynamicList() [15/15]

DynamicList ( Istream is)
explicit

Construct from Istream. Size set to size of list read.

Definition at line 37 of file DynamicListIO.C.

Member Function Documentation

◆ min_size()

static constexpr label min_size ( )
inlinestaticconstexprnoexcept

Normal lower capacity limit - the SizeMin template parameter.

Definition at line 168 of file DynamicList.H.

◆ capacity()

Foam::label capacity ( ) const
inlinenoexcept

Size of the underlying storage.

Definition at line 287 of file DynamicListI.H.

Referenced by primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), extendedEdgeMesh::cut(), primitiveMesh::faceEdges(), primitiveMesh::pointPoints(), DynamicField< Foam::Vector >::swap(), DynamicList< Foam::FixedList< scalar, 3 > >::transfer(), and DynamicField< Foam::Vector >::transfer().

Here is the caller graph for this function:

◆ capacity_bytes()

std::streamsize capacity_bytes ( ) const
inlinenoexcept

Number of contiguous bytes of the underlying storage.

Note
Only meaningful for contiguous data

Definition at line 295 of file DynamicListI.H.

◆ setCapacity()

void setCapacity ( const label  len)
inline

Alter the size of the underlying storage.

The addressed size will be truncated if needed to fit, but will remain otherwise untouched. Use this or reserve() in combination with append().

Definition at line 303 of file DynamicListI.H.

Referenced by primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), extendedEdgeMesh::cut(), primitiveMesh::faceEdges(), fileMonitorWatcher::fileMonitorWatcher(), primitiveMesh::pointPoints(), Pstream::Pstream(), surfaceFeatures::selectFeatureEdges(), PatchTools::sortedPointEdges(), and extendedEdgeMesh::sortPointsAndEdges().

Here is the caller graph for this function:

◆ setCapacity_nocopy()

void setCapacity_nocopy ( const label  len)
inline

Alter the size of the underlying storage, without retaining old content.

The addressed size will be truncated if needed to fit, but will remain otherwise untouched.

Definition at line 313 of file DynamicListI.H.

◆ setCapacity_unsafe()

void setCapacity_unsafe ( const label  len)
inlinenoexcept

Change the value for the list capacity directly (ADVANCED, UNSAFE) Does not perform any memory management or resizing.

Definition at line 323 of file DynamicListI.H.

Referenced by DynamicField< Foam::Vector >::swap().

Here is the caller graph for this function:

◆ reserve()

void reserve ( const label  len)
inline

Reserve allocation space for at least this size, allocating new space if required and retaining old content.

Never shrinks the allocated size, use setCapacity() for that.

Definition at line 333 of file DynamicListI.H.

Referenced by STARCDsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), and Foam::ensightOutput::writeCloudPositions().

Here is the caller graph for this function:

◆ reserve_nocopy()

void reserve_nocopy ( const label  len)
inline

Reserve allocation space for at least this size, allocating new space if required without retaining old content.

Never shrinks the allocated size, use setCapacity() for that.

Definition at line 343 of file DynamicListI.H.

◆ resize() [1/2]

void resize ( const label  len)
inline

Alter addressable list size, allocating new space if required while recovering old content.

If no reallocation is required, the contents remain untouched. Otherwise new entries will be uninitialized. Use this to resize the list prior to using the operator[] for setting values (as per List usage).

Definition at line 353 of file DynamicListI.H.

Referenced by basicThermo::printThermoNames(), lumpedPointMovement::setInterpolator(), DynamicList< Foam::FixedList< scalar, 3 > >::setSize(), lduPrimitiveMesh::upperTriOrder(), cuttingSurfaceBase::walkCellCuts(), decomposedBlockData::writeBlocks(), and profiling::writeData().

Here is the caller graph for this function:

◆ resize() [2/2]

void resize ( const label  len,
const T val 
)
inline

Alter addressable size and fill new entries with constant value.

Definition at line 373 of file DynamicListI.H.

◆ resize_nocopy()

void resize_nocopy ( const label  len)
inline

Alter addressable list size, allocating new space if required without necessarily recovering old content.

If no reallocation is required, the contents remain untouched. Otherwise all entries will be uninitialized.

Definition at line 363 of file DynamicListI.H.

Referenced by Foam::ensightOutput::writeCloudField(), Foam::ensightOutput::writeCloudPositions(), Foam::vtk::writeListParallel(), and Foam::vtk::writeListsParallel().

Here is the caller graph for this function:

◆ setSize() [1/2]

◆ setSize() [2/2]

void setSize ( const label  n,
const T val 
)
inline

Same as resize()

Definition at line 227 of file DynamicList.H.

◆ clear()

void clear ( )
inlinenoexcept

Clear the addressed list, i.e. set the size to zero.

Allocated size does not change

Definition at line 391 of file DynamicListI.H.

Referenced by Foam::bandCompression(), faceAreaWeightAMI::calcAddressing(), cutCell::calcIsoFacePointsFromEdges(), correctedCellVolumeWeightMethod::calculateAddressing(), cellVolumeWeightMethod::calculateAddressing(), mapNearestMethod::calculateAddressing(), primitiveMesh::cellCells(), primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), foamVtkMeshMaps::clear(), obstacleGrouping::clear(), ABAQUSCore::readHelper::clear(), probes::clearFieldGroups(), snappySnapDriver::doSnap(), primitiveMesh::edgeCells(), primitiveMesh::edgeFaces(), NASCore::faceDecomposition(), ABAQUSCore::faceDecomposition(), primitiveMesh::faceEdges(), triSurfaceSearch::findLineAll(), searchableRotatedBox::findLineAll(), searchableBox::findLineAll(), cellDistFuncs::getPointNeighbours(), indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::indexedOctree(), csvTableReader< Type >::operator()(), OppositeFaceCellWave< Type, TrackingData >::opposingFaceLabels(), primitiveMesh::pointCells(), primitiveMesh::pointPoints(), OBJsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), Foam::readObjVertices(), STARCDCore::readPoints(), faceAreaWeightAMI::restartUncoveredSourceFace(), OTstream::rewind(), lumpedPointMovement::setInterpolator(), Reaction< ReactionThermo >::setLRhs(), propellerInfo::setSampleDiskGeometry(), PatchTools::sortedPointEdges(), MeshedSurface< Foam::face >::sortFacesAndStore(), patchInjectionBase::updateMesh(), cuttingSurfaceBase::walkCellCuts(), and externalCoupled::writeGeometry().

Here is the caller graph for this function:

◆ clearStorage()

void clearStorage ( )
inline

Clear the list and delete storage.

Definition at line 398 of file DynamicListI.H.

Referenced by isoSurfaceTopo::isoSurfaceTopo(), Foam::operator>>(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), List< vectorField >::transfer(), DynamicList< Foam::FixedList< scalar, 3 > >::transfer(), and DynamicField< Foam::Vector >::transfer().

Here is the caller graph for this function:

◆ expandStorage()

Foam::label expandStorage ( )
inlinenoexcept

Expand the addressable size to fit the allocated capacity.

Returns the previous addressable size.

Definition at line 406 of file DynamicListI.H.

Referenced by DynamicList< Foam::FixedList< scalar, 3 > >::readList().

Here is the caller graph for this function:

◆ shrinkStorage()

void shrinkStorage ( )
inline

Shrink the allocated space to the number of elements used.

Definition at line 418 of file DynamicListI.H.

◆ shrink()

◆ swap()

void swap ( DynamicList< T, AnySizeMin > &  other)
inline

Swap content, independent of sizing parameter.

Definition at line 444 of file DynamicListI.H.

Referenced by Foam::Swap().

Here is the caller graph for this function:

◆ transfer() [1/3]

void transfer ( List< T > &  list)
inline

Transfer contents of the argument List into this.

Definition at line 464 of file DynamicListI.H.

Referenced by curvatureSeparation::curvatureSeparation(), ReactingMultiphaseParcel< ParcelType >::ReactingMultiphaseParcel(), ReactingParcel< ParcelType >::ReactingParcel(), OBJsurfaceFormat< Face >::read(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::removeIndex(), and streamLineBase::writeToFile().

Here is the caller graph for this function:

◆ transfer() [2/3]

void transfer ( DynamicList< T, AnySizeMin > &  list)
inline

Transfer contents of any sized DynamicList into this.

Definition at line 476 of file DynamicListI.H.

◆ transfer() [3/3]

void transfer ( SortableList< T > &  list)
inline

Transfer contents of the argument SortableList into this.

Definition at line 498 of file DynamicListI.H.

◆ append() [1/13]

Foam::DynamicList< T, SizeMin > & append ( const T val)
inline

Append an element to the end of this list.

Definition at line 511 of file DynamicListI.H.

Referenced by AABBTree< Type >::AABBTree(), ISAT< CompType, ThermoType >::add(), cellZoneSet::addSet(), pointZoneSet::addSet(), faceZoneSet::addSet(), fileOperation::addWatches(), masterUncollatedFileOperation::addWatches(), advancingFrontAMI::appendNbrFaces(), directMethod::appendToDirectSeeds(), Foam::appendTriLabels(), setToCellZone::applyToSet(), setToPointZone::applyToSet(), setAndNormalToFaceZone::applyToSet(), setToFaceZone::applyToSet(), extendedEdgeMesh::autoMap(), Foam::bandCompression(), STLAsciiParse::beginSolid(), PDRblock::blockMeshDict(), box::box(), faceAreaWeightAMI::calcAddressing(), cutCell::calcIsoFacePointsFromEdges(), mappedPatchBase::calcMapping(), faPatch::calcPointLabels(), cutFace::calcSubFace(), viewFactor::calculate(), correctedCellVolumeWeightMethod::calculateAddressing(), cellVolumeWeightMethod::calculateAddressing(), mapNearestMethod::calculateAddressing(), primitiveMesh::cellCells(), primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), polyMeshTetDecomposition::cellTetIndices(), collectLibsCallback(), patchPatchDist::correct(), AABBTree< Type >::createBoxes(), geomCellLooper::cut(), extendedEdgeMesh::cut(), cutFaceAdvect::cutPoints(), Foam::dlLoaded(), snappySnapDriver::doSnap(), extendedEdgeMesh::edgeBaffles(), primitiveMesh::edgeCells(), primitiveMesh::edgeFaces(), ifeqEntry::execute(), primitiveMesh::faceEdges(), OppositeFaceCellWave< Type, TrackingData >::faceToCell(), triSurfaceSearch::findLineAll(), searchableRotatedBox::findLineAll(), searchableBox::findLineAll(), mapNearestMethod::findMappedSrcCell(), mapNearestMethod::findNearestCell(), UPstream::freeTag(), isoSurfacePoint::generateFaceTriPoints(), ensightSurfaceReader::geometry(), removeCells::getExposedFaces(), externalDisplacementMeshMover::getFixedValueBCs(), boundaryMesh::getNearest(), incompressiblePrimalSolver::getObjectiveFunctions(), cellDistFuncs::getPointNeighbours(), distributedTriSurfaceMesh::getVolumeType(), chemPointISAT< CompType, ThermoType >::grow(), indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::indexedOctree(), fluxSummary::initialiseCellZoneAndDirection(), fluxSummary::initialiseFaceZone(), fluxSummary::initialiseFaceZoneAndDirection(), fluxSummary::initialiseSurface(), fluxSummary::initialiseSurfaceAndDirection(), meshSearch::intersections(), fileOperation::lookupAndCacheProcessorsPath(), Foam::lumpedPointTools::lumpedPointStates(), trackingInverseDistance::markDonors(), inverseDistance::markDonors(), polyBoundaryMesh::matchGroups(), meshRefinement::mergeZoneBaffles(), combustionModel::New(), chemistryTabulationMethod< ReactionThermo, ThermoType >::New(), chemistryReductionMethod< ReactionThermo, ThermoType >::New(), fvMeshTools::newMesh(), properties::objectResultEntries(), csvTableReader< Type >::operator()(), sampledSurface::iNewCapture::operator()(), listOp< N >::result::operator+(), OppositeFaceCellWave< Type, TrackingData >::opposingFaceLabels(), sampledPatch::patchIDs(), patchInteractionDataList::patchInteractionDataList(), primitiveMesh::pointCells(), primitiveMesh::pointPoints(), collatedFileOperation::printBanner(), ProcessorTopology< Container, ProcPatch >::ProcessorTopology(), faceAreaWeightAMI::processSourceFace(), OBJsurfaceFormat< Face >::read(), NASedgeFormat::read(), OFFsurfaceFormat< Face >::read(), OBJedgeFormat::read(), ABAQUSsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), VTKsurfaceFormat< Face >::read(), masterUncollatedFileOperation::read(), ensightSurfaceReader::readCase(), Foam::readObjVertices(), STARCDCore::readPoints(), FIREMeshReader::readSelections(), box::refineBox(), searchableSurfaceCollection::regions(), regionSplit2D::regionSplit2D(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::removeIndex(), dynamicCode::resolveTemplates(), surfaceFeatures::selectFeatureEdges(), dynamicRefineFvMesh::selectRefineCells(), dynamicRefineFvMesh::selectUnrefinePoints(), boundaryMesh::setFeatureEdges(), lumpedPointMovement::setInterpolator(), Reaction< ReactionThermo >::setLRhs(), noiseModel::setOctaveBands(), box::setRefineFlags(), faceCollapser::setRefinement(), boundaryCutter::setRefinement(), createShellMesh::setRefinement(), hexRef8::setRefinement(), propellerInfo::setSampleDiskGeometry(), PatchTools::sortedPointEdges(), extendedEdgeMesh::sortPointsAndEdges(), faceAreaWeightAMI2D::storeInterArea(), streamLineBase::storePoint(), masterUncollatedFileOperation::subRanks(), reconstructionSchemes::surface(), surfaceIntersection::surfaceIntersection(), faceAreaIntersect::triangleFan(), streamLineBase::trimToBox(), refinementParameters::unzonedLocations(), trackingInverseDistance::update(), CollisionRecordList< vector, vector >::update(), inverseDistance::update(), probes::updateMesh(), cuttingSurfaceBase::walkCellCuts(), wallLayerCells::wallLayerCells(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), multiFieldValue::writeFileHeader(), and externalCoupled::writeGeometry().

◆ append() [2/13]

Foam::DynamicList< T, SizeMin > & append ( T &&  val)
inline

Move append an element.

Definition at line 526 of file DynamicListI.H.

◆ append() [3/13]

Foam::DynamicList< T, SizeMin > & append ( const UList< T > &  lst)
inline

Append another list to the end of this list.

Definition at line 541 of file DynamicListI.H.

◆ append() [4/13]

DynamicList<T, SizeMin>& append ( const FixedList< T, N > &  lst)
inline

Append a FixedList to the end of this list.

◆ append() [5/13]

Foam::DynamicList< T, SizeMin > & append ( std::initializer_list< T lst)
inline

Append an initializer list at the end of this list.

Definition at line 585 of file DynamicListI.H.

◆ append() [6/13]

DynamicList<T, SizeMin>& append ( const IndirectListBase< T, Addr > &  lst)
inline

Append a IndirectList at the end of this list.

◆ append() [7/13]

Foam::DynamicList< T, SizeMin > & append ( List< T > &&  lst)
inline

Move append list.

Definition at line 624 of file DynamicListI.H.

◆ append() [8/13]

Foam::DynamicList< T, SizeMin > & append ( DynamicList< T, SizeMin > &&  lst)
inline

Move append list.

Definition at line 651 of file DynamicListI.H.

◆ append() [9/13]

DynamicList<T, SizeMin>& append ( DynamicList< T, AnySizeMin > &&  lst)
inline

Move append list.

◆ append() [10/13]

Foam::DynamicList< T, SizeMin > & append ( SortableList< T > &&  lst)
inline

Move append list.

Definition at line 678 of file DynamicListI.H.

◆ appendUniq()

Foam::label appendUniq ( const T val)
inline

Append an element if not already in the list.

Returns
the change in list length

Definition at line 689 of file DynamicListI.H.

Referenced by meshToMeshMethod::appendNbrCells(), and cellDistFuncs::getPointNeighbours().

Here is the caller graph for this function:

◆ remove() [1/4]

T remove ( )
inline

Remove and return the last element. Fatal on an empty list.

Definition at line 704 of file DynamicListI.H.

Referenced by UPstream::allocateTag(), directMethod::appendToDirectSeeds(), ifeqEntry::evaluate(), ifeqEntry::execute(), mapNearestMethod::findMappedSrcCell(), mapNearestMethod::findNearestCell(), Foam::iallReduce(), faceAreaWeightAMI::processSourceFace(), and Reaction< ReactionThermo >::setLRhs().

Here is the caller graph for this function:

◆ remove() [2/4]

T remove ( const label  idx,
const bool  fast = false 
)
inline

Remove and return the specified element. Fatal on an empty list.

With fast=true (operates in constant time), the place of the removed element is swapped with the last one in the list, which changes the ordering. With fast=false (operates in linear time), the elements are swapped down in the list to preserve ordering.

Definition at line 725 of file DynamicListI.H.

◆ remove() [3/4]

Foam::label remove ( const labelRange range)
inline

Remove a (start,size) subset from the list.

The range is subsetted with the list size itself to ensure result always addresses a valid section of the list. Remaining elements are moved down.

Definition at line 748 of file DynamicListI.H.

◆ remove() [4/4]

Foam::label remove ( std::initializer_list< label >  start_size)
inline

Remove a (start,size) subset from the list.

Definition at line 758 of file DynamicListI.H.

◆ subset() [1/2]

Foam::label subset ( const labelRange range)
inline

Retain a (start,size) subset from the list.

The range is subsetted with the list size itself to ensure result always addresses a valid section of the list. Remaining elements are moved down.

Definition at line 768 of file DynamicListI.H.

◆ subset() [2/2]

Foam::label subset ( std::initializer_list< label >  start_size)
inline

Retain a (start,size) subset from List.

Definition at line 778 of file DynamicListI.H.

◆ operator()()

T & operator() ( const label  i)
inline

Return non-const access to an element, resizing list if needed.

Definition at line 790 of file DynamicListI.H.

◆ operator=() [1/12]

void operator= ( const T val)
inline

Assignment of all addressed entries to the given value.

Definition at line 805 of file DynamicListI.H.

◆ operator=() [2/12]

void operator= ( const Foam::zero  )
inline

Assignment of all entries to zero.

Definition at line 815 of file DynamicListI.H.

◆ operator=() [3/12]

void operator= ( const UList< T > &  lst)
inline

Assignment to UList.

Definition at line 825 of file DynamicListI.H.

◆ operator=() [4/12]

void operator= ( const FixedList< T, N > &  lst)
inline

Assignment to FixedList.

Definition at line 836 of file DynamicListI.H.

◆ operator=() [5/12]

void operator= ( const DynamicList< T, SizeMin > &  lst)
inline

Assignment to DynamicList.

Definition at line 846 of file DynamicListI.H.

◆ operator=() [6/12]

void operator= ( const DynamicList< T, AnySizeMin > &  lst)
inline

Assignment from DynamicList with different sizing parameters.

Definition at line 862 of file DynamicListI.H.

◆ operator=() [7/12]

void operator= ( std::initializer_list< T lst)
inline

Assignment from initializer list.

Definition at line 878 of file DynamicListI.H.

◆ operator=() [8/12]

void operator= ( const IndirectListBase< T, Addr > &  lst)
inline

Assignment from IndirectList.

Definition at line 889 of file DynamicListI.H.

◆ operator=() [9/12]

void operator= ( List< T > &&  lst)
inline

Move assignment.

Definition at line 899 of file DynamicListI.H.

◆ operator=() [10/12]

void operator= ( DynamicList< T, SizeMin > &&  lst)
inline

Move assignment.

Definition at line 910 of file DynamicListI.H.

◆ operator=() [11/12]

void operator= ( DynamicList< T, AnySizeMin > &&  lst)
inline

Move assignment.

Definition at line 927 of file DynamicListI.H.

◆ operator=() [12/12]

void operator= ( SortableList< T > &&  lst)
inline

Move assignment.

Definition at line 944 of file DynamicListI.H.

◆ readList()

Foam::Istream & readList ( Istream is)

Read from Istream, discarding existing contents.

Definition at line 50 of file DynamicListIO.C.

Referenced by DynamicField< Foam::Vector >::readList().

Here is the caller graph for this function:

◆ append() [11/13]

Foam::DynamicList<T, SizeMin>& append ( const FixedList< T, N > &  lst)
inline

Definition at line 567 of file DynamicListI.H.

◆ append() [12/13]

Foam::DynamicList<T, SizeMin>& append ( const IndirectListBase< T, Addr > &  lst)
inline

Definition at line 604 of file DynamicListI.H.

◆ append() [13/13]

Foam::DynamicList<T, SizeMin>& append ( DynamicList< T, AnySizeMin > &&  lst)
inline

Definition at line 665 of file DynamicListI.H.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
DynamicList< T, SizeMin > &  list 
)
friend

Use the readList() method to read contents from Istream.

Definition at line 411 of file DynamicList.H.

◆ operator

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

Write to Ostream.


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