polyMeshFromShapeMesh.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-2016 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 \*---------------------------------------------------------------------------*/
25 
26 #include "polyMesh.H"
27 #include "Time.H"
28 #include "primitiveMesh.H"
29 #include "DynamicList.H"
30 #include "indexedOctree.H"
31 #include "treeDataCell.H"
32 #include "globalMeshData.H"
33 
34 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
35 
36 Foam::labelListList Foam::polyMesh::cellShapePointCells
37 (
38  const cellShapeList& c
39 ) const
40 {
41  List<DynamicList<label, primitiveMesh::cellsPerPoint_>>
42  pc(points().size());
43 
44  // For each cell
45  forAll(c, i)
46  {
47  // For each vertex
48  const labelList& labels = c[i];
49 
50  forAll(labels, j)
51  {
52  // Set working point label
53  label curPoint = labels[j];
54  DynamicList<label, primitiveMesh::cellsPerPoint_>& curPointCells =
55  pc[curPoint];
56 
57  // Enter the cell label in the point's cell list
58  curPointCells.append(i);
59  }
60  }
61 
62  labelListList pointCellAddr(pc.size());
63 
64  forAll(pc, pointi)
65  {
66  pointCellAddr[pointi].transfer(pc[pointi]);
67  }
68 
69  return pointCellAddr;
70 }
71 
72 
73 Foam::labelList Foam::polyMesh::facePatchFaceCells
74 (
75  const faceList& patchFaces,
76  const labelListList& pointCells,
77  const faceListList& cellsFaceShapes,
78  const label patchID
79 ) const
80 {
81  bool found;
82 
83  labelList FaceCells(patchFaces.size());
84 
85  forAll(patchFaces, fI)
86  {
87  found = false;
88 
89  const face& curFace = patchFaces[fI];
90  const labelList& facePoints = patchFaces[fI];
91 
92  forAll(facePoints, pointi)
93  {
94  const labelList& facePointCells = pointCells[facePoints[pointi]];
95 
96  forAll(facePointCells, celli)
97  {
98  faceList cellFaces = cellsFaceShapes[facePointCells[celli]];
99 
100  forAll(cellFaces, cellFace)
101  {
102  if (face::sameVertices(cellFaces[cellFace], curFace))
103  {
104  // Found the cell corresponding to this face
105  FaceCells[fI] = facePointCells[celli];
106 
107  found = true;
108  }
109  if (found) break;
110  }
111  if (found) break;
112  }
113  if (found) break;
114  }
115 
116  if (!found)
117  {
119  << "face " << fI << " in patch " << patchID
120  << " does not have neighbour cell"
121  << " face: " << patchFaces[fI]
122  << abort(FatalError);
123  }
124  }
125 
126  return FaceCells;
127 }
128 
129 
130 void Foam::polyMesh::setTopology
131 (
132  const cellShapeList& cellsAsShapes,
133  const faceListList& boundaryFaces,
134  const wordList& boundaryPatchNames,
135  labelList& patchSizes,
136  labelList& patchStarts,
137  label& defaultPatchStart,
138  label& nFaces,
139  cellList& cells
140 )
141 {
142  // Calculate the faces of all cells
143  // Initialise maximum possible numer of mesh faces to 0
144  label maxFaces = 0;
145 
146  // Set up a list of face shapes for each cell
147  faceListList cellsFaceShapes(cellsAsShapes.size());
148  cells.setSize(cellsAsShapes.size());
149 
150  forAll(cellsFaceShapes, celli)
151  {
152  cellsFaceShapes[celli] = cellsAsShapes[celli].faces();
153 
154  cells[celli].setSize(cellsFaceShapes[celli].size());
155 
156  // Initialise cells to -1 to flag undefined faces
157  static_cast<labelList&>(cells[celli]) = -1;
158 
159  // Count maximum possible numer of mesh faces
160  maxFaces += cellsFaceShapes[celli].size();
161  }
162 
163  // Set size of faces array to maximum possible number of mesh faces
164  faces_.setSize(maxFaces);
165 
166  // Initialise number of faces to 0
167  nFaces = 0;
168 
169  // Set reference to point-cell addressing
170  labelListList PointCells = cellShapePointCells(cellsAsShapes);
171 
172  bool found = false;
173 
174  forAll(cells, celli)
175  {
176  // Note:
177  // Insertion cannot be done in one go as the faces need to be
178  // added into the list in the increasing order of neighbour
179  // cells. Therefore, all neighbours will be detected first
180  // and then added in the correct order.
181 
182  const faceList& curFaces = cellsFaceShapes[celli];
183 
184  // Record the neighbour cell
185  labelList neiCells(curFaces.size(), -1);
186 
187  // Record the face of neighbour cell
188  labelList faceOfNeiCell(curFaces.size(), -1);
189 
190  label nNeighbours = 0;
191 
192  // For all faces ...
193  forAll(curFaces, facei)
194  {
195  // Skip faces that have already been matched
196  if (cells[celli][facei] >= 0) continue;
197 
198  found = false;
199 
200  const face& curFace = curFaces[facei];
201 
202  // Get the list of labels
203  const labelList& curPoints = curFace;
204 
205  // For all points
206  forAll(curPoints, pointi)
207  {
208  // dGget the list of cells sharing this point
209  const labelList& curNeighbours =
210  PointCells[curPoints[pointi]];
211 
212  // For all neighbours
213  forAll(curNeighbours, neiI)
214  {
215  label curNei = curNeighbours[neiI];
216 
217  // Reject neighbours with the lower label
218  if (curNei > celli)
219  {
220  // Get the list of search faces
221  const faceList& searchFaces = cellsFaceShapes[curNei];
222 
223  forAll(searchFaces, neiFacei)
224  {
225  if (searchFaces[neiFacei] == curFace)
226  {
227  // Match!!
228  found = true;
229 
230  // Record the neighbour cell and face
231  neiCells[facei] = curNei;
232  faceOfNeiCell[facei] = neiFacei;
233  nNeighbours++;
234 
235  break;
236  }
237  }
238  if (found) break;
239  }
240  if (found) break;
241  }
242  if (found) break;
243  } // End of current points
244  } // End of current faces
245 
246  // Add the faces in the increasing order of neighbours
247  for (label neiSearch = 0; neiSearch < nNeighbours; neiSearch++)
248  {
249  // Find the lowest neighbour which is still valid
250  label nextNei = -1;
251  label minNei = cells.size();
252 
253  forAll(neiCells, ncI)
254  {
255  if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
256  {
257  nextNei = ncI;
258  minNei = neiCells[ncI];
259  }
260  }
261 
262  if (nextNei > -1)
263  {
264  // Add the face to the list of faces
265  faces_[nFaces] = curFaces[nextNei];
266 
267  // Set cell-face and cell-neighbour-face to current face label
268  cells[celli][nextNei] = nFaces;
269  cells[neiCells[nextNei]][faceOfNeiCell[nextNei]] = nFaces;
270 
271  // Stop the neighbour from being used again
272  neiCells[nextNei] = -1;
273 
274  // Increment number of faces counter
275  nFaces++;
276  }
277  else
278  {
280  << "Error in internal face insertion"
281  << abort(FatalError);
282  }
283  }
284  }
285 
286  // Do boundary faces
287 
288  patchSizes.setSize(boundaryFaces.size(), -1);
289  patchStarts.setSize(boundaryFaces.size(), -1);
290 
291  forAll(boundaryFaces, patchi)
292  {
293  const faceList& patchFaces = boundaryFaces[patchi];
294 
295  labelList curPatchFaceCells =
296  facePatchFaceCells
297  (
298  patchFaces,
299  PointCells,
300  cellsFaceShapes,
301  patchi
302  );
303 
304  // Grab the start label
305  label curPatchStart = nFaces;
306 
307  forAll(patchFaces, facei)
308  {
309  const face& curFace = patchFaces[facei];
310 
311  const label cellInside = curPatchFaceCells[facei];
312 
313  // Get faces of the cell inside
314  const faceList& facesOfCellInside = cellsFaceShapes[cellInside];
315 
316  bool found = false;
317 
318  forAll(facesOfCellInside, cellFacei)
319  {
320  if (face::sameVertices(facesOfCellInside[cellFacei], curFace))
321  {
322  if (cells[cellInside][cellFacei] >= 0)
323  {
325  << "Trying to specify a boundary face " << curFace
326  << " on the face on cell " << cellInside
327  << " which is either an internal face or already "
328  << "belongs to some other patch. This is face "
329  << facei << " of patch "
330  << patchi << " named "
331  << boundaryPatchNames[patchi] << "."
332  << abort(FatalError);
333  }
334 
335  found = true;
336 
337  // Set the patch face to corresponding cell-face
338  faces_[nFaces] = facesOfCellInside[cellFacei];
339 
340  cells[cellInside][cellFacei] = nFaces;
341 
342  break;
343  }
344  }
345 
346  if (!found)
347  {
349  << "face " << facei << " of patch " << patchi
350  << " does not seem to belong to cell " << cellInside
351  << " which, according to the addressing, "
352  << "should be next to it."
353  << abort(FatalError);
354  }
355 
356  // Increment the counter of faces
357  nFaces++;
358  }
359 
360  patchSizes[patchi] = nFaces - curPatchStart;
361  patchStarts[patchi] = curPatchStart;
362  }
363 
364  // Grab "non-existing" faces and put them into a default patch
365 
366  defaultPatchStart = nFaces;
367 
368  forAll(cells, celli)
369  {
370  labelList& curCellFaces = cells[celli];
371 
372  forAll(curCellFaces, facei)
373  {
374  if (curCellFaces[facei] == -1) // "non-existent" face
375  {
376  curCellFaces[facei] = nFaces;
377  faces_[nFaces] = cellsFaceShapes[celli][facei];
378 
379  nFaces++;
380  }
381  }
382  }
383 
384  // Reset the size of the face list
385  faces_.setSize(nFaces);
386 
387  return ;
388 }
389 
390 
391 Foam::polyMesh::polyMesh
392 (
393  const IOobject& io,
394  const Xfer<pointField>& points,
395  const cellShapeList& cellsAsShapes,
396  const faceListList& boundaryFaces,
397  const wordList& boundaryPatchNames,
398  const wordList& boundaryPatchTypes,
399  const word& defaultBoundaryPatchName,
400  const word& defaultBoundaryPatchType,
401  const wordList& boundaryPatchPhysicalTypes,
402  const bool syncPar
403 )
404 :
405  objectRegistry(io),
406  primitiveMesh(),
407  points_
408  (
409  IOobject
410  (
411  "points",
412  instance(),
413  meshSubDir,
414  *this,
417  ),
418  points
419  ),
420  faces_
421  (
422  IOobject
423  (
424  "faces",
425  instance(),
426  meshSubDir,
427  *this,
430  ),
431  0
432  ),
433  owner_
434  (
435  IOobject
436  (
437  "owner",
438  instance(),
439  meshSubDir,
440  *this,
443  ),
444  0
445  ),
446  neighbour_
447  (
448  IOobject
449  (
450  "neighbour",
451  instance(),
452  meshSubDir,
453  *this,
456  ),
457  0
458  ),
459  clearedPrimitives_(false),
460  boundary_
461  (
462  IOobject
463  (
464  "boundary",
465  instance(),
466  meshSubDir,
467  *this,
470  ),
471  *this,
472  boundaryFaces.size() + 1 // Add room for a default patch
473  ),
474  bounds_(points_, syncPar),
475  comm_(UPstream::worldComm),
476  geometricD_(Zero),
477  solutionD_(Zero),
478  tetBasePtIsPtr_(nullptr),
479  cellTreePtr_(nullptr),
480  pointZones_
481  (
482  IOobject
483  (
484  "pointZones",
485  instance(),
486  meshSubDir,
487  *this,
490  ),
491  *this,
492  0
493  ),
494  faceZones_
495  (
496  IOobject
497  (
498  "faceZones",
499  instance(),
500  meshSubDir,
501  *this,
504  ),
505  *this,
506  0
507  ),
508  cellZones_
509  (
510  IOobject
511  (
512  "cellZones",
513  instance(),
514  meshSubDir,
515  *this,
518  ),
519  *this,
520  0
521  ),
522  globalMeshDataPtr_(nullptr),
523  moving_(false),
524  topoChanging_(false),
525  curMotionTimeIndex_(time().timeIndex()),
526  oldPointsPtr_(nullptr)
527 {
528  if (debug)
529  {
530  Info<<"Constructing polyMesh from cell and boundary shapes." << endl;
531  }
532 
533  // Remove all of the old mesh files if they exist
535 
536  // Calculate faces and cells
537  labelList patchSizes;
538  labelList patchStarts;
539  label defaultPatchStart;
540  label nFaces;
541  cellList cells;
542  setTopology
543  (
544  cellsAsShapes,
545  boundaryFaces,
546  boundaryPatchNames,
547  patchSizes,
548  patchStarts,
549  defaultPatchStart,
550  nFaces,
551  cells
552  );
553 
554  // Warning: Patches can only be added once the face list is
555  // completed, as they hold a subList of the face list
556  forAll(boundaryFaces, patchi)
557  {
558  // Add the patch to the list
559  boundary_.set
560  (
561  patchi,
563  (
564  boundaryPatchTypes[patchi],
565  boundaryPatchNames[patchi],
566  patchSizes[patchi],
567  patchStarts[patchi],
568  patchi,
569  boundary_
570  )
571  );
572 
573  if
574  (
575  boundaryPatchPhysicalTypes.size()
576  && boundaryPatchPhysicalTypes[patchi].size()
577  )
578  {
579  boundary_[patchi].physicalType() =
580  boundaryPatchPhysicalTypes[patchi];
581  }
582  }
583 
584  label nAllPatches = boundaryFaces.size();
585 
586 
587  label nDefaultFaces = nFaces - defaultPatchStart;
588  if (syncPar)
589  {
590  reduce(nDefaultFaces, sumOp<label>());
591  }
592 
593  if (nDefaultFaces > 0)
594  {
596  << "Found " << nDefaultFaces
597  << " undefined faces in mesh; adding to default patch." << endl;
598 
599  // Check if there already exists a defaultFaces patch as last patch
600  // and reuse it.
601  label patchi = findIndex(boundaryPatchNames, defaultBoundaryPatchName);
602 
603  if (patchi != -1)
604  {
605  if (patchi != boundaryFaces.size()-1 || boundary_[patchi].size())
606  {
608  << "Default patch " << boundary_[patchi].name()
609  << " already has faces in it or is not"
610  << " last in list of patches." << exit(FatalError);
611  }
612 
614  << "Reusing existing patch " << patchi
615  << " for undefined faces." << endl;
616 
617  boundary_.set
618  (
619  patchi,
621  (
622  boundaryPatchTypes[patchi],
623  boundaryPatchNames[patchi],
624  nFaces - defaultPatchStart,
625  defaultPatchStart,
626  patchi,
627  boundary_
628  )
629  );
630  }
631  else
632  {
633  boundary_.set
634  (
635  nAllPatches,
637  (
638  defaultBoundaryPatchType,
639  defaultBoundaryPatchName,
640  nFaces - defaultPatchStart,
641  defaultPatchStart,
642  boundary_.size() - 1,
643  boundary_
644  )
645  );
646 
647  nAllPatches++;
648  }
649  }
650 
651  // Reset the size of the boundary
652  boundary_.setSize(nAllPatches);
653 
654  // Set the primitive mesh
655  initMesh(cells);
656 
657  if (syncPar)
658  {
659  // Calculate topology for the patches (processor-processor comms etc.)
660  boundary_.updateMesh();
661 
662  // Calculate the geometry for the patches (transformation tensors etc.)
663  boundary_.calcGeometry();
664  }
665 
666  if (debug)
667  {
668  if (checkMesh())
669  {
670  Info<< "Mesh OK" << endl;
671  }
672  }
673 }
674 
675 
676 Foam::polyMesh::polyMesh
677 (
678  const IOobject& io,
679  const Xfer<pointField>& points,
680  const cellShapeList& cellsAsShapes,
681  const faceListList& boundaryFaces,
682  const wordList& boundaryPatchNames,
683  const PtrList<dictionary>& boundaryDicts,
684  const word& defaultBoundaryPatchName,
685  const word& defaultBoundaryPatchType,
686  const bool syncPar
687 )
688 :
689  objectRegistry(io),
690  primitiveMesh(),
691  points_
692  (
693  IOobject
694  (
695  "points",
696  instance(),
697  meshSubDir,
698  *this,
701  ),
702  points
703  ),
704  faces_
705  (
706  IOobject
707  (
708  "faces",
709  instance(),
710  meshSubDir,
711  *this,
714  ),
715  0
716  ),
717  owner_
718  (
719  IOobject
720  (
721  "owner",
722  instance(),
723  meshSubDir,
724  *this,
727  ),
728  0
729  ),
730  neighbour_
731  (
732  IOobject
733  (
734  "neighbour",
735  instance(),
736  meshSubDir,
737  *this,
740  ),
741  0
742  ),
743  clearedPrimitives_(false),
744  boundary_
745  (
746  IOobject
747  (
748  "boundary",
749  instance(),
750  meshSubDir,
751  *this,
754  ),
755  *this,
756  boundaryFaces.size() + 1 // Add room for a default patch
757  ),
758  bounds_(points_, syncPar),
759  comm_(UPstream::worldComm),
760  geometricD_(Zero),
761  solutionD_(Zero),
762  tetBasePtIsPtr_(nullptr),
763  cellTreePtr_(nullptr),
764  pointZones_
765  (
766  IOobject
767  (
768  "pointZones",
769  instance(),
770  meshSubDir,
771  *this,
774  ),
775  *this,
776  0
777  ),
778  faceZones_
779  (
780  IOobject
781  (
782  "faceZones",
783  instance(),
784  meshSubDir,
785  *this,
788  ),
789  *this,
790  0
791  ),
792  cellZones_
793  (
794  IOobject
795  (
796  "cellZones",
797  instance(),
798  meshSubDir,
799  *this,
802  ),
803  *this,
804  0
805  ),
806  globalMeshDataPtr_(nullptr),
807  moving_(false),
808  topoChanging_(false),
809  curMotionTimeIndex_(time().timeIndex()),
810  oldPointsPtr_(nullptr)
811 {
812  if (debug)
813  {
814  Info<<"Constructing polyMesh from cell and boundary shapes." << endl;
815  }
816 
817  // Remove all of the old mesh files if they exist
819 
820  // Calculate faces and cells
821  labelList patchSizes;
822  labelList patchStarts;
823  label defaultPatchStart;
824  label nFaces;
825  cellList cells;
826  setTopology
827  (
828  cellsAsShapes,
829  boundaryFaces,
830  boundaryPatchNames,
831  patchSizes,
832  patchStarts,
833  defaultPatchStart,
834  nFaces,
835  cells
836  );
837 
838  // Warning: Patches can only be added once the face list is
839  // completed, as they hold a subList of the face list
840  forAll(boundaryDicts, patchi)
841  {
842  dictionary patchDict(boundaryDicts[patchi]);
843 
844  patchDict.set("nFaces", patchSizes[patchi]);
845  patchDict.set("startFace", patchStarts[patchi]);
846 
847  // Add the patch to the list
848  boundary_.set
849  (
850  patchi,
852  (
853  boundaryPatchNames[patchi],
854  patchDict,
855  patchi,
856  boundary_
857  )
858  );
859  }
860 
861  label nAllPatches = boundaryFaces.size();
862 
863  label nDefaultFaces = nFaces - defaultPatchStart;
864  if (syncPar)
865  {
866  reduce(nDefaultFaces, sumOp<label>());
867  }
868 
869  if (nDefaultFaces > 0)
870  {
872  << "Found " << nDefaultFaces
873  << " undefined faces in mesh; adding to default patch." << endl;
874 
875  // Check if there already exists a defaultFaces patch as last patch
876  // and reuse it.
877  label patchi = findIndex(boundaryPatchNames, defaultBoundaryPatchName);
878 
879  if (patchi != -1)
880  {
881  if (patchi != boundaryFaces.size()-1 || boundary_[patchi].size())
882  {
884  << "Default patch " << boundary_[patchi].name()
885  << " already has faces in it or is not"
886  << " last in list of patches." << exit(FatalError);
887  }
888 
890  << "Reusing existing patch " << patchi
891  << " for undefined faces." << endl;
892 
893  boundary_.set
894  (
895  patchi,
897  (
898  boundary_[patchi].type(),
899  boundary_[patchi].name(),
900  nFaces - defaultPatchStart,
901  defaultPatchStart,
902  patchi,
903  boundary_
904  )
905  );
906  }
907  else
908  {
909  boundary_.set
910  (
911  nAllPatches,
913  (
914  defaultBoundaryPatchType,
915  defaultBoundaryPatchName,
916  nFaces - defaultPatchStart,
917  defaultPatchStart,
918  boundary_.size() - 1,
919  boundary_
920  )
921  );
922 
923  nAllPatches++;
924  }
925  }
926 
927  // Reset the size of the boundary
928  boundary_.setSize(nAllPatches);
929 
930  // Set the primitive mesh
931  initMesh(cells);
932 
933  if (syncPar)
934  {
935  // Calculate topology for the patches (processor-processor comms etc.)
936  boundary_.updateMesh();
937 
938  // Calculate the geometry for the patches (transformation tensors etc.)
939  boundary_.calcGeometry();
940  }
941 
942  if (debug)
943  {
944  if (checkMesh())
945  {
946  Info << "Mesh OK" << endl;
947  }
948  }
949 }
950 
951 
952 // ************************************************************************* //
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:57
List< faceList > faceListList
Definition: faceListFwd.H:45
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
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
const word & name() const
Return name.
Definition: IOobject.H:291
bool set(const label) const
Is element set.
Definition: PtrListI.H:65
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
label nFaces() const
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Definition: polyMesh.H:312
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:163
List< face > faceList
Definition: faceListFwd.H:43
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
primitiveMesh()
Construct null.
Definition: primitiveMesh.C:39
const cellList & cells() const
static label worldComm
Default communicator (all processors)
Definition: UPstream.H:275
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1011
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
Definition: cellShapeList.H:43
void removeFiles() const
Remove all files from mesh instance()
Definition: polyMesh.C:1236
bool found(const word &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:113
A class for handling words, derived from string.
Definition: word.H:59
virtual bool checkMesh(const bool report=false) const
Check mesh for correctness. Returns false for no error.
List< label > labelList
A List of labels.
Definition: labelList.H:56
static const zero Zero
Definition: zero.H:91
errorManip< error > abort(error &err)
Definition: errorManip.H:131
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
Definition: PtrList.C:131
void updateMesh()
Correct polyBoundaryMesh after topology update.
const Time & time() const
Return time.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:485
label size() const
Return the number of elements in the UPtrList.
Definition: UPtrListI.H:29
static bool sameVertices(const face &, const face &)
Return true if the faces have the same vertices.
Definition: face.C:400
List< word > wordList
A List of words.
Definition: fileName.H:54
void setSize(const label)
Reset size of List.
Definition: List.C:281
const fileName & instance() const
Definition: IOobject.H:386
label patchi
#define WarningInFunction
Report a warning using Foam::Warning.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
label timeIndex
Definition: getTimeIndex.H:4
void set(entry *)
Assign a new entry, overwrite any existing entry.
Definition: dictionary.C:941
messageStream Info
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
Definition: polyPatchNew.C:32
Registry of regIOobjects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
List< cell > cellList
list of cells
Definition: cellList.H:42