conformalVoronoiMeshZones.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "conformalVoronoiMesh.H"
29 #include "polyModifyFace.H"
30 #include "polyModifyCell.H"
31 #include "syncTools.H"
32 #include "regionSplit.H"
33 #include "surfaceZonesInfo.H"
34 
35 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
36 
37 void Foam::conformalVoronoiMesh::calcNeighbourCellCentres
38 (
39  const polyMesh& mesh,
40  const pointField& cellCentres,
41  pointField& neiCc
42 ) const
43 {
44  const label nBoundaryFaces = mesh.nBoundaryFaces();
45 
46  if (neiCc.size() != nBoundaryFaces)
47  {
49  << "nBoundaries:" << nBoundaryFaces
50  << " neiCc:" << neiCc.size()
51  << abort(FatalError);
52  }
53 
54  const polyBoundaryMesh& patches = mesh.boundaryMesh();
55 
56  forAll(patches, patchi)
57  {
58  const polyPatch& pp = patches[patchi];
59 
60  const labelUList& faceCells = pp.faceCells();
61 
62  label bFacei = pp.start() - mesh.nInternalFaces();
63 
64  if (pp.coupled())
65  {
66  forAll(faceCells, i)
67  {
68  neiCc[bFacei] = cellCentres[faceCells[i]];
69  bFacei++;
70  }
71  }
72  }
73 
74  // Swap coupled boundaries. Apply separation to cc since is coordinate.
76 }
77 
78 
79 void Foam::conformalVoronoiMesh::selectSeparatedCoupledFaces
80 (
81  const polyMesh& mesh,
82  boolList& selected
83 ) const
84 {
85  const polyBoundaryMesh& patches = mesh.boundaryMesh();
86 
87  forAll(patches, patchi)
88  {
89  // Check all coupled. Avoid using .coupled() so we also pick up AMI.
90  if (isA<coupledPolyPatch>(patches[patchi]))
91  {
92  const coupledPolyPatch& cpp = refCast<const coupledPolyPatch>
93  (
94  patches[patchi]
95  );
96 
97  if (cpp.separated() || !cpp.parallel())
98  {
99  forAll(cpp, i)
100  {
101  selected[cpp.start()+i] = true;
102  }
103  }
104  }
105  }
106 }
107 
108 
109 void Foam::conformalVoronoiMesh::findCellZoneInsideWalk
110 (
111  const polyMesh& mesh,
112  const labelList& locationSurfaces, // indices of surfaces with inside point
113  const labelList& faceToSurface, // per face index of named surface
114  labelList& cellToSurface
115 ) const
116 {
117  // Analyse regions. Reuse regionsplit
118  boolList blockedFace(mesh.nFaces());
119  selectSeparatedCoupledFaces(mesh, blockedFace);
120 
121  forAll(faceToSurface, facei)
122  {
123  if (faceToSurface[facei] == -1)
124  {
125  blockedFace[facei] = false;
126  }
127  else
128  {
129  blockedFace[facei] = true;
130  }
131  }
132  // No need to sync since namedSurfaceIndex already is synced
133 
134  // Set region per cell based on walking
135  regionSplit cellRegion(mesh, blockedFace);
136  blockedFace.clear();
137 
138 
139  // Force calculation of face decomposition (used in findCell)
140  (void)mesh.tetBasePtIs();
141 
142  const PtrList<surfaceZonesInfo>& surfZones =
143  geometryToConformTo().surfZones();
144 
145  // For all locationSurface find the cell
146  forAll(locationSurfaces, i)
147  {
148  label surfI = locationSurfaces[i];
149 
150  const Foam::point& insidePoint = surfZones[surfI].zoneInsidePoint();
151 
152  const word& surfName = geometryToConformTo().geometry().names()[surfI];
153 
154  Info<< " For surface " << surfName
155  << " finding inside point " << insidePoint
156  << endl;
157 
158  // Find the region containing the insidePoint
159  label keepRegionI = -1;
160 
161  label celli = mesh.findCell(insidePoint);
162 
163  if (celli != -1)
164  {
165  keepRegionI = cellRegion[celli];
166  }
167  reduce(keepRegionI, maxOp<label>());
168 
169  Info<< " For surface " << surfName
170  << " found point " << insidePoint << " in cell " << celli
171  << " in global region " << keepRegionI
172  << " out of " << cellRegion.nRegions() << " regions." << endl;
173 
174  if (keepRegionI == -1)
175  {
177  << "Point " << insidePoint
178  << " is not inside the mesh." << nl
179  << "Bounding box of the mesh:" << mesh.bounds()
180  << exit(FatalError);
181  }
182 
183  // Set all cells with this region
184  forAll(cellRegion, celli)
185  {
186  if (cellRegion[celli] == keepRegionI)
187  {
188  if (cellToSurface[celli] == -2)
189  {
190  cellToSurface[celli] = surfI;
191  }
192  else if (cellToSurface[celli] != surfI)
193  {
195  << "Cell " << celli
196  << " at " << mesh.cellCentres()[celli]
197  << " is inside surface " << surfName
198  << " but already marked as being in zone "
199  << cellToSurface[celli] << endl
200  << "This can happen if your surfaces are not"
201  << " (sufficiently) closed."
202  << endl;
203  }
204  }
205  }
206  }
207 }
208 
209 
210 Foam::labelList Foam::conformalVoronoiMesh::calcCellZones
211 (
212  const pointField& cellCentres
213 ) const
214 {
215  labelList cellToSurface(cellCentres.size(), label(-1));
216 
217  const PtrList<surfaceZonesInfo>& surfZones =
218  geometryToConformTo().surfZones();
219 
220  // Get list of closed surfaces
221  labelList closedNamedSurfaces
222  (
224  (
225  surfZones,
226  geometryToConformTo().geometry(),
227  geometryToConformTo().surfaces()
228  )
229  );
230 
231  forAll(closedNamedSurfaces, i)
232  {
233  label surfI = closedNamedSurfaces[i];
234 
235  const searchableSurface& surface =
236  allGeometry()[geometryToConformTo().surfaces()[surfI]];
237 
238  const surfaceZonesInfo::areaSelectionAlgo selectionMethod =
239  surfZones[surfI].zoneInside();
240 
241  if
242  (
243  selectionMethod != surfaceZonesInfo::INSIDE
244  && selectionMethod != surfaceZonesInfo::OUTSIDE
245  && selectionMethod != surfaceZonesInfo::INSIDEPOINT
246  )
247  {
249  << "Trying to use surface "
250  << surface.name()
251  << " which has non-geometric inside selection method "
252  << surfaceZonesInfo::areaSelectionAlgoNames[selectionMethod]
253  << exit(FatalError);
254  }
255 
256  if (surface.hasVolumeType())
257  {
258  List<volumeType> volType;
259  surface.getVolumeType(cellCentres, volType);
260 
261  bool selectInside = true;
262  if (selectionMethod == surfaceZonesInfo::INSIDEPOINT)
263  {
264  List<volumeType> volTypeInsidePoint;
265  surface.getVolumeType
266  (
267  pointField(1, surfZones[surfI].zoneInsidePoint()),
268  volTypeInsidePoint
269  );
270 
271  if (volTypeInsidePoint[0] == volumeType::OUTSIDE)
272  {
273  selectInside = false;
274  }
275  }
276  else if (selectionMethod == surfaceZonesInfo::OUTSIDE)
277  {
278  selectInside = false;
279  }
280 
281  forAll(volType, pointi)
282  {
283  if (cellToSurface[pointi] == -1)
284  {
285  if
286  (
287  (
288  volType[pointi] == volumeType::INSIDE
289  && selectInside
290  )
291  || (
292  volType[pointi] == volumeType::OUTSIDE
293  && !selectInside
294  )
295  )
296  {
297  cellToSurface[pointi] = surfI;
298  }
299  }
300  }
301  }
302  }
303 
304  return cellToSurface;
305 }
306 
307 
308 void Foam::conformalVoronoiMesh::calcFaceZones
309 (
310  const polyMesh& mesh,
311  const pointField& cellCentres,
312  const labelList& cellToSurface,
313  labelList& faceToSurface,
314  boolList& flipMap
315 ) const
316 {
317  faceToSurface.setSize(mesh.nFaces(), -1);
318  flipMap.setSize(mesh.nFaces(), false);
319 
320  const faceList& faces = mesh.faces();
321  const labelList& faceOwner = mesh.faceOwner();
322  const labelList& faceNeighbour = mesh.faceNeighbour();
323 
324  labelList neiFaceOwner(mesh.nBoundaryFaces(), label(-1));
325 
326  const polyBoundaryMesh& patches = mesh.boundaryMesh();
327 
328  forAll(patches, patchi)
329  {
330  const polyPatch& pp = patches[patchi];
331 
332  const labelUList& faceCells = pp.faceCells();
333 
334  label bFacei = pp.start() - mesh.nInternalFaces();
335 
336  if (pp.coupled())
337  {
338  forAll(faceCells, i)
339  {
340  neiFaceOwner[bFacei] = cellToSurface[faceCells[i]];
341  bFacei++;
342  }
343  }
344  }
345 
346  syncTools::swapBoundaryFaceList(mesh, neiFaceOwner);
347 
348  forAll(faces, facei)
349  {
350  const label ownerSurfacei = cellToSurface[faceOwner[facei]];
351 
352  if (faceToSurface[facei] >= 0)
353  {
354  continue;
355  }
356 
357  if (mesh.isInternalFace(facei))
358  {
359  const label neiSurfacei = cellToSurface[faceNeighbour[facei]];
360 
361  if
362  (
363  (ownerSurfacei >= 0 || neiSurfacei >= 0)
364  && ownerSurfacei != neiSurfacei
365  )
366  {
367  flipMap[facei] =
368  (
369  ownerSurfacei == max(ownerSurfacei, neiSurfacei)
370  ? false
371  : true
372  );
373 
374  faceToSurface[facei] = max(ownerSurfacei, neiSurfacei);
375  }
376  }
377  else
378  {
379  label patchID = mesh.boundaryMesh().whichPatch(facei);
380 
381  if (mesh.boundaryMesh()[patchID].coupled())
382  {
383  const label neiSurfacei =
384  neiFaceOwner[facei - mesh.nInternalFaces()];
385 
386  if
387  (
388  (ownerSurfacei >= 0 || neiSurfacei >= 0)
389  && ownerSurfacei != neiSurfacei
390  )
391  {
392  flipMap[facei] =
393  (
394  ownerSurfacei == max(ownerSurfacei, neiSurfacei)
395  ? false
396  : true
397  );
398 
399  faceToSurface[facei] = max(ownerSurfacei, neiSurfacei);
400  }
401  }
402  else
403  {
404  if (ownerSurfacei >= 0)
405  {
406  faceToSurface[facei] = ownerSurfacei;
407  }
408  }
409  }
410  }
411 
412 
413  const PtrList<surfaceZonesInfo>& surfZones =
414  geometryToConformTo().surfZones();
415 
416  labelList unclosedSurfaces
417  (
419  (
420  surfZones,
421  geometryToConformTo().geometry(),
422  geometryToConformTo().surfaces()
423  )
424  );
425 
426  pointField neiCc(mesh.nBoundaryFaces());
427  calcNeighbourCellCentres
428  (
429  mesh,
430  cellCentres,
431  neiCc
432  );
433 
434  // Use intersection of cellCentre connections
435  forAll(faces, facei)
436  {
437  if (faceToSurface[facei] >= 0)
438  {
439  continue;
440  }
441 
442  label patchID = mesh.boundaryMesh().whichPatch(facei);
443 
444  const label own = faceOwner[facei];
445 
446  List<pointIndexHit> surfHit;
447  labelList hitSurface;
448 
449  if (mesh.isInternalFace(facei))
450  {
451  const label nei = faceNeighbour[facei];
452 
453  geometryToConformTo().findSurfaceAllIntersections
454  (
455  cellCentres[own],
456  cellCentres[nei],
457  surfHit,
458  hitSurface
459  );
460  }
461  else if (patchID != -1 && mesh.boundaryMesh()[patchID].coupled())
462  {
463  geometryToConformTo().findSurfaceAllIntersections
464  (
465  cellCentres[own],
466  neiCc[facei - mesh.nInternalFaces()],
467  surfHit,
468  hitSurface
469  );
470  }
471 
472  // If there are multiple intersections then do not add to
473  // a faceZone
474  if (surfHit.size() == 1 && surfHit[0].hit())
475  {
476  if (unclosedSurfaces.found(hitSurface[0]))
477  {
478  vectorField norm;
479  geometryToConformTo().getNormal
480  (
481  hitSurface[0],
482  List<pointIndexHit>(1, surfHit[0]),
483  norm
484  );
485 
486  const vector areaNorm = faces[facei].areaNormal(mesh.points());
487 
488  if ((norm[0] & areaNorm) < 0)
489  {
490  flipMap[facei] = true;
491  }
492  else
493  {
494  flipMap[facei] = false;
495  }
496 
497  faceToSurface[facei] = hitSurface[0];
498  }
499  }
500  }
501 
502 
503 // labelList neiCellSurface(mesh.nBoundaryFaces());
504 //
505 // forAll(patches, patchi)
506 // {
507 // const polyPatch& pp = patches[patchi];
508 //
509 // if (pp.coupled())
510 // {
511 // forAll(pp, i)
512 // {
513 // label facei = pp.start()+i;
514 // label ownSurface = cellToSurface[faceOwner[facei]];
515 // neiCellSurface[facei - mesh.nInternalFaces()] = ownSurface;
516 // }
517 // }
518 // }
519 // syncTools::swapBoundaryFaceList(mesh, neiCellSurface);
520 //
521 // forAll(patches, patchi)
522 // {
523 // const polyPatch& pp = patches[patchi];
524 //
525 // if (pp.coupled())
526 // {
527 // forAll(pp, i)
528 // {
529 // label facei = pp.start()+i;
530 // label ownSurface = cellToSurface[faceOwner[facei]];
531 // label neiSurface =
532 // neiCellSurface[facei-mesh.nInternalFaces()];
533 //
534 // if (faceToSurface[facei] == -1 && (ownSurface != neiSurface))
535 // {
536 // // Give face the max cell zone
537 // faceToSurface[facei] = max(ownSurface, neiSurface);
538 // }
539 // }
540 // }
541 // }
542 
543  // Sync
544  syncTools::syncFaceList(mesh, faceToSurface, maxEqOp<label>());
545 }
546 
547 
548 void Foam::conformalVoronoiMesh::addZones
549 (
550  polyMesh& mesh,
551  const pointField& cellCentres
552 ) const
553 {
554  Info<< " Adding zones to mesh" << endl;
555 
556  const PtrList<surfaceZonesInfo>& surfZones =
557  geometryToConformTo().surfZones();
558 
559  labelList cellToSurface(calcCellZones(cellCentres));
560 
561  labelList faceToSurface;
562  boolList flipMap;
563 
564  calcFaceZones
565  (
566  mesh,
567  cellCentres,
568  cellToSurface,
569  faceToSurface,
570  flipMap
571  );
572 
573  labelList insidePointNamedSurfaces
574  (
576  );
577 
578  findCellZoneInsideWalk
579  (
580  mesh,
581  insidePointNamedSurfaces,
582  faceToSurface,
583  cellToSurface
584  );
585 
586  labelList namedSurfaces(surfaceZonesInfo::getNamedSurfaces(surfZones));
587 
588  // Tbd. No support yet for multi-faceZones on outside of cellZone
589 
590  forAll(namedSurfaces, i)
591  {
592  label surfI = namedSurfaces[i];
593  const wordList& fzNames = surfZones[surfI].faceZoneNames();
594 
595  Info<< incrIndent << indent << "Surface : "
596  << geometryToConformTo().geometry().names()[surfI] << nl
597  << indent << " faceZone : "
598  << (fzNames.size() ? fzNames[0] : "") << nl
599  << indent << " cellZone : "
600  << surfZones[surfI].cellZoneName()
601  << decrIndent << endl;
602  }
603 
604  // Add zones to mesh
605  labelList surfaceToFaceZone(surfZones.size(), -1);
606  {
607  const labelListList surfaceToFaceZones
608  (
610  (
611  surfZones,
612  namedSurfaces,
613  mesh
614  )
615  );
616  forAll(surfaceToFaceZones, surfi)
617  {
618  if (surfaceToFaceZones[surfi].size())
619  {
620  surfaceToFaceZone[surfi] = surfaceToFaceZones[surfi][0];
621  }
622  }
623  }
624 
625  const labelList surfaceToCellZone
626  (
628  (
629  surfZones,
630  namedSurfaces,
631  mesh
632  )
633  );
634 
635  // Topochange container
636  polyTopoChange meshMod(mesh);
637 
638  forAll(cellToSurface, celli)
639  {
640  label surfacei = cellToSurface[celli];
641 
642  if (surfacei >= 0)
643  {
644  label zoneI = surfaceToCellZone[surfacei];
645 
646  if (zoneI >= 0)
647  {
648  meshMod.setAction
649  (
650  polyModifyCell
651  (
652  celli,
653  false, // removeFromZone
654  zoneI
655  )
656  );
657  }
658  }
659  }
660 
661  const labelList& faceOwner = mesh.faceOwner();
662  const labelList& faceNeighbour = mesh.faceNeighbour();
663 
664  forAll(faceToSurface, facei)
665  {
666  label surfacei = faceToSurface[facei];
667 
668  if (surfacei < 0)
669  {
670  continue;
671  }
672 
673  label patchID = mesh.boundaryMesh().whichPatch(facei);
674 
675  if (mesh.isInternalFace(facei))
676  {
677  label own = faceOwner[facei];
678  label nei = faceNeighbour[facei];
679 
680  meshMod.setAction
681  (
682  polyModifyFace
683  (
684  mesh.faces()[facei], // modified face
685  facei, // label of face
686  own, // owner
687  nei, // neighbour
688  false, // face flip
689  -1, // patch for face
690  false, // remove from zone
691  surfaceToFaceZone[surfacei], // zone for face
692  flipMap[facei] // face flip in zone
693  )
694  );
695  }
696  else if (patchID != -1 && mesh.boundaryMesh()[patchID].coupled())
697  {
698  label own = faceOwner[facei];
699 
700  meshMod.setAction
701  (
702  polyModifyFace
703  (
704  mesh.faces()[facei], // modified face
705  facei, // label of face
706  own, // owner
707  -1, // neighbour
708  false, // face flip
709  patchID, // patch for face
710  false, // remove from zone
711  surfaceToFaceZone[surfacei], // zone for face
712  flipMap[facei] // face flip in zone
713  )
714  );
715  }
716  }
717 
718  // Change the mesh (no inflation, parallel sync)
719  autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false, true);
720 }
721 
722 
723 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:71
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
Foam::polyMesh::points
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1038
Foam::surfaceZonesInfo::getInsidePointNamedSurfaces
static labelList getInsidePointNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of surfaces with a cellZone that have 'insidePoint'.
Definition: surfaceZonesInfo.C:401
Foam::primitiveMesh::nInternalFaces
label nInternalFaces() const
Number of internal faces.
Definition: primitiveMeshI.H:78
Foam::primitiveMesh::nFaces
label nFaces() const
Number of mesh faces.
Definition: primitiveMeshI.H:90
Foam::syncTools::swapBoundaryFaceList
static void swapBoundaryFaceList(const polyMesh &mesh, UList< T > &faceValues)
Swap coupled boundary face values. Uses eqOp.
Definition: syncTools.H:439
Foam::boolList
List< bool > boolList
A List of bools.
Definition: List.H:69
Foam::surfaceZonesInfo::getNamedSurfaces
static labelList getNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces (surfaces with faceZoneName)
Definition: surfaceZonesInfo.C:263
Foam::polyMesh::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:435
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::surfaceZonesInfo::INSIDE
Definition: surfaceZonesInfo.H:67
Foam::surfaceZonesInfo::getAllClosedNamedSurfaces
static labelList getAllClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed.
Definition: surfaceZonesInfo.C:373
Foam::incrIndent
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Definition: Ostream.H:327
syncTools.H
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
Foam::wordList
List< word > wordList
A List of words.
Definition: fileName.H:59
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:51
Foam::syncTools::syncFaceList
static void syncFaceList(const polyMesh &mesh, UList< T > &faceValues, const CombineOp &cop)
Synchronize values on all mesh faces.
Definition: syncTools.H:390
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
patchID
label patchID
Definition: boundaryProcessorFaPatchPoints.H:5
Foam::polyMesh::faceOwner
virtual const labelList & faceOwner() const
Return face owner.
Definition: polyMesh.C:1076
regionSplit.H
Foam::surfaceZonesInfo::areaSelectionAlgo
areaSelectionAlgo
Types of selection of area.
Definition: surfaceZonesInfo.H:65
Foam::surfaceZonesInfo::OUTSIDE
Definition: surfaceZonesInfo.H:68
Foam::polyBoundaryMesh::whichPatch
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Definition: polyBoundaryMesh.C:805
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::syncTools::swapBoundaryFacePositions
static void swapBoundaryFacePositions(const polyMesh &mesh, UList< point > &positions)
Swap coupled positions. Uses eqOp.
Definition: syncTools.H:455
surfaceZonesInfo.H
Foam::FatalError
error FatalError
Foam::primitiveMesh::nBoundaryFaces
label nBoundaryFaces() const
Number of boundary faces (== nFaces - nInternalFaces)
Definition: primitiveMeshI.H:84
Foam::surfaceZonesInfo::INSIDEPOINT
Definition: surfaceZonesInfo.H:69
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::decrIndent
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Definition: Ostream.H:334
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
Foam::indent
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:320
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
polyModifyFace.H
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::surfaceZonesInfo::getUnclosedNamedSurfaces
static labelList getUnclosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are unclosed.
Definition: surfaceZonesInfo.C:346
Foam::polyMesh::bounds
const boundBox & bounds() const
Return mesh bounding box.
Definition: polyMesh.H:441
Foam::labelListList
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:56
Foam::polyMesh::findCell
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
Definition: polyMesh.C:1446
Foam::primitiveMesh::cellCentres
const vectorField & cellCentres() const
Definition: primitiveMeshCellCentresAndVols.C:175
Foam::polyMesh::faces
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1063
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:372
Foam::nl
constexpr char nl
Definition: Ostream.H:385
Foam::faceList
List< face > faceList
A List of faces.
Definition: faceListFwd.H:47
Foam::Vector
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:62
Foam::List< label >
Foam::primitiveMesh::isInternalFace
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Definition: primitiveMeshI.H:102
patches
const polyBoundaryMesh & patches
Definition: convertProcessorPatches.H:65
Foam::volumeType::INSIDE
A location inside the volume.
Definition: volumeType.H:68
Foam::surfaceZonesInfo::addFaceZonesToMesh
static labelListList addFaceZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
Definition: surfaceZonesInfo.C:543
Foam::labelUList
UList< label > labelUList
A UList of labels.
Definition: UList.H:80
Foam::surfaceZonesInfo::areaSelectionAlgoNames
static const Enum< areaSelectionAlgo > areaSelectionAlgoNames
Definition: surfaceZonesInfo.H:73
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:298
Foam::polyMesh::faceNeighbour
virtual const labelList & faceNeighbour() const
Return face neighbour.
Definition: polyMesh.C:1082
Foam::volumeType::OUTSIDE
A location outside the volume.
Definition: volumeType.H:69
conformalVoronoiMesh.H
polyModifyCell.H
Foam::surfaceZonesInfo::addCellZonesToMesh
static labelList addCellZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
Definition: surfaceZonesInfo.C:458
Foam::polyMesh::tetBasePtIs
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
Definition: polyMesh.C:861