Go to the documentation of this file.
111 useDATABoxes_(useDATABoxes),
113 octreePointsPtr_(NULL),
114 nodeLabelsPtr_(NULL),
115 nodeLeavesPtr_(NULL),
118 octreeFacesPtr_(NULL),
119 octreeFacesOwnersPtr_(NULL),
120 octreeFacesNeighboursPtr_(NULL),
123 leafLeavesPtr_(NULL),
124 octreeEdgesPtr_(NULL),
125 edgeLeavesPtr_(NULL),
130 globalPointLabelPtr_(NULL),
131 globalPointToLocalPtr_(NULL),
132 pointProcsPtr_(NULL),
133 globalFaceLabelPtr_(NULL),
134 globalFaceToLocalPtr_(NULL),
136 globalLeafLabelPtr_(NULL),
137 globalLeafToLocalPtr_(NULL),
138 leafAtProcsPtr_(NULL)
140 if( !useDATABoxes &&
dict.
found(
"keepCellsIntersectingBoundary") )
147 const bool nonManifoldMesh
152 if( nonManifoldMesh )
153 useDATABoxes_ =
true;
180 if( neighbour[fI] < 0 )
188 if( nAppearances.found(triangles[triI]) )
190 ++nAppearances[triangles[triI]];
194 nAppearances.insert(triangles[triI], 1);
202 if( nAppearances.found(triangles[triI]) )
204 ++nAppearances[triangles[triI]];
208 nAppearances.insert(triangles[triI], 1);
230 f[pI] = faces(fI, pI);
254 bool sameLevel(
true);
258 const label leafI = edgeCubes(eI, i);
273 if( nAppearances.found(triangles[triI]) )
275 ++nAppearances[triangles[triI]];
279 nAppearances.insert(triangles[triI], 1);
301 points[edges[eI].start()],
319 intersections.
clear();
323 const VRWGraph& edgeCubes = this->edgeLeaves();
332 const label leafI = edgeCubes(eI, i);
333 if( !octree_.hasContainedTriangles(leafI) )
337 octree_.containedTriangles(leafI, triangles);
340 if( nAppearances.found(triangles[triI]) )
342 ++nAppearances[triangles[triI]];
346 nAppearances.insert(triangles[triI], 1);
358 const bool intersectionExists =
363 points[edges[eI].start()],
368 if( intersectionExists )
395 case 0:
case 1:
case 2:
case 3:
397 edgeCubes[0] = pLeaves(nodeI, 1);
398 edgeCubes[1] = pLeaves(nodeI, 3);
399 edgeCubes[2] = pLeaves(nodeI, 5);
400 edgeCubes[3] = pLeaves(nodeI, 7);
402 case 4:
case 5:
case 6:
case 7:
404 edgeCubes[0] = pLeaves(nodeI, 2);
405 edgeCubes[1] = pLeaves(nodeI, 3);
406 edgeCubes[2] = pLeaves(nodeI, 6);
407 edgeCubes[3] = pLeaves(nodeI, 7);
409 case 8:
case 9:
case 10:
case 11:
411 edgeCubes[0] = pLeaves(nodeI, 4);
412 edgeCubes[1] = pLeaves(nodeI, 5);
413 edgeCubes[2] = pLeaves(nodeI, 6);
414 edgeCubes[3] = pLeaves(nodeI, 7);
420 "void tetMeshExtractorOctree::cubesAroundEdge(const label,"
421 "const direction, FixedList<label, 4>&)"
433 if( octree_.isQuadtree() && eI >= 8 )
446 case 0:
case 1:
case 2:
case 3:
450 case 4:
case 5:
case 6:
case 7:
454 case 8:
case 9:
case 10:
case 11:
462 "label meshOctreeAddressing::findEdgeCentre"
463 "(const label leafI, const direction eI) const"
468 for(
label i=0;i<4;++i)
472 if( pLeaves(nodeI, fNode) < 0 )
475 const label leafJ = pLeaves(nodeI, fNode);
476 if( octree_.returnLeaf(leafJ).level() > level )
478 const label shift = (i+2)%4;
labelLongList * globalPointLabelPtr_
global octree point label
VRWGraph * leafEdgesPtr_
leaf-edges addressing
VRWGraph * nodeEdgesPtr_
node-edges addressing
bool doFaceAndTriangleIntersect(const triSurf &surface, const label triI, const face &f, const pointField &facePoints)
check if the surface triangle and the face intersect
labelLongList * globalFaceLabelPtr_
global octree face label
Map< label > * globalPointToLocalPtr_
global point to local label addressing
VRWGraph * faceEdgesPtr_
face-edges addressing
#define forAll(list, i)
Loop across all elements in list.
VRWGraph * leafLeavesPtr_
leaf-leaves addressing
void cubesAroundEdge(const label leafI, const direction eI, FixedList< label, 4 > &edgeCubes) const
find cubes around an edge (cubes must be at the same level)
void addLayerFromNeighbouringProcessors()
labelLongList * octreeFacesNeighboursPtr_
Template functions to aid in the implementation of demand driven data.
void containedTriangles(const label, DynList< label > &) const
static bool & parRun()
Is this a parallel run?
void clearOut()
Clear allocated data.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
pointField * octreePointsPtr_
coordinates of octree nodes
VRWGraph * edgeFacesPtr_
edge-faces addressing
dimensioned< scalar > mag(const dimensioned< Type > &)
labelLongList * globalLeafLabelPtr_
global leaf label
void clearNodeAddressing()
labelLongList * octreeFacesOwnersPtr_
const labelLongList & octreeFaceOwner() const
return owners of octree faces
List< direction > * nodeTypePtr_
identify created nodes as OUTERNODE or INNERNODE
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void clearParallelAddressing()
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Pre-declare SubField and related Field type.
bool isIntersectedFace(const label fI) const
checks if the face is intersected by the surface
List< direction > * boxTypePtr_
identify which boxes should be used as mesh cells
#define forAllRow(graph, rowI, index)
FRWGraph< label, 8 > * nodeLeavesPtr_
node leaves
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const VRWGraph & edgeLeaves() const
return edge-leaves addressing
bool triLineIntersection(const triangle< point, point > &tria, const point &lineStart, const point &lineEnd, point &intersection)
check if a line intersects the triangle, and return the intersection
errorManip< error > abort(error &err)
static const label edgeNodes_[12][2]
edge nodes for an octree cube
static const label faceNodes_[6][4]
cube nodes making each face
const labelLongList & octreeFaceNeighbour() const
return neighbours of octree faces
LongList< edge > * octreeEdgesPtr_
edges of the octree
Map< label > * globalFaceToLocalPtr_
global face label to local label addressing
VRWGraph * pointProcsPtr_
point-processors addressing
VRWGraph * faceProcsPtr_
face-processors addressing
VRWGraph * octreeFacesPtr_
faces of the octree
label nNodes_
number of created octree nodes
meshOctreeAddressing(const meshOctreeAddressing &)
Disallow default bitwise copy construct.
direction level() const
return level
VRWGraph * edgeLeavesPtr_
edges-leaves addressing
VRWGraph * nodeFacesPtr_
node-faces addressing
const LongList< edge > & octreeEdges() const
return octree edges, created for MESHCELL boxes
bool isIntersectedEdge(const label eI) const
checks if the edge is intersected by the surface
bool hasContainedTriangles(const label) const
Map< label > * globalLeafToLocalPtr_
global leaf label to local label addressing for octree leaves
VRWGraph * nodeLabelsPtr_
node labels
const pointField & octreePoints() const
return coordinates of octree vertices
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.
const VRWGraph & octreeFaces() const
return octree faces, created for MESHCELL boxes
label findEdgeCentre(const label leafI, const direction eI) const
find edge centre if it exists
const triSurf & surface() const
return a reference to the surface
const meshOctree & octree_
reference to the octree
VRWGraph * leafAtProcsPtr_
leaf at procs
void edgeIntersections(const label eI, DynList< point > &intersections) const
const meshOctreeCubeBasic & returnLeaf(const label) const
void clear()
Clear the list, i.e. set next free to zero.
void append(const T &e)
Append an element at the end of the list.
VRWGraph * leafFacesPtr_
octree box-faces addressing