OpenFOAM logo
Open Source CFD Toolkit

polyMesh Class Reference

Inheritance diagram for polyMesh:

Inheritance graph
[legend]
Collaboration diagram for polyMesh:

Collaboration graph
[legend]
List of all members.

Public Types

enum  readUpdateState { UNCHANGED, POINTS_MOVED, TOPO_CHANGE, TOPO_PATCH_CHANGE }
 Enumeration defining the state of the mesh after a read update. More...

Public Member Functions

 TypeName ("polyMesh")
 Runtime type information.
 polyMesh (const IOobject &io)
 Construct from IOobject.
 polyMesh (const IOobject &io, const pointField &points, const faceList &faces, const cellList &cells)
 Construct from components without boundary.
 polyMesh (const IOobject &io, const pointField &points, const cellShapeList &shapes, const faceListList &boundaryFaces, const wordList &boundaryPatchNames, const wordList &boundaryPatchTypes, const word &defaultBoundaryPatchType, const wordList &boundaryPatchPhysicalTypes)
 Construct from cell shapes.
virtual ~polyMesh ()
virtual const fileNamedbDir () const
 Over-ride the objectRegistry dbDir.
fileName meshDir () const
 Return the local mesh directory (dbDir()/meshSubDir).
const fileNamepointsInstance () const
 Return the current instance directory for points.
const fileNamefacesInstance () const
 Return the current instance directory for faces.
void setInstance (const fileName &)
 Set the instance for mesh files.
const pointFieldallPoints () const
 Return raw points.
const faceListallFaces () const
 Return raw faces.
const pointFieldoldAllPoints () const
 Return old mesh motion points.
const labelListallOwner () const
 Return face owner.
const labelListallNeighbour () const
 Return face neighbour.
const polyBoundaryMeshboundaryMesh () const
 Return boundary mesh.
const pointZoneMeshpointZones () const
 Return point zone mesh.
const faceZoneMeshfaceZones () const
 Return face zone mesh.
const cellZoneMeshcellZones () const
 Return cell zone mesh.
const parallelInfoparallelData () const
 Return parallel info.
bool moving () const
 Is mesh moving.
virtual tmp< scalarFieldmovePoints (const pointField &)
 Move points, returns volumes swept by faces in motion.
void resetMotion () const
 Reset motion.
pointZoneMeshpointZones ()
 Return non-const access to the pointZones.
faceZoneMeshfaceZones ()
 Return non-const access to the faceZones.
cellZoneMeshcellZones ()
 Return non-const access to the cellZones.
void addPatches (const List< polyPatch * > &)
 Add boundary patches.
void addZones (const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
 Add mesh zones.
virtual readUpdateState readUpdate ()
 Update the mesh based on the mesh files saved in.
virtual void updateMesh (const mapPolyMesh &mpm)
 Update the mesh corresponding to given map.
void removeBoundary ()
 Remove boundary patches.
void resetPrimitives (const label nUsedFaces, const pointField &allPoints, const faceList &allFaces, const labelList &allOwner, const labelList &allNeighbour, const labelList &patchSizes, const labelList &patchStarts, const bool validBoundary=true)
 Reset mesh primitive data. Assumes all patch info correct.
void clearGeom ()
 Clear geometry.
void clearAddressing ()
 Clear addressing.
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD.
void clearPrimitives ()
 Clear primitive data (points, faces and cells).
void removeFiles (const fileName &dir) const
 Remove all files.

Static Public Attributes

word defaultRegion
 Return the default region name.
word meshSubDir
 Return the mesh sub-directory name (usually "polyMesh").

Member Enumeration Documentation

enum readUpdateState
 

Enumeration defining the state of the mesh after a read update.

Used for post-processing applications, where the mesh needs to update based on the files written in time directores

Enumeration values:
UNCHANGED 
POINTS_MOVED 
TOPO_CHANGE 
TOPO_PATCH_CHANGE 

Definition at line 95 of file polyMesh.H.


Constructor & Destructor Documentation

polyMesh const IOobject io  )  [explicit]
 

Construct from IOobject.

polyMesh const IOobject io,
const pointField points,
const faceList faces,
const cellList cells
 

Construct from components without boundary.

Boundary is added using addPatches() member function

polyMesh const IOobject io,
const pointField points,
const cellShapeList shapes,
const faceListList boundaryFaces,
const wordList boundaryPatchNames,
const wordList boundaryPatchTypes,
const word defaultBoundaryPatchType,
const wordList boundaryPatchPhysicalTypes
 

Construct from cell shapes.

virtual ~polyMesh  )  [virtual]
 


Member Function Documentation

void addPatches const List< polyPatch * > &   ) 
 

Add boundary patches.

void addZones const List< pointZone * > &  pz,
const List< faceZone * > &  fz,
const List< cellZone * > &  cz
 

Add mesh zones.

const faceList& allFaces  )  const
 

Return raw faces.

const labelList& allNeighbour  )  const
 

Return face neighbour.

const labelList& allOwner  )  const
 

Return face owner.

const pointField& allPoints  )  const
 

Return raw points.

const polyBoundaryMesh& boundaryMesh  )  const [inline]
 

Return boundary mesh.

Definition at line 281 of file polyMesh.H.

References Foam::cellZoneMesh.

cellZoneMesh& cellZones  )  [inline]
 

Return non-const access to the cellZones.

Definition at line 339 of file polyMesh.H.

References Foam::faceList, Foam::label, Foam::labelList, and Foam::pointField.

const cellZoneMesh& cellZones  )  const [inline]
 

Return cell zone mesh.

Definition at line 299 of file polyMesh.H.

References Foam::pointField, and Foam::pointZoneMesh.

void clearAddressing  ) 
 

Clear addressing.

Reimplemented from primitiveMesh.

void clearGeom  ) 
 

Clear geometry.

Reimplemented from primitiveMesh.

void clearOut  ) 
 

Clear all geometry and addressing unnecessary for CFD.

Reimplemented from primitiveMesh.

void clearPrimitives  ) 
 

Clear primitive data (points, faces and cells).

Reimplemented from primitiveMesh.

virtual const fileName& dbDir  )  const [virtual]
 

Over-ride the objectRegistry dbDir.

if this is single-region case

Reimplemented from objectRegistry.

const fileName& facesInstance  )  const
 

Return the current instance directory for faces.

faceZoneMesh& faceZones  )  [inline]
 

Return non-const access to the faceZones.

Definition at line 333 of file polyMesh.H.

const faceZoneMesh& faceZones  )  const [inline]
 

Return face zone mesh.

Definition at line 293 of file polyMesh.H.

fileName meshDir  )  const
 

Return the local mesh directory (dbDir()/meshSubDir).

virtual tmp<scalarField> movePoints const pointField  )  [virtual]
 

Move points, returns volumes swept by faces in motion.

bool moving  )  const [inline]
 

Is mesh moving.

Definition at line 312 of file polyMesh.H.

const pointField& oldAllPoints  )  const
 

Return old mesh motion points.

const parallelInfo& parallelData  )  const
 

Return parallel info.

Referenced by pointMesh::movePoints().

const fileName& pointsInstance  )  const
 

Return the current instance directory for points.

Used in the consruction of gemometric mesh data dependent on points

pointZoneMesh& pointZones  )  [inline]
 

Return non-const access to the pointZones.

Definition at line 327 of file polyMesh.H.

const pointZoneMesh& pointZones  )  const [inline]
 

Return point zone mesh.

Definition at line 287 of file polyMesh.H.

virtual readUpdateState readUpdate  )  [virtual]
 

Update the mesh based on the mesh files saved in.

time directories

Reimplemented in fvMesh.

void removeBoundary  ) 
 

Remove boundary patches.

void removeFiles const fileName dir  )  const
 

Remove all files.

void resetMotion  )  const
 

Reset motion.

void resetPrimitives const label  nUsedFaces,
const pointField allPoints,
const faceList allFaces,
const labelList allOwner,
const labelList allNeighbour,
const labelList patchSizes,
const labelList patchStarts,
const bool  validBoundary = true
 

Reset mesh primitive data. Assumes all patch info correct.

(so does e.g. parallel communication). If not use validBoundary=false (still assumes patchStarts[0] = nInternalFaces and last patch ends at nActiveFaces) and change patches with addPatches.

void setInstance const fileName  ) 
 

Set the instance for mesh files.

TypeName "polyMesh"   ) 
 

Runtime type information.

virtual void updateMesh const mapPolyMesh mpm  )  [virtual]
 

Update the mesh corresponding to given map.

Reimplemented in fvMesh.


Member Data Documentation

word defaultRegion [static]
 

Return the default region name.

Definition at line 194 of file polyMesh.H.

word meshSubDir [static]
 

Return the mesh sub-directory name (usually "polyMesh").

Definition at line 197 of file polyMesh.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org