hexRef4.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::hexRef8
26 
27 Description
28  Refinement of (split) hexes using polyTopoChange.
29 
30 SourceFiles
31  hexRef8.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef hexRef8_H
36 #define hexRef8_H
37 
38 #include "labelIOList.H"
39 #include "face.H"
40 #include "HashSet.H"
41 #include "DynamicList.H"
42 #include "primitivePatch.H"
43 #include "removeFaces.H"
44 #include "refinementHistory.H"
45 #include "PackedBoolList.H"
47 #include "cellShapeList.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 // Forward declaration of classes
55 class polyMesh;
56 class polyPatch;
57 class polyTopoChange;
58 class mapPolyMesh;
59 class mapDistributePolyMesh;
60 
61 /*---------------------------------------------------------------------------*\
62  Class hexRef8 Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class hexRef8
66 {
67  // Private data
68 
69  //- Reference to underlying mesh.
70  const polyMesh& mesh_;
71 
72  //- Per cell the refinement level
74 
75  //- Per point the refinement level
77 
78  //- Typical edge length between unrefined points
80 
81  //- Refinement history
83 
84  //- Face remover engine
86 
87  //- Level of saved points
89 
90  //- Level of saved cells
92 
93  //- Cell shapes when seen as split hexes
95 
96 
97  // Private Member Functions
98 
99  //- Reorder according to map.
100  static void reorder
101  (
102  const labelList& map,
103  const label len,
104  const label null,
105  labelList& elems
106  );
107 
108  //- Get patch and zone info
109  void getFaceInfo
110  (
111  const label faceI,
112  label& patchID,
113  label& zoneID,
114  label& zoneFlip
115  ) const;
116 
117  //- Adds a face on top of existing faceI. Reverses if necessary.
118  label addFace
119  (
120  polyTopoChange& meshMod,
121  const label faceI,
122  const face& newFace,
123  const label own,
124  const label nei
125  ) const;
126 
127  //- Adds internal face from point. No checks on reversal.
129  (
130  polyTopoChange& meshMod,
131  const label meshFaceI,
132  const label meshPointI,
133  const face& newFace,
134  const label own,
135  const label nei
136  ) const;
137 
138  //- Modifies existing faceI for either new owner/neighbour or new face
139  // points. Reverses if necessary.
140  void modFace
141  (
142  polyTopoChange& meshMod,
143  const label faceI,
144  const face& newFace,
145  const label own,
146  const label nei
147  ) const;
148 
149  scalar getLevel0EdgeLength() const;
150 
151  //- Get cell added to point of cellI (if any)
153  (
154  const labelListList& cellAnchorPoints,
155  const labelListList& cellAddedCells,
156  const label cellI,
157  const label faceI,
158  const label pointI
159  ) const;
160 
161  //- Get new owner and neighbour (in unspecified order) of pointI
162  // on faceI.
163  void getFaceNeighbours
164  (
165  const labelListList& cellAnchorPoints,
166  const labelListList& cellAddedCells,
167  const label faceI,
168  const label pointI,
169 
170  label& own,
171  label& nei
172  ) const;
173 
174 
175  //- Get index of minimum pointlevel.
176  label findMinLevel(const labelList& f) const;
177  //- Get maximum pointlevel.
178  label findMaxLevel(const labelList& f) const;
179  //- Count number of vertices <= anchorLevel
180  label countAnchors(const labelList&, const label) const;
181  //- Debugging: dump cell as .obj file
182  void dumpCell(const label cellI) const;
183  //- Find index of point with wantedLevel, starting from fp.
185  (
186  const label faceI,
187  const face& f,
188  const label startFp,
189  const bool searchForward,
190  const label wantedLevel
191  ) const;
192 
194  //void printLevels(Ostream&, const labelList&) const;
195 
196  //- debug:check orientation of added internal face
197  static void checkInternalOrientation
198  (
199  polyTopoChange& meshMod,
200  const label cellI,
201  const label faceI,
202  const point& ownPt,
203  const point& neiPt,
204  const face& newFace
205  );
206 
207  //- debug:check orientation of new boundary face
208  static void checkBoundaryOrientation
209  (
210  polyTopoChange& meshMod,
211  const label cellI,
212  const label faceI,
213  const point& ownPt,
214  const point& boundaryPt,
215  const face& newFace
216  );
217 
218  //- If p0 and p1 are existing vertices check if edge is split and insert
219  // splitPoint.
220  void insertEdgeSplit
221  (
222  const labelList& edgeMidPoint,
223  const label p0,
224  const label p1,
225  DynamicList<label>& verts
226  ) const;
227 
228  //- Store in maps correspondence from midpoint to anchors and faces.
230  (
231  const labelListList& cellAnchorPoints,
232  const labelListList& cellAddedCells,
233  const labelList& cellMidPoint,
234  const labelList& edgeMidPoint,
235  const label cellI,
236  const label faceI,
237  const bool faceOrder,
238  const label midPointI,
239  const label anchorPointI,
240  const label faceMidPointI,
241 
242  Map<edge>& midPointToAnchors,
243  Map<edge>& midPointToFaceMids,
244  polyTopoChange& meshMod
245  ) const;
246 
247  //- Create all internal faces from an unsplit face.
249  (
250  const labelListList& cellAnchorPoints,
251  const labelListList& cellAddedCells,
252  const labelList& cellMidPoint,
253  const labelList& faceMidPoint,
254  const labelList& edgeMidPoint,
255  const label cellI,
256  const label faceI,
257 
258  Map<edge>& midPointToAnchors,
259  Map<edge>& midPointToFaceMids,
260  polyTopoChange& meshMod,
261  label& nFacesAdded
262  ) const;
263 
264  //- Create all internal faces to split cellI into 8.
266  (
267  const labelListList& cellAnchorPoints,
268  const labelListList& cellAddedCells,
269  const labelList& cellMidPoint,
270  const labelList& faceMidPoint,
271  const labelList& faceAnchorLevel,
272  const labelList& edgeMidPoint,
273  const label cellI,
274  polyTopoChange& meshMod
275  ) const;
276 
277  //- Store vertices from startFp upto face split point.
278  // Used when splitting face into 4.
279  void walkFaceToMid
280  (
281  const labelList& edgeMidPoint,
282  const label cLevel,
283  const label faceI,
284  const label startFp,
285  DynamicList<label>& faceVerts
286  ) const;
287 
288  //- Same as walkFaceToMid but now walk back.
289  void walkFaceFromMid
290  (
291  const labelList& edgeMidPoint,
292  const label cLevel,
293  const label faceI,
294  const label startFp,
295  DynamicList<label>& faceVerts
296  ) const;
297 
298  //- Updates refineCell so consistent 2:1 refinement. Returns local
299  // number of cells changed.
301  (
302  const bool maxSet,
304  ) const;
305 
306  //- Check wanted refinement for 2:1 consistency
307  void checkWantedRefinementLevels(const labelList&) const;
308 
309 
310  // Cellshape recognition
311 
312  //- Collect all points on face of certain level
313  void collectLevelPoints
314  (
315  const labelList& f,
316  const label level,
318  ) const;
319 
320  //- Collect all points on face (in local numbering) of certain level
321  void collectLevelPoints
322  (
323  const labelList& meshPoints,
324  const labelList& f,
325  const label level,
327  ) const;
328 
329  //- Collect all faces with four corner points and return true if
330  // hex was matched (6 faces of each four corner points)
331  bool matchHexShape
332  (
333  const label cellI,
334  const label cellLevel,
335  DynamicList<face>& quads
336  ) const;
337 
338 
339  //- Disallow default bitwise copy construct
340  hexRef8(const hexRef8&);
341 
342  //- Disallow default bitwise assignment
343  void operator=(const hexRef8&);
344 
345 
346 public:
347 
348  //- Runtime type information
349  ClassName("hexRef8");
350 
351 
352  // Constructors
353 
354  //- Construct from mesh, read_if_present refinement data
355  // (from write below). If readHistory is true does read_if_present
356  // of refinement history. If false clears all history
357  hexRef8(const polyMesh& mesh, const bool readHistory = true);
358 
359  //- Construct from mesh and un/refinement data and optional size of
360  // starting cells
361  hexRef8
362  (
363  const polyMesh& mesh,
364  const labelList& cellLevel,
365  const labelList& pointLevel,
366  const refinementHistory& history,
367  const scalar level0Edge = -GREAT
368  );
369 
370  //- Construct from mesh and refinement data and optional size of
371  // starting cells
372  hexRef8
373  (
374  const polyMesh& mesh,
375  const labelList& cellLevel,
376  const labelList& pointLevel,
377  const scalar level0Edge = -GREAT
378  );
379 
380 
381  // Member Functions
382 
383  // Access
384 
385  const polyMesh& mesh() const
386  {
387  return mesh_;
388  }
389 
390  const labelIOList& cellLevel() const
391  {
392  return cellLevel_;
393  }
394 
395  const labelIOList& pointLevel() const
396  {
397  return pointLevel_;
398  }
399 
400  const refinementHistory& history() const
401  {
402  return history_;
403  }
404 
405  //- Typical edge length between unrefined points
406  scalar level0EdgeLength() const
407  {
408  return level0Edge_.value();
409  }
410 
411  // Refinement
412 
413  //- Gets level such that the face has four points <= level.
414  label faceLevel(const label faceI) const;
415 
416  //- Given valid mesh and current cell level and proposed
417  // cells to refine calculate any clashes (due to 2:1) and return
418  // ok list of cells to refine.
419  // Either adds cells to refine to set (maxSet = true) or
420  // removes cells to refine (maxSet = false)
422  (
423  const labelList& cellsToRefine,
424  const bool maxSet
425  ) const;
426 
427  //- Like consistentRefinement but slower:
428  //
429  // - specify number of cells between consecutive refinement levels
430  // (consistentRefinement equivalent to 1)
431  // - specify max level difference between point-connected cells.
432  // (-1 to disable) Note that with normal 2:1 limitation
433  // (maxFaceDiff=1) there can be 8:1 size difference across point
434  // connected cells so maxPointDiff allows you to make that less.
435  // cellsToRefine : cells we're thinking about refining. It will
436  // extend this set. All refinement levels will be
437  // at least maxFaceDiff layers thick.
438  // facesToCheck : additional faces where to implement the
439  // maxFaceDiff thickness (usually only boundary
440  // faces)
442  (
443  const label maxFaceDiff,
444  const labelList& cellsToRefine,
445  const labelList& facesToCheck,
446  const label maxPointDiff,
447  const labelList& pointsToCheck
448  ) const;
449 
450  //- Like consistentSlowRefinement but uses different meshWave
451  // (proper distance instead of toplogical count). No point checks
452  // yet.
454  (
455  const label maxFaceDiff,
456  const labelList& cellsToRefine,
457  const labelList& facesToCheck
458  ) const;
459 
460  //- Insert refinement. All selected cells will be split into 8.
461  // Returns per element in cells the 8 cells they were split into.
462  // Guarantees that the 0th element is the original cell label.
463  // Mapping:
464  // -split cells: 7 new ones get added from original
465  // -split faces: original gets modified; 3 new ones get added
466  // from original
467  // -added internal faces: added from original cell face(if
468  // that was internal) or created out-of-nothing (so will not
469  // get mapped!). Note: could make this inflate from point but
470  // that will allocate interpolation.
471  // -points added to split edge: added from edge start()
472  // -midpoints added: added from cellPoints[0].
474  (
475  const labelList& cells,
477  );
478 
479  //- Update local numbering for changed mesh.
480  void updateMesh(const mapPolyMesh&);
481 
482 
483  // Restoring : is where other processes delete and reinsert data.
484  // These callbacks allow this to restore the cellLevel
485  // and pointLevel for reintroduced points.
486  // Is not related to undoing my refinement
487 
488  //- Signal points/face/cells for which to store data
489  void storeData
490  (
491  const labelList& pointsToStore,
492  const labelList& facesToStore,
493  const labelList& cellsToStore
494  );
495 
496  //- Update local numbering + undo
497  // Data to restore given as new pointlabel + stored pointlabel
498  // (i.e. what was in pointsToStore)
499  void updateMesh
500  (
501  const mapPolyMesh&,
502  const Map<label>& pointsToRestore,
503  const Map<label>& facesToRestore,
504  const Map<label>& cellsToRestore
505  );
506 
507 
508  //- Update local numbering for subsetted mesh.
509  // Gets new-to-old maps. Not compatible with unrefinement.
510  void subset
511  (
512  const labelList& pointMap,
513  const labelList& faceMap,
514  const labelList& cellMap
515  );
516 
517  //- Update local numbering for mesh redistribution
518  void distribute(const mapDistributePolyMesh&);
519 
520  //- Debug: Check coupled mesh for correctness
521  void checkMesh() const;
522 
523  //- Debug: Check 2:1 consistency across faces.
524  // maxPointDiff==-1 : only check 2:1 across faces
525  // maxPointDiff!=-1 : check point-connected cells.
527  (
528  const label maxPointDiff,
529  const labelList& pointsToCheck
530  ) const;
531 
532  //- Utility: get hexes as cell shapes
533  const cellShapeList& cellShapes() const;
534 
535 
536  // Unrefinement (undoing refinement, not arbitrary coarsening)
537 
538  //- Return the points at the centre of top-level split cells
539  // that can be unsplit.
540  labelList getSplitPoints() const;
541 
542  //- Given proposed
543  // splitPoints to unrefine according to calculate any clashes
544  // (due to 2:1) and return ok list of points to unrefine.
545  // Either adds points to refine to set (maxSet = true) or
546  // removes points to refine (maxSet = false)
548  (
549  const labelList& pointsToUnrefine,
550  const bool maxSet
551  ) const;
552 
553  //- Remove some refinement. Needs to be supplied output of
554  // consistentUnrefinement. Only call if undoable set.
555  // All 8 pointCells of a split point will be combined into
556  // the lowest numbered cell of those 8.
557  void setUnrefinement
558  (
559  const labelList& splitPointLabels,
561  );
562 
563  // Write
564 
565  // Set instance for mesh files
566  void setInstance(const fileName& inst);
567 
568  //- Force writing refinement+history to polyMesh directory.
569  bool write() const;
570 
571 };
572 
573 
574 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
575 
576 } // End namespace Foam
577 
578 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
579 
580 #endif
581 
582 // ************************************************************************* //
Foam::hexRef8::collectLevelPoints
void collectLevelPoints(const labelList &f, const label level, DynamicList< label > &points) const
Collect all points on face of certain level.
Definition: hexRef4.C:1749
Foam::PackedBoolList
A bit-packed bool list.
Definition: PackedBoolList.H:63
Foam::hexRef8::consistentRefinement
labelList consistentRefinement(const labelList &cellsToRefine, const bool maxSet) const
Given valid mesh and current cell level and proposed.
Definition: hexRef4.C:2258
Foam::hexRef8::cellShapesPtr_
autoPtr< cellShapeList > cellShapesPtr_
Cell shapes when seen as split hexes.
Definition: hexRef4.H:93
Foam::hexRef8::findLevel
label findLevel(const label faceI, const face &f, const label startFp, const bool searchForward, const label wantedLevel) const
Find index of point with wantedLevel, starting from fp.
Definition: hexRef4.C:734
Foam::faceMap
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Definition: blockMeshMergeFast.C:90
Foam::hexRef8::cellLevel
const labelIOList & cellLevel() const
Definition: hexRef4.H:389
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::hexRef8::ClassName
ClassName("hexRef8")
Runtime type information.
Foam::hexRef8::addFace
label addFace(polyTopoChange &meshMod, const label faceI, const face &newFace, const label own, const label nei) const
Adds a face on top of existing faceI. Reverses if necessary.
Definition: hexRef8.C:127
Foam::DynamicList< label >
Foam::hexRef8::getSplitPoints
labelList getSplitPoints() const
Return the points at the centre of top-level split cells.
Definition: hexRef4.C:5129
cellShapeList.H
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:97
face.H
Foam::Map< label >
Foam::hexRef8::updateMesh
void updateMesh(const mapPolyMesh &)
Update local numbering for changed mesh.
Definition: hexRef4.C:4287
Foam::hexRef8::insertEdgeSplit
void insertEdgeSplit(const labelList &edgeMidPoint, const label p0, const label p1, DynamicList< label > &verts) const
If p0 and p1 are existing vertices check if edge is split and insert.
Definition: hexRef4.C:920
Foam::hexRef8::setInstance
void setInstance(const fileName &inst)
Definition: hexRef4.C:1733
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
Foam::hexRef8::createInternalFaces
void createInternalFaces(const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &faceMidPoint, const labelList &faceAnchorLevel, const labelList &edgeMidPoint, const label cellI, polyTopoChange &meshMod) const
Create all internal faces to split cellI into 8.
Definition: hexRef4.C:1178
Foam::hexRef8::walkFaceToMid
void walkFaceToMid(const labelList &edgeMidPoint, const label cLevel, const label faceI, const label startFp, DynamicList< label > &faceVerts) const
Store vertices from startFp upto face split point.
Definition: hexRef4.C:1460
Foam::hexRef8::cellShapes
const cellShapeList & cellShapes() const
Utility: get hexes as cell shapes.
Definition: hexRef4.C:5062
Foam::hexRef8::addInternalFace
label addInternalFace(polyTopoChange &meshMod, const label meshFaceI, const label meshPointI, const face &newFace, const label own, const label nei) const
Adds internal face from point. No checks on reversal.
Definition: hexRef8.C:192
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::hexRef8::history_
refinementHistory history_
Refinement history.
Definition: hexRef4.H:81
Foam::refinementHistory
All refinement history. Used in unrefinement.
Definition: refinementHistory.H:95
Foam::hexRef8::setRefinement
labelListList setRefinement(const labelList &cells, polyTopoChange &)
Insert refinement. All selected cells will be split into 8.
Definition: hexRef4.C:3242
Foam::hexRef8::checkRefinementLevels
void checkRefinementLevels(const label maxPointDiff, const labelList &pointsToCheck) const
Debug: Check 2:1 consistency across faces.
Definition: hexRef4.C:4810
Foam::UniformDimensionedField< scalar >
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::removeFaces
Given list of faces to remove insert all the topology changes. Contains helper function to get consis...
Definition: removeFaces.H:62
Foam::hexRef8::reorder
static void reorder(const labelList &map, const label len, const label null, labelList &elems)
Reorder according to map.
Definition: hexRef8.C:69
Foam::hexRef8::getFaceNeighbours
void getFaceNeighbours(const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const label faceI, const label pointI, label &own, label &nei) const
Get new owner and neighbour (in unspecified order) of pointI.
Definition: hexRef4.C:593
Foam::hexRef8::checkBoundaryOrientation
static void checkBoundaryOrientation(polyTopoChange &meshMod, const label cellI, const label faceI, const point &ownPt, const point &boundaryPt, const face &newFace)
debug:check orientation of new boundary face
Definition: hexRef4.C:871
Foam::hexRef8::getFaceInfo
void getFaceInfo(const label faceI, label &patchID, label &zoneID, label &zoneFlip) const
Get patch and zone info.
Definition: hexRef8.C:98
PackedBoolList.H
Foam::hexRef8::level0Edge_
uniformDimensionedScalarField level0Edge_
Typical edge length between unrefined points.
Definition: hexRef4.H:78
Foam::hexRef8::getAnchorCell
label getAnchorCell(const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const label cellI, const label faceI, const label pointI) const
Get cell added to point of cellI (if any)
Definition: hexRef4.C:536
Foam::hexRef8::subset
void subset(const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
Update local numbering for subsetted mesh.
Definition: hexRef4.C:4489
Foam::hexRef8::savedCellLevel_
Map< label > savedCellLevel_
Level of saved cells.
Definition: hexRef4.H:90
Foam::hexRef8::checkInternalOrientation
static void checkInternalOrientation(polyTopoChange &meshMod, const label cellI, const label faceI, const point &ownPt, const point &neiPt, const face &newFace)
debug:check orientation of added internal face
Definition: hexRef4.C:825
Foam::hexRef8::mesh
const polyMesh & mesh() const
Definition: hexRef4.H:384
Foam::hexRef8::write
bool write() const
Force writing refinement+history to polyMesh directory.
Definition: hexRef4.C:5756
refinementHistory.H
HashSet.H
Foam::hexRef8::cellLevel_
labelIOList cellLevel_
Per cell the refinement level.
Definition: hexRef4.H:72
removeFaces.H
Foam::hexRef8::findMaxLevel
label findMaxLevel(const labelList &f) const
Get maximum pointlevel.
Definition: hexRef4.C:653
Foam::hexRef8::history
const refinementHistory & history() const
Definition: hexRef4.H:399
Foam::hexRef8::walkFaceFromMid
void walkFaceFromMid(const labelList &edgeMidPoint, const label cLevel, const label faceI, const label startFp, DynamicList< label > &faceVerts) const
Same as walkFaceToMid but now walk back.
Definition: hexRef4.C:1509
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::hexRef8::operator=
void operator=(const hexRef8 &)
Disallow default bitwise assignment.
Foam::hexRef8::consistentSlowRefinement2
labelList consistentSlowRefinement2(const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck) const
Like consistentSlowRefinement but uses different meshWave.
Definition: hexRef4.C:2817
Foam::hexRef8::storeData
void storeData(const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore)
Signal points/face/cells for which to store data.
Definition: hexRef4.C:4262
Foam::hexRef8::faceLevel
label faceLevel(const label faceI) const
Gets level such that the face has four points <= level.
Definition: hexRef4.C:796
Foam::hexRef8::findMinLevel
label findMinLevel(const labelList &f) const
Get index of minimum pointlevel.
Definition: hexRef4.C:632
Foam::hexRef8::pointLevel_
labelIOList pointLevel_
Per point the refinement level.
Definition: hexRef4.H:75
Foam::hexRef8::createInternalFromSplitFace
void createInternalFromSplitFace(const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &faceMidPoint, const labelList &edgeMidPoint, const label cellI, const label faceI, Map< edge > &midPointToAnchors, Map< edge > &midPointToFaceMids, polyTopoChange &meshMod, label &nFacesAdded) const
Create all internal faces from an unsplit face.
Foam::hexRef8::savedPointLevel_
Map< label > savedPointLevel_
Level of saved points.
Definition: hexRef4.H:87
Foam::hexRef8::consistentSlowRefinement
labelList consistentSlowRefinement(const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck, const label maxPointDiff, const labelList &pointsToCheck) const
Like consistentRefinement but slower:
Definition: hexRef4.C:2333
Foam::hexRef8::setUnrefinement
void setUnrefinement(const labelList &splitPointLabels, polyTopoChange &)
Remove some refinement. Needs to be supplied output of.
Definition: hexRef4.C:5567
uniformDimensionedFields.H
Foam::hexRef8::level0EdgeLength
scalar level0EdgeLength() const
Typical edge length between unrefined points.
Definition: hexRef4.H:405
Foam::hexRef8::modFace
void modFace(polyTopoChange &meshMod, const label faceI, const face &newFace, const label own, const label nei) const
Modifies existing faceI for either new owner/neighbour or new face.
Definition: hexRef4.C:288
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::hexRef8::storeMidPointInfo
label storeMidPointInfo(const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &edgeMidPoint, const label cellI, const label faceI, const bool faceOrder, const label midPointI, const label anchorPointI, const label faceMidPointI, Map< edge > &midPointToAnchors, Map< edge > &midPointToFaceMids, polyTopoChange &meshMod) const
Store in maps correspondence from midpoint to anchors and faces.
Definition: hexRef4.C:948
Foam::refineCell
Container with cells to refine. Refinement given as single direction.
Definition: refineCell.H:52
Foam::hexRef8::faceRemover_
removeFaces faceRemover_
Face remover engine.
Definition: hexRef4.H:84
Foam::hexRef8
Refinement of (split) hexes using polyTopoChange.
Definition: hexRef4.H:64
f
labelList f(nPoints)
Foam::Vector< scalar >
Foam::hexRef8::pointLevel
const labelIOList & pointLevel() const
Definition: hexRef4.H:394
Foam::hexRef8::getLevel0EdgeLength
scalar getLevel0EdgeLength() const
Definition: hexRef4.C:351
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::hexRef8::countAnchors
label countAnchors(const labelList &, const label) const
Count number of vertices <= anchorLevel.
Definition: hexRef4.C:674
Foam::hexRef8::matchHexShape
bool matchHexShape(const label cellI, const label cellLevel, DynamicList< face > &quads) const
Collect all faces with four corner points and return true if.
Definition: hexRef4.C:1786
labelIOList.H
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::IOList< label >
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::hexRef8::distribute
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
Definition: hexRef4.C:4572
Foam::face
A face is a list of labels corresponding to mesh vertices.
Definition: face.H:75
DynamicList.H
cells
const cellShapeList & cells
Definition: gmvOutputHeader.H:3
Foam::hexRef8::checkMesh
void checkMesh() const
Debug: Check coupled mesh for correctness.
Definition: hexRef4.C:4600
Foam::hexRef8::dumpCell
void dumpCell(const label cellI) const
Debugging: dump cell as .obj file.
Definition: hexRef4.C:692
Foam::mapDistributePolyMesh
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Definition: mapDistributePolyMesh.H:57
Foam::hexRef8::mesh_
const polyMesh & mesh_
Reference to underlying mesh.
Definition: hexRef4.H:69
Foam::hexRef8::consistentUnrefinement
labelList consistentUnrefinement(const labelList &pointsToUnrefine, const bool maxSet) const
Given proposed.
Definition: hexRef4.C:5333
Foam::hexRef8::hexRef8
hexRef8(const hexRef8 &)
Disallow default bitwise copy construct.
Foam::hexRef8::faceConsistentRefinement
label faceConsistentRefinement(const bool maxSet, PackedBoolList &refineCell) const
Updates refineCell so consistent 2:1 refinement. Returns local.
Definition: hexRef4.C:1564
Foam::hexRef8::checkWantedRefinementLevels
void checkWantedRefinementLevels(const labelList &) const
Check wanted refinement for 2:1 consistency.
Definition: hexRef4.C:1651