meshOctreeModifierRefineSelectedBoxes.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "meshOctreeModifier.H"
29 #include "triSurf.H"
30 #include "HashSet.H"
31 #include "helperFunctions.H"
33 
34 # ifdef USE_OMP
35 #include <omp.h>
36 # endif
37 
38 #include <set>
39 
40 #include <sys/stat.h>
41 
42 //#define OCTREETiming
43 //#define DEBUGSearch
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
53 (
54  labelList& refineBox,
55  const label nLayers
56 ) const
57 {
58  const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
59 
60  //- this is needed for parallel runs to reduce the communication messages
61  labelHashSet transferCoordinates;
62 
63  DynList<label> neiLeaves;
64 
65  for(label i=1;i<=nLayers;++i)
66  {
68 
69  transferCoordinates.clear();
70 
71  labelLongList activeLeaves;
72  forAll(leaves, leafI)
73  if( refineBox[leafI] == i )
74  activeLeaves.append(leafI);
75 
76  # ifdef USE_OMP
77  # pragma omp parallel for private(neiLeaves) schedule(dynamic, 20)
78  # endif
79  forAll(activeLeaves, lI)
80  {
81  const label leafI = activeLeaves[lI];
82 
83  const meshOctreeCubeCoordinates& oc = leaves[leafI]->coordinates();
84 
85  neiLeaves.clear();
86  octree_.findAllLeafNeighbours(oc, neiLeaves);
87 
88  forAll(neiLeaves, posI)
89  {
90  const label neiLabel = neiLeaves[posI];
91 
92  if( neiLabel == meshOctreeCubeBasic::OTHERPROC )
93  {
94  # ifdef USE_OMP
95  # pragma omp critical
96  # endif
97  {
98  if( !transferCoordinates.found(leafI) )
99  {
100  processorChecks.append(oc);
101  transferCoordinates.insert(leafI);
102  }
103  }
104 
105  continue;
106  }
107 
108  if( neiLabel < 0 )
109  continue;
110 
111  if( !refineBox[neiLabel] )
112  refineBox[neiLabel] = i+1;
113  }
114  }
115 
116  if( octree_.neiProcs().size() )
117  {
119  octree_.exchangeRequestsWithNeighbourProcessors
120  (
121  processorChecks,
122  receivedCoords
123  );
124 
125  //- check consistency with received cube coordinates
126  # ifdef USE_OMP
127  # pragma omp parallel for if( receivedCoords.size() > 1000 ) \
128  schedule(dynamic, 20) private(neiLeaves)
129  # endif
130  forAll(receivedCoords, ccI)
131  {
132  octree_.findAllLeafNeighbours(receivedCoords[ccI], neiLeaves);
133 
134  forAll(neiLeaves, posI)
135  {
136  if( neiLeaves[posI] < 0 )
137  continue;
138 
139  if( !refineBox[neiLeaves[posI]] )
140  refineBox[neiLeaves[posI]] = i+1;
141  }
142  }
143  }
144  }
145 }
146 
148 (
149  labelList& refineBox,
150  const label nLayers
151 ) const
152 {
153  const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
154 
155  //- this is needed for parallel runs to reduce the communication messages
156  labelHashSet transferCoordinates;
157 
158  DynList<label> neiLeaves;
159 
160  for(label i=1;i<=nLayers;++i)
161  {
162  LongList<meshOctreeCubeCoordinates> processorChecks;
163 
164  transferCoordinates.clear();
165 
166  labelLongList activeLeaves;
167  forAll(leaves, leafI)
168  if( refineBox[leafI] == i )
169  activeLeaves.append(leafI);
170 
171  # ifdef USE_OMP
172  # pragma omp parallel for private(neiLeaves) schedule(dynamic, 20)
173  # endif
174  forAll(activeLeaves, lI)
175  {
176  const label leafI = activeLeaves[lI];
177 
178  const meshOctreeCubeCoordinates& oc = leaves[leafI]->coordinates();
179 
180  neiLeaves.clear();
181  octree_.findNeighboursForLeaf(oc, neiLeaves);
182 
183  forAll(neiLeaves, posI)
184  {
185  const label neiLabel = neiLeaves[posI];
186 
187  if( neiLabel == meshOctreeCubeBasic::OTHERPROC )
188  {
189  # ifdef USE_OMP
190  # pragma omp critical
191  # endif
192  {
193  if( !transferCoordinates.found(leafI) )
194  {
195  processorChecks.append(oc);
196  transferCoordinates.insert(leafI);
197  }
198  }
199 
200  continue;
201  }
202 
203  if( neiLabel < 0 )
204  continue;
205 
206  if( !refineBox[neiLabel] )
207  refineBox[neiLabel] = i+1;
208  }
209  }
210 
211  if( octree_.neiProcs().size() )
212  {
214  octree_.exchangeRequestsWithNeighbourProcessors
215  (
216  processorChecks,
217  receivedCoords
218  );
219 
220  //- check consistency with received cube coordinates
221  # ifdef USE_OMP
222  # pragma omp parallel for if( receivedCoords.size() > 1000 ) \
223  schedule(dynamic, 20) private(neiLeaves)
224  # endif
225  forAll(receivedCoords, ccI)
226  {
227  neiLeaves.clear();
228  octree_.findNeighboursForLeaf(receivedCoords[ccI], neiLeaves);
229 
230  forAll(neiLeaves, posI)
231  {
232  if( neiLeaves[posI] < 0 )
233  continue;
234 
235  if( !refineBox[neiLeaves[posI]] )
236  refineBox[neiLeaves[posI]] = i+1;
237  }
238  }
239  }
240  }
241 }
242 
243 # ifdef DEBUGSearch
244 void writeLeaves
245 (
246  const fileName& fName,
247  const meshOctree& octree,
248  const labelList& markedBoxes,
249  const label layer
250 )
251 {
252  labelLongList activeLeaves;
253 
254  forAll(markedBoxes, leafI)
255  if( markedBoxes[leafI] == layer )
256  activeLeaves.append(leafI);
257 
258  OFstream file(fName);
259 
260  //- write the header
261  file << "# vtk DataFile Version 3.0\n";
262  file << "vtk output\n";
263  file << "ASCII\n";
264  file << "DATASET POLYDATA\n";
265 
266  //- write points
267  file << "POINTS " << (8 * activeLeaves.size()) << " float\n";
268  forAll(activeLeaves, i)
269  {
270  const label leafI = activeLeaves[i];
271  FixedList<point, 8> vertices;
272  octree.returnLeaf(leafI).vertices(octree.rootBox(), vertices);
273 
274  forAll(vertices, vI)
275  {
276  const point& p = vertices[vI];
277 
278  file << p.x() << ' ' << p.y() << ' ' << p.z() << nl;
279  }
280  }
281 
282  //- write lines
283  file << "\nPOLYGONS " << (6*activeLeaves.size())
284  << " " << 30*activeLeaves.size() << nl;
285  forAll(activeLeaves, i)
286  {
287  const label startNode = 8 * i;
288  for(label fI=0;fI<6;++fI)
289  {
290  file << 4;
291 
292  for(label pI=0;pI<4;++pI)
293  file << " " << (startNode+meshOctreeCube::faceNodes_[fI][pI]);
294 
295  file << nl;
296  }
297  }
298 
299  file << "\n";
300 }
301 # endif
302 
304 (
305  labelList& refineBox,
306  labelList& nLayers,
307  List<direction>& targetRefLevel
308 ) const
309 {
310  const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
311 
312  # ifdef DEBUGSearch
313  Info << "Marking additional layers " << endl;
314  # endif
315 
316  //- sort leaves based on the number of additional layers
317  label maxLevel = Foam::max(nLayers);
318  reduce(maxLevel, maxOp<label>());
319 
320  List<labelLongList> leavesForLayer(maxLevel+1);
321  forAll(nLayers, leafI)
322  {
323  if( nLayers[leafI] < 1 )
324  continue;
325 
326  leavesForLayer[nLayers[leafI]].append(leafI);
327  }
328 
329  //- set refinement flag to additional boxes marked separately
330  label nMarked(0);
331 
332  forAllReverse(leavesForLayer, layerI)
333  {
334  const labelLongList& activeLeaves = leavesForLayer[layerI];
335 
336  if( returnReduce(activeLeaves.size(), sumOp<label>()) == 0 )
337  continue;
338 
339  //- find the max required refinement level
340  direction maxLevel(0);
341 
342  # ifdef USE_OMP
343  # pragma omp parallel
344  # endif
345  {
346  direction localMax(0);
347 
348  # ifdef USE_OMP
349  # pragma omp for schedule(dynamic, 50)
350  # endif
351  forAll(activeLeaves, i)
352  localMax = Foam::max(localMax, targetRefLevel[activeLeaves[i]]);
353 
354  # ifdef USE_OMP
355  # pragma omp critical
356  # endif
357  maxLevel = Foam::max(localMax, maxLevel);
358  }
359 
360  label ml = maxLevel;
361  reduce(ml, maxOp<label>());
362  maxLevel = ml;
363 
364  //- mark additional boxes for refinement
365  for(direction levelI=maxLevel;levelI>0;--levelI)
366  {
367  labelList markedBoxes(leaves.size(), 0);
368 
369  label counter(0);
370  # ifdef USE_OMP
371  # pragma omp parallel for reduction(+:counter)
372  # endif
373  forAll(activeLeaves, lI)
374  {
375  const label leafI = activeLeaves[lI];
376 
377  if( targetRefLevel[leafI] == levelI )
378  {
379  markedBoxes[leafI] = 1;
380  ++counter;
381  }
382  }
383 
384  if( returnReduce(counter, sumOp<label>()) == 0 )
385  continue;
386 
387  //- mark additional cells at this refinement level
388  markAdditionalLayersOfFaceNeighbours(markedBoxes, layerI);
389 
390  # ifdef DEBUGSearch
391  for(label i=1;i<(layerI+1);++i)
392  {
393  const fileName fName("leaves_"+help::labelToText(i)+".vtk");
394  writeLeaves(fName, octree_, markedBoxes, i);
395  }
396 
397  Info << "LayerI " << layerI << endl;
398  # endif
399 
400  //- update the main list
401  # ifdef USE_OMP
402  # pragma omp parallel for schedule(dynamic, 100) \
403  reduction(+:nMarked)
404  # endif
405  forAll(markedBoxes, leafI)
406  {
407  if( markedBoxes[leafI] < 2 )
408  continue;
409 
410  if( leaves[leafI]->level() >= levelI )
411  continue;
412 
413  if( !refineBox[leafI] )
414  {
415  refineBox[leafI] |= 1;
416  ++nMarked;
417  }
418  }
419  }
420  }
421 
422  reduce(nMarked, sumOp<label>());
423 
424  return nMarked;
425 }
426 
428 (
429  labelList& refineBox,
430  const bool hexRefinement
431 )
432 {
433  # ifdef OCTREETiming
434  const scalar startTime = omp_get_wtime();
435  # endif
436 
437  //- ensure that refinement will produce 1-irregular octree
438  do
439  {
440  ensureCorrectRegularity(refineBox);
441  } while( hexRefinement && ensureCorrectRegularitySons(refineBox) );
442 
443  # ifdef OCTREETiming
444  const scalar regTime = omp_get_wtime();
445  Info << "Time for ensuring regularity " << (regTime-startTime) << endl;
446  # endif
447 
448  const triSurf& surface = octree_.surface();
449  const boundBox& rootBox = octree_.rootBox();
450  const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
451 
452  //- this is needed for thread safety
453  //- such solutions make me a sad bunny :(
454  surface.facetEdges();
455  surface.edgeFacets();
456  surface.edges();
457 
458  # ifdef USE_OMP
459  # pragma omp parallel num_threads(octree_.dataSlots_.size())
460  # endif
461  {
462  # ifdef USE_OMP
463  meshOctreeSlot* slotPtr = &octree_.dataSlots_[omp_get_thread_num()];
464  # else
465  meshOctreeSlot* slotPtr = &octree_.dataSlots_[0];
466  # endif
467 
468  if( !octree_.isQuadtree() )
469  {
470  # ifdef USE_OMP
471  # pragma omp for schedule(dynamic, 100)
472  # endif
473  forAll(leaves, leafI)
474  {
475  if( refineBox[leafI] )
476  leaves[leafI]->refineCube(surface, rootBox, slotPtr);
477  }
478  }
479  else
480  {
481  # ifdef USE_OMP
482  # pragma omp for schedule(dynamic, 100)
483  # endif
484  forAll(leaves, leafI)
485  {
486  if( refineBox[leafI] )
487  leaves[leafI]->refineCube2D(surface, rootBox, slotPtr);
488  }
489  }
490  }
491 
492  createListOfLeaves();
493 
494  # ifdef OCTREETiming
495  Info << "Time for actual refinement " << (omp_get_wtime()-regTime) << endl;
496  # endif
497 }
498 
500 (
501  labelList& refineBox,
502  const scalarList& refThickness
503 )
504 {
505  const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
506 
507  typedef std::pair<direction, label> mapKey;
508  typedef std::map<mapKey, LongList<meshOctreeCube*> > lMap;
509  lMap leavesMap;
510 
511  # ifdef DEBUGSearch
512  Info << "Refining leaves and additional layers" << endl;
513  # endif
514 
515  //- find the maximum refinement level of leaves marked for refinement
516  direction maxLevel(0);
517 
518  # ifdef USE_OMP
519  # pragma omp parallel
520  {
521  direction localMax(0);
522 
523  forAll(refineBox, leafI)
524  {
525  if( refineBox[leafI] )
526  localMax = Foam::max(localMax, leaves[leafI]->level());
527  }
528 
529  # pragma omp critical
530  maxLevel = Foam::max(maxLevel, localMax);
531  }
532  # else
533  forAll(refineBox, leafI)
534  {
535  if( refineBox[leafI] )
536  maxLevel = Foam::max(maxLevel, leaves[leafI]->level());
537  }
538  # endif
539 
540  label ml = maxLevel;
541  reduce(ml, maxOp<label>());
542  maxLevel = ml;
543 
544  //- sort leaves based on the current level
545  List<labelLongList> leavesForLevel(maxLevel+1);
546  forAll(refineBox, leafI)
547  {
548  if( !refineBox[leafI] )
549  continue;
550 
551  leavesForLevel[leaves[leafI]->level()].append(leafI);
552  }
553 
554  //- find leaves with the same number of additional layers
555  forAllReverse(leavesForLevel, levelI)
556  {
557  const labelLongList& activeLeaves = leavesForLevel[levelI];
558 
559  if( returnReduce(activeLeaves.size(), sumOp<label>()) == 0 )
560  continue;
561 
562  labelLongList nLayersForActive(activeLeaves.size());
563  label maxNLayers(0);
564  # ifdef USE_OMP
565  # pragma omp parallel
566  {
567  label localMaxNLayers(0);
568 
569  forAll(activeLeaves, i)
570  {
571  const label leafI = activeLeaves[i];
572 
573  const scalar cs = leaves[leafI]->size(octree_.rootBox());
574 
575  nLayersForActive[i] = Foam::max(ceil(refThickness[leafI]/cs), 1);
576 
577  localMaxNLayers =
578  Foam::max(localMaxNLayers, nLayersForActive[i]);
579  }
580 
581  # pragma omp critical
582  maxNLayers = Foam::max(maxNLayers, localMaxNLayers);
583  }
584  # else
585  forAll(activeLeaves, i)
586  {
587  const label leafI = activeLeaves[i];
588 
589  const scalar cs = leaves[leafI]->size(octree_.rootBox());
590 
591  nLayersForActive[i] = Foam::max(ceil(refThickness[leafI]/cs), 1);
592 
593  maxNLayers = Foam::max(maxNLayers, nLayersForActive[i]);
594  }
595  # endif
596 
597  //- find the maximum number of layers
598  reduce(maxNLayers, maxOp<label>());
599 
600  for(label layerI=0;layerI<=maxNLayers;++layerI)
601  {
602  mapKey key(levelI, layerI);
603  LongList<meshOctreeCube*>& currLeaves = leavesMap[key];
604  currLeaves.clear();
605  }
606 
607  forAll(activeLeaves, i)
608  {
609  mapKey key(levelI, nLayersForActive[i]);
610  leavesMap[key].append(leaves[activeLeaves[i]]);
611  }
612  }
613 
614  //- refine leaves
615  forAllConstIter(lMap, leavesMap, it)
616  {
617  const label nLayers = it->first.second;
618  const direction levelI = it->first.first;
619 
620  const LongList<meshOctreeCube*>& selectedLeaves = it->second;
621 
622  if( returnReduce(selectedLeaves.size(), sumOp<label>()) == 0 )
623  continue;
624 
625  # ifdef DEBUGSearch
626  Info << "Target level " << label(levelI) << endl;
627  Info << "Target num layer " << nLayers << endl;
628  Info << "Num selected leaves " << selectedLeaves.size() << endl;
629  # endif
630 
631  label nMarked;
632  do
633  {
634  nMarked = 0;
635 
636  //- mark current leaves for refinement
637  labelList markedLeaves(leaves.size(), 0);
638 
639  # ifdef USE_OMP
640  # pragma omp parallel for schedule(dynamic, 50) reduction(+:nMarked)
641  # endif
642  forAll(selectedLeaves, i)
643  {
644  if( !selectedLeaves[i]->isLeaf() )
645  continue;
646 
647  markedLeaves[selectedLeaves[i]->cubeLabel()] = 1;
648  ++nMarked;
649  }
650 
651  reduce(nMarked, sumOp<label>());
652 
653  //- get out of the do-while loop if there are no selected leaves
654  if( nMarked == 0 )
655  break;
656 
657  //- mark additional boxes for refinement
658  markAdditionalLayers(markedLeaves, nLayers);
659 
660  //- find the leaves in the additional layers
661  labelLongList activeLeaves;
662  forAll(markedLeaves, leafI)
663  {
664  if( markedLeaves[leafI] )
665  activeLeaves.append(leafI);
666  }
667 
668  //- check if there exist leaves at lower refinement level
669  bool hasLowerLevel(false);
670 
671  # ifdef USE_OMP
672  # pragma omp parallel for schedule(guided)
673  # endif
674  forAll(activeLeaves, i)
675  {
676  const direction level = leaves[activeLeaves[i]]->level();
677  if( level < levelI )
678  {
679  //- found a neighbour at a lower refinement level
680  hasLowerLevel = true;
681  }
682  else if( level > levelI )
683  {
684  //- do not allow refinement of leaves at higher
685  //- refinement level
686  markedLeaves[activeLeaves[i]] = 0;
687  }
688  }
689 
690  reduce(hasLowerLevel, maxOp<bool>());
691 
692  //- deselect leaves at the current level
693  if( hasLowerLevel )
694  {
695  # ifdef USE_OMP
696  # pragma omp parallel for schedule(guided)
697  # endif
698  forAll(activeLeaves, i)
699  {
700  if( leaves[activeLeaves[i]]->level() == levelI )
701  markedLeaves[activeLeaves[i]] = 0;
702  }
703  }
704 
705  //- refine selected octree boxes
706  refineSelectedBoxes(markedLeaves);
707  } while( nMarked );
708  }
709 }
710 
711 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
712 
713 } // End namespace Foam
714 
715 // ************************************************************************* //
Foam::surface::surface
surface(const surface &)
Disallow default bitwise copy construct.
Foam::maxOp
Definition: ops.H:172
Foam::LongList::append
void append(const T &e)
Append an element at the end of the list.
Definition: LongListI.H:265
triSurf.H
p
p
Definition: pEqn.H:62
Foam::meshOctreeModifier::refineSelectedBoxesAndAdditionalLayers
void refineSelectedBoxesAndAdditionalLayers(labelList &refineBox, const scalarList &refThickness)
refine selected boxes and the boxes within the given range
Definition: meshOctreeModifierRefineSelectedBoxes.C:500
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::returnReduce
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Definition: PstreamReduceOps.H:86
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::meshOctreeCubeCoordinates
Definition: meshOctreeCubeCoordinates.H:55
Foam::LongList::clear
void clear()
Clear the list, i.e. set next free to zero.
Definition: LongListI.H:230
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::LongList::size
label size() const
Size of the active part of the list.
Definition: LongListI.H:203
Foam::HashSet< label, Hash< label > >
meshOctreeModifier.H
forAllConstIter
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:39
Foam::meshOctreeModifier::refineSelectedBoxes
void refineSelectedBoxes(labelList &refineBox, const bool hexRefinement=false)
Definition: meshOctreeModifierRefineSelectedBoxes.C:428
Foam::meshOctreeSlot
Definition: meshOctreeSlot.H:50
Foam::LongList
Definition: LongList.H:55
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:43
Foam::help::labelToText
word labelToText(const label l)
convert the integer value into text
Definition: helperFunctionsStringConversion.C:69
Foam::localMax
LocalMax-mean differencing scheme class.
Definition: localMax.H:54
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::List::append
void append(const T &)
Append an element at the end of the list.
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
HashSet.H
forAllReverse
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Definition: UList.H:418
Foam::HashTable::found
bool found(const Key &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:109
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::DynList< label >
Foam::meshOctreeCubeCoordinates::faceNodes_
static const label faceNodes_[6][4]
cube nodes making each face
Definition: meshOctreeCubeCoordinates.H:73
Foam::OFstream
Output to file stream.
Definition: OFstream.H:81
Foam::meshOctreeCubeBasic::OTHERPROC
@ OTHERPROC
Definition: meshOctreeCubeBasic.H:93
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::meshOctreeModifier::markAdditionalLayersOfFaceNeighbours
void markAdditionalLayersOfFaceNeighbours(labelList &refineBox, const label nLayers=1) const
mark additional layers around the leaves selected for refinement
Definition: meshOctreeModifierRefineSelectedBoxes.C:148
Foam::meshOctree::rootBox
const boundBox & rootBox() const
return rootBox
Definition: meshOctreeI.H:135
Foam::sumOp
Definition: ops.H:162
Foam::HashTable::clear
void clear()
Clear all entries from table.
Definition: HashTable.C:473
helperFunctions.H
Foam::meshOctreeModifier::markAdditionalLayers
void markAdditionalLayers(labelList &refineBox, const label nLayers=1) const
mark additional layers around the leaves selected for refinement
Definition: meshOctreeModifierRefineSelectedBoxes.C:53
Foam::Vector< scalar >
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::meshOctree
Definition: meshOctree.H:55
Foam::FixedList
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:53
Foam::surface
Definition: surface.H:55
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:116
meshOctreeCubeCoordinatesScalar.H
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::boundBox
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:55
startTime
Foam::label startTime
Definition: checkTimeOptions.H:5
Foam::meshOctreeCubeCoordinates::vertices
void vertices(const boundBox &, FixedList< point, 8 > &) const
calculate vertices
Definition: meshOctreeCubeCoordinatesIntersections.C:114
Foam::triSurf
Definition: triSurf.H:59
Foam::meshOctree::returnLeaf
const meshOctreeCubeBasic & returnLeaf(const label) const
Definition: meshOctreeI.H:60
Foam::DynList::clear
void clear()
Clear the list, i.e. set next free to zero.
Definition: DynListI.H:279