Public Member Functions | |
meshOctreeCubeCoordinates () | |
Null constructor. More... | |
meshOctreeCubeCoordinates (const label posX, const label posY, const label posZ, const direction level) | |
Construct from coordinates and level. More... | |
meshOctreeCubeCoordinates (const meshOctreeCubeCoordinates &) | |
copy constructor More... | |
~meshOctreeCubeCoordinates () | |
direction | level () const |
return level More... | |
label | posX () const |
return x, y, z coordinates More... | |
label | posY () const |
label | posZ () const |
meshOctreeCubeCoordinates | refineForPosition (const label) const |
return the coordinates of child cube at the given position More... | |
meshOctreeCubeCoordinates | reduceLevelBy (const direction diff) const |
meshOctreeCubeCoordinates | reduceToLevel (const direction) const |
return the coordinates of the parent at the given level More... | |
meshOctreeCubeCoordinates | increaseToLevelMin (const direction l) const |
return the minimal coordinates of the child at the given level More... | |
meshOctreeCubeCoordinates | increaseToLevelMax (const direction l) const |
return the maximal coordinates of the child at the given level More... | |
void | cubeBox (const boundBox &, point &, point &) const |
return min and max points More... | |
void | vertices (const boundBox &, FixedList< point, 8 > &) const |
calculate vertices More... | |
point | centre (const boundBox &) const |
return centre More... | |
scalar | size (const boundBox &) const |
return size More... | |
void | edgeVertices (const boundBox &, FixedList< FixedList< point, 2 >, 12 > &) const |
edges of the cube More... | |
bool | intersectsTriangle (const triSurf &, const boundBox &, const label) const |
check if the surface triangle intersects the cube More... | |
bool | intersectsTriangleExact (const triSurf &, const boundBox &, const label) const |
bool | isVertexInside (const boundBox &, const point &) const |
is a vertex inside the cube More... | |
bool | isPositionInside (const meshOctreeCubeCoordinates &) const |
void | neighbourRange (meshOctreeCubeCoordinates &minCoord, meshOctreeCubeCoordinates &maxCoord) const |
bool | intersectsLine (const boundBox &, const point &, const point &) const |
check if the cube intersects a line More... | |
meshOctreeCubeCoordinates | operator+ (const meshOctreeCubeCoordinates &) const |
void | operator= (const meshOctreeCubeCoordinates &) |
bool | operator== (const meshOctreeCubeCoordinates &) const |
bool | operator!= (const meshOctreeCubeCoordinates &) const |
bool | operator<= (const meshOctreeCubeCoordinates &) const |
comparison of Morton codes More... | |
bool | operator>= (const meshOctreeCubeCoordinates &) const |
bool | operator< (const meshOctreeCubeCoordinates &) const |
bool | operator> (const meshOctreeCubeCoordinates &) const |
Static Public Attributes | |
static const label | edgeNodes_ [12][2] |
edge nodes for an octree cube More... | |
static const label | faceNodes_ [6][4] |
cube nodes making each face More... | |
static const label | nodeFaces_ [8][3] |
node-faces addressing for the cube More... | |
static const label | faceEdges_ [6][4] |
face-edges addressing for the octree cube More... | |
static const label | edgeFaces_ [12][2] |
edge-faces addressing for the octree cube More... | |
static const label | oppositeFace_ [6] = {1, 0, 3, 2, 5, 4} |
return the opposite face of each cube face More... | |
Private Attributes | |
label | posX_ |
coordinates in the octree structure More... | |
label | posY_ |
label | posZ_ |
direction | level_ |
cube level in the octree structure More... | |
Friends | |
Istream & | operator>> (Istream &, meshOctreeCubeCoordinates &) |
Ostream & | operator<< (Ostream &, const meshOctreeCubeCoordinates &) |
Definition at line 55 of file meshOctreeCubeCoordinates.H.
|
inline |
Null constructor.
Definition at line 38 of file meshOctreeCubeCoordinatesI.H.
|
inlineexplicit |
Construct from coordinates and level.
Definition at line 47 of file meshOctreeCubeCoordinatesI.H.
|
inline |
copy constructor
Definition at line 61 of file meshOctreeCubeCoordinatesI.H.
|
inline |
Definition at line 108 of file meshOctreeCubeCoordinates.H.
|
inline |
return level
Definition at line 74 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_.
Referenced by tetCreatorOctree::createFaceCentreLabels(), meshOctreeAddressing::createNodeLabels(), meshOctreeAddressing::createOctreeFaces(), meshOctreeCreator::createOctreeWithRefinedBoundary(), tetCreatorOctree::createPointsAndAddressing(), tetCreatorOctree::createTetsAroundEdges(), tetCreatorOctree::createTetsAroundSplitEdges(), meshOctreeModifier::ensureCorrectRegularity(), meshOctree::exchangeRequestsWithNeighbourProcessors(), meshOctree::findCubeForPosition(), meshOctreeAddressing::findEdgeCentre(), meshOctree::findLeafLabelForPosition(), meshOctree::findNeighbourOverNode(), meshOctree::findNeighboursInDirection(), meshOctree::findNeighboursOverEdge(), meshOctreeAddressing::isIntersectedEdge(), meshOctreeAddressing::isIntersectedFace(), meshOctreeCubeCoordinates::isPositionInside(), meshOctreeAutomaticRefinement::refineBasedOnCurvature(), meshOctreeAutomaticRefinement::refineBasedOnProximityTests(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxes(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), meshOctreeCreator::refineBoxesNearDataBoxes(), and meshOctreeModifier::refineTreeForCoordinates().
|
inline |
return x, y, z coordinates
Definition at line 79 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::posX_.
Referenced by meshOctree::exchangeRequestsWithNeighbourProcessors(), meshOctree::findCubeForPosition(), meshOctree::findLeafLabelForPosition(), meshOctree::findNeighbourOverNode(), meshOctree::findNeighboursInDirection(), meshOctree::findNeighboursOverEdge(), and meshOctreeModifier::refineTreeForCoordinates().
|
inline |
Definition at line 84 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::posY_.
Referenced by meshOctree::exchangeRequestsWithNeighbourProcessors(), meshOctree::findCubeForPosition(), meshOctree::findLeafLabelForPosition(), meshOctree::findNeighbourOverNode(), meshOctree::findNeighboursInDirection(), meshOctree::findNeighboursOverEdge(), and meshOctreeModifier::refineTreeForCoordinates().
|
inline |
Definition at line 89 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::posZ_.
Referenced by meshOctree::exchangeRequestsWithNeighbourProcessors(), meshOctree::findCubeForPosition(), meshOctree::findLeafLabelForPosition(), meshOctree::findNeighbourOverNode(), meshOctree::findNeighboursInDirection(), meshOctree::findNeighboursOverEdge(), and meshOctreeModifier::refineTreeForCoordinates().
|
inline |
return the coordinates of child cube at the given position
create new boxes in z-order fashion
Definition at line 95 of file meshOctreeCubeCoordinatesI.H.
Referenced by tetCreatorOctree::createTetsAroundEdges(), meshOctreeModifier::ensureCorrectRegularitySons(), meshOctree::findLeavesForCubeVertex(), and meshOctreeAutomaticRefinement::refineSelectedBoxes().
|
inline |
return the coordinates of the parent at the level reduced by the given number of levels
Definition at line 118 of file meshOctreeCubeCoordinatesI.H.
References Foam::diff().
Referenced by meshOctreeCubeCoordinates::isPositionInside().
|
inline |
return the coordinates of the parent at the given level
Definition at line 134 of file meshOctreeCubeCoordinatesI.H.
References Foam::diff().
Referenced by meshOctreeCubeCoordinates::operator<(), meshOctreeCubeCoordinates::operator<=(), meshOctreeCubeCoordinates::operator>(), and meshOctreeCubeCoordinates::operator>=().
|
inline |
return the minimal coordinates of the child at the given level
Definition at line 144 of file meshOctreeCubeCoordinatesI.H.
References Foam::diff().
|
inline |
return the maximal coordinates of the child at the given level
Definition at line 159 of file meshOctreeCubeCoordinatesI.H.
References Foam::diff().
return min and max points
Definition at line 174 of file meshOctreeCubeCoordinatesI.H.
References boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by triSurfaceClassifyEdges::checkOrientation(), meshOctreeCube::leavesInBox(), and meshOctreeCreator::refineBoxesContainedInObjects().
calculate vertices
Definition at line 114 of file meshOctreeCubeCoordinatesIntersections.C.
References boundBox::max(), and boundBox::min().
Referenced by meshOctreeAddressing::createOctreePoints(), tetCreatorOctree::createPointsAndAddressing(), and tetCreatorOctree::selectElements().
return centre
Definition at line 203 of file meshOctreeCubeCoordinatesI.H.
References Foam::max(), and Foam::min().
Referenced by tetCreatorOctree::createPointsAndAddressing(), meshOctree::findLeafContainingVertex(), meshOctreeCube::leavesInSphere(), meshOctreeCube::markLeavesInSphere(), meshOctreeAutomaticRefinement::refineBasedOnContainedPartitions(), meshOctreeAutomaticRefinement::refineBasedOnProximityTests(), and tetCreatorOctree::selectElements().
|
inline |
return size
Definition at line 213 of file meshOctreeCubeCoordinatesI.H.
References Foam::max(), and Foam::min().
Referenced by triSurfaceClassifyEdges::checkOrientation(), meshOctreeAutomaticRefinement::refineBasedOnContainedPartitions(), meshOctreeAutomaticRefinement::refineBasedOnCurvature(), meshOctreeAutomaticRefinement::refineBasedOnProximityTests(), and meshOctreeCreator::refineBoxesIntersectingSurfaces().
edges of the cube
Definition at line 137 of file meshOctreeCubeCoordinatesIntersections.C.
References Foam::e.
check if the surface triangle intersects the cube
calculate the bound box of the octree cube
calculate the bounding box of the triangle
Definition at line 153 of file meshOctreeCubeCoordinatesIntersections.C.
References Vector< Cmpt >::max, boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), and points.
bool intersectsTriangleExact | ( | const triSurf & | surface, |
const boundBox & | rootBox, | ||
const label | tI | ||
) | const |
check if any of the vertices is in the cube
check if any edges of the triangle intersect the cube
check if any cube edges intersects the triangle
Definition at line 187 of file meshOctreeCubeCoordinatesIntersections.C.
References Foam::help::boundBoxLineIntersection(), Foam::e, edge::end(), forAll, boundBox::max(), boundBox::min(), points, s(), edge::start(), and Foam::help::triLineIntersection().
Referenced by meshOctreeCreator::refineBoxesIntersectingSurfaces().
is a vertex inside the cube
Definition at line 244 of file meshOctreeCubeCoordinatesIntersections.C.
References boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), and p.
Referenced by meshOctree::findLeafContainingVertex().
bool isPositionInside | ( | const meshOctreeCubeCoordinates & | cc | ) | const |
Definition at line 270 of file meshOctreeCubeCoordinatesIntersections.C.
References Foam::diff(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, meshOctreeCubeCoordinates::level(), and meshOctreeCubeCoordinates::reduceLevelBy().
|
inline |
return the possible range of neighbour boxes one level higher than the current cube. It is useful for parallel octree
Definition at line 223 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, and meshOctreeCubeCoordinates::posZ_.
check if the cube intersects a line
check if the cube contains start point or end point
check for intersections of line with the cube faces
x-min face
x-max face
y-min face
y-max face
z-min face
z-min face
Definition at line 309 of file meshOctreeCubeCoordinatesIntersections.C.
References Foam::e, Foam::mag(), boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), s(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by meshOctreeCreator::refineBoxesIntersectingEdgeMeshes().
|
inline |
Definition at line 250 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, and meshOctreeCubeCoordinates::posZ_.
|
inline |
Definition at line 266 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, and meshOctreeCubeCoordinates::posZ_.
|
inline |
Definition at line 277 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, and meshOctreeCubeCoordinates::posZ_.
|
inline |
Definition at line 293 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, and meshOctreeCubeCoordinates::posZ_.
|
inline |
comparison of Morton codes
Definition at line 309 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, Foam::max(), Foam::min(), meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, meshOctreeCubeCoordinates::posZ_, and meshOctreeCubeCoordinates::reduceToLevel().
|
inline |
Definition at line 362 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, Foam::max(), Foam::min(), meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, meshOctreeCubeCoordinates::posZ_, and meshOctreeCubeCoordinates::reduceToLevel().
|
inline |
Definition at line 415 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, Foam::max(), Foam::min(), meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, meshOctreeCubeCoordinates::posZ_, and meshOctreeCubeCoordinates::reduceToLevel().
|
inline |
Definition at line 468 of file meshOctreeCubeCoordinatesI.H.
References meshOctreeCubeCoordinates::level_, Foam::max(), Foam::min(), meshOctreeCubeCoordinates::posX_, meshOctreeCubeCoordinates::posY_, meshOctreeCubeCoordinates::posZ_, and meshOctreeCubeCoordinates::reduceToLevel().
|
friend |
Definition at line 521 of file meshOctreeCubeCoordinatesI.H.
|
friend |
Definition at line 546 of file meshOctreeCubeCoordinatesI.H.
|
private |
coordinates in the octree structure
Definition at line 59 of file meshOctreeCubeCoordinates.H.
Referenced by meshOctreeCubeCoordinates::neighbourRange(), meshOctreeCubeCoordinates::operator!=(), meshOctreeCubeCoordinates::operator+(), meshOctreeCubeCoordinates::operator<(), Foam::operator<<(), meshOctreeCubeCoordinates::operator<=(), meshOctreeCubeCoordinates::operator=(), meshOctreeCubeCoordinates::operator==(), meshOctreeCubeCoordinates::operator>(), meshOctreeCubeCoordinates::operator>=(), Foam::operator>>(), and meshOctreeCubeCoordinates::posX().
|
private |
Definition at line 60 of file meshOctreeCubeCoordinates.H.
Referenced by meshOctreeCubeCoordinates::neighbourRange(), meshOctreeCubeCoordinates::operator!=(), meshOctreeCubeCoordinates::operator+(), meshOctreeCubeCoordinates::operator<(), Foam::operator<<(), meshOctreeCubeCoordinates::operator<=(), meshOctreeCubeCoordinates::operator=(), meshOctreeCubeCoordinates::operator==(), meshOctreeCubeCoordinates::operator>(), meshOctreeCubeCoordinates::operator>=(), Foam::operator>>(), and meshOctreeCubeCoordinates::posY().
|
private |
Definition at line 61 of file meshOctreeCubeCoordinates.H.
Referenced by meshOctreeCubeCoordinates::neighbourRange(), meshOctreeCubeCoordinates::operator!=(), meshOctreeCubeCoordinates::operator+(), meshOctreeCubeCoordinates::operator<(), Foam::operator<<(), meshOctreeCubeCoordinates::operator<=(), meshOctreeCubeCoordinates::operator=(), meshOctreeCubeCoordinates::operator==(), meshOctreeCubeCoordinates::operator>(), meshOctreeCubeCoordinates::operator>=(), Foam::operator>>(), and meshOctreeCubeCoordinates::posZ().
|
private |
cube level in the octree structure
Definition at line 64 of file meshOctreeCubeCoordinates.H.
Referenced by meshOctreeCubeCoordinates::level(), meshOctreeCubeCoordinates::neighbourRange(), meshOctreeCubeCoordinates::operator!=(), meshOctreeCubeCoordinates::operator+(), meshOctreeCubeCoordinates::operator<(), Foam::operator<<(), meshOctreeCubeCoordinates::operator<=(), meshOctreeCubeCoordinates::operator=(), meshOctreeCubeCoordinates::operator==(), meshOctreeCubeCoordinates::operator>(), meshOctreeCubeCoordinates::operator>=(), and Foam::operator>>().
|
static |
edge nodes for an octree cube
Definition at line 70 of file meshOctreeCubeCoordinates.H.
Referenced by tetCreatorOctree::createTetsAroundEdges(), tetCreatorOctree::createTetsAroundSplitEdges(), tetCreatorOctree::createTetsFromFacesWithCentreNode(), meshOctreeAddressing::cubesAroundEdge(), meshOctreeAddressing::findEdgeCentre(), and meshOctree::findNeighboursOverEdge().
|
static |
cube nodes making each face
Definition at line 73 of file meshOctreeCubeCoordinates.H.
Referenced by tetCreatorOctree::createFaceCentreLabels(), meshOctreeAddressing::createOctreeFaces(), tetCreatorOctree::createTetsAroundEdges(), tetCreatorOctree::createTetsAroundSplitEdges(), tetCreatorOctree::createTetsFromFacesWithCentreNode(), tetCreatorOctree::createTetsFromSplitFaces(), meshOctreeAddressing::findEdgeCentre(), and meshOctree::findNeighboursInDirection().
|
static |
node-faces addressing for the cube
Definition at line 76 of file meshOctreeCubeCoordinates.H.
|
static |
face-edges addressing for the octree cube
Definition at line 79 of file meshOctreeCubeCoordinates.H.
Referenced by meshOctreeAddressing::createOctreeFaces(), and tetCreatorOctree::createTetsFromFacesWithCentreNode().
|
static |
edge-faces addressing for the octree cube
Definition at line 82 of file meshOctreeCubeCoordinates.H.
Referenced by tetCreatorOctree::createTetsFromFacesWithCentreNode().
|
static |
return the opposite face of each cube face
Definition at line 85 of file meshOctreeCubeCoordinates.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.