extrudeMesh.C
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 | Copyright (C) 2015 OpenCFD Ltd.
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 Application
25  extrudeMesh
26 
27 Description
28  Extrude mesh from existing patch (by default outwards facing normals;
29  optional flips faces) or from patch read from file.
30 
31  Note: Merges close points so be careful.
32 
33  Type of extrusion prescribed by run-time selectable model.
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #include "argList.H"
38 #include "Time.H"
39 #include "polyTopoChange.H"
40 #include "polyTopoChanger.H"
41 #include "edgeCollapser.H"
42 #include "perfectInterface.H"
43 #include "addPatchCellLayer.H"
44 #include "fvMesh.H"
45 #include "MeshedSurfaces.H"
46 #include "globalIndex.H"
47 #include "cellSet.H"
48 
49 #include "extrudedMesh.H"
50 #include "extrudeModel.H"
51 
52 #include "wedge.H"
53 #include "wedgePolyPatch.H"
54 #include "planeExtrusion.H"
55 #include "emptyPolyPatch.H"
56 
57 using namespace Foam;
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
62 {
63  MESH,
64  PATCH,
65  SURFACE
66 };
67 
68 namespace Foam
69 {
70  template<>
71  const char* NamedEnum<ExtrudeMode, 3>::names[] =
72  {
73  "mesh",
74  "patch",
75  "surface"
76  };
77 }
78 
80 
81 
83 {
84  // Create dummy system/fv*
85  {
86  IOobject io
87  (
88  "fvSchemes",
89  mesh.time().system(),
90  regionName,
91  mesh,
94  false
95  );
96 
97  Info<< "Testing:" << io.objectPath() << endl;
98 
99  if (!io.headerOk())
100  {
101  Info<< "Writing dummy " << regionName/io.name() << endl;
102  dictionary dummyDict;
103  dictionary divDict;
104  dummyDict.add("divSchemes", divDict);
105  dictionary gradDict;
106  dummyDict.add("gradSchemes", gradDict);
107  dictionary laplDict;
108  dummyDict.add("laplacianSchemes", laplDict);
109 
110  IOdictionary(io, dummyDict).regIOobject::write();
111  }
112  }
113  {
114  IOobject io
115  (
116  "fvSolution",
117  mesh.time().system(),
118  regionName,
119  mesh,
122  false
123  );
124 
125  if (!io.headerOk())
126  {
127  Info<< "Writing dummy " << regionName/io.name() << endl;
128  dictionary dummyDict;
129  IOdictionary(io, dummyDict).regIOobject::write();
130  }
131  }
132 }
133 
134 
136 {
137  const label patchID = patches.findPatchID(name);
138 
139  if (patchID == -1)
140  {
142  << "Cannot find patch " << name
143  << " in the source mesh.\n"
144  << "Valid patch names are " << patches.names()
145  << exit(FatalError);
146  }
147  return patchID;
148 }
149 
150 
152 {
153  label n = 0;
154 
155  forAll(names, i)
156  {
157  const polyPatch& pp = patches[findPatchID(patches, names[i])];
158 
159  n += pp.size();
160  }
161  labelList faceLabels(n);
162  n = 0;
163  forAll(names, i)
164  {
165  const polyPatch& pp = patches[findPatchID(patches, names[i])];
166 
167  forAll(pp, j)
168  {
169  faceLabels[n++] = pp.start()+j;
170  }
171  }
172 
173  return faceLabels;
174 }
175 
176 
177 void updateFaceLabels(const mapPolyMesh& map, labelList& faceLabels)
178 {
179  const labelList& reverseMap = map.reverseFaceMap();
180 
181  labelList newFaceLabels(faceLabels.size());
182  label newI = 0;
183 
184  forAll(faceLabels, i)
185  {
186  label oldFaceI = faceLabels[i];
187 
188  if (reverseMap[oldFaceI] >= 0)
189  {
190  newFaceLabels[newI++] = reverseMap[oldFaceI];
191  }
192  }
193  newFaceLabels.setSize(newI);
194  faceLabels.transfer(newFaceLabels);
195 }
196 
197 
198 void updateCellSet(const mapPolyMesh& map, labelHashSet& cellLabels)
199 {
200  const labelList& reverseMap = map.reverseCellMap();
201 
202  labelHashSet newCellLabels(2*cellLabels.size());
203 
204  forAll(cellLabels, i)
205  {
206  label oldCellI = cellLabels[i];
207 
208  if (reverseMap[oldCellI] >= 0)
209  {
210  newCellLabels.insert(reverseMap[oldCellI]);
211  }
212  }
213  cellLabels.transfer(newCellLabels);
214 }
215 
216 
217 template<class PatchType>
219 (
220  polyMesh& mesh,
221  const word& frontPatchName,
222  const word& backPatchName
223 )
224 {
226 
227  label frontPatchI = findPatchID(patches, frontPatchName);
228  label backPatchI = findPatchID(patches, backPatchName);
229 
230  DynamicList<polyPatch*> newPatches(patches.size());
231 
232  forAll(patches, patchI)
233  {
234  const polyPatch& pp(patches[patchI]);
235 
236  if (patchI == frontPatchI || patchI == backPatchI)
237  {
238  newPatches.append
239  (
240  new PatchType
241  (
242  pp.name(),
243  pp.size(),
244  pp.start(),
245  pp.index(),
246  mesh.boundaryMesh(),
247  PatchType::typeName
248  )
249  );
250  }
251  else
252  {
253  newPatches.append(pp.clone(mesh.boundaryMesh()).ptr());
254  }
255  }
256 
257  // Edit patches
259  mesh.addPatches(newPatches, true);
260 }
261 
262 
263 int main(int argc, char *argv[])
264 {
265  #include "addRegionOption.H"
266  #include "setRootCase.H"
267  #include "createTimeExtruded.H"
268 
269  // Get optional regionName
271  word regionDir;
272  if (args.optionReadIfPresent("region", regionName))
273  {
274  regionDir = regionName;
275  Info<< "Create mesh " << regionName << " for time = "
276  << runTimeExtruded.timeName() << nl << endl;
277  }
278  else
279  {
281  Info<< "Create mesh for time = "
282  << runTimeExtruded.timeName() << nl << endl;
283  }
284 
285 
287  (
288  IOobject
289  (
290  "extrudeMeshDict",
291  runTimeExtruded.system(),
292  runTimeExtruded,
294  )
295  );
296 
297  // Point generator
299 
300  // Whether to flip normals
301  const Switch flipNormals(dict.lookup("flipNormals"));
302 
303  // What to extrude
304  const ExtrudeMode mode = ExtrudeModeNames.read
305  (
306  dict.lookup("constructFrom")
307  );
308 
309  // Any merging of small edges
310  const scalar mergeTol(dict.lookupOrDefault<scalar>("mergeTol", 1e-4));
311 
312  Info<< "Extruding from " << ExtrudeModeNames[mode]
313  << " using model " << model().type() << endl;
314  if (flipNormals)
315  {
316  Info<< "Flipping normals before extruding" << endl;
317  }
318  if (mergeTol > 0)
319  {
320  Info<< "Collapsing edges < " << mergeTol << " of bounding box" << endl;
321  }
322  else
323  {
324  Info<< "Not collapsing any edges after extrusion" << endl;
325  }
326  Info<< endl;
327 
328 
329  // Generated mesh (one of either)
330  autoPtr<fvMesh> meshFromMesh;
331  autoPtr<polyMesh> meshFromSurface;
332 
333  // Faces on front and back for stitching (in case of mergeFaces)
334  word frontPatchName;
335  labelList frontPatchFaces;
336  word backPatchName;
337  labelList backPatchFaces;
338 
339  // Optional added cells (get written to cellSet)
340  labelHashSet addedCellsSet;
341 
342  if (mode == PATCH || mode == MESH)
343  {
344  if (flipNormals && mode == MESH)
345  {
347  << "Flipping normals not supported for extrusions from mesh."
348  << exit(FatalError);
349  }
350 
351  fileName sourceCasePath(dict.lookup("sourceCase"));
352  sourceCasePath.expand();
353  fileName sourceRootDir = sourceCasePath.path();
354  fileName sourceCaseDir = sourceCasePath.name();
355  if (Pstream::parRun())
356  {
357  sourceCaseDir =
358  sourceCaseDir
359  /"processor" + Foam::name(Pstream::myProcNo());
360  }
361  wordList sourcePatches;
362  dict.lookup("sourcePatches") >> sourcePatches;
363 
364  if (sourcePatches.size() == 1)
365  {
366  frontPatchName = sourcePatches[0];
367  }
368 
369  Info<< "Extruding patches " << sourcePatches
370  << " on mesh " << sourceCasePath << nl
371  << endl;
372 
373  Time runTime
374  (
376  sourceRootDir,
377  sourceCaseDir
378  );
379 
380  #include "createMesh.H"
381 
383 
384 
385  // Extrusion engine. Either adding to existing mesh or
386  // creating separate mesh.
387  addPatchCellLayer layerExtrude(mesh, (mode == MESH));
388 
389  const labelList meshFaces(patchFaces(patches, sourcePatches));
390 
391  if (mode == PATCH && flipNormals)
392  {
393  // Cheat. Flip patch faces in mesh. This invalidates the
394  // mesh (open cells) but does produce the correct extrusion.
395  polyTopoChange meshMod(mesh);
396  forAll(meshFaces, i)
397  {
398  label meshFaceI = meshFaces[i];
399 
400  label patchI = patches.whichPatch(meshFaceI);
401  label own = mesh.faceOwner()[meshFaceI];
402  label nei = -1;
403  if (patchI == -1)
404  {
405  nei = mesh.faceNeighbour()[meshFaceI];
406  }
407 
408  label zoneI = mesh.faceZones().whichZone(meshFaceI);
409  bool zoneFlip = false;
410  if (zoneI != -1)
411  {
412  label index = mesh.faceZones()[zoneI].whichFace(meshFaceI);
413  zoneFlip = mesh.faceZones()[zoneI].flipMap()[index];
414  }
415 
416  meshMod.modifyFace
417  (
418  mesh.faces()[meshFaceI].reverseFace(), // modified face
419  meshFaceI, // label of face
420  own, // owner
421  nei, // neighbour
422  true, // face flip
423  patchI, // patch for face
424  zoneI, // zone for face
425  zoneFlip // face flip in zone
426  );
427  }
428 
429  // Change the mesh. No inflation.
430  autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);
431 
432  // Update fields
433  mesh.updateMesh(map);
434 
435  // Move mesh (since morphing does not do this)
436  if (map().hasMotionPoints())
437  {
438  mesh.movePoints(map().preMotionPoints());
439  }
440  }
441 
442 
443 
444  indirectPrimitivePatch extrudePatch
445  (
447  (
448  mesh.faces(),
449  meshFaces
450  ),
451  mesh.points()
452  );
453 
454  // Determine extrudePatch normal
455  pointField extrudePatchPointNormals
456  (
457  PatchTools::pointNormals(mesh, extrudePatch)
458  );
459 
460 
461  // Precalculate mesh edges for pp.edges.
462  const labelList meshEdges
463  (
464  extrudePatch.meshEdges
465  (
466  mesh.edges(),
467  mesh.pointEdges()
468  )
469  );
470 
471  // Global face indices engine
472  const globalIndex globalFaces(mesh.nFaces());
473 
474  // Determine extrudePatch.edgeFaces in global numbering (so across
475  // coupled patches)
476  labelListList edgeGlobalFaces
477  (
479  (
480  mesh,
481  globalFaces,
482  extrudePatch
483  )
484  );
485 
486 
487  // Determine what patches boundary edges need to get extruded into.
488  // This might actually cause edge-connected processors to become
489  // face-connected so might need to introduce new processor boundaries.
490  // Calculates:
491  // - per pp.edge the patch to extrude into
492  // - any additional processor boundaries (patchToNbrProc = map from
493  // new patchID to neighbour processor)
494  // - number of new patches (nPatches)
495 
496  labelList edgePatchID;
497  labelList edgeZoneID;
498  boolList edgeFlip;
499  labelList inflateFaceID;
500  label nPatches;
501  Map<label> nbrProcToPatch;
502  Map<label> patchToNbrProc;
504  (
505  true, // for internal edges get zone info from any face
506 
507  mesh,
508  globalFaces,
509  edgeGlobalFaces,
510  extrudePatch,
511 
512  edgePatchID,
513  nPatches,
514  nbrProcToPatch,
515  patchToNbrProc,
516 
517  edgeZoneID,
518  edgeFlip,
519  inflateFaceID
520  );
521 
522 
523  // Add any patches.
524 
525  label nAdded = nPatches - mesh.boundaryMesh().size();
526  reduce(nAdded, sumOp<label>());
527 
528  Info<< "Adding overall " << nAdded << " processor patches." << endl;
529 
530  if (nAdded > 0)
531  {
532  DynamicList<polyPatch*> newPatches(nPatches);
533  forAll(mesh.boundaryMesh(), patchI)
534  {
535  newPatches.append
536  (
537  mesh.boundaryMesh()[patchI].clone
538  (
540  ).ptr()
541  );
542  }
543  for
544  (
545  label patchI = mesh.boundaryMesh().size();
546  patchI < nPatches;
547  patchI++
548  )
549  {
550  label nbrProcI = patchToNbrProc[patchI];
551 
552  word name =
553  "procBoundary"
555  + "to"
556  + Foam::name(nbrProcI);
557 
558  Pout<< "Adding patch " << patchI
559  << " name:" << name
560  << " between " << Pstream::myProcNo()
561  << " and " << nbrProcI
562  << endl;
563 
564 
565  newPatches.append
566  (
568  (
569  name,
570  0, // size
571  mesh.nFaces(), // start
572  patchI, // index
573  mesh.boundaryMesh(),// polyBoundaryMesh
574  Pstream::myProcNo(),// myProcNo
575  nbrProcI // neighbProcNo
576  )
577  );
578  }
579 
580  // Add patches. Do no parallel updates.
582  mesh.addFvPatches(newPatches, true);
583  }
584 
585 
586 
587  // Only used for addPatchCellLayer into new mesh
588  labelList exposedPatchID;
589  if (mode == PATCH)
590  {
591  dict.lookup("exposedPatchName") >> backPatchName;
592  exposedPatchID.setSize
593  (
594  extrudePatch.size(),
595  findPatchID(patches, backPatchName)
596  );
597  }
598 
599  // Determine points and extrusion
600  pointField layer0Points(extrudePatch.nPoints());
601  pointField displacement(extrudePatch.nPoints());
602  forAll(displacement, pointI)
603  {
604  const vector& patchNormal = extrudePatchPointNormals[pointI];
605 
606  // layer0 point
607  layer0Points[pointI] = model()
608  (
609  extrudePatch.localPoints()[pointI],
610  patchNormal,
611  0
612  );
613  // layerN point
614  point extrudePt = model()
615  (
616  extrudePatch.localPoints()[pointI],
617  patchNormal,
618  model().nLayers()
619  );
620  displacement[pointI] = extrudePt - layer0Points[pointI];
621  }
622 
623 
624  // Check if wedge (has layer0 different from original patch points)
625  // If so move the mesh to starting position.
626  if (gMax(mag(layer0Points-extrudePatch.localPoints())) > SMALL)
627  {
628  Info<< "Moving mesh to layer0 points since differ from original"
629  << " points - this can happen for wedge extrusions." << nl
630  << endl;
631 
632  pointField newPoints(mesh.points());
633  forAll(extrudePatch.meshPoints(), i)
634  {
635  newPoints[extrudePatch.meshPoints()[i]] = layer0Points[i];
636  }
637  mesh.movePoints(newPoints);
638  }
639 
640 
641  // Layers per face
642  labelList nFaceLayers(extrudePatch.size(), model().nLayers());
643 
644  // Layers per point
645  labelList nPointLayers(extrudePatch.nPoints(), model().nLayers());
646 
647  // Displacement for first layer
648  vectorField firstLayerDisp(displacement*model().sumThickness(1));
649 
650  // Expansion ratio not used.
651  scalarField ratio(extrudePatch.nPoints(), 1.0);
652 
653  // Topo change container. Either copy an existing mesh or start
654  // with empty storage (number of patches only needed for checking)
656  (
657  (
658  mode == MESH
659  ? new polyTopoChange(mesh)
660  : new polyTopoChange(patches.size())
661  )
662  );
663 
664  layerExtrude.setRefinement
665  (
666  globalFaces,
667  edgeGlobalFaces,
668 
669  ratio, // expansion ratio
670  extrudePatch, // patch faces to extrude
671 
672  edgePatchID, // if boundary edge: patch for extruded face
673  edgeZoneID, // optional zone for extruded face
674  edgeFlip,
675  inflateFaceID, // mesh face that zone/patch info is from
676 
677  exposedPatchID, // if new mesh: patches for exposed faces
678  nFaceLayers,
679  nPointLayers,
680  firstLayerDisp,
681  meshMod()
682  );
683 
684  // Reset points according to extrusion model
685  forAll(layerExtrude.addedPoints(), pointI)
686  {
687  const labelList& pPoints = layerExtrude.addedPoints()[pointI];
688  forAll(pPoints, pPointI)
689  {
690  label meshPointI = pPoints[pPointI];
691 
692  point modelPt
693  (
694  model()
695  (
696  extrudePatch.localPoints()[pointI],
697  extrudePatchPointNormals[pointI],
698  pPointI+1 // layer
699  )
700  );
701 
702  const_cast<DynamicList<point>&>
703  (
704  meshMod().points()
705  )[meshPointI] = modelPt;
706  }
707  }
708 
709  // Store faces on front and exposed patch (if mode=patch there are
710  // only added faces so cannot used map to old faces)
711  const labelListList& layerFaces = layerExtrude.layerFaces();
712  backPatchFaces.setSize(layerFaces.size());
713  frontPatchFaces.setSize(layerFaces.size());
714  forAll(backPatchFaces, patchFaceI)
715  {
716  backPatchFaces[patchFaceI] = layerFaces[patchFaceI].first();
717  frontPatchFaces[patchFaceI] = layerFaces[patchFaceI].last();
718  }
719 
720 
721  // Create dummy fvSchemes, fvSolution
722  createDummyFvMeshFiles(mesh, regionDir);
723 
724  // Create actual mesh from polyTopoChange container
725  autoPtr<mapPolyMesh> map = meshMod().makeMesh
726  (
727  meshFromMesh,
728  IOobject
729  (
730  regionName,
731  runTimeExtruded.constant(),
732  runTimeExtruded,
735  false
736  ),
737  mesh
738  );
739 
740  layerExtrude.updateMesh
741  (
742  map(),
743  identity(extrudePatch.size()),
744  identity(extrudePatch.nPoints())
745  );
746 
747  // Calculate face labels for front and back.
748  frontPatchFaces = renumber
749  (
750  map().reverseFaceMap(),
751  frontPatchFaces
752  );
753  backPatchFaces = renumber
754  (
755  map().reverseFaceMap(),
756  backPatchFaces
757  );
758 
759  // Store added cells
760  if (mode == MESH)
761  {
762  const labelListList addedCells
763  (
764  layerExtrude.addedCells
765  (
766  meshFromMesh,
767  layerExtrude.layerFaces()
768  )
769  );
770  forAll(addedCells, faceI)
771  {
772  const labelList& aCells = addedCells[faceI];
773  forAll(aCells, i)
774  {
775  addedCellsSet.insert(aCells[i]);
776  }
777  }
778  }
779  }
780  else
781  {
782  // Read from surface
783  fileName surfName(dict.lookup("surface"));
784  surfName.expand();
785 
786  Info<< "Extruding surfaceMesh read from file " << surfName << nl
787  << endl;
788 
789  MeshedSurface<face> fMesh(surfName);
790 
791  if (flipNormals)
792  {
793  Info<< "Flipping faces." << nl << endl;
794  faceList& faces = const_cast<faceList&>(fMesh.faces());
795  forAll(faces, i)
796  {
797  faces[i] = fMesh[i].reverseFace();
798  }
799  }
800 
801  Info<< "Extruding surface with :" << nl
802  << " points : " << fMesh.points().size() << nl
803  << " faces : " << fMesh.size() << nl
804  << " normals[0] : " << fMesh.faceNormals()[0]
805  << nl
806  << endl;
807 
808  meshFromSurface.reset
809  (
810  new extrudedMesh
811  (
812  IOobject
813  (
815  runTimeExtruded.constant(),
816  runTimeExtruded
817  ),
818  fMesh,
819  model()
820  )
821  );
822 
823 
824  // Get the faces on front and back
825  frontPatchName = "originalPatch";
826  frontPatchFaces = patchFaces
827  (
828  meshFromSurface().boundaryMesh(),
829  wordList(1, frontPatchName)
830  );
831  backPatchName = "otherSide";
832  backPatchFaces = patchFaces
833  (
834  meshFromSurface().boundaryMesh(),
835  wordList(1, backPatchName)
836  );
837  }
838 
839 
840  polyMesh& mesh =
841  (
842  meshFromMesh.valid()
843  ? meshFromMesh()
844  : meshFromSurface()
845  );
846 
847 
848  const boundBox& bb = mesh.bounds();
849  const vector span = bb.span();
850  const scalar mergeDim = mergeTol * bb.minDim();
851 
852  Info<< "Mesh bounding box : " << bb << nl
853  << " with span : " << span << nl
854  << "Merge distance : " << mergeDim << nl
855  << endl;
856 
857 
858  // Collapse edges
859  // ~~~~~~~~~~~~~~
860 
861  if (mergeDim > 0)
862  {
863  Info<< "Collapsing edges < " << mergeDim << " ..." << nl << endl;
864 
865  // Edge collapsing engine
866  edgeCollapser collapser(mesh);
867 
868  const edgeList& edges = mesh.edges();
869  const pointField& points = mesh.points();
870 
872  Map<point> collapsePointToLocation(mesh.nPoints());
873 
874  forAll(edges, edgeI)
875  {
876  const edge& e = edges[edgeI];
877 
878  scalar d = e.mag(points);
879 
880  if (d < mergeDim)
881  {
882  Info<< "Merging edge " << e << " since length " << d
883  << " << " << mergeDim << nl;
884 
885  collapseEdge[edgeI] = true;
886  collapsePointToLocation.set(e[1], points[e[0]]);
887  }
888  }
889 
890  List<pointEdgeCollapse> allPointInfo;
892  labelList pointPriority(mesh.nPoints(), 0);
893 
894  collapser.consistentCollapse
895  (
896  globalPoints,
897  pointPriority,
898  collapsePointToLocation,
899  collapseEdge,
900  allPointInfo
901  );
902 
903  // Topo change container
904  polyTopoChange meshMod(mesh);
905 
906  // Put all modifications into meshMod
907  bool anyChange = collapser.setRefinement(allPointInfo, meshMod);
908 
909  if (anyChange)
910  {
911  // Construct new mesh from polyTopoChange.
912  autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);
913 
914  // Update fields
915  mesh.updateMesh(map);
916 
917  // Update stored data
918  updateFaceLabels(map(), frontPatchFaces);
919  updateFaceLabels(map(), backPatchFaces);
920  updateCellSet(map(), addedCellsSet);
921 
922  // Move mesh (if inflation used)
923  if (map().hasMotionPoints())
924  {
925  mesh.movePoints(map().preMotionPoints());
926  }
927  }
928  }
929 
930 
931  // Change the front and back patch types as required
932  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
933 
934  word frontBackType(word::null);
935 
936  if (isType<extrudeModels::wedge>(model()))
937  {
938  changeFrontBackPatches<wedgePolyPatch>
939  (
940  mesh,
941  frontPatchName,
942  backPatchName
943  );
944  }
945  else if (isType<extrudeModels::plane>(model()))
946  {
947  changeFrontBackPatches<emptyPolyPatch>
948  (
949  mesh,
950  frontPatchName,
951  backPatchName
952  );
953  }
954 
955 
956  // Merging front and back patch faces
957  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
958 
959  Switch mergeFaces(dict.lookup("mergeFaces"));
960  if (mergeFaces)
961  {
962  if (mode == MESH)
963  {
965  << "Cannot stitch front and back of extrusion since"
966  << " in 'mesh' mode (extrusion appended to mesh)."
967  << exit(FatalError);
968  }
969 
970  Info<< "Assuming full 360 degree axisymmetric case;"
971  << " stitching faces on patches "
972  << frontPatchName << " and "
973  << backPatchName << " together ..." << nl << endl;
974 
975  if (frontPatchFaces.size() != backPatchFaces.size())
976  {
978  << "Differing number of faces on front ("
979  << frontPatchFaces.size() << ") and back ("
980  << backPatchFaces.size() << ")"
981  << exit(FatalError);
982  }
983 
984 
985 
986  polyTopoChanger stitcher(mesh);
987  stitcher.setSize(1);
988 
989  const word cutZoneName("originalCutFaceZone");
990 
991  List<faceZone*> fz
992  (
993  1,
994  new faceZone
995  (
996  cutZoneName,
997  frontPatchFaces,
998  boolList(frontPatchFaces.size(), false),
999  0,
1000  mesh.faceZones()
1001  )
1002  );
1003 
1005 
1006  // Add the perfect interface mesh modifier
1007  perfectInterface perfectStitcher
1008  (
1009  "couple",
1010  0,
1011  stitcher,
1012  cutZoneName,
1013  word::null, // dummy patch name
1014  word::null // dummy patch name
1015  );
1016 
1017  // Topo change container
1018  polyTopoChange meshMod(mesh);
1019 
1020  perfectStitcher.setRefinement
1021  (
1023  (
1025  (
1026  mesh.faces(),
1027  frontPatchFaces
1028  ),
1029  mesh.points()
1030  ),
1032  (
1034  (
1035  mesh.faces(),
1036  backPatchFaces
1037  ),
1038  mesh.points()
1039  ),
1040  meshMod
1041  );
1042 
1043  // Construct new mesh from polyTopoChange.
1044  autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);
1045 
1046  // Update fields
1047  mesh.updateMesh(map);
1048 
1049  // Update local data
1050  updateCellSet(map(), addedCellsSet);
1051 
1052  // Move mesh (if inflation used)
1053  if (map().hasMotionPoints())
1054  {
1055  mesh.movePoints(map().preMotionPoints());
1056  }
1057  }
1058 
1059  mesh.setInstance(runTimeExtruded.constant());
1060  Info<< "Writing mesh to " << mesh.objectPath() << nl << endl;
1061 
1062  if (!mesh.write())
1063  {
1065  << exit(FatalError);
1066  }
1067 
1068  // Need writing cellSet
1069  label nAdded = returnReduce(addedCellsSet.size(), sumOp<label>());
1070  if (nAdded > 0)
1071  {
1072  cellSet addedCells(mesh, "addedCells", addedCellsSet);
1073  Info<< "Writing added cells to cellSet " << addedCells.name()
1074  << nl << endl;
1075  if (!addedCells.write())
1076  {
1078  << addedCells.name()
1079  << exit(FatalError);
1080  }
1081  }
1082 
1083  Info<< "End\n" << endl;
1084 
1085  return 0;
1086 }
1087 
1088 
1089 // ************************************************************************* //
planeExtrusion.H
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
addPatchCellLayer.H
Foam::polyMesh::points
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:979
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::PackedBoolList
A bit-packed bool list.
Definition: PackedBoolList.H:63
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
main
int main(int argc, char *argv[])
Definition: extrudeMesh.C:260
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Foam::globalPoints
Calculates points shared by more than two processor patches or cyclic patches.
Definition: globalPoints.H:100
createDummyFvMeshFiles
void createDummyFvMeshFiles(const polyMesh &mesh, const word &regionName)
Definition: extrudeMesh.C:79
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
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
Foam::polyBoundaryMesh
Foam::polyBoundaryMesh.
Definition: polyBoundaryMesh.H:60
Foam::IOobject::AUTO_WRITE
@ AUTO_WRITE
Definition: IOobject.H:117
nPatches
label nPatches
Definition: readKivaGrid.H:402
Foam::polyMesh::defaultRegion
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:306
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::HashTable::transfer
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
Definition: HashTable.C:518
Foam::addPatchCellLayer::globalEdgeFaces
static labelListList globalEdgeFaces(const polyMesh &, const globalIndex &globalFaces, const indirectPrimitivePatch &pp)
Per patch edge the pp faces (in global indices) using it. Uses.
Definition: addPatchCellLayer.C:618
Foam::polyTopoChange::changeMesh
autoPtr< mapPolyMesh > changeMesh(polyMesh &mesh, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
Definition: polyTopoChange.C:3039
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:56
Foam::fvMesh::addFvPatches
void addFvPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches. Constructor helper.
Definition: fvMesh.C:462
wedgePolyPatch.H
Foam::PrimitivePatch::localPoints
const Field< PointType > & localPoints() const
Return pointField of points in patch.
Definition: PrimitivePatchTemplate.C:432
globalIndex.H
Foam::polyTopoChanger
List of mesh modifiers defining the mesh dynamics.
Definition: polyTopoChanger.H:56
polyTopoChanger.H
Foam::polyTopoChange::modifyFace
void modifyFace(const face &f, const label faceI, const label own, const label nei, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip)
Modify vertices or cell of face.
Definition: polyTopoChange.C:2869
polyTopoChange.H
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:377
Foam::dictionary::lookup
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:449
Foam::PrimitivePatch::meshEdges
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
Return labels of patch edges in the global edge list using.
Definition: PrimitivePatchMeshEdges.C:41
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:97
Foam::edge
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:58
Foam::fileName::path
fileName path() const
Return directory path name (part before last /)
Definition: fileName.C:293
Foam::List::transfer
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Foam::dictionary::lookupOrDefault
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Definition: dictionaryTemplates.C:33
Foam::Map< label >
Foam::regIOobject::write
virtual bool write() const
Write using setting from DB.
Definition: regIOobjectWrite.C:126
Foam::fvMesh::removeFvBoundary
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
Definition: fvMesh.C:480
Foam::fvMesh::movePoints
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
Definition: fvMesh.C:726
Foam::polyMesh::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:421
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::primitiveMesh::edges
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
Definition: primitiveMeshEdges.C:353
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::primitiveMesh::pointEdges
const labelListList & pointEdges() const
Definition: primitiveMeshPointEdges.C:96
Foam::perfectInterface::setRefinement
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
Definition: perfectInterface.C:435
Foam::addPatchCellLayer::addedPoints
const labelListList & addedPoints() const
Added points per patch point.
Definition: addPatchCellLayer.H:306
Foam::HashSet< label, Hash< label > >
patchFaces
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
Definition: extrudeMesh.C:148
Foam::primitiveMesh::nEdges
label nEdges() const
Definition: primitiveMeshI.H:41
Foam::extrudeModel::New
static autoPtr< extrudeModel > New(const dictionary &)
Select null constructed.
Definition: extrudeModelNew.C:31
wedge.H
Foam::MeshedSurface::faces
const List< Face > & faces() const
Return const access to the faces.
Definition: MeshedSurface.H:301
Foam::mode
mode_t mode(const fileName &)
Return the file mode.
Definition: POSIX.C:573
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::IOobject::NO_WRITE
@ NO_WRITE
Definition: IOobject.H:118
Foam::fileName::name
word name() const
Return file name (part beyond last /)
Definition: fileName.C:212
changeFrontBackPatches
void changeFrontBackPatches(polyMesh &mesh, const word &frontPatchName, const word &backPatchName)
Definition: extrudeMesh.C:216
Foam::polyMesh::faceZones
const faceZoneMesh & faceZones() const
Return face zone mesh.
Definition: polyMesh.H:463
Foam::wordList
List< word > wordList
A List of words.
Definition: fileName.H:54
Foam::renumber
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) of a list.
Definition: ListOpsTemplates.C:32
Foam::edgeCollapser
Does polyTopoChanges to remove edges. Can remove faces due to edge collapse but can not remove cells ...
Definition: edgeCollapser.H:66
Foam::IOobject::objectPath
fileName objectPath() const
Return complete path + object name.
Definition: IOobject.H:376
Foam::boundBox::span
vector span() const
The bounding box span (from minimum to maximum)
Definition: boundBoxI.H:84
Foam::fvMesh::write
virtual bool write() const
Write mesh using IO settings from time.
Definition: fvMesh.C:873
PATCH
@ PATCH
Definition: extrudeMesh.C:61
Foam::IOobject::headerOk
bool headerOk()
Read and check header info.
Definition: IOobject.C:439
Foam::IOobject::MUST_READ_IF_MODIFIED
@ MUST_READ_IF_MODIFIED
Definition: IOobject.H:109
n
label n
Definition: TABSMDCalcMethod2.H:31
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::primitiveMesh::nPoints
label nPoints() const
Definition: primitiveMeshI.H:35
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:43
updateFaceLabels
void updateFaceLabels(const mapPolyMesh &map, labelList &faceLabels)
Definition: extrudeMesh.C:174
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::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
createTimeExtruded.H
Foam::TimePaths::system
const word & system() const
Return system name.
Definition: TimePaths.H:120
Foam::extrudedMesh
Definition: extrudedMesh.H:49
Foam::faceZone
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:64
edgeCollapser.H
Foam::IOobject::NO_READ
@ NO_READ
Definition: IOobject.H:111
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
MESH
@ MESH
Definition: extrudeMesh.C:60
extrudeModel.H
argList.H
Foam::polyMesh::faceOwner
virtual const labelList & faceOwner() const
Return face owner.
Definition: polyMesh.C:1017
Foam::IndirectList
A List with indirect addressing.
Definition: IndirectList.H:102
addRegionOption.H
Foam::fvMesh::updateMesh
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh corresponding to the given map.
Definition: fvMesh.C:802
Foam::boundBox::minDim
scalar minDim() const
Smallest length/height/width dimension.
Definition: boundBoxI.H:102
Foam::IOobject::name
const word & name() const
Return name.
Definition: IOobject.H:273
Foam::processorPolyPatch
Neighbour processor patch.
Definition: processorPolyPatch.H:55
findPatchID
label findPatchID(const polyBoundaryMesh &patches, const word &name)
Definition: extrudeMesh.C:132
Foam::edgeCollapser::consistentCollapse
void consistentCollapse(const globalIndex &globalPoints, const labelList &pointPriority, const Map< point > &collapsePointToLocation, PackedBoolList &collapseEdge, List< pointEdgeCollapse > &allPointInfo, const bool allowCellCollapse=false) const
Ensure that the collapse is parallel consistent and update.
Definition: edgeCollapser.C:1637
Foam::ZoneMesh::whichZone
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
Definition: ZoneMesh.C:226
Foam::identity
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
Definition: ListOps.C:104
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::PrimitivePatch::nPoints
label nPoints() const
Return number of points supporting patch faces.
Definition: PrimitivePatchTemplate.H:293
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::HashTable::size
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
Foam::perfectInterface
Hack of attachDetach to couple patches when they perfectly align. Does not decouple....
Definition: perfectInterface.H:55
Foam::addPatchCellLayer
Adds layers of cells to outside of polyPatch. Can optionally create stand-alone extruded mesh (addToM...
Definition: addPatchCellLayer.H:125
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
ExtrudeModeNames
static const NamedEnum< ExtrudeMode, 3 > ExtrudeModeNames
Definition: extrudeMesh.C:76
fvMesh.H
Foam::edgeCollapser::setRefinement
bool setRefinement(const List< pointEdgeCollapse > &allPointInfo, polyTopoChange &meshMod) const
Play commands into polyTopoChange to create mesh.
Definition: edgeCollapser.C:1265
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::cellSet
A collection of cell labels.
Definition: cellSet.H:48
Foam::globalIndex
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:63
Foam::e
const double e
Elementary charge.
Definition: doubleFloat.H:94
Foam::boolList
List< bool > boolList
Bool container classes.
Definition: boolList.H:50
Foam::polyPatch::start
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:312
Foam::addPatchCellLayer::updateMesh
void updateMesh(const mapPolyMesh &, const labelList &faceMap, const labelList &pointMap)
Update any locally stored mesh information. Gets additional.
Definition: addPatchCellLayer.C:1972
emptyPolyPatch.H
Foam::DynamicList::append
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Foam::polyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: polyPatch.H:231
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::polyMesh::removeBoundary
void removeBoundary()
Remove boundary patches.
Definition: polyMeshClear.C:36
Foam::UPstream::myProcNo
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:405
Foam::addPatchCellLayer::layerFaces
const labelListList & layerFaces() const
Layer faces per patch face. See above.
Definition: addPatchCellLayer.H:312
Foam::mapPolyMesh::reverseFaceMap
const labelList & reverseFaceMap() const
Reverse face map.
Definition: mapPolyMesh.H:497
Foam::polyMesh::setInstance
void setInstance(const fileName &)
Set the instance for mesh files.
Definition: polyMeshIO.C:32
Foam::polyMesh::bounds
const boundBox & bounds() const
Return mesh bounding box.
Definition: polyMesh.H:427
Foam::List::setSize
void setSize(const label)
Reset size of List.
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
setRootCase.H
Foam::mapPolyMesh::reverseCellMap
const labelList & reverseCellMap() const
Reverse cell map.
Definition: mapPolyMesh.H:528
SURFACE
@ SURFACE
Definition: extrudeMesh.C:62
Foam::polyMesh::faces
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1004
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::primitiveMesh::nFaces
label nFaces() const
Definition: primitiveMeshI.H:58
Foam::sumOp
Definition: ops.H:162
Foam::Pout
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
Foam::PatchTools::pointNormals
static tmp< pointField > pointNormals(const polyMesh &, const PrimitivePatch< Face, FaceList, PointField, PointType > &)
Return parallel consistent point normals for patches using mesh points.
Foam::Vector< scalar >
Foam::polyMesh::addPatches
void addPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches.
Definition: polyMesh.C:878
updateCellSet
void updateCellSet(const mapPolyMesh &map, labelHashSet &cellLabels)
Definition: extrudeMesh.C:195
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::addPatchCellLayer::calcExtrudeInfo
static void calcExtrudeInfo(const bool zoneFromAnyFace, const polyMesh &, const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const indirectPrimitivePatch &pp, labelList &edgePatchID, label &nPatches, Map< label > &nbrProcToPatch, Map< label > &patchToNbrProc, labelList &edgeZoneID, boolList &edgeFlip, labelList &inflateFaceID)
Determine extrude information per patch edge:
Definition: addPatchCellLayer.C:663
Foam::IOobject::clone
Foam::autoPtr< IOobject > clone() const
Clone.
Definition: IOobject.H:252
Foam::string::expand
string & expand(const bool allowEmpty=false)
Expand initial tildes and all occurences of environment variables.
Definition: string.C:98
Foam::autoPtr::valid
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set).
Definition: autoPtrI.H:83
createMesh.H
MeshedSurfaces.H
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::PtrList::size
label size() const
Return the number of elements in the PtrList.
Definition: PtrListI.H:32
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:116
Foam::PtrList::setSize
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
Definition: PtrList.C:142
Foam::word::null
static const word null
An empty word.
Definition: word.H:77
ExtrudeMode
ExtrudeMode
Definition: extrudeMesh.C:58
Foam::boundBox
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:55
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::autoPtr::reset
void reset(T *=0)
If object pointer already set, delete object and set to given.
Definition: autoPtrI.H:114
perfectInterface.H
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
Foam::boundaryMesh
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:59
patches
patches[0]
Definition: createSingleCellMesh.H:36
cellSet.H
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
collapseEdge
label collapseEdge(triSurface &surf, const scalar minLen)
Keep collapsing all edges < minLen.
Foam::PrimitivePatch::meshPoints
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Definition: PrimitivePatchTemplate.C:392
Foam::MeshedSurface< face >
args
Foam::argList args(argc, argv)
Foam::Time::controlDictName
static word controlDictName
The default control dictionary name (normally "controlDict")
Definition: Time.H:213
Foam::MeshedSurface::size
label size() const
The surface size is the number of faces.
Definition: MeshedSurface.H:295
Foam::argList::optionReadIfPresent
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
Definition: argListI.H:198
Foam::patchIdentifier::name
const word & name() const
Return name.
Definition: patchIdentifier.H:109
Foam::patchIdentifier::index
label index() const
Return the index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:133
Foam::polyMesh::addZones
void addZones(const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
Add mesh zones.
Definition: polyMesh.C:922
Foam::gMax
Type gMax(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:562
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::polyMesh::faceNeighbour
virtual const labelList & faceNeighbour() const
Return face neighbour.
Definition: polyMesh.C:1023
Foam::dictionary::add
bool add(entry *, bool mergeEntry=false)
Add a new entry.
Definition: dictionary.C:729
Foam::addPatchCellLayer::addedCells
static labelListList addedCells(const polyMesh &, const labelListList &layerFaces)
Helper: get added cells per patch face.
Definition: addPatchCellLayer.C:584
Foam::NamedEnum
Initialise the NamedEnum HashTable from the static list of names.
Definition: NamedEnum.H:52
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatchTemplate.H:88
Foam::addPatchCellLayer::setRefinement
void setRefinement(const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const scalarField &expansionRatio, const indirectPrimitivePatch &pp, const labelList &sidePatchID, const labelList &sideZoneID, const boolList &sideFlip, const labelList &inflateFaceID, const labelList &exposedPatchID, const labelList &nFaceLayers, const labelList &nPointLayers, const vectorField &firstLayerDisp, polyTopoChange &meshMod)
Play commands into polyTopoChange to create layers on top.
Definition: addPatchCellLayer.C:1008