Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
VRWGraph Class Reference
Inheritance diagram for VRWGraph:
Inheritance graph
[legend]
Collaboration diagram for VRWGraph:
Collaboration graph
[legend]

Public Member Functions

 VRWGraph ()
 Construct null. More...
 
 VRWGraph (const label size)
 Construct given number of rows. More...
 
 VRWGraph (const label nRows, const label nColumnsInRow)
 Construct given number of rows and row size. More...
 
 VRWGraph (const label nRows, const label nColumnsInRow, const label t)
 Construct to given number of rows, row size and initialize. More...
 
 VRWGraph (const VRWGraph &)
 Copy contructor. More...
 
 ~VRWGraph ()
 
label size () const
 Returns the number of rows. More...
 
label sizeOfRow (const label rowI) const
 Returns the number of elements in the given row. More...
 
void setSize (const label)
 Reset the number of rows. More...
 
void setSizeAndColumnWidth (const label newNumRows, const label rcWidth)
 
template<class ListType >
void setSizeAndRowSize (const ListType &)
 Set the number of rows and the size of each row. More...
 
void setRowSize (const label rowI, const label newSize)
 Reset the size of the given row. More...
 
void clear ()
 Clear the graph. More...
 
template<class ListType >
void appendList (const ListType &l)
 Append a list as a row at the end of the graph. More...
 
void append (const label rowI, const label)
 Append an element to the given row. More...
 
void appendIfNotIn (const label rowI, const label)
 Append an element to the given row if it does not exist there. More...
 
template<class ListType >
void setRow (const label rowI, const ListType &l)
 Set row with the list. More...
 
void mergeGraphs (const List< VRWGraph > &graphParts)
 
template<class GraphType >
void reverseAddressing (const label nRows, const GraphType &origGraph)
 
template<class GraphType >
void reverseAddressing (const GraphType &origGraph)
 
void reverseAddressing (const label nRows, const VRWGraph &origGraph)
 
void reverseAddressing (const VRWGraph &origGraph)
 
void optimizeMemoryUsage ()
 optimize memory usage More...
 
bool contains (const label rowI, const label e) const
 check if the element is in the given row (takes linear time) More...
 
label containsAtPosition (const label rowI, const label e) const
 
label operator() (const label i, const label j) const
 get and set operators More...
 
labeloperator() (const label i, const label j)
 
constRow operator[] (const label i) const
 
row operator[] (const label i)
 
void operator= (const VRWGraph &)
 Assignment operator. More...
 

Private Types

enum  typeOfEntries { NONE = 0, INVALIDROW =-10, FREEENTRY =-11, FREESTART =-12 }
 

Private Member Functions

void checkIndex (const label i, const label j) const
 check index More...
 

Private Attributes

labelLongList data_
 list containing data More...
 
LongList< rowElementrows_
 number of rows More...
 

Friends

class VRWGraphSMPModifier
 
Ostreamoperator<< (Ostream &, const VRWGraph &)
 

Detailed Description

Definition at line 101 of file VRWGraph.H.

Member Enumeration Documentation

◆ typeOfEntries

enum typeOfEntries
private
Enumerator
NONE 
INVALIDROW 
FREEENTRY 
FREESTART 

Definition at line 115 of file VRWGraph.H.

Constructor & Destructor Documentation

◆ VRWGraph() [1/5]

VRWGraph ( )
inline

Construct null.

Definition at line 52 of file VRWGraphI.H.

◆ VRWGraph() [2/5]

VRWGraph ( const label  size)
inlineexplicit

Construct given number of rows.

Construct given size.

Definition at line 60 of file VRWGraphI.H.

◆ VRWGraph() [3/5]

VRWGraph ( const label  nRows,
const label  nColumnsInRow 
)
inlineexplicit

Construct given number of rows and row size.

Definition at line 75 of file VRWGraphI.H.

◆ VRWGraph() [4/5]

VRWGraph ( const label  nRows,
const label  nColumnsInRow,
const label  t 
)
inlineexplicit

Construct to given number of rows, row size and initialize.

Definition at line 91 of file VRWGraphI.H.

◆ VRWGraph() [5/5]

VRWGraph ( const VRWGraph ol)
inline

Copy contructor.

Definition at line 108 of file VRWGraphI.H.

◆ ~VRWGraph()

~VRWGraph ( )
inline

Definition at line 116 of file VRWGraphI.H.

Member Function Documentation

◆ checkIndex()

void checkIndex ( const label  i,
const label  j 
) const
inlineprivate

check index

Definition at line 26 of file VRWGraphI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, VRWGraph::rows_, and VRWGraph::size().

Here is the call graph for this function:

◆ size()

Foam::label size ( ) const
inline

Returns the number of rows.

Definition at line 122 of file VRWGraphI.H.

Referenced by polyMeshGenModifier::addProcessorFaces(), polyMeshGenAddressing::calcGlobalEdgeLabels(), polyMeshGenAddressing::calcPointPoints(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), triSurfacePartitioner::calculateEdgeGroups(), meshOctreeAddressing::calculateEdgeLeaves(), meshSurfaceEngine::calculateEdgePatchesAddressing(), triSurfAddressing::calculateEdges(), boundaryLayerOptimisation::calculateHairEdges(), meshOctreeAddressing::calculateLeafFaces(), meshOctreeAddressing::calculateLeafLeaves(), triSurfAddressing::calculatePointNormals(), edgeExtractor::calculateSingleCellEdge(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), VRWGraph::checkIndex(), meshSurfaceCheckEdgeTypes::classifyEdges(), triSurfaceClassifyEdges::classifyEdgesTypes(), voronoiMeshExtractor::createAddressing(), partTetMesh::createBOUNDARYPointsOrdering(), partTetMesh::createBufferLayers(), boundaryLayers::createNewFacesParallel(), meshOctreeAddressing::createNodeLabels(), meshOctreeAddressing::createOctreeEdges(), meshOctreeAddressing::createOctreeFaces(), meshOctreeAddressing::createOctreePoints(), partTetMesh::createParallelAddressing(), voronoiMeshExtractor::createPolyMesh(), partTetMesh::createSMOOTHPointsOrdering(), decomposeFaces::decomposeConcaveInternalFaces(), correctEdgesBetweenPatches::decomposeProblematicFaces(), meshSurfaceEdgeExtractor2D::distributeBoundaryFaces(), checkBoundaryFacesSharingTwoEdges::findBndFacesAtBndVertex(), meshOctreeCube::findContainedEdges(), checkBoundaryFacesSharingTwoEdges::findFacesAtBndEdge(), boundaryLayers::findPatchVertices(), meshOctreeInsideOutside::frontalMarking(), refineBoundaryLayers::generateNewCells(), refineBoundaryLayers::generateNewFaces(), graphSelectorOp::operator()(), VRWGraphSMPModifier::optimizeMemoryUsage(), correctEdgesBetweenPatches::patchCorrection(), meshOctreeModifier::reduceMemoryConsumption(), meshOctreeCube::refineCube(), meshOctreeCube::refineCube2D(), meshOctreeCube::refineMissingCube(), polyMeshGenModifier::renumberMesh(), polyMeshGenModifier::replaceBoundary(), VRWGraphSMPModifier::reverseAddressing(), VRWGraph::reverseAddressing(), meshSurfaceMapper::selectNodesAtParallelBnd(), graphNeiOp::size(), and surfaceNeiOp::size().

◆ sizeOfRow()

Foam::label sizeOfRow ( const label  rowI) const
inline

Returns the number of elements in the given row.

Definition at line 127 of file VRWGraphI.H.

Referenced by decomposeCells::addNewCells(), polyMeshGenModifier::addProcessorFaces(), refineBoundaryLayers::analyseLayers(), meshSurfaceEngine::calcAddressingForProcEdges(), meshSurfaceEngine::calcGlobalBoundaryEdgeLabels(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), polyMeshGenAddressing::calcGlobalEdgeLabels(), meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::calcGlobalPointLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), triSurfacePartitioner::calculateCornersAndAddressing(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), edgeExtractor::calculateDeformationMetricForFace(), triSurfaceCurvatureEstimator::calculateEdgeCurvature(), meshSurfaceEngine::calculateFaceFacesAddressing(), boundaryLayerOptimisation::calculateHairEdges(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallel(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallelNewPatches(), triSurfacePartitioner::calculatePatchPatches(), meshOptimizer::calculatePointLocations(), meshSurfaceEngine::calculatePointPatches(), meshSurfaceEngine::calculatePointPoints(), edgeExtractor::calculateSingleCellEdge(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), meshOctreeAddressing::checkAndFixIrregularConnections(), edgeExtractor::checkConcaveEdgeCells(), edgeExtractor::checkCorners(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), edgeExtractor::checkFacePatchesTopology(), Foam::triSurfaceChecks::checkForHoles(), Foam::triSurfaceChecks::checkForNonManifoldEdges(), topologicalCleaner::checkInvalidConnectionsForVerticesCells(), topologicalCleaner::checkInvalidConnectionsForVerticesFaces(), triSurfaceClassifyEdges::checkOrientation(), Foam::polyMeshGenChecks::checkPoints(), boundaryLayers::checkTopologyOfBoundaryFaces(), Foam::polyMeshGenChecks::checkUpperTriangular(), meshSurfaceCheckEdgeTypes::classifyEdges(), triSurfaceClassifyEdges::classifyEdgesTypes(), partTriMesh::createBufferLayers(), partTetMesh::createBufferLayers(), meshSurfaceEdgeExtractor::createEdgeVertices(), tetCreatorOctree::createFaceCentreLabels(), extrudeLayer::createLayerCells(), boundaryLayers::createLayerCells(), boundaryLayers::createNewFacesAndCells(), boundaryLayers::createNewFacesParallel(), extrudeLayer::createNewVertices(), meshOctreeAddressing::createOctreeEdges(), meshOctreeAddressing::createOctreeFaces(), meshOctreeAddressing::createOctreePoints(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), edgeExtractor::cornerEvaluator::createParallelAddressing(), tetCreatorOctree::createPointsAndAddressing(), cartesianMeshExtractor::createPolyMesh(), voronoiMeshExtractor::createPolyMesh(), tetCreatorOctree::createTetsAroundEdges(), tetCreatorOctree::createTetsAroundSplitEdges(), tetCreatorOctree::createTetsFromFacesWithCentreNode(), correctEdgesBetweenPatches::decomposeConcaveFaces(), decomposeFaces::decomposeConcaveInternalFaces(), decomposeFaces::decomposeMeshFaces(), correctEdgesBetweenPatches::decomposeProblematicFaces(), triSurfaceDetectFeatureEdges::detectFeatureEdgesAngleCriterion(), refineBoundaryLayers::refineCornerHexCell::determineFacesInDirections(), edgeExtractor::distributeBoundaryFacesNormalAlignment(), meshOctreeAddressing::edgeIntersections(), tetMeshOptimisation::exchangeData(), meshSurfaceMapper2D::findActiveBoundaryEdges(), checkBoundaryFacesSharingTwoEdges::findBndFacesAtBndVertex(), meshOctreeCube::findContainedEdges(), edgeExtractor::findEdgeCandidates(), edgeExtractor::findFaceCandidates(), meshSurfaceMapper::findMappingDistance(), meshOctree::findNearestCorner(), edgeExtractor::findNeiPatches(), edgeExtractor::findOtherFacePatchesParallel(), boundaryLayers::findPatchesToBeTreatedTogether(), boundaryLayers::findPatchVertices(), detectBoundaryLayers::generateHairEdges(), refineBoundaryLayers::generateNewCells(), refineBoundaryLayers::generateNewFaces(), refineBoundaryLayers::generateNewVertices(), Foam::help::groupMarking(), meshOctreeAddressing::isIntersectedEdge(), meshOctreeAddressing::isIntersectedFace(), meshOptimizer::laplaceSmoother::laplacian(), meshOptimizer::laplaceSmoother::laplacianParallel(), meshOptimizer::laplaceSmoother::laplacianPC(), meshOptimizer::laplaceSmoother::laplacianWPC(), meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapVerticesOntoSurface(), meshSurfaceMapper2D::mapVerticesOntoSurface(), meshSurfaceMapper::mapVerticesOntoSurfacePatches(), meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), edgeExtractor::markPatchPoints(), VRWGraphSMPModifier::mergeGraphs(), VRWGraph::mergeGraphs(), edgeExtractor::faceEvaluator::neiFacesOverEdges(), edgeExtractor::faceEvaluator::neiFacesProcs(), edgeExtractor::faceEvaluator::neiPatchesOverEdges(), meshSurfaceOptimizer::newPositionLaplacian(), meshSurfaceOptimizer::newPositionLaplacianFC(), meshSurfaceOptimizer::newPositionLaplacianWFC(), meshSurfaceOptimizer::nodeDisplacementLaplacianParallel(), meshBndLayerNeighbourOperator::operator()(), graphNeiOp::operator()(), surfaceNeiOp::operator()(), VRWGraphSMPModifier::optimizeMemoryUsage(), symmetryPlaneOptimisation::optimizeSymmetryPlanes(), partTetMeshSimplex::partTetMeshSimplex(), partTriMeshSimplex::partTriMeshSimplex(), correctEdgesBetweenPatches::patchCorrection(), meshSurfaceMapper::preMapVertices(), meshSurfaceMapper2D::preMapVertices(), polyMeshGenModifier::replaceBoundary(), VRWGraph::reverseAddressing(), tetCreatorOctree::selectElements(), meshSurfaceEngineModifier::syncVerticesAtParallelBoundaries(), and meshSurfaceEngine::updatePointNormalsAtProcBoundaries().

◆ setSize()

void setSize ( const label  size)
inline

Reset the number of rows.

Definition at line 132 of file VRWGraphI.H.

Referenced by polyMeshGenAddressing::calcEdgeCells(), polyMeshGenAddressing::calcGlobalEdgeLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), polyMeshGenAddressing::calcPointCells(), polyMeshGenAddressing::calcPointEdges(), polyMeshGenAddressing::calcPointFaces(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), meshOctreeAddressing::calculateEdgeFaces(), meshSurfaceEngine::calculateEdgePatchesAddressing(), meshSurfaceEngine::calculateEdgesAndAddressing(), triSurfAddressing::calculateFacetFacetsEdges(), boundaryLayerOptimisation::calculateHairEdges(), meshOctreeAddressing::calculateLeafEdges(), meshOctreeAddressing::calculateNodeFaces(), meshSurfaceEngine::calculatePointFaces(), partTetMesh::createBOUNDARYPointsOrdering(), meshOctreeAddressing::createOctreeFaces(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), partTetMesh::createSMOOTHPointsOrdering(), decomposeFaces::decomposeConcaveInternalFaces(), decomposeFaces::decomposeMeshFaces(), edgeExtractor::findFeatureEdgesNearEdge(), findCellsIntersectingSurface::findIntersectedCells(), edgeExtractor::findPatchesNearSurfaceFace(), meshOctreeInsideOutside::frontalMarking(), detectBoundaryLayers::generateHairEdges(), refineBoundaryLayers::generateNewCells(), refineBoundaryLayers::generateNewFaces(), Foam::help::groupMarking(), meshOctreeCube::meshOctreeCube(), surfaceMorpherCells::morphBoundaryFaces(), surfaceMorpherCells::morphInternalFaces(), partTetMeshSimplex::partTetMeshSimplex(), refineBoundaryLayers::refineEdgeHexCell::populateExistingFaces(), and VRWGraphSMPModifier::reverseAddressing().

Here is the caller graph for this function:

◆ setSizeAndColumnWidth()

void setSizeAndColumnWidth ( const label  newNumRows,
const label  rcWidth 
)
inline

Reset the number of rows. The second argument specifies the reserved column width

Definition at line 148 of file VRWGraphI.H.

References Foam::exit(), Foam::FatalError, and FatalErrorIn.

Referenced by meshOctreeAddressing::calculateEdgeLeaves(), and meshOctreeAddressing::createOctreeEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSizeAndRowSize()

void setSizeAndRowSize ( const ListType &  l)
inline

Set the number of rows and the size of each row.

set the size of graph rows

Definition at line 178 of file VRWGraphI.H.

Referenced by edgeExtractor::findFeatureEdgesNearEdge(), edgeExtractor::findPatchesNearSurfaceFace(), meshOctreeInsideOutside::frontalMarking(), and refineBoundaryLayers::generateNewVertices().

Here is the caller graph for this function:

◆ setRowSize()

void setRowSize ( const label  rowI,
const label  newSize 
)
inline

◆ clear()

void clear ( )
inline

◆ appendList()

void appendList ( const ListType &  l)
inline

◆ append()

void append ( const label  rowI,
const label  el 
)
inline

◆ appendIfNotIn()

void appendIfNotIn ( const label  rowI,
const label  el 
)
inline

◆ setRow()

void setRow ( const label  rowI,
const ListType &  l 
)
inline

◆ mergeGraphs()

void mergeGraphs ( const List< VRWGraph > &  graphParts)
inline

merge graphs with the identical number of rows into a single one. Use for SMP parallelisation

find the number of elements in each row

Finally, assemble the merged graph

Definition at line 366 of file VRWGraphI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, List::size(), VRWGraph::sizeOfRow(), and Foam::sum().

Here is the call graph for this function:

◆ reverseAddressing() [1/4]

void reverseAddressing ( const label  nRows,
const GraphType &  origGraph 
)
inline

set the graph to the reverse of the original graph. the rows of such graph store the rows which contain the elements of the original graph

finally fill in the data

Definition at line 406 of file VRWGraphI.H.

References LongList< T, Offset >::size().

Referenced by refineBoundaryLayers::analyseLayers(), meshOctreeAddressing::calcGlobalPointLabels(), triSurfAddressing::calculatePointEdges(), polyMeshGenModifier::calculatePointFaces(), voronoiMeshExtractor::createAddressing(), extrudeLayer::createLayerCells(), extrudeLayer::createNewVertices(), tetMeshExtractorOctree::createPolyMesh(), detectBoundaryLayers::generateHairEdges(), refineBoundaryLayers::generateNewCells(), and extrudeLayer::movePoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverseAddressing() [2/4]

void reverseAddressing ( const GraphType &  origGraph)
inline

Definition at line 442 of file VRWGraphI.H.

References Foam::max(), and maxValue.

Here is the call graph for this function:

◆ reverseAddressing() [3/4]

void reverseAddressing ( const label  nRows,
const VRWGraph origGraph 
)
inline

finally fill in the data

Definition at line 459 of file VRWGraphI.H.

References VRWGraph::size(), and VRWGraph::sizeOfRow().

Here is the call graph for this function:

◆ reverseAddressing() [4/4]

void reverseAddressing ( const VRWGraph origGraph)
inline

Definition at line 494 of file VRWGraphI.H.

References Foam::max(), maxValue, VRWGraph::size(), and VRWGraph::sizeOfRow().

Here is the call graph for this function:

◆ optimizeMemoryUsage()

void optimizeMemoryUsage ( )

optimize memory usage

this should be used once the graph will not be resized any more

create new data

renumber rows

Definition at line 86 of file VRWGraph.C.

References VRWGraph::data_, VRWGraph::FREEENTRY, VRWGraph::INVALIDROW, Foam::pos(), VRWGraph::rows_, LongList< T, Offset >::setSize(), and LongList< T, Offset >::size().

Referenced by meshOctreeModifier::reduceMemoryConsumption().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains()

bool contains ( const label  rowI,
const label  e 
) const
inline

◆ containsAtPosition()

Foam::label containsAtPosition ( const label  rowI,
const label  e 
) const
inline

◆ operator()() [1/2]

Foam::label operator() ( const label  i,
const label  j 
) const
inline

get and set operators

Definition at line 550 of file VRWGraphI.H.

◆ operator()() [2/2]

Foam::label & operator() ( const label  i,
const label  j 
)
inline

Definition at line 564 of file VRWGraphI.H.

◆ operator[]() [1/2]

Foam::constRow operator[] ( const label  i) const
inline

Definition at line 575 of file VRWGraphI.H.

References Foam::constRow.

◆ operator[]() [2/2]

Foam::row operator[] ( const label  i)
inline

Definition at line 580 of file VRWGraphI.H.

◆ operator=()

void operator= ( const VRWGraph l)
inline

Assignment operator.

Definition at line 586 of file VRWGraphI.H.

Referenced by cellIOGraph::operator=(), and faceIOGraph::operator=().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ VRWGraphSMPModifier

friend class VRWGraphSMPModifier
friend

Definition at line 127 of file VRWGraph.H.

◆ operator<<

Ostream& operator<< ( Ostream ,
const VRWGraph  
)
friend

Field Documentation

◆ data_

labelLongList data_
private

◆ rows_

LongList<rowElement> rows_
private

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