Public Member Functions | |
meshOctree (const triSurf &, const bool isQuadtree=false) | |
Construct from surface. More... | |
~meshOctree () | |
label | findLeafContainingVertex (const point &) const |
find a cube containing the vertex More... | |
void | findLeavesInSphere (const point &, const scalar, DynList< label > &) const |
find leaves within the given range from the given point More... | |
bool | isQuadtree () const |
is octree a quadtree or an octree More... | |
const FixedList< Vector< label >, 8 > & | octantVectors () const |
return octant vectors More... | |
label | numberOfLeaves () const |
return leaves of the octree More... | |
const meshOctreeCubeBasic & | returnLeaf (const label) const |
short | leafAtProc (const label) const |
void | findBoundaryPatchesForLeaf (const label, DynList< label > &) const |
bool | hasContainedTriangles (const label) const |
void | containedTriangles (const label, DynList< label > &) const |
bool | hasContainedEdges (const label) const |
void | containedEdges (const label, DynList< label > &) const |
bool | isPointInside (const point &) const |
checks if the point is inside or outside the surface More... | |
void | findNearestSurfacePoint (point &nearest, scalar &distSq, label &nearestTriangle, label ®ion, const point &p) const |
find nearest surface point for vertex and its region More... | |
void | findNearestSurfacePointInRegion (point &nearest, scalar &distSq, label &nearestTriangle, const label region, const point &p) const |
find nearest surface point for vertex in a given region More... | |
bool | findNearestEdgePoint (point &edgePoint, scalar &distSq, label &nearestEdge, const point &p, const DynList< label > ®ions) const |
find nearest feature-edges vertex to a given vertex More... | |
bool | findNearestPointToEdge (point &nearest, scalar &distSq, label &nearestEdge, const FixedList< point, 2 > &edgePoints, const FixedList< label, 2 > &edgePointRegions) const |
bool | findNearestCorner (point &nearest, scalar &distSq, label &nearestPoint, const point &p, const DynList< label > &patches) const |
find nearest corner point More... | |
bool | findNearestPointToPatches (point &nearest, scalar &distSq, const point &p, const DynList< label > &patches, const scalar tol=1e-4) const |
find the nearest vertex to the given patches More... | |
const triSurf & | surface () const |
return a reference to the surface More... | |
label | findNeighbourOverNode (const meshOctreeCubeCoordinates &, const label nodeI) const |
find a neighbour over a cube's node More... | |
void | findNeighboursOverEdge (const meshOctreeCubeCoordinates &, const label eI, DynList< label > &neighbourLeaves) const |
find neighbours over a cube's edge More... | |
void | findNeighboursInDirection (const meshOctreeCubeCoordinates &, const label dir, DynList< label > &neighbourLeaves) const |
find neighbours over a leaf cube face in the given direction More... | |
void | findNeighboursForLeaf (const meshOctreeCubeCoordinates &, DynList< label > &neighbourLeaves) const |
find neighbour leaf cubes over all faces More... | |
void | findAllLeafNeighbours (const meshOctreeCubeCoordinates &, DynList< label > &neighbourLeaves) const |
find neighbour leaves over nodes, edges and faces More... | |
label | findNeighbourOverNode (const label leafI, const label nodeI) const |
find neighbours over a cube's node More... | |
void | findNeighboursOverEdge (const label leafI, const label eI, DynList< label > &neighbourLeaves) const |
find neighbours over a cube's edge More... | |
void | findNeighboursInDirection (const label leafI, const label dir, DynList< label > &) const |
find neighbouring leaves of a leaf cube More... | |
void | findNeighboursForLeaf (const label, DynList< label > &) const |
find neighbours over faces More... | |
void | findAllLeafNeighbours (const label, DynList< label > &) const |
find neighbours over nodes, edges and faces More... | |
label | findLeafLabelForPosition (const meshOctreeCubeCoordinates &) const |
return leaf cube for the given position More... | |
void | findLeavesForCubeVertex (const label, const direction, FixedList< label, 8 > &) const |
find neighbouring leaves of a vertex More... | |
void | findLeavesContainedInBox (const boundBox &, labelList &) const |
find all leaves contained within the given boundBox More... | |
void | findLeavesContainedInBox (const boundBox &, DynList< label > &) const |
void | findEdgesInBox (const boundBox &, DynList< label > &) const |
void | findTrianglesInBox (const boundBox &, DynList< label > &) const |
const boundBox & | rootBox () const |
return rootBox More... | |
const FixedList< meshOctreeCubeCoordinates, 26 > & | regularityPositions () const |
const FixedList< FixedList< meshOctreeCubeCoordinates, 8 >, 8 > & | positionsOfLeavesAtNodes () const |
return positions to find the leaves at each cube node More... | |
void | exchangeRequestsWithNeighbourProcessors (const LongList< meshOctreeCubeCoordinates > &dataToSend, LongList< meshOctreeCubeCoordinates > &dataToReceive) const |
exchange requests with other processors generating the octree More... | |
void | exchangeRequestsWithNeighbourProcessors (const LongList< meshOctreeCubeCoordinates > &dataToSend, const LongList< scalar > &rangesToSend, LongList< meshOctreeCubeCoordinates > &dataToReceive, LongList< scalar > &receivedRanges) const |
exchange requests with other processors generating the octree More... | |
const labelList & | neiProcs () const |
neighbour processors of the current one More... | |
Private Member Functions | |
void | setOctantVectorsAndPositions () |
set data needed for finding neighbours More... | |
void | createInitialOctreeBox () |
create initial octree box More... | |
meshOctreeCube * | findCubeForPosition (const meshOctreeCubeCoordinates &) const |
return leaf cube for the given position More... | |
void | findLeavesContainedInBox (const boundBox &, DynList< const meshOctreeCube *, 256 > &) const |
find leaves contained in the box More... | |
meshOctree (const meshOctree &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const meshOctree &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const triSurf & | surface_ |
Reference to surface to work on. More... | |
labelList | neiProcs_ |
List< Pair< meshOctreeCubeCoordinates > > | neiRange_ |
meshOctreeCube * | initialCubePtr_ |
Root cube of the octree structure. More... | |
label | initialCubeRotation_ |
boundBox | rootBox_ |
bool | isRootInitialised_ |
scalar | searchRange_ |
octree search range More... | |
FixedList< Vector< label >, 8 > | octantVectors_ |
FixedList< FixedList< meshOctreeCubeCoordinates, 8 >, 8 > | vrtLeavesPos_ |
FixedList< meshOctreeCubeCoordinates, 26 > | regularityPositions_ |
List< meshOctreeSlot > | dataSlots_ |
List of slots containing data generated by each processor. More... | |
LongList< meshOctreeCube * > | leaves_ |
list of cubes which are leaves of the octree More... | |
const bool | isQuadtree_ |
a flag whether is true if is it a quadtree More... | |
Friends | |
class | meshOctreeModifier |
Definition at line 55 of file meshOctree.H.
|
private |
Disallow default bitwise copy construct.
meshOctree | ( | const triSurf & | ts, |
const bool | isQuadtree = false |
||
) |
Construct from surface.
Definition at line 47 of file meshOctree.C.
References meshOctree::createInitialOctreeBox(), and meshOctree::setOctantVectorsAndPositions().
~meshOctree | ( | ) |
Definition at line 71 of file meshOctree.C.
|
private |
set data needed for finding neighbours
set regularity positions neighbours over faces
neighbours over edges edges in x-direction
edges in y-direction
edges in z-direction
neighbours over vertices
set vrtLeavesPos_
Definition at line 76 of file meshOctree.C.
References Foam::endl(), Foam::Info, meshOctree::octantVectors_, Foam::pos(), meshOctree::regularityPositions_, and meshOctree::vrtLeavesPos_.
Referenced by meshOctree::meshOctree().
|
private |
create initial octree box
create initial octree box
create root box and initial cube
allocate data slots
Definition at line 185 of file meshOctree.C.
References Foam::constant::universal::c, meshOctreeSlot::cubes_, meshOctree::dataSlots_, meshOctree::initialCubePtr_, meshOctree::isQuadtree_, meshOctree::leaves_, boundBox::max(), boundBox::min(), UPstream::parRun(), triSurfPoints::points(), Foam::reduce(), meshOctree::rootBox_, triSurfFacets::size(), meshOctree::surface_, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by meshOctree::meshOctree().
|
private |
return leaf cube for the given position
Definition at line 459 of file meshOctreeNeighbourSearches.C.
References Foam::endl(), Foam::Info, meshOctreeCube::isLeaf(), meshOctreeCubeCoordinates::level(), meshOctreeCubeCoordinates::posX(), meshOctreeCubeCoordinates::posY(), meshOctreeCubeCoordinates::posZ(), and meshOctreeCube::subCube().
|
private |
find leaves contained in the box
Definition at line 131 of file meshOctreeInsideCalculations.C.
References DynList< T, staticSize >::clear().
Referenced by Foam::triSurfaceChecks::checkCollocatedPoints(), Foam::triSurfaceChecks::checkOverlaps(), Foam::triSurfaceChecks::checkSelfIntersections(), meshOctree::findEdgesInBox(), findCellsIntersectingSurface::findIntersectedCells(), meshSurfaceMapper::preMapVertices(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), and meshOctreeCreator::refineBoxesIntersectingSurfaces().
|
private |
Disallow default bitwise assignment.
find a cube containing the vertex
find a subCube containing the vertex;
Definition at line 42 of file meshOctreeNeighbourSearches.C.
References Foam::constant::universal::c, meshOctreeCubeCoordinates::centre(), meshOctreeCube::cubeLabel(), Foam::endl(), FatalErrorIn, Foam::Info, meshOctreeCube::isLeaf(), meshOctreeCubeCoordinates::isVertexInside(), meshOctreeCubeBasic::OTHERPROC, p, and meshOctreeCube::subCube().
Referenced by meshOctree::isPointInside().
void findLeavesInSphere | ( | const point & | c, |
const scalar | r, | ||
DynList< label > & | containedLeaves | ||
) | const |
find leaves within the given range from the given point
Definition at line 103 of file meshOctreeNeighbourSearches.C.
References Foam::constant::universal::c, and DynList< T, staticSize >::clear().
|
inline |
is octree a quadtree or an octree
Definition at line 36 of file meshOctreeI.H.
References meshOctree::isQuadtree_.
Referenced by cartesianMeshExtractor::createPolyMesh().
return octant vectors
Definition at line 42 of file meshOctreeI.H.
References meshOctree::octantVectors_.
|
inline |
return leaves of the octree
Definition at line 48 of file meshOctreeI.H.
References Foam::exit(), Foam::FatalError, FatalErrorIn, and meshOctree::leaves_.
Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::calcGlobalPointLabels(), meshOctreeAddressing::calculateLeafEdges(), meshOctreeAddressing::calculateLeafFaces(), meshOctreeAddressing::calculateLeafLeaves(), triSurfaceClassifyEdges::checkOrientation(), meshOctreeAddressing::createNodeLabels(), meshOctreeAddressing::createOctreeFaces(), tetCreatorOctree::createPointsAndAddressing(), meshOctreeAutomaticRefinement::curvatureRefinement(), meshOctreeAddressing::findUsedBoxes(), triSurfaceCleanupDuplicates::mergeDuplicatePoints(), meshOctreeInsideOutside::meshOctreeInsideOutside(), meshOctreeAutomaticRefinement::proximityRefinement(), and tetCreatorOctree::selectElements().
|
inline |
Definition at line 60 of file meshOctreeI.H.
Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::calcGlobalPointLabels(), meshOctreeAddressing::calculateNodeType(), meshOctreeAddressing::checkAndFixIrregularConnections(), meshOctreeAddressing::checkGluedRegions(), triSurfaceClassifyEdges::checkOrientation(), tetCreatorOctree::createFaceCentreLabels(), meshOctreeAddressing::createNodeLabels(), meshOctreeAddressing::createOctreeFaces(), meshOctreeAddressing::createOctreePoints(), tetCreatorOctree::createPointsAndAddressing(), cartesianMeshExtractor::createPolyMesh(), tetCreatorOctree::createTetsAroundEdges(), tetCreatorOctree::createTetsAroundSplitEdges(), meshOctreeAddressing::findUsedBoxes(), meshOctreeAddressing::isIntersectedEdge(), meshOctreeAddressing::isIntersectedFace(), meshOctree::isPointInside(), meshOctreeInsideOutside::meshOctreeInsideOutside(), and tetCreatorOctree::selectElements().
|
inline |
Definition at line 67 of file meshOctreeI.H.
References meshOctree::leaves_.
Definition at line 42 of file meshOctreeCubePatches.C.
References Foam::constRow, forAll, and patches.
|
inline |
Definition at line 72 of file meshOctreeI.H.
References meshOctree::leaves_.
Referenced by meshOctreeAddressing::calculateNodeType(), meshOctreeAddressing::checkGluedRegions(), meshOctreeAddressing::findUsedBoxes(), and meshOctreeAddressing::isIntersectedEdge().
Definition at line 81 of file meshOctreeI.H.
References DynList< T, staticSize >::append(), DynList< T, staticSize >::clear(), Foam::constRow, and forAll.
Referenced by Foam::triSurfaceChecks::checkCollocatedPoints(), triSurfaceClassifyEdges::checkOrientation(), Foam::triSurfaceChecks::checkOverlaps(), Foam::triSurfaceChecks::checkSelfIntersections(), meshOctreeAddressing::findUsedBoxes(), meshOctreeAddressing::isIntersectedEdge(), meshOctreeAddressing::isIntersectedFace(), triSurfaceCleanupDuplicates::mergeDuplicatePoints(), and meshSurfaceMapper::preMapVertices().
|
inline |
Definition at line 101 of file meshOctreeI.H.
References meshOctree::leaves_.
Referenced by meshOctreeAddressing::findUsedBoxes().
Definition at line 110 of file meshOctreeI.H.
References DynList< T, staticSize >::append(), DynList< T, staticSize >::clear(), Foam::constRow, and forAll.
bool isPointInside | ( | const point & | p | ) | const |
checks if the point is inside or outside the surface
Definition at line 42 of file meshOctreeInsideCalculations.C.
References Foam::endl(), meshOctree::findLeafContainingVertex(), Foam::Info, meshOctreeCubeBasic::INSIDE, p, and meshOctree::returnLeaf().
void findNearestSurfacePoint | ( | point & | nearest, |
scalar & | distSq, | ||
label & | nearestTriangle, | ||
label & | region, | ||
const point & | p | ||
) | const |
find nearest surface point for vertex and its region
find nearest surface vertex to the point p
find nearest projection
Definition at line 44 of file meshOctreeFindNearestSurfacePoint.C.
References DynList< T, staticSize >::clear(), Foam::constRow, Foam::endl(), forAll, found, Foam::magSqr(), Foam::help::nearestPointOnTheTriangle(), p, UPstream::parRun(), Foam::Pout, s(), Foam::Warning, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by meshSurfaceEdgeExtractorFUN::distributeBoundaryFaces(), meshSurfaceEdgeExtractor2D::distributeBoundaryFaces(), edgeExtractor::distributeBoundaryFaces(), meshSurfaceMapper::mapNodeToPatch(), meshSurfaceMapper::mapVerticesOntoSurface(), meshSurfaceMapper2D::mapVerticesOntoSurface(), edgeExtractor::moveVerticesTowardsDiscontinuities(), and meshSurfaceMapper2D::preMapVertices().
void findNearestSurfacePointInRegion | ( | point & | nearest, |
scalar & | distSq, | ||
label & | nearestTriangle, | ||
const label | region, | ||
const point & | p | ||
) | const |
find nearest surface point for vertex in a given region
find nearest surface vertex to the point p
find nearest projection
Definition at line 131 of file meshOctreeFindNearestSurfacePoint.C.
References DynList< T, staticSize >::clear(), Foam::constRow, Foam::endl(), forAll, found, Foam::magSqr(), Foam::help::nearestPointOnTheTriangle(), p, UPstream::parRun(), s(), Foam::Warning, WarningIn, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by edgeExtractor::distributeBoundaryFacesNormalAlignment(), meshSurfaceMapper::mapCorners(), meshSurfaceMapper2D::mapCorners(), meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapNodeToPatch(), meshSurfaceMapper::preMapVertices(), and edgeExtractor::projectDeterminedFeatureVertices().
bool findNearestEdgePoint | ( | point & | edgePoint, |
scalar & | distSq, | ||
label & | nearestEdge, | ||
const point & | p, | ||
const DynList< label > & | regions | ||
) | const |
find nearest feature-edges vertex to a given vertex
find the estimate for the searching range
find if the edge is in correct patches
Definition at line 215 of file meshOctreeFindNearestSurfacePoint.C.
References DynList< T, staticSize >::clear(), Foam::constRow, DynList< T, staticSize >::contains(), Foam::e, forAll, forAllRow, Foam::magSqr(), Foam::help::nearestPointOnTheEdgeExact(), p, s(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by edgeExtractor::checkCorners(), meshSurfaceMapper2D::mapCorners(), meshSurfaceMapper::mapEdgeNodes(), and edgeExtractor::projectDeterminedFeatureVertices().
bool findNearestPointToEdge | ( | point & | nearest, |
scalar & | distSq, | ||
label & | nearestEdge, | ||
const FixedList< point, 2 > & | edgePoints, | ||
const FixedList< label, 2 > & | edgePointRegions | ||
) | const |
Definition at line 321 of file meshOctreeFindNearestSurfacePoint.C.
References Foam::constant::universal::c, Foam::constRow, forAll, found, Foam::mag(), Foam::magSqr(), Foam::help::nearestEdgePointToTheLine(), and points.
Referenced by meshSurfaceEdgeExtractor::createEdgeVertices().
bool findNearestCorner | ( | point & | nearest, |
scalar & | distSq, | ||
label & | nearestPoint, | ||
const point & | p, | ||
const DynList< label > & | patches | ||
) | const |
find nearest corner point
find nearest surface vertex to the point p
find nearest projection
found an edge attached to this vertex
check if all required patches are present at this corner
all patches are present, check the distance
Definition at line 405 of file meshOctreeFindNearestSurfacePoint.C.
References DynList< T, staticSize >::appendIfNotIn(), DynList< T, staticSize >::clear(), Foam::constRow, DynList< T, staticSize >::contains(), forAll, forAllRow, found, HashTable::found(), HashSet< Key, Hash >::insert(), Foam::magSqr(), p, patches, points, s(), VRWGraph::sizeOfRow(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by edgeExtractor::checkCorners(), and edgeExtractor::projectDeterminedFeatureVertices().
bool findNearestPointToPatches | ( | point & | nearest, |
scalar & | distSq, | ||
const point & | p, | ||
const DynList< label > & | patches, | ||
const scalar | tol = 1e-4 |
||
) | const |
find the nearest vertex to the given patches
Definition at line 535 of file meshOctreeFindNearestSurfacePoint.C.
References forAll, Foam::magSqr(), p, patches, and Vector< scalar >::zero.
Referenced by edgeExtractor::checkCorners(), edgeExtractor::cornerEvaluator::improveCorners(), and meshSurfaceMapper::preMapVertices().
return a reference to the surface
Definition at line 130 of file meshOctreeI.H.
References meshOctree::surface_.
Referenced by meshSurfaceMapper2D::adjustZCoordinates(), edgeExtractor::checkConcaveEdgeCells(), triSurfaceClassifyEdges::checkOrientation(), triSurfaceClassifyEdges::classifyEdgesTypes(), meshSurfaceEdgeExtractor::createBoundaryFaces(), meshOctreeAutomaticRefinement::createCurvatureEstimator(), meshOctreeAutomaticRefinement::createSurfacePartitioner(), meshSurfaceMapper::createTriSurfacePartitioner(), meshSurfaceMapper2D::createTriSurfacePartitioner(), meshSurfaceEdgeExtractorFUN::distributeBoundaryFaces(), meshSurfaceEdgeExtractor2D::distributeBoundaryFaces(), edgeExtractor::distributeBoundaryFaces(), edgeExtractor::distributeBoundaryFacesNormalAlignment(), edgeExtractor::findCornerCandidates(), edgeExtractor::findEdgeCandidates(), findCellsIntersectingSurface::findIntersectedCells(), edgeExtractor::findPatchesNearSurfaceFace(), meshOctreeAddressing::findUsedBoxes(), meshOctreeAddressing::isIntersectedEdge(), meshOctreeAddressing::isIntersectedFace(), meshSurfaceMapper::mapCorners(), edgeExtractor::partitioner(), meshSurfaceMapper::preMapVertices(), edgeExtractor::projectDeterminedFeatureVertices(), meshOctreeInsideOutside::reviseDataBoxes(), meshOctreeCreator::setRootCubeSizeAndRefParameters(), edgeExtractor::surfaceWithPatches(), and edgeExtractor::updateMeshPatches().
label findNeighbourOverNode | ( | const meshOctreeCubeCoordinates & | cc, |
const label | nodeI | ||
) | const |
find a neighbour over a cube's node
Definition at line 115 of file meshOctreeNeighbourSearches.C.
References Foam::abort(), meshOctreeCube::cubeLabel(), Foam::FatalError, FatalErrorIn, meshOctreeCube::isLeaf(), meshOctreeCubeCoordinates::level(), meshOctreeCubeBasic::OTHERPROC, UPstream::parRun(), meshOctreeCubeCoordinates::posX(), meshOctreeCubeCoordinates::posY(), meshOctreeCubeCoordinates::posZ(), and meshOctreeCube::subCube().
void findNeighboursOverEdge | ( | const meshOctreeCubeCoordinates & | cc, |
const label | eI, | ||
DynList< label > & | neighbourLeaves | ||
) | const |
find neighbours over a cube's edge
Definition at line 185 of file meshOctreeNeighbourSearches.C.
References Foam::abort(), DynList< T, staticSize >::append(), meshOctreeCube::cubeLabel(), meshOctreeCubeCoordinates::edgeNodes_, Foam::FatalError, meshOctreeCube::isLeaf(), meshOctreeCubeCoordinates::level(), meshOctreeCubeBasic::OTHERPROC, UPstream::parRun(), meshOctreeCubeCoordinates::posX(), meshOctreeCubeCoordinates::posY(), meshOctreeCubeCoordinates::posZ(), and meshOctreeCube::subCube().
void findNeighboursInDirection | ( | const meshOctreeCubeCoordinates & | cc, |
const label | dir, | ||
DynList< label > & | neighbourLeaves | ||
) | const |
find neighbours over a leaf cube face in the given direction
Definition at line 262 of file meshOctreeNeighbourSearches.C.
References Foam::abort(), DynList< T, staticSize >::append(), meshOctreeCube::cubeLabel(), meshOctreeCubeCoordinates::faceNodes_, Foam::FatalError, meshOctreeCube::isLeaf(), meshOctreeCubeCoordinates::level(), meshOctreeCubeBasic::OTHERPROC, UPstream::parRun(), meshOctreeCubeCoordinates::posX(), meshOctreeCubeCoordinates::posY(), meshOctreeCubeCoordinates::posZ(), and meshOctreeCube::subCube().
Referenced by meshOctreeAddressing::checkGluedRegions(), tetCreatorOctree::createFaceCentreLabels(), meshOctreeAddressing::createOctreeFaces(), and meshOctreeAddressing::findUsedBoxes().
void findNeighboursForLeaf | ( | const meshOctreeCubeCoordinates & | cc, |
DynList< label > & | neighbourLeaves | ||
) | const |
find neighbour leaf cubes over all faces
Definition at line 372 of file meshOctreeNeighbourSearches.C.
References DynList< T, staticSize >::clear().
Referenced by meshOctreeInsideOutside::frontalMarking(), meshOctreeInsideOutside::markInsideCubes(), and meshOctreeInsideOutside::markOutsideCubes().
void findAllLeafNeighbours | ( | const meshOctreeCubeCoordinates & | cc, |
DynList< label > & | neighbourLeaves | ||
) | const |
find neighbour leaves over nodes, edges and faces
neighbours over nodes
neighbours over edges
neighbours over faces
neighbours of an quadtree leaf neighbours over edges
neighbours over faces
Definition at line 387 of file meshOctreeNeighbourSearches.C.
References DynList< T, staticSize >::append(), and DynList< T, staticSize >::clear().
Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), triSurfaceClassifyEdges::checkOrientation(), meshOctreeModifier::ensureCorrectRegularity(), and meshOctreeInsideOutside::reviseDataBoxes().
find neighbours over a cube's node
Definition at line 158 of file meshOctreeI.H.
References coordinates().
|
inline |
find neighbours over a cube's edge
Definition at line 167 of file meshOctreeI.H.
References coordinates().
|
inline |
find neighbouring leaves of a leaf cube
Definition at line 177 of file meshOctreeI.H.
References coordinates().
find neighbours over faces
Definition at line 187 of file meshOctreeI.H.
References coordinates().
find neighbours over nodes, edges and faces
Definition at line 196 of file meshOctreeI.H.
References coordinates().
label findLeafLabelForPosition | ( | const meshOctreeCubeCoordinates & | cc | ) | const |
return leaf cube for the given position
Definition at line 516 of file meshOctreeNeighbourSearches.C.
References meshOctreeCube::cubeLabel(), meshOctreeCube::isLeaf(), meshOctreeCubeCoordinates::level(), meshOctreeCubeBasic::OTHERPROC, meshOctreeCubeCoordinates::posX(), meshOctreeCubeCoordinates::posY(), and meshOctreeCubeCoordinates::posZ().
Referenced by meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::checkAndFixIrregularConnections(), meshOctreeAddressing::checkGluedRegions(), meshOctreeModifier::ensureCorrectRegularitySons(), and meshOctreeCreator::refineBoxesNearDataBoxes().
void findLeavesForCubeVertex | ( | const label | leafI, |
const direction | vrtI, | ||
FixedList< label, 8 > & | neighbours | ||
) | const |
find neighbouring leaves of a vertex
Definition at line 422 of file meshOctreeNeighbourSearches.C.
References Foam::endl(), forAll, Foam::Info, and meshOctreeCubeCoordinates::refineForPosition().
Referenced by meshOctreeAddressing::createNodeLabels(), and meshOctreeAddressing::createNodeLeaves().
find all leaves contained within the given boundBox
Definition at line 142 of file meshOctreeInsideCalculations.C.
References forAll, List::setSize(), and DynList< T, staticSize >::size().
Definition at line 165 of file meshOctreeInsideCalculations.C.
References DynList< T, staticSize >::append(), DynList< T, staticSize >::clear(), and forAll.
Definition at line 60 of file meshOctreeInsideCalculations.C.
References DynList< T, staticSize >::append(), Foam::constant::universal::c, DynList< T, staticSize >::clear(), meshOctreeCube::containedEdges(), meshOctreeSlot::containedEdges_, Foam::e, triSurfAddressing::edges(), meshOctree::findLeavesContainedInBox(), forAll, forAllRow, meshOctreeCube::hasContainedEdges(), meshOctreeCube::isLeaf(), Foam::magSqr(), boundBox::max(), boundBox::min(), Foam::help::nearestPointOnTheEdgeExact(), p, points, triSurfPoints::points(), meshOctreeCube::slotPtr(), Foam::sqr(), meshOctree::surface_, and Vector< Cmpt >::x().
Referenced by edgeExtractor::checkConcaveEdgeCells(), and edgeExtractor::findFeatureEdgesNearEdge().
Definition at line 98 of file meshOctreeInsideCalculations.C.
References DynList< T, staticSize >::append(), Foam::constant::universal::c, DynList< T, staticSize >::clear(), meshOctreeCube::containedElements(), meshOctreeSlot::containedTriangles_, forAll, forAllRow, meshOctreeCube::hasContainedElements(), meshOctreeCube::isLeaf(), Foam::magSqr(), boundBox::max(), boundBox::min(), Foam::help::nearestPointOnTheTriangle(), p, meshOctreeCube::slotPtr(), Foam::sqr(), and Vector< Cmpt >::x().
Referenced by triSurfaceImportSurfaceAsSubset::addSurfaceAsSubset(), edgeExtractor::findCornerCandidates(), edgeExtractor::findEdgeCandidates(), and edgeExtractor::findPatchesNearSurfaceFace().
|
inline |
return rootBox
Definition at line 135 of file meshOctreeI.H.
References meshOctree::rootBox_.
Referenced by triSurfaceClassifyEdges::checkOrientation(), meshOctreeAddressing::createOctreePoints(), tetCreatorOctree::createPointsAndAddressing(), cartesianMeshExtractor::createPolyMesh(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), tetCreatorOctree::selectElements(), and meshOctreeAutomaticRefinement::setMaxRefLevel().
|
inline |
return positions which need to be searched to achieve 1-irregular octree
Definition at line 141 of file meshOctreeI.H.
References meshOctree::regularityPositions_.
Referenced by meshOctreeCreator::refineBoxesNearDataBoxes().
|
inline |
return positions to find the leaves at each cube node
Definition at line 147 of file meshOctreeI.H.
References meshOctree::vrtLeavesPos_.
Referenced by tetCreatorOctree::createTetsAroundEdges().
void exchangeRequestsWithNeighbourProcessors | ( | const LongList< meshOctreeCubeCoordinates > & | dataToSend, |
LongList< meshOctreeCubeCoordinates > & | dataToReceive | ||
) | const |
exchange requests with other processors generating the octree
this is a serial run
send an receive the size of data chunk which will be exchanged
exchange data between processors upper-diagonal communication
receive data from other processor
send data to other processor
lower-diagonal communication
receive data from other processor
send data to other processor
Definition at line 41 of file meshOctreeParallelCommunication.C.
References Foam::abort(), List::append(), LongList< T, Offset >::appendFromStream(), UPstream::blocking, Foam::endl(), Foam::FatalError, forAll, forAllReverse, UPstream::myProcNo(), meshOctreeCubeBasic::OTHERPROC, UPstream::parRun(), Foam::Pout, UPstream::scheduled, and List::size().
Referenced by meshOctreeAddressing::checkAndFixIrregularConnections(), meshOctreeAddressing::checkGluedRegions(), meshOctreeModifier::ensureCorrectRegularity(), meshOctreeModifier::ensureCorrectRegularitySons(), meshOctreeInsideOutside::markInsideCubes(), meshOctreeInsideOutside::markOutsideCubes(), meshOctreeCreator::refineBoxesNearDataBoxes(), and meshOctreeInsideOutside::reviseDataBoxes().
void exchangeRequestsWithNeighbourProcessors | ( | const LongList< meshOctreeCubeCoordinates > & | dataToSend, |
const LongList< scalar > & | rangesToSend, | ||
LongList< meshOctreeCubeCoordinates > & | dataToReceive, | ||
LongList< scalar > & | receivedRanges | ||
) | const |
exchange requests with other processors generating the octree
this is a serial run
send an receive the size of data chunk which will be exchanged
exchange data between processors upper-diagonal communication
receive data from other processor
send data to other processor
lower-diagonal communication
receive data from other processor
send data to other processor
exchange attributes exchange data between processors upper-diagonal communication
receive data from other processor
send data to other processor
lower-diagonal communication
receive data from other processor
send data to other processor
Definition at line 192 of file meshOctreeParallelCommunication.C.
References List::append(), LongList< T, Offset >::appendFromStream(), UPstream::blocking, forAll, forAllReverse, meshOctreeCubeCoordinates::level(), UPstream::myProcNo(), UPstream::parRun(), meshOctreeCubeCoordinates::posX(), meshOctreeCubeCoordinates::posY(), meshOctreeCubeCoordinates::posZ(), UPstream::scheduled, List::size(), and LongList< T, Offset >::size().
|
inline |
neighbour processors of the current one
Definition at line 152 of file meshOctreeI.H.
References meshOctree::neiProcs_.
Referenced by meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::calcGlobalPointLabels(), meshOctreeModifier::distributeLeavesToProcessors(), meshOctreeModifier::ensureCorrectRegularity(), meshOctreeModifier::ensureCorrectRegularitySons(), meshOctreeAddressing::findUsedBoxes(), meshOctreeCreator::loadDistribution(), meshOctreeModifier::loadDistribution(), meshOctreeInsideOutside::markInsideCubes(), meshOctreeInsideOutside::meshOctreeInsideOutside(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), meshOctreeCreator::refineBoxesNearDataBoxes(), and meshOctreeInsideOutside::reviseDataBoxes().
|
friend |
Definition at line 123 of file meshOctree.H.
|
private |
Reference to surface to work on.
Definition at line 59 of file meshOctree.H.
Referenced by meshOctree::createInitialOctreeBox(), meshOctree::findEdgesInBox(), and meshOctree::surface().
|
private |
neighbouring processors which can exchange data with the current one this is only used in case of parallel calculations
Definition at line 63 of file meshOctree.H.
Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), meshOctreeModifier::distributeLeavesToProcessors(), meshOctree::neiProcs(), meshOctreeModifier::neiProcsAccess(), and meshOctreeModifier::updateCommunicationPattern().
|
private |
this list contains the first the last octree box coordinates on a neighbour processor. They are used for parallel runs when the leaves are sorted in Morton's Z-order
Definition at line 68 of file meshOctree.H.
Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), meshOctreeModifier::distributeLeavesToProcessors(), meshOctreeModifier::neiRangeAccess(), and meshOctreeModifier::updateCommunicationPattern().
|
private |
Root cube of the octree structure.
Definition at line 71 of file meshOctree.H.
Referenced by meshOctree::createInitialOctreeBox(), meshOctreeModifier::createListOfLeaves(), meshOctreeModifier::distributeLeavesToProcessors(), meshOctreeModifier::initialCubeAccess(), meshOctreeModifier::loadDistribution(), and meshOctreeModifier::updateCommunicationPattern().
|
private |
Definition at line 72 of file meshOctree.H.
|
private |
Definition at line 73 of file meshOctree.H.
Referenced by meshOctree::createInitialOctreeBox(), meshOctree::rootBox(), and meshOctreeModifier::rootBoxAccess().
|
private |
Definition at line 74 of file meshOctree.H.
Referenced by meshOctreeModifier::isRootInitialisedAccess().
|
private |
octree search range
Definition at line 77 of file meshOctree.H.
Referenced by meshOctreeModifier::searchRangeAccess().
vectors pointing into each octant they are useful during creation of vertex labels
Definition at line 81 of file meshOctree.H.
Referenced by meshOctree::octantVectors(), and meshOctree::setOctantVectorsAndPositions().
|
private |
Definition at line 82 of file meshOctree.H.
Referenced by meshOctree::positionsOfLeavesAtNodes(), and meshOctree::setOctantVectorsAndPositions().
|
private |
Definition at line 83 of file meshOctree.H.
Referenced by meshOctree::regularityPositions(), and meshOctree::setOctantVectorsAndPositions().
|
private |
List of slots containing data generated by each processor.
Definition at line 86 of file meshOctree.H.
Referenced by meshOctree::createInitialOctreeBox(), meshOctreeModifier::dataSlotsAccess(), and meshOctreeModifier::reduceMemoryConsumption().
|
private |
list of cubes which are leaves of the octree
Definition at line 89 of file meshOctree.H.
Referenced by meshOctreeModifier::addLayerFromNeighbouringProcessors(), meshOctree::createInitialOctreeBox(), meshOctreeModifier::createListOfLeaves(), meshOctreeModifier::distributeLeavesToProcessors(), meshOctreeModifier::ensureCorrectRegularity(), meshOctreeModifier::ensureCorrectRegularitySons(), meshOctree::hasContainedEdges(), meshOctree::hasContainedTriangles(), meshOctree::leafAtProc(), meshOctreeModifier::leavesAccess(), meshOctreeModifier::loadDistribution(), meshOctree::numberOfLeaves(), meshOctreeModifier::reduceMemoryConsumption(), and meshOctreeModifier::updateCommunicationPattern().
|
private |
a flag whether is true if is it a quadtree
Definition at line 92 of file meshOctree.H.
Referenced by meshOctree::createInitialOctreeBox(), and meshOctree::isQuadtree().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.