polyMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::polyMesh
26 
27 Description
28  Mesh consisting of general polyhedral cells.
29 
30 SourceFiles
31  polyMesh.C
32  polyMeshInitMesh.C
33  polyMeshClear.C
34  polyMeshFromShapeMesh.C
35  polyMeshIO.C
36  polyMeshUpdate.C
37  polyMeshCheck.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef polyMesh_H
42 #define polyMesh_H
43 
44 #include "objectRegistry.H"
45 #include "primitiveMesh.H"
46 #include "pointField.H"
47 #include "faceList.H"
48 #include "cellList.H"
49 #include "cellShapeList.H"
50 #include "pointIOField.H"
51 #include "faceIOList.H"
52 #include "labelIOList.H"
53 #include "polyBoundaryMesh.H"
54 #include "boundBox.H"
55 #include "pointZoneList.H"
56 #include "faceZoneList.H"
57 #include "cellZoneList.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 
64 // Forward declaration of classes
65 class globalMeshData;
66 class polyTopoChangeMap;
67 class polyMeshMap;
68 class polyDistributionMap;
69 class polyMeshTetDecomposition;
70 class treeDataCell;
71 template<class Type> class indexedOctree;
72 
73 /*---------------------------------------------------------------------------*\
74  Class polyMesh Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class polyMesh
78 :
79  public objectRegistry,
80  public primitiveMesh
81 {
82 
83 public:
84 
85  // Public data types
86 
87  //- Enumeration defining the state of the mesh after a read update.
88  // Used for post-processing applications, where the mesh
89  // needs to update based on the files written in time directories.
90  enum readUpdateState
91  {
96  };
97 
98  //- Enumeration defining the decomposition of the cell for
99  // inside/outside test
100  enum cellDecomposition
101  {
102  FACE_PLANES, //- Faces considered as planes
103 
104  FACE_CENTRE_TRIS, //- Faces decomposed into triangles
105  // using face-centre
106 
107  FACE_DIAG_TRIS, //- Faces decomposed into triangles diagonally
108 
109  CELL_TETS //- Cell decomposed into tets
110  };
111 
112 
113 private:
114 
115  // Private Member Data
116 
117  // Primitive mesh data
118 
119  //- Points
120  pointIOField points_;
121 
122  //- Faces
123  faceCompactIOList faces_;
124 
125  //- Face owner
126  labelIOList owner_;
127 
128  //- Face neighbour
129  labelIOList neighbour_;
130 
131  //- Have the primitives been cleared
132  bool clearedPrimitives_;
133 
134  //- Boundary mesh
135  mutable polyBoundaryMesh boundary_;
136 
137  //- Mesh bounding-box.
138  // Created from points on construction, updated when the mesh moves
139  boundBox bounds_;
140 
141  //- Communicator used for parallel communication
142  label comm_;
143 
144  //- Vector of non-constrained directions in mesh
145  // defined according to the presence of empty and wedge patches
146  mutable Vector<label> geometricD_;
147 
148  //- Vector of valid directions in mesh
149  // defined according to the presence of empty patches
150  mutable Vector<label> solutionD_;
151 
152  //- Base point for face decomposition into tets
153  mutable autoPtr<labelIOList> tetBasePtIsPtr_;
154 
155  //- Search tree to allow spatial cell searching
156  mutable autoPtr<indexedOctree<treeDataCell>> cellTreePtr_;
157 
158 
159  // Zoning information
160 
161  //- Point zones
162  pointZoneList pointZones_;
163 
164  //- Face zones
165  faceZoneList faceZones_;
166 
167  //- Cell zones
168  cellZoneList cellZones_;
169 
170 
171  //- Parallel info
172  mutable autoPtr<globalMeshData> globalMeshDataPtr_;
173 
174 
175  // Mesh motion related dat
176 
177  //- Current time index for mesh motion
178  mutable label curMotionTimeIndex_;
179 
180  //- Old points (for the last mesh motion)
181  mutable autoPtr<pointField> oldPointsPtr_;
182 
183  //- Old cell centres (for the last mesh motion)
184  mutable autoPtr<pointField> oldCellCentresPtr_;
185 
186  //- Whether or not to store the old cell centres
187  mutable bool storeOldCellCentres_;
188 
189 
190  // Private Member Functions
191 
192  //- Return the region directory
193  static fileName regionDir(const IOobject& io);
194 
195  //- Initialise the polyMesh from the primitive data
196  void initMesh();
197 
198  //- Initialise the polyMesh from the given set of cells
199  void initMesh(cellList& c);
200 
201  //- Calculate the valid directions in the mesh from the boundaries
202  void calcDirections() const;
203 
204  //- Calculate the cell shapes from the primitive
205  // polyhedral information
206  void calcCellShapes() const;
207 
208  //- Read and return the tetBasePtIs
209  autoPtr<labelIOList> readTetBasePtIs() const;
210 
211  //- Set the write option of the points
212  void setPointsWrite(const IOobject::writeOption wo);
213 
214  //- Set the write option of the topology
215  void setTopologyWrite(const IOobject::writeOption wo);
216 
217 
218  // Helper functions for constructor from cell shapes
219 
220  labelListList cellShapePointCells(const cellShapeList&) const;
221 
222  labelList facePatchFaceCells
223  (
224  const faceList& patchFaces,
225  const labelListList& pointCells,
226  const faceListList& cellsFaceShapes,
227  const label patchID
228  ) const;
229 
230  void setTopology
231  (
232  const cellShapeList& cellsAsShapes,
233  const faceListList& boundaryFaces,
234  const wordList& boundaryPatchNames,
235  labelList& patchSizes,
236  labelList& patchStarts,
237  label& defaultPatchStart,
238  label& nFaces,
239  cellList& cells
240  );
241 
242 
243 protected:
244 
245  // Protected Member Data
246 
247  //- Member data pending transfer to fvMesh
248 
249  //- Is the mesh moving
250  bool moving_;
251 
252  //- Has the mesh topology changed
253  bool topoChanged_;
254 
255 
256 public:
257 
258  // Public Typedefs
259 
260  typedef polyMesh Mesh;
262 
263 
264  //- Runtime type information
265  TypeName("polyMesh");
266 
267 
268  // Static data
269 
270  //- Return the default region name
271  static word defaultRegion;
272 
273  //- Return the mesh sub-directory name (usually "polyMesh")
274  static word meshSubDir;
275 
276 
277  // Constructors
278 
279  //- Return whether the given IOobject relates to a mesh on disk
280  static bool found(const IOobject& io);
281 
282  //- Construct from IOobject.
283  explicit polyMesh(const IOobject& io);
284 
285  //- Move construct from IOobject or from components.
286  // Boundary is added using addPatches() member function
287  polyMesh
288  (
289  const IOobject& io,
290  pointField&& points,
291  faceList&& faces,
292  labelList&& owner,
293  labelList&& neighbour,
294  const bool syncPar = true
295  );
296 
297  //- Move construct without boundary with cells rather than
298  // owner/neighbour.
299  // Boundary is added using addPatches() member function
300  polyMesh
301  (
302  const IOobject& io,
303  pointField&& points,
304  faceList&& faces,
305  cellList&& cells,
306  const bool syncPar = true
307  );
308 
309  //- Move construct from cell shapes
310  polyMesh
311  (
312  const IOobject& io,
313  pointField&& points,
314  const cellShapeList& shapes,
315  const faceListList& boundaryFaces,
316  const wordList& boundaryPatchNames,
317  const wordList& boundaryPatchTypes,
318  const word& defaultBoundaryPatchName,
319  const word& defaultBoundaryPatchType,
320  const wordList& boundaryPatchPhysicalTypes,
321  const bool syncPar = true
322  );
323 
324  //- Move construct from cell shapes with patch information in dictionary
325  // format.
326  polyMesh
327  (
328  const IOobject& io,
329  pointField&& points,
330  const cellShapeList& shapes,
331  const faceListList& boundaryFaces,
332  const wordList& boundaryPatchNames,
333  const PtrList<dictionary>& boundaryDicts,
334  const word& defaultBoundaryPatchName,
335  const word& defaultBoundaryPatchType,
336  const bool syncPar = true
337  );
338 
339  //- Move constructor
340  polyMesh(polyMesh&&);
341 
342  //- Disallow default bitwise copy construction
343  polyMesh(const polyMesh&) = delete;
344 
345 
346  //- Destructor
347  virtual ~polyMesh();
348 
349 
350  // Member Functions
351 
352  // Database
353 
354  //- Return the local mesh directory (dbDir()/meshSubDir)
355  fileName meshDir() const;
356 
357  //- Return the current instance directory for points
358  // Used in the construction of geometric mesh data dependent
359  // on points
360  const fileName& pointsInstance() const;
361 
362  //- Return the current instance directory for faces
363  const fileName& facesInstance() const;
364 
365  //- Return the points write option
367 
368  //- Return the points write option
370 
371  //- Set the instance for the points files
372  void setPointsInstance(const fileName&);
373 
374  //- Set the instance for mesh files
375  void setInstance(const fileName&);
376 
377 
378  // Access
379 
380  // Primitive mesh data
381 
382  //- Return raw points
383  virtual const pointField& points() const;
384 
385  //- Return raw faces
386  virtual const faceList& faces() const;
387 
388  //- Return face owner
389  virtual const labelList& faceOwner() const;
390 
391  //- Return face neighbour
392  virtual const labelList& faceNeighbour() const;
393 
394  //- Return old points for mesh motion
395  virtual const pointField& oldPoints() const;
396 
397  //- Return old cell centres for mesh motion
398  virtual const pointField& oldCellCentres() const;
399 
400 
401  //- Return boundary mesh
402  const polyBoundaryMesh& boundaryMesh() const
403  {
404  return boundary_;
405  }
406 
407  //- Return mesh bounding box
408  const boundBox& bounds() const
409  {
410  return bounds_;
411  }
412 
413  //- Return the vector of geometric directions in mesh.
414  // Defined according to the presence of empty and wedge patches.
415  // 1 indicates unconstrained direction and -1 a constrained
416  // direction.
417  const Vector<label>& geometricD() const;
418 
419  //- Return the number of valid geometric dimensions in the mesh
420  label nGeometricD() const;
421 
422  //- Return the vector of solved-for directions in mesh.
423  // Differs from geometricD in that it includes for wedge cases
424  // the circumferential direction in case of swirl.
425  // 1 indicates valid direction and -1 an invalid direction.
426  const Vector<label>& solutionD() const;
427 
428  //- Return the number of valid solved-for dimensions in the mesh
429  label nSolutionD() const;
430 
431  //- Return the tetBasePtIs
432  const labelIOList& tetBasePtIs() const;
433 
434  //- Return the cell search tree
435  const indexedOctree<treeDataCell>& cellTree() const;
436 
437  //- Return point zones
438  const pointZoneList& pointZones() const
439  {
440  return pointZones_;
441  }
442 
443  //- Return face zones
444  const faceZoneList& faceZones() const
445  {
446  return faceZones_;
447  }
448 
449  //- Return cell zones
450  const cellZoneList& cellZones() const
451  {
452  return cellZones_;
453  }
454 
455  //- Return parallel info
456  const globalMeshData& globalData() const;
457 
458  //- Return communicator used for parallel communication
459  label comm() const;
460 
461  //- Return communicator used for parallel communication
462  label& comm();
463 
464  //- Return the object registry
465  const objectRegistry& thisDb() const
466  {
467  return *this;
468  }
469 
470 
471  // Mesh motion
472 
473  //- Is mesh moving
474  bool moving() const
475  {
476  return moving_;
477  }
478 
479  //- Has the mesh topology changed this time-step
480  bool topoChanged() const
481  {
482  return topoChanged_;
483  }
484 
485  //- Is mesh changing
486  // Moving or mesh topology changed this time-step)
487  bool changing() const
488  {
489  return moving() || topoChanged();
490  }
491 
492  //- Reset the points
493  // without storing old points or returning swept volumes
494  virtual void setPoints(const pointField&);
495 
496  //- Move points, returns volumes swept by faces in motion
497  virtual tmp<scalarField> movePoints(const pointField&);
498 
499  //- Reset motion
500  void resetMotion() const;
501 
502 
503  // Topological change
504 
505  //- Return non-const access to the pointZones
507  {
508  return pointZones_;
509  }
510 
511  //- Return non-const access to the faceZones
513  {
514  return faceZones_;
515  }
516 
517  //- Return non-const access to the cellZones
519  {
520  return cellZones_;
521  }
522 
523  //- Add boundary patches
524  void addPatches
525  (
526  const List<polyPatch*>&,
527  const bool validBoundary = true
528  );
529 
530  //- Add mesh zones
531  void addZones
532  (
533  const List<pointZone*>& pz,
534  const List<faceZone*>& fz,
535  const List<cellZone*>& cz
536  );
537 
538  //- Add/insert single patch
539  virtual void addPatch
540  (
541  const label insertPatchi,
542  const polyPatch& patch
543  );
544 
545  //- Complete addition of single patches
546  void addedPatches();
547 
548  //- Reorder and trim existing patches. If validBoundary the new
549  // situation is consistent across processors
550  virtual void reorderPatches
551  (
552  const labelUList& newToOld,
553  const bool validBoundary
554  );
555 
556  //- Update the mesh based on the mesh files saved in
557  // time directories
559 
560  //- Update zones using the given map
561  void topoChangeZones(const polyTopoChangeMap&);
562 
563  //- Update topology using the given map
564  virtual void topoChange(const polyTopoChangeMap&);
565 
566  //- Update from another mesh using the given map
567  virtual void mapMesh(const polyMeshMap&);
568 
569  //- Redistribute or update using the given distribution map
570  virtual void distribute(const polyDistributionMap& map);
571 
572  //- Remove boundary patches
573  void removeBoundary();
574 
575  //- Reset mesh primitive data. Assumes all patch info correct
576  // (so does e.g. parallel communication). If not use
577  // validBoundary=false
578  void resetPrimitives
579  (
580  pointField&& points,
581  faceList&& faces,
582  labelList&& owner,
583  labelList&& neighbour,
584  const labelList& patchSizes,
585  const labelList& patchStarts,
586  const bool validBoundary = true
587  );
588 
589  //- Swap mesh
590  // For run-time mesh replacement and mesh to mesh mapping
591  void swap(polyMesh&);
592 
593 
594  // Storage management
595 
596  //- Print a list of all the currently allocated mesh data
597  void printAllocated() const;
598 
599  //- Clear geometry
600  void clearGeom();
601 
602  //- Clear addressing
603  void clearAddressing(const bool isMeshUpdate = false);
604 
605  //- Clear all geometry and addressing unnecessary for CFD
606  void clearOut();
607 
608  //- Clear primitive data (points, faces and cells)
609  void clearPrimitives();
610 
611  //- Clear tet base points
612  void clearTetBasePtIs();
613 
614  //- Clear cell tree data
615  void clearCellTree();
616 
617  //- Remove all files from mesh instance
618  void removeFiles(const fileName& instanceDir) const;
619 
620  //- Remove all files from mesh instance()
621  void removeFiles() const;
622 
623 
624  // Position search functions
625 
626  //- Find the cell, tetFacei and tetPti for point p
627  void findCellFacePt
628  (
629  const point& p,
630  label& celli,
631  label& tetFacei,
632  label& tetPti
633  ) const;
634 
635  //- Find the tetFacei and tetPti for point p in celli.
636  // tetFacei and tetPtI are set to -1 if not found
637  void findTetFacePt
638  (
639  const label celli,
640  const point& p,
641  label& tetFacei,
642  label& tetPti
643  ) const;
644 
645  //- Test if point p is in the celli
646  bool pointInCell
647  (
648  const point& p,
649  label celli,
651  ) const;
652 
653  //- Find cell enclosing this location and return index
654  // If not found -1 is returned
656  (
657  const point& p,
659  ) const;
660 
661 
662  // Write
663 
664  //- Write the underlying polyMesh
665  virtual bool writeObject
666  (
670  const bool write = true
671  ) const;
672 
673 
674  // Member Operators
675 
676  //- Disallow default bitwise assignment
677  void operator=(const polyMesh&) = delete;
678 };
679 
680 
681 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
682 
683 } // End namespace Foam
684 
685 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
686 
687 #endif
688 
689 // ************************************************************************* //
Foam::cellZoneList.
A primitive field of type <Type> with automated input and output.
Definition: IOField.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
writeOption
Enumeration defining the write options.
Definition: IOobject.H:126
Version number type.
Definition: IOstream.H:97
streamFormat
Enumeration for the format of data in the stream.
Definition: IOstream.H:87
compressionType
Enumeration for the format of data in the stream.
Definition: IOstream.H:194
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:59
A class for handling file names.
Definition: fileName.H:82
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Non-pointer based hierarchical recursive searching.
Definition: indexedOctree.H:72
Registry of regIOobjects.
Foam::polyBoundaryMesh.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
const pointZoneList & pointZones() const
Return point zones.
Definition: polyMesh.H:437
virtual ~polyMesh()
Destructor.
Definition: polyMesh.C:950
void findCellFacePt(const point &p, label &celli, label &tetFacei, label &tetPti) const
Find the cell, tetFacei and tetPti for point p.
Definition: polyMesh.C:1582
bool topoChanged_
Has the mesh topology changed.
Definition: polyMesh.H:252
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: polyMesh.C:994
label nGeometricD() const
Return the number of valid geometric dimensions in the mesh.
Definition: polyMesh.C:1023
const cellZoneList & cellZones() const
Return cell zones.
Definition: polyMesh.H:449
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:270
polyMesh Mesh
Definition: polyMesh.H:259
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
Definition: polyMesh.C:982
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
Definition: polyMesh.C:1450
void clearCellTree()
Clear cell tree data.
cellDecomposition
Enumeration defining the decomposition of the cell for.
Definition: polyMesh.H:100
bool moving_
Member data pending transfer to fvMesh.
Definition: polyMesh.H:249
IOobject::writeOption facesWriteOpt() const
Return the points write option.
Definition: polyMesh.C:1006
static bool found(const IOobject &io)
Return whether the given IOobject relates to a mesh on disk.
Definition: polyMesh.C:959
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1344
void addedPatches()
Complete addition of single patches.
Definition: polyMesh.C:1319
void clearGeom()
Clear geometry.
Definition: polyMeshClear.C:71
readUpdateState
Enumeration defining the state of the mesh after a read update.
Definition: polyMesh.H:90
@ TOPO_PATCH_CHANGE
Definition: polyMesh.H:94
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
Definition: polyMesh.C:1733
void resetPrimitives(pointField &&points, faceList &&faces, labelList &&owner, labelList &&neighbour, const labelList &patchSizes, const labelList &patchStarts, const bool validBoundary=true)
Reset mesh primitive data. Assumes all patch info correct.
Definition: polyMesh.C:716
virtual const labelList & faceOwner() const
Return face owner.
Definition: polyMesh.C:1357
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
Definition: polyMesh.C:1046
void operator=(const polyMesh &)=delete
Disallow default bitwise assignment.
void findTetFacePt(const label celli, const point &p, label &tetFacei, label &tetPti) const
Find the tetFacei and tetPti for point p in celli.
Definition: polyMesh.C:1607
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
TypeName("polyMesh")
Runtime type information.
const globalMeshData & globalData() const
Return parallel info.
Definition: polyMesh.C:1521
const objectRegistry & thisDb() const
Return the object registry.
Definition: polyMesh.H:464
bool changing() const
Is mesh changing.
Definition: polyMesh.H:486
void clearPrimitives()
Clear primitive data (points, faces and cells)
bool pointInCell(const point &p, label celli, const cellDecomposition=CELL_TETS) const
Test if point p is in the celli.
Definition: polyMesh.C:1623
label nSolutionD() const
Return the number of valid solved-for dimensions in the mesh.
Definition: polyMesh.C:1040
polyBoundaryMesh BoundaryMesh
Definition: polyMesh.H:260
virtual const pointField & oldPoints() const
Return old points for mesh motion.
Definition: polyMesh.C:1369
void swap(polyMesh &)
Swap mesh.
Definition: polyMesh.C:817
const fileName & pointsInstance() const
Return the current instance directory for points.
Definition: polyMesh.C:988
label comm() const
Return communicator used for parallel communication.
Definition: polyMesh.C:1539
polyMesh(const IOobject &io)
Construct from IOobject.
Definition: polyMesh.C:176
void resetMotion() const
Reset motion.
Definition: polyMesh.C:1513
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the underlying polyMesh.
Definition: polyMeshIO.C:526
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const faceZoneList & faceZones() const
Return face zones.
Definition: polyMesh.H:443
readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
Definition: polyMeshIO.C:124
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:401
virtual const labelList & faceNeighbour() const
Return face neighbour.
Definition: polyMesh.C:1363
void topoChangeZones(const polyTopoChangeMap &)
Update zones using the given map.
void addPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches.
Definition: polyMesh.C:1107
bool topoChanged() const
Has the mesh topology changed this time-step.
Definition: polyMesh.H:479
void clearTetBasePtIs()
Clear tet base points.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
void setPointsInstance(const fileName &)
Set the instance for the points files.
Definition: polyMeshIO.C:71
void addZones(const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
Add mesh zones.
Definition: polyMesh.C:1145
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1331
const indexedOctree< treeDataCell > & cellTree() const
Return the cell search tree.
Definition: polyMesh.C:1080
void printAllocated() const
Print a list of all the currently allocated mesh data.
Definition: polyMeshClear.C:53
IOobject::writeOption pointsWriteOpt() const
Return the points write option.
Definition: polyMesh.C:1000
void removeFiles() const
Remove all files from mesh instance()
Definition: polyMesh.C:1575
void removeBoundary()
Remove boundary patches.
Definition: polyMeshClear.C:36
virtual const pointField & oldCellCentres() const
Return old cell centres for mesh motion.
Definition: polyMesh.C:1387
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
Definition: polyMesh.C:1203
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Definition: polyMesh.H:273
void setInstance(const fileName &)
Set the instance for mesh files.
Definition: polyMeshIO.C:91
const boundBox & bounds() const
Return mesh bounding box.
Definition: polyMesh.H:407
virtual void addPatch(const label insertPatchi, const polyPatch &patch)
Add/insert single patch.
Definition: polyMesh.C:1246
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
virtual void setPoints(const pointField &)
Reset the points.
Definition: polyMesh.C:1407
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
Definition: polyMesh.C:1029
bool moving() const
Is mesh moving.
Definition: polyMesh.H:473
const Vector< label > & geometricD() const
Return the vector of geometric directions in mesh.
Definition: polyMesh.C:1012
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:75
const labelListList & pointCells() const
void clearAddressing()
Clear topological data.
const cellList & cells() const
label nFaces() const
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Foam::faceZoneList.
const dimensionedScalar c
Speed of light in a vacuum.
Namespace for OpenFOAM.
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::pointZoneList.
volScalarField & p