Public Member Functions | Private Member Functions | Private Attributes | Friends
LongList< T, Offset > Class Template Reference
Inheritance diagram for LongList< T, Offset >:
Inheritance graph
[legend]

Public Member Functions

 LongList ()
 Construct null. More...
 
 LongList (const label size)
 Construct given size. More...
 
 LongList (const label size, const T &t)
 Construct to given size and initialize. More...
 
 LongList (const LongList< T, Offset > &)
 Copy contructor. More...
 
 ~LongList ()
 
label size () const
 Size of the active part of the list. More...
 
label byteSize () const
 Return the binary size in number of characters of the UList. More...
 
void setSize (const label)
 Reset size of List. More...
 
void clear ()
 Clear the list, i.e. set next free to zero. More...
 
LongList< T, Offset > & shrink ()
 Shrink the list to the number of elements used. More...
 
void transfer (LongList< T, Offset > &)
 transfer the list from another one without allocating it More...
 
void append (const T &e)
 Append an element at the end of the list. More...
 
void appendIfNotIn (const T &e)
 
bool contains (const T &e) const
 check if the element is in the list (takes linear time) More...
 
label containsAtPosition (const T &e) const
 
T remove (const label i)
 Return and remove the element. More...
 
T removeLastElement ()
 
const Toperator[] (const label i) const
 get and set operators More...
 
Toperator[] (const label i)
 
Toperator() (const label)
 Return non-const access to an element,. More...
 
TnewElmt (const label)
 return a non-const access to an element, More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 
void operator= (const LongList< T, Offset > &)
 Assignment operator. More...
 
void appendFromStream (Istream &)
 Read from stream and append to the current content. More...
 
void writeEntry (Ostream &os) const
 Write as a dictionary entry. More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write as a dictionary entry with keyword. More...
 

Private Member Functions

void checkIndex (const label i) const
 check index More...
 
void initializeParameters ()
 initialize width and mask More...
 
void allocateSize (const label)
 Allocate memory for the list. More...
 
void clearOut ()
 delete all elements More...
 

Private Attributes

label N_
 number of allocated elements More...
 
label nextFree_
 number of elements in the list More...
 
label numBlocks_
 number of used blocks of data More...
 
label numAllocatedBlocks_
 
label shift_
 
label mask_
 
T ** dataPtr_
 array of pointers to the blocks of data, each of the size WIDTH More...
 

Friends

Ostreamoperator (Ostream &, const LongList< T, Offset > &)
 
Istreamoperator>> (Istream &, LongList< T, Offset > &)
 Read from Istream, discarding contents of existing LongList. More...
 

Detailed Description

template<class T, label Offset = 19>
class Foam::LongList< T, Offset >

Definition at line 55 of file LongList.H.

Constructor & Destructor Documentation

◆ LongList() [1/4]

LongList
inline

Construct null.

Definition at line 133 of file LongListI.H.

◆ LongList() [2/4]

LongList ( const label  size)
inlineexplicit

Construct given size.

Definition at line 148 of file LongListI.H.

◆ LongList() [3/4]

LongList ( const label  size,
const T t 
)
inlineexplicit

Construct to given size and initialize.

Construct given size.

Definition at line 165 of file LongListI.H.

◆ LongList() [4/4]

LongList ( const LongList< T, Offset > &  ol)
inline

Copy contructor.

Definition at line 181 of file LongListI.H.

◆ ~LongList()

~LongList
inline

Definition at line 195 of file LongListI.H.

Member Function Documentation

◆ checkIndex()

void checkIndex ( const label  i) const
private

check index

Definition at line 29 of file LongListI.H.

◆ initializeParameters()

void initializeParameters
private

initialize width and mask

Definition at line 43 of file LongListI.H.

◆ allocateSize()

void allocateSize ( const label  s)
inlineprivate

Allocate memory for the list.

Definition at line 60 of file LongListI.H.

◆ clearOut()

void clearOut
private

delete all elements

Definition at line 112 of file LongListI.H.

◆ size()

Foam::label size
inline

Size of the active part of the list.

Definition at line 203 of file LongListI.H.

Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), polyMeshGenModifier::addProcessorFaces(), triSurfacePatchManipulator::allocateFeatureEdges(), refineBoundaryLayers::analyseLayers(), meshSurfaceEngine::calcAddressingForProcEdges(), polyMeshGenAddressing::calcEdges(), polyMeshGenAddressing::calcGlobalCellLabels(), meshOctreeAddressing::calcGlobalLeafLabels(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), triSurfaceCurvatureEstimator::calculateEdgeCurvature(), triSurfAddressing::calculateEdgeFacets(), triSurfacePartitioner::calculateEdgeGroups(), triSurfAddressing::calculateEdges(), meshSurfaceEngine::calculateEdgesAndAddressing(), triSurfAddressing::calculateFacetEdges(), boundaryLayerOptimisation::calculateHairEdges(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallel(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallelNewPatches(), meshSurfaceEngine::calculatePointPatches(), meshSurfaceEngine::calculatePointPoints(), cartesian2DMeshGenerator::cartesian2DMeshGenerator(), cartesianMeshGenerator::cartesianMeshGenerator(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), meshOctreeAddressing::checkAndFixIrregularConnections(), Foam::triSurfaceChecks::checkAngles(), Foam::triSurfaceChecks::checkCollocatedPoints(), triSurfaceCleanupDuplicateTriangles::checkDuplicateTriangles(), triSurfaceCleanupDuplicates::checkDuplicateTriangles(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), edgeExtractor::checkFacePatchesGeometry(), Foam::triSurfaceChecks::checkForHoles(), Foam::triSurfaceChecks::checkForNonManifoldEdges(), triSurfaceClassifyEdges::checkOrientation(), Foam::triSurfaceChecks::checkOverlaps(), Foam::triSurfaceChecks::checkSelfIntersections(), triSurfaceCopyParts::copySurfaceMesh(), partTetMesh::createBOUNDARYPointsOrdering(), extrudeLayer::createDuplicateFrontFaces(), boundaryLayers::createLayerCells(), triSurfaceMetaData::createMetaData(), boundaryLayers::createNewEdgeVerticesParallel(), boundaryLayers::createNewPartitionVerticesParallel(), extrudeLayer::createNewVertices(), boundaryLayers::createNewVertices(), meshOctreeAddressing::createOctreeEdges(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), triSurfacePatchManipulator::createPatches(), voronoiMeshExtractor::createPoints(), partTetMesh::createPointsAndTets(), tetMeshExtractorOctree::createPolyMesh(), voronoiMeshExtractor::createPolyMesh(), createFundamentalSheetsJFS::createSheetsAtFeatureEdges(), partTetMesh::createSMOOTHPointsOrdering(), correctEdgesBetweenPatches::decomposeConcaveFaces(), correctEdgesBetweenPatches::decomposeProblematicFaces(), meshOctreeModifier::distributeLeavesToProcessors(), meshSurfaceOptimizer::edgeNodeDisplacementParallel(), meshOctreeModifier::ensureCorrectRegularity(), meshOctree::exchangeRequestsWithNeighbourProcessors(), triSurfaceExtrude2DEdges::extrudeSurface(), checkBoundaryFacesSharingTwoEdges::findBndFacesAtBndVertex(), surfaceMorpherCells::findBoundaryVertices(), edgeExtractor::findFeatureEdgesNearEdge(), meshOctreeCube::findLeaves(), meshSurfaceMapper::findMappingDistance(), edgeExtractor::findOtherFacePatchesParallel(), edgeExtractor::findPatchesNearSurfaceFace(), boundaryLayers::findPatchesToBeTreatedTogether(), Foam::help::frontalMarking(), meshOctreeInsideOutside::frontalMarking(), detectBoundaryLayers::generateHairEdges(), refineBoundaryLayers::generateNewVertices(), Foam::help::groupMarking(), meshOptimizer::laplaceSmoother::laplacianParallel(), meshOptimizer::laplaceSmoother::laplacianPCParallel(), meshOptimizer::laplaceSmoother::laplacianWPCParallel(), meshOctreeModifier::loadDistribution(), meshSurfaceMapper::mapToSmallestDistance(), meshSurfaceMapper2D::mapToSmallestDistance(), meshSurfaceMapper::mapVerticesOntoSurface(), meshSurfaceMapper2D::mapVerticesOntoSurface(), meshSurfaceMapper::mapVerticesOntoSurfacePatches(), meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), meshOctreeModifier::markAdditionalLayers(), edgeExtractor::markPatchPoints(), mergeSurfacePatches(), triSurfFeatureEdges::nFeatureEdges(), meshSurfaceOptimizer::nodeDisplacementLaplacianFCParallel(), meshSurfaceOptimizer::nodeDisplacementLaplacianParallel(), VRWGraphSMPModifier::operator=(), LongList< Foam::meshOctreeCube >::operator=(), tetMeshOptimisation::optimiseBoundarySurfaceLaplace(), tetMeshOptimisation::optimiseBoundaryVolumeOptimizer(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), VRWGraph::optimizeMemoryUsage(), symmetryPlaneOptimisation::pointInPlanes(), meshSurfaceMapper2D::preMapVertices(), edgeExtractor::projectDeterminedFeatureVertices(), meshOctreeAutomaticRefinement::refineBasedOnContainedCorners(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxes(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), meshOctreeCreator::refineBoxesNearDataBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), triSurfaceRemoveFacets::removeFacets(), polyMeshGenModifier::renumberMesh(), polyMeshGenModifier::reorderBoundaryFaces(), VRWGraph::reverseAddressing(), meshOctreeInsideOutside::reviseDataBoxes(), meshSurfaceOptimizer::smoothSurfaceOptimizer(), triSurfacePatchManipulator::surfaceWithPatches(), tetMeshGenerator::tetMeshGenerator(), triSurf::topologyCheck(), meshOctreeModifier::updateCommunicationPattern(), voronoiMeshGenerator::voronoiMeshGenerator(), writeEdgesToVTK(), writeFacetsToVTK(), and fpmaMesh::writeSubsets().

◆ byteSize()

Foam::label byteSize
inline

◆ setSize()

void setSize ( const label  i)
inline

Reset size of List.

Definition at line 223 of file LongListI.H.

Referenced by boundaryLayers::addLayerForAllPatches(), boundaryLayers::addLayerForPatch(), polyMeshGenAddressing::calcGlobalCellLabels(), polyMeshGenAddressing::calcGlobalEdgeLabels(), polyMeshGenAddressing::calcGlobalFaceLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), triSurfAddressing::calculateEdges(), meshSurfaceEngine::calculatePointFaces(), edgeExtractor::calculateSingleCellEdge(), meshSurfaceOptimizer::calculateTrianglesAndAddressing(), edgeExtractor::calculateValence(), Foam::triSurfaceChecks::checkDisconnectedParts(), Foam::triSurfaceChecks::checkOrientation(), extrudeLayer::createDuplicateFrontFaces(), meshOctreeAddressing::createOctreeFaces(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), createFundamentalSheetsJFS::createSheetsAtFeatureEdges(), edgeExtractor::distributeBoundaryFaces(), meshOctreeModifier::ensureCorrectRegularity(), triSurfaceExtrude2DEdges::extrudeSurface(), detectBoundaryLayers::generateHairEdges(), meshOctreeModifier::loadDistribution(), main(), triSurfaceCleanupDuplicates::mergeDuplicatePoints(), triSurfaceCleanupDuplicates::mergeIdentities(), surfaceMorpherCells::morphBoundaryFaces(), surfaceMorpherCells::morphInternalFaces(), VRWGraphSMPModifier::operator=(), VRWGraphSMPModifier::optimizeMemoryUsage(), VRWGraph::optimizeMemoryUsage(), meshOctreeAutomaticRefinement::refineSelectedBoxes(), meshOptimizer::removeUserConstraints(), polyMeshGenModifier::replaceBoundary(), VRWGraphSMPModifier::reverseAddressing(), VRWGraphSMPModifier::setSizeAndRowSize(), and meshSurfaceOptimizer::transformIntoPlane().

Here is the caller graph for this function:

◆ clear()

void clear
inline

Clear the list, i.e. set next free to zero.

Allocated size does not change

Definition at line 230 of file LongListI.H.

Referenced by meshOctreeAddressing::calcGlobalLeafLabels(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), Foam::triSurfaceChecks::checkAngles(), Foam::triSurfaceChecks::checkCollocatedPoints(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), edgeExtractor::checkFacePatchesGeometry(), Foam::triSurfaceChecks::checkForHoles(), Foam::triSurfaceChecks::checkForNonManifoldEdges(), Foam::triSurfaceChecks::checkOverlaps(), Foam::triSurfaceChecks::checkSelfIntersections(), triSurfaceCopyParts::copySurfaceMesh(), partTriMesh::createBufferLayers(), partTetMesh::createBufferLayers(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), triSurfaceDetectFeatureEdges::detectFeatureEdges(), meshOctreeModifier::ensureCorrectRegularity(), meshSurfaceMapper2D::findActiveBoundaryEdges(), edgeExtractor::findFaceCandidates(), meshOctreeInsideOutside::frontalMarking(), detectBoundaryLayers::generateHairEdges(), refineBoundaryLayers::generateNewVertices(), meshSurfaceMapper::mapCornersAndEdges(), meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), meshOctreeInsideOutside::markInsideCubes(), meshSurfaceOptimizer::optimizeSurface2D(), correctEdgesBetweenPatches::patchCorrection(), refineBoundaryLayers::pointsInBndLayer(), meshOctreeAutomaticRefinement::proximityRefinement(), meshOctreeCreator::refineBoxesNearDataBoxes(), meshOctreeAutomaticRefinement::refineSelectedBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), and meshSurfaceOptimizer::untangleSurface().

Here is the caller graph for this function:

◆ shrink()

Foam::LongList< T, Offset > & shrink
inline

Shrink the list to the number of elements used.

Definition at line 238 of file LongListI.H.

◆ transfer()

void transfer ( LongList< T, Offset > &  ol)
inline

transfer the list from another one without allocating it

Definition at line 245 of file LongListI.H.

Referenced by meshOctreeModifier::ensureCorrectRegularity(), detectBoundaryLayers::generateHairEdges(), VRWGraphSMPModifier::optimizeMemoryUsage(), and triSurfaceRemoveFacets::removeFacets().

Here is the caller graph for this function:

◆ append()

void append ( const T e)
inline

Append an element at the end of the list.

Definition at line 265 of file LongListI.H.

Referenced by polyMeshGenModifier::addBufferCells(), decomposeCells::addNewCells(), triSurfFeatureEdges::appendFeatureEdge(), meshSurfaceEngine::calcAddressingForProcEdges(), polyMeshGenAddressing::calcEdges(), meshSurfaceEngine::calcGlobalBoundaryEdgeLabels(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), polyMeshGenAddressing::calcGlobalEdgeLabels(), meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::calcGlobalPointLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), meshSurfaceEngine::calculateBoundaryNodes(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), triSurfacePartitioner::calculateEdgeGroups(), triSurfAddressing::calculateEdges(), meshSurfaceEngine::calculateEdgesAndAddressing(), boundaryLayerOptimisation::calculateHairVectorsAtTheBoundary(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallel(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallelNewPatches(), renameBoundaryPatches::calculateNewBoundary(), meshSurfaceEngine::calculatePointPatches(), meshSurfaceEngine::calculatePointPoints(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), meshOctreeAddressing::checkAndFixIrregularConnections(), Foam::triSurfaceChecks::checkAngles(), Foam::polyMeshGenChecks::checkCellPartTetrahedra(), Foam::triSurfaceChecks::checkCollocatedPoints(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), edgeExtractor::checkFacePatchesGeometry(), Foam::polyMeshGenChecks::checkFacePyramids(), Foam::triSurfaceChecks::checkForHoles(), Foam::triSurfaceChecks::checkForNonManifoldEdges(), meshOctreeAddressing::checkGluedRegions(), triSurfaceClassifyEdges::checkOrientation(), Foam::triSurfaceChecks::checkOverlaps(), Foam::triSurfaceChecks::checkSelfIntersections(), boundaryLayers::checkTopologyOfBoundaryFaces(), triSurfaceCopyParts::copySurfaceMesh(), voronoiMeshExtractor::createAddressing(), partTetMesh::createBOUNDARYPointsOrdering(), partTriMesh::createBufferLayers(), partTetMesh::createBufferLayers(), extrudeLayer::createDuplicateFrontFaces(), boundaryLayers::createLayerCells(), boundaryLayers::createNewEdgeVerticesParallel(), boundaryLayers::createNewFacesAndCells(), boundaryLayers::createNewFacesFromPointsParallel(), boundaryLayers::createNewFacesParallel(), extrudeLayer::createNewVertices(), boundaryLayers::createNewVertices(), meshOctreeAddressing::createOctreeEdges(), meshOctreeAddressing::createOctreeFaces(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), edgeExtractor::cornerEvaluator::createParallelAddressing(), triSurfacePatchManipulator::createPatches(), partTetMesh::createPointsAndTets(), cartesianMeshExtractor::createPolyMesh(), createFundamentalSheetsJFS::createSheetsAtFeatureEdges(), createFundamentalSheetsFJ::createSheetsAtFeatureEdges(), partTetMesh::createSMOOTHPointsOrdering(), meshOctreeAutomaticRefinement::curvatureRefinement(), correctEdgesBetweenPatches::decomposeConcaveFaces(), triSurfaceDetectFeatureEdges::detectFeatureEdges(), meshSurfaceEdgeExtractor2D::distributeBoundaryFaces(), meshSurfaceOptimizer::edgeNodeDisplacementParallel(), meshOctreeModifier::ensureCorrectRegularity(), meshOctreeModifier::ensureCorrectRegularitySons(), meshSurfaceMapper2D::findActiveBoundaryEdges(), surfaceMorpherCells::findBoundaryVertices(), edgeExtractor::findFaceCandidates(), edgeExtractor::findFeatureEdgesNearEdge(), meshOctreeCube::findLeaves(), edgeExtractor::findOtherFacePatchesParallel(), edgeExtractor::findPatchesNearSurfaceFace(), boundaryLayers::findPatchesToBeTreatedTogether(), Foam::help::frontalMarking(), meshOctreeInsideOutside::frontalMarking(), detectBoundaryLayers::generateHairEdges(), refineBoundaryLayers::generateNewFaces(), Foam::help::groupMarking(), meshOptimizer::laplaceSmoother::laplacian(), meshOptimizer::laplaceSmoother::laplacianParallel(), meshOptimizer::laplaceSmoother::laplacianPC(), meshOptimizer::laplaceSmoother::laplacianPCParallel(), meshOptimizer::laplaceSmoother::laplacianSurface(), meshOptimizer::laplaceSmoother::laplacianWPC(), meshOptimizer::laplaceSmoother::laplacianWPCParallel(), meshOptimizer::lockCells(), meshOptimizer::lockFaces(), meshOptimizer::lockPoints(), meshSurfaceMapper2D::mapCorners(), meshSurfaceMapper::mapCornersAndEdges(), meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapVerticesOntoSurface(), meshSurfaceMapper2D::mapVerticesOntoSurface(), meshSurfaceMapper::mapVerticesOntoSurfacePatches(), meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), meshOctreeModifier::markAdditionalLayers(), meshOctreeModifier::markAdditionalLayersOfFaceNeighbours(), meshOctreeInsideOutside::markInsideCubes(), meshOctreeInsideOutside::markOutsideCubes(), edgeExtractor::markPatchPoints(), surfaceMorpherCells::morphBoundaryFaces(), surfaceMorpherCells::morphInternalFaces(), meshSurfaceOptimizer::nodeDisplacementLaplacianFCParallel(), meshSurfaceOptimizer::nodeDisplacementLaplacianParallel(), tetMeshOptimisation::optimiseBoundarySurfaceLaplace(), tetMeshOptimisation::optimiseBoundaryVolumeOptimizer(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), boundaryLayerOptimisation::optimiseLayer(), boundaryLayerOptimisation::optimiseThicknessVariation(), tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), tetMeshOptimisation::optimiseUsingVolumeOptimizer(), meshOptimizer::optimizeBoundaryLayer(), meshOptimizer::laplaceSmoother::optimizeLaplacian(), meshOptimizer::laplaceSmoother::optimizeLaplacianPC(), meshOptimizer::laplaceSmoother::optimizeLaplacianWPC(), meshOptimizer::optimizeLowQualityFaces(), meshOptimizer::optimizeMeshFVBestQuality(), meshOptimizer::optimizeMeshNearBoundaries(), meshSurfaceOptimizer::optimizeSurface(), meshSurfaceOptimizer::optimizeSurface2D(), correctEdgesBetweenPatches::patchCorrection(), symmetryPlaneOptimisation::pointInPlanes(), refineBoundaryLayers::pointsInBndLayer(), meshSurfaceMapper::preMapVertices(), meshSurfaceMapper2D::preMapVertices(), meshOctreeAutomaticRefinement::proximityRefinement(), meshOctreeCreator::refineBoxesNearDataBoxes(), meshOctreeAutomaticRefinement::refineSelectedBoxes(), meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers(), polyMeshGenModifier::renumberMesh(), polyMeshGenModifier::reorderBoundaryFaces(), meshOctreeInsideOutside::reviseDataBoxes(), meshSurfaceOptimizer::smoothEdgePoints(), meshSurfaceOptimizer::smoothLaplacianFC(), decomposeCells::storeBoundaryFaces(), meshSurfaceEngineModifier::syncVerticesAtParallelBoundaries(), meshOptimizer::untangleMeshFV(), meshSurfaceOptimizer::untangleSurface(), meshSurfaceOptimizer::untangleSurface2D(), extrudeLayer::updateBoundary(), checkMeshDict::updateKeepCellsIntersectingPatches(), meshOptimizer::laplaceSmoother::updateMeshGeometry(), partTetMesh::updateOrigMesh(), checkMeshDict::updatePatchCellSize(), and checkMeshDict::updateRemoveCellsIntersectingPatches().

◆ appendIfNotIn()

void appendIfNotIn ( const T e)
inline

Append an element at the end of the list if it is not yet present in the list (takes linear time)

Definition at line 276 of file LongListI.H.

◆ contains()

bool contains ( const T e) const
inline

check if the element is in the list (takes linear time)

Definition at line 283 of file LongListI.H.

◆ containsAtPosition()

Foam::label containsAtPosition ( const T e) const
inline

Definition at line 294 of file LongListI.H.

◆ remove()

T remove ( const label  i)
inline

Return and remove the element.

Definition at line 306 of file LongListI.H.

◆ removeLastElement()

T removeLastElement
inline

◆ operator[]() [1/2]

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

get and set operators

Definition at line 342 of file LongListI.H.

◆ operator[]() [2/2]

T & operator[] ( const label  i)
inline

Definition at line 352 of file LongListI.H.

◆ operator()()

T & operator() ( const label  i)
inline

Return non-const access to an element,.

resizing the list if necessary

Definition at line 362 of file LongListI.H.

◆ newElmt()

T & newElmt ( const label  i)
inline

return a non-const access to an element,

resize the list if necessary

Definition at line 372 of file LongListI.H.

◆ operator=() [1/2]

void operator= ( const T t)
inline

Assignment of all entries to the given value.

Definition at line 378 of file LongListI.H.

Referenced by IOLongList< T, Offset >::IOLongList(), and IOLongList< T, Offset >::operator=().

Here is the caller graph for this function:

◆ operator=() [2/2]

void operator= ( const LongList< T, Offset > &  l)
inline

Assignment operator.

Definition at line 385 of file LongListI.H.

◆ appendFromStream()

void appendFromStream ( Istream is)

Read from stream and append to the current content.

Definition at line 275 of file LongList.C.

Referenced by meshOctree::exchangeRequestsWithNeighbourProcessors().

Here is the caller graph for this function:

◆ writeEntry() [1/2]

void writeEntry ( Ostream os) const

Write as a dictionary entry.

Definition at line 33 of file LongList.C.

◆ writeEntry() [2/2]

void writeEntry ( const word keyword,
Ostream os 
) const

Write as a dictionary entry with keyword.

Definition at line 52 of file LongList.C.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const LongList< T, Offset > &   
)
friend

◆ operator>>

Istream& operator>> ( Istream ,
LongList< T, Offset > &   
)
friend

Read from Istream, discarding contents of existing LongList.

Field Documentation

◆ N_

label N_
private

number of allocated elements

Definition at line 79 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::transfer().

◆ nextFree_

label nextFree_
private

number of elements in the list

Definition at line 82 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::operator=(), and LongList< Foam::meshOctreeCube >::transfer().

◆ numBlocks_

label numBlocks_
private

number of used blocks of data

Definition at line 85 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::transfer().

◆ numAllocatedBlocks_

label numAllocatedBlocks_
private

maximum number of blocks that can be allocated without reallocating the list containing pointers to the chunks of data

Definition at line 90 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::transfer().

◆ shift_

label shift_
private

size of blocks is calculated by powers of 2 and therefore the access can be done using shift and mask

Definition at line 94 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::transfer().

◆ mask_

label mask_
private

Definition at line 95 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::transfer().

◆ dataPtr_

T** dataPtr_
private

array of pointers to the blocks of data, each of the size WIDTH

Definition at line 98 of file LongList.H.

Referenced by LongList< Foam::meshOctreeCube >::transfer().


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