Go to the documentation of this file.
43 Info <<
"Creating tets around split edges " <<
endl;
63 for(
label plI=0;plI<8;++plI)
65 const label leafI = pLeaves(nodeI, plI);
73 nodeLevel[nodeI] = level;
77 label helpNodes[2][8];
86 forAll(curLevelLeaves, leafI)
88 const label curLabel = curLevelLeaves[leafI];
90 if( cubeLabel[curLabel] == -1 )
94 for(
label eI=0;eI<12;++eI)
109 if( (nodeLevel[start] == level) && (nodeLevel[end] == level) )
116 const label fI = 2*(eI/4)+1;
118 const label* fNodes =
123 for(
label i=0;i<4;++i)
124 edgeCubes[i] = pLeaves(start, fNodes[i]);
127 Info <<
"Cube " << curLabel <<
" has nodes ";
129 Info << nodeLabels(curLabel, i) <<
" ";
131 Info <<
"Creating tets around edge " << eI <<
endl;
132 Info <<
"Edge nodes are " << start <<
" and " << end <<
endl;
133 Info <<
"Edge cubes " << edgeCubes <<
endl;
138 const label cLabel = edgeCubes[i];
142 (cLabel < curLabel) ||
151 Info <<
"Edge cube " << i <<
" is " << cLabel <<
endl;
154 for(
label j=0;j<8;++j)
156 if( nodeLabels(cLabel,j) == start )
158 if( subNodeLabels.
sizeOfRow(cLabel) != 0 )
160 helpNodes[0][i] = subNodeLabels(cLabel,j);
164 helpNodes[0][i] = -1;
167 helpNodes[0][i+4] = cubeLabel[cLabel];
170 if( nodeLabels(cLabel, j) == end )
172 if( subNodeLabels.
sizeOfRow(cLabel) != 0 )
174 helpNodes[1][i+4] = subNodeLabels(cLabel,j);
178 helpNodes[1][i+4] = -1;
181 helpNodes[1][i] = cubeLabel[cLabel];
185 if( faceCentreLabel.
sizeOfRow(cLabel) != 0 )
187 const label helpFace = eI/4;
208 Info <<
"Face centre " <<
n <<
" "
209 << faceCentres[
n] <<
endl;
210 Info <<
"Hex 0 " << helpNodes[0][
n] <<
" and "
211 << helpNodes[0][
n+4] <<
endl;
212 Info <<
"Hex 1 " << helpNodes[1][
n] <<
" and "
213 << helpNodes[1][
n+4] <<
endl;
217 if( nodeLevel[start] > level )
228 helpNodes[0][(
k+1)%4],
240 helpNodes[0][(
k+1)%4],
262 faceCentres[(
k+3)%4],
278 faceCentres[(
k+3)%4],
298 if( nodeLevel[end] > level )
309 helpNodes[1][((
k+1)%4)+4],
321 helpNodes[1][((
k+1)%4)+4],
343 faceCentres[(
k+3)%4],
359 faceCentres[(
k+3)%4],
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
void checkAndAppendTet(const partTet)
const VRWGraph & nodeLabels() const
return nodeLabels
Ostream & endl(Ostream &os)
Add newline and flush stream.
meshOctreeAddressing octreeCheck_
reference to the octree
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
VRWGraph * faceCentreLabelPtr_
cube face label
#define forAllRow(graph, rowI, index)
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
VRWGraph * subNodeLabelsPtr_
node labels of vertices created inside split-hex boxes
static const label edgeNodes_[12][2]
edge nodes for an octree cube
static const label faceNodes_[6][4]
cube nodes making each face
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
LongList< point > tetPoints_
points of the tetrahedrisation
const meshOctree & octree() const
return const reference to meshOctree
static const label faceCentreHelper_[3][4]
helper for finding face centres of cubes sharing an edge
direction level() const
return level
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
List< labelLongList > sortedLeaves_
octree leaves sorted according to their level
void createTetsAroundSplitEdges()
create tetrahedra from faces with split edges
label k
Boltzmann constant.
const FRWGraph< label, 8 > & nodeLeaves() const
return nodeLeaves
LongList< partTet > tets_
tetrahedra
label numberOfNodes() const
return number of octree nodes
const meshOctreeCubeBasic & returnLeaf(const label) const
labelList * cubeLabelPtr_
cube centre label