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-2024 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  // Permanent 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  //- Initialise the polyMesh from the primitive data
193  void initMesh();
194 
195  //- Initialise the polyMesh from the given set of cells
196  void initMesh(cellList& c);
197 
198  //- Calculate the valid directions in the mesh from the boundaries
199  void calcDirections() const;
200 
201  //- Calculate the cell shapes from the primitive
202  // polyhedral information
203  void calcCellShapes() const;
204 
205  //- Read and return the tetBasePtIs
206  autoPtr<labelIOList> readTetBasePtIs() const;
207 
208  //- Set the write option of the points
209  void setPointsWrite(const IOobject::writeOption wo);
210 
211  //- Set the write option of the topology
212  void setTopologyWrite(const IOobject::writeOption wo);
213 
214 
215  // Helper functions for constructor from cell shapes
216 
217  labelListList cellShapePointCells(const cellShapeList&) const;
218 
219  labelList facePatchFaceCells
220  (
221  const faceList& patchFaces,
222  const labelListList& pointCells,
223  const faceListList& cellsFaceShapes,
224  const label patchID
225  ) const;
226 
227  void setTopology
228  (
229  const cellShapeList& cellsAsShapes,
230  const faceListList& boundaryFaces,
231  const wordList& boundaryPatchNames,
232  labelList& patchSizes,
233  labelList& patchStarts,
234  label& defaultPatchStart,
235  label& nFaces,
236  cellList& cells
237  );
238 
239 
240 protected:
241 
242  // Protected Member Data
243 
244  //- Member data pending transfer to fvMesh
245 
246  //- Is the mesh moving
247  bool moving_;
248 
249  //- Has the mesh topology changed
250  bool topoChanged_;
251 
252 
253 public:
254 
255  // Public Typedefs
256 
257  typedef polyMesh Mesh;
259 
260 
261  //- Runtime type information
262  TypeName("polyMesh");
263 
264 
265  // Static data
266 
267  //- Return the default region name
268  static word defaultRegion;
269 
270  //- Return the mesh sub-directory name (usually "polyMesh")
271  static word meshSubDir;
272 
273 
274  // Constructors
275 
276  //- Construct from IOobject
277  explicit polyMesh(const IOobject& io);
278 
279  //- Move construct from IOobject or from components.
280  // Boundary is added using addPatches() member function
281  polyMesh
282  (
283  const IOobject& io,
284  pointField&& points,
285  faceList&& faces,
286  labelList&& owner,
287  labelList&& neighbour,
288  const bool syncPar = true
289  );
290 
291  //- Move construct without boundary with cells rather than
292  // owner/neighbour.
293  // Boundary is added using addPatches() member function
294  polyMesh
295  (
296  const IOobject& io,
297  pointField&& points,
298  faceList&& faces,
299  cellList&& cells,
300  const bool syncPar = true
301  );
302 
303  //- Move construct from cell shapes
304  polyMesh
305  (
306  const IOobject& io,
307  pointField&& points,
308  const cellShapeList& shapes,
309  const faceListList& boundaryFaces,
310  const wordList& boundaryPatchNames,
311  const wordList& boundaryPatchTypes,
312  const word& defaultBoundaryPatchName,
313  const word& defaultBoundaryPatchType,
314  const wordList& boundaryPatchPhysicalTypes,
315  const bool syncPar = true
316  );
317 
318  //- Move construct from cell shapes with patch information in dictionary
319  // format.
320  polyMesh
321  (
322  const IOobject& io,
323  pointField&& points,
324  const cellShapeList& shapes,
325  const faceListList& boundaryFaces,
326  const wordList& boundaryPatchNames,
327  const PtrList<dictionary>& boundaryDicts,
328  const word& defaultBoundaryPatchName,
329  const word& defaultBoundaryPatchType,
330  const bool syncPar = true
331  );
332 
333  //- Move constructor
334  polyMesh(polyMesh&&);
335 
336  //- Disallow default bitwise copy construction
337  polyMesh(const polyMesh&) = delete;
338 
339 
340  //- Destructor
341  virtual ~polyMesh();
342 
343 
344  // Member Functions
345 
346  // Database
347 
348  //- Override the objectRegistry dbDir for a single-region case
349  virtual const fileName& dbDir() const;
350 
351  //- Return the local mesh directory (dbDir()/meshSubDir)
352  fileName meshDir() const;
353 
354  //- Return the current instance directory for points
355  // Used in the construction of geometric mesh data dependent
356  // on points
357  const fileName& pointsInstance() const;
358 
359  //- Return the current instance directory for faces
360  const fileName& facesInstance() const;
361 
362  //- Return the points write option
364 
365  //- Return the points write option
367 
368  //- Set the instance for the points files
369  void setPointsInstance(const fileName&);
370 
371  //- Set the instance for mesh files
372  void setInstance(const fileName&);
373 
374 
375  // Access
376 
377  // Primitive mesh data
378 
379  //- Return raw points
380  virtual const pointField& points() const;
381 
382  //- Return raw faces
383  virtual const faceList& faces() const;
384 
385  //- Return face owner
386  virtual const labelList& faceOwner() const;
387 
388  //- Return face neighbour
389  virtual const labelList& faceNeighbour() const;
390 
391  //- Return old points for mesh motion
392  virtual const pointField& oldPoints() const;
393 
394  //- Return old cell centres for mesh motion
395  virtual const pointField& oldCellCentres() const;
396 
397 
398  //- Return true if io is up-to-date with points
399  bool upToDatePoints(const regIOobject& io) const;
400 
401  //- Set io to be up-to-date with points
402  void setUpToDatePoints(regIOobject& io) const;
403 
404  //- Return boundary mesh
405  const polyBoundaryMesh& boundaryMesh() const
406  {
407  return boundary_;
408  }
409 
410  //- Return mesh bounding box
411  const boundBox& bounds() const
412  {
413  return bounds_;
414  }
415 
416  //- Return the vector of geometric directions in mesh.
417  // Defined according to the presence of empty and wedge patches.
418  // 1 indicates unconstrained direction and -1 a constrained
419  // direction.
420  const Vector<label>& geometricD() const;
421 
422  //- Return the number of valid geometric dimensions in the mesh
423  label nGeometricD() const;
424 
425  //- Return the vector of solved-for directions in mesh.
426  // Differs from geometricD in that it includes for wedge cases
427  // the circumferential direction in case of swirl.
428  // 1 indicates valid direction and -1 an invalid direction.
429  const Vector<label>& solutionD() const;
430 
431  //- Return the number of valid solved-for dimensions in the mesh
432  label nSolutionD() const;
433 
434  //- Return the tetBasePtIs
435  const labelIOList& tetBasePtIs() const;
436 
437  //- Return the cell search tree
438  const indexedOctree<treeDataCell>& cellTree() const;
439 
440  //- Return point zones
441  const pointZoneList& pointZones() const
442  {
443  return pointZones_;
444  }
445 
446  //- Return face zones
447  const faceZoneList& faceZones() const
448  {
449  return faceZones_;
450  }
451 
452  //- Return cell zones
453  const cellZoneList& cellZones() const
454  {
455  return cellZones_;
456  }
457 
458  //- Return parallel info
459  const globalMeshData& globalData() const;
460 
461  //- Return communicator used for parallel communication
462  label comm() const;
463 
464  //- Return communicator used for parallel communication
465  label& comm();
466 
467  //- Return the object registry
468  const objectRegistry& thisDb() const
469  {
470  return *this;
471  }
472 
473 
474  // Mesh motion
475 
476  //- Is mesh moving
477  bool moving() const
478  {
479  return moving_;
480  }
481 
482  //- Has the mesh topology changed this time-step
483  bool topoChanged() const
484  {
485  return topoChanged_;
486  }
487 
488  //- Is mesh changing
489  // Moving or mesh topology changed this time-step)
490  bool changing() const
491  {
492  return moving() || topoChanged();
493  }
494 
495  //- Reset the points
496  // without storing old points or returning swept volumes
497  virtual void setPoints(const pointField&);
498 
499  //- Move points, returns volumes swept by faces in motion
500  virtual tmp<scalarField> movePoints(const pointField&);
501 
502  //- Reset motion
503  void resetMotion() const;
504 
505 
506  // Topological change
507 
508  //- Return non-const access to the pointZones
510  {
511  return pointZones_;
512  }
513 
514  //- Return non-const access to the faceZones
516  {
517  return faceZones_;
518  }
519 
520  //- Return non-const access to the cellZones
522  {
523  return cellZones_;
524  }
525 
526  //- Add boundary patches
527  void addPatches
528  (
529  const List<polyPatch*>&,
530  const bool validBoundary = true
531  );
532 
533  //- Add mesh zones
534  void addZones
535  (
536  const List<pointZone*>& pz,
537  const List<faceZone*>& fz,
538  const List<cellZone*>& cz
539  );
540 
541  //- Add/insert single patch. If validBoundary the new situation
542  // is consistent across processors.
543  virtual void addPatch
544  (
545  const label insertPatchi,
546  const polyPatch& patch,
547  const dictionary& patchFieldDict,
548  const word& defaultPatchFieldType,
549  const bool validBoundary
550  );
551 
552  //- Reorder and trim existing patches. If validBoundary the new
553  // situation is consistent across processors
554  virtual void reorderPatches
555  (
556  const labelUList& newToOld,
557  const bool validBoundary
558  );
559 
560  //- Update the mesh based on the mesh files saved in
561  // time directories
563 
564  //- Update zones using the given map
565  void topoChangeZones(const polyTopoChangeMap&);
566 
567  //- Update topology using the given map
568  virtual void topoChange(const polyTopoChangeMap&);
569 
570  //- Update from another mesh using the given map
571  virtual void mapMesh(const polyMeshMap&);
572 
573  //- Redistribute or update using the given distribution map
574  virtual void distribute(const polyDistributionMap& map);
575 
576  //- Remove boundary patches
577  void removeBoundary();
578 
579  //- Reset mesh primitive data. Assumes all patch info correct
580  // (so does e.g. parallel communication). If not use
581  // validBoundary=false
582  void resetPrimitives
583  (
584  pointField&& points,
585  faceList&& faces,
586  labelList&& owner,
587  labelList&& neighbour,
588  const labelList& patchSizes,
589  const labelList& patchStarts,
590  const bool validBoundary = true
591  );
592 
593  //- Swap mesh
594  // For run-time mesh replacement and mesh to mesh mapping
595  void swap(polyMesh&);
596 
597 
598  // Storage management
599 
600  //- Clear geometry
601  void clearGeom();
602 
603  //- Clear addressing
604  void clearAddressing(const bool isMeshUpdate = false);
605 
606  //- Clear all geometry and addressing unnecessary for CFD
607  void clearOut();
608 
609  //- Clear primitive data (points, faces and cells)
610  void clearPrimitives();
611 
612  //- Clear tet base points
613  void clearTetBasePtIs();
614 
615  //- Clear cell tree data
616  void clearCellTree();
617 
618  //- Remove all files from mesh instance
619  void removeFiles(const fileName& instanceDir) const;
620 
621  //- Remove all files from mesh instance()
622  void removeFiles() const;
623 
624 
625  // Position search functions
626 
627  //- Find the cell, tetFacei and tetPti for point p
628  void findCellFacePt
629  (
630  const point& p,
631  label& celli,
632  label& tetFacei,
633  label& tetPti
634  ) const;
635 
636  //- Find the tetFacei and tetPti for point p in celli.
637  // tetFacei and tetPtI are set to -1 if not found
638  void findTetFacePt
639  (
640  const label celli,
641  const point& p,
642  label& tetFacei,
643  label& tetPti
644  ) const;
645 
646  //- Test if point p is in the celli
647  bool pointInCell
648  (
649  const point& p,
650  label celli,
652  ) const;
653 
654  //- Find cell enclosing this location and return index
655  // If not found -1 is returned
657  (
658  const point& p,
660  ) const;
661 
662 
663  // Write
664 
665  //- Write the underlying polyMesh
666  virtual bool writeObject
667  (
671  const bool write = true
672  ) const;
673 
674 
675  // Member Operators
676 
677  //- Disallow default bitwise assignment
678  void operator=(const polyMesh&) = delete;
679 };
680 
681 
682 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
683 
684 } // End namespace Foam
685 
686 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
687 
688 #endif
689 
690 // ************************************************************************* //
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 list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
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:440
virtual ~polyMesh()
Destructor.
Definition: polyMesh.C:937
void findCellFacePt(const point &p, label &celli, label &tetFacei, label &tetPti) const
Find the cell, tetFacei and tetPti for point p.
Definition: polyMesh.C:1576
bool topoChanged_
Has the mesh topology changed.
Definition: polyMesh.H:249
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: polyMesh.C:971
label nGeometricD() const
Return the number of valid geometric dimensions in the mesh.
Definition: polyMesh.C:1000
const cellZoneList & cellZones() const
Return cell zones.
Definition: polyMesh.H:452
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:267
polyMesh Mesh
Definition: polyMesh.H:256
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
Definition: polyMesh.C:959
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
Definition: polyMesh.C:1444
void clearCellTree()
Clear cell tree data.
virtual void addPatch(const label insertPatchi, const polyPatch &patch, const dictionary &patchFieldDict, const word &defaultPatchFieldType, const bool validBoundary)
Add/insert single patch. If validBoundary the new situation.
Definition: polyMesh.C:1231
cellDecomposition
Enumeration defining the decomposition of the cell for.
Definition: polyMesh.H:100
bool moving_
Member data pending transfer to fvMesh.
Definition: polyMesh.H:246
IOobject::writeOption facesWriteOpt() const
Return the points write option.
Definition: polyMesh.C:983
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1326
void clearGeom()
Clear geometry.
Definition: polyMeshClear.C:53
readUpdateState
Enumeration defining the state of the mesh after a read update.
Definition: polyMesh.H:90
@ TOPO_PATCH_CHANGE
Definition: polyMesh.H:94
virtual const fileName & dbDir() const
Override the objectRegistry dbDir for a single-region case.
Definition: polyMesh.C:946
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
Definition: polyMesh.C:1727
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:703
virtual const labelList & faceOwner() const
Return face owner.
Definition: polyMesh.C:1339
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
Definition: polyMesh.C:1023
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:1601
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:1515
const objectRegistry & thisDb() const
Return the object registry.
Definition: polyMesh.H:467
bool changing() const
Is mesh changing.
Definition: polyMesh.H:489
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:1617
label nSolutionD() const
Return the number of valid solved-for dimensions in the mesh.
Definition: polyMesh.C:1017
polyBoundaryMesh BoundaryMesh
Definition: polyMesh.H:257
virtual const pointField & oldPoints() const
Return old points for mesh motion.
Definition: polyMesh.C:1351
void swap(polyMesh &)
Swap mesh.
Definition: polyMesh.C:804
const fileName & pointsInstance() const
Return the current instance directory for points.
Definition: polyMesh.C:965
label comm() const
Return communicator used for parallel communication.
Definition: polyMesh.C:1533
polyMesh(const IOobject &io)
Construct from IOobject.
Definition: polyMesh.C:162
void resetMotion() const
Reset motion.
Definition: polyMesh.C:1507
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the underlying polyMesh.
Definition: polyMeshIO.C:460
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const faceZoneList & faceZones() const
Return face zones.
Definition: polyMesh.H:446
readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
Definition: polyMeshIO.C:99
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:404
virtual const labelList & faceNeighbour() const
Return face neighbour.
Definition: polyMesh.C:1345
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:1084
bool topoChanged() const
Has the mesh topology changed this time-step.
Definition: polyMesh.H:482
bool upToDatePoints(const regIOobject &io) const
Return true if io is up-to-date with points.
Definition: polyMesh.C:1389
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:58
void addZones(const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
Add mesh zones.
Definition: polyMesh.C:1128
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1313
void setUpToDatePoints(regIOobject &io) const
Set io to be up-to-date with points.
Definition: polyMesh.C:1395
const indexedOctree< treeDataCell > & cellTree() const
Return the cell search tree.
Definition: polyMesh.C:1057
IOobject::writeOption pointsWriteOpt() const
Return the points write option.
Definition: polyMesh.C:977
void removeFiles() const
Remove all files from mesh instance()
Definition: polyMesh.C:1569
void removeBoundary()
Remove boundary patches.
Definition: polyMeshClear.C:36
virtual const pointField & oldCellCentres() const
Return old cell centres for mesh motion.
Definition: polyMesh.C:1369
virtual void reorderPatches(const labelUList &newToOld, const bool validBoundary)
Reorder and trim existing patches. If validBoundary the new.
Definition: polyMesh.C:1186
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Definition: polyMesh.H:270
void setInstance(const fileName &)
Set the instance for mesh files.
Definition: polyMeshIO.C:78
const boundBox & bounds() const
Return mesh bounding box.
Definition: polyMesh.H:410
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
virtual void setPoints(const pointField &)
Reset the points.
Definition: polyMesh.C:1401
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
Definition: polyMesh.C:1006
bool moving() const
Is mesh moving.
Definition: polyMesh.H:476
const Vector< label > & geometricD() const
Return the vector of geometric directions in mesh.
Definition: polyMesh.C:989
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.
label nFaces() const
const cellList & cells() const
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
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