OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

polyMesh Class Reference

Inheritance diagram for polyMesh:

Inheritance graph
[legend]
Collaboration diagram for polyMesh:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 78 of file polyMesh.H.


Public Types

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

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 labelList &allOwner, const labelList &allNeighbour, const bool syncPar=true)
 Construct from components without boundary.
 polyMesh (const IOobject &io, const pointField &points, const faceList &faces, const cellList &cells, const bool syncPar=true)
 Construct from components with cells rather than owner.
 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, const bool syncPar=true)
 Construct from cell shapes.
virtual ~polyMesh ()
virtual const fileName & dbDir () const
 Over-ride the objectRegistry dbDir.
fileName meshDir () const
 Return the local mesh directory (dbDir()/meshSubDir).
const fileName & pointsInstance () const
 Return the current instance directory for points.
const fileName & facesInstance () const
 Return the current instance directory for faces.
void setInstance (const fileName &)
 Set the instance for mesh files.
const pointField & allPoints () const
 Return raw points.
const faceList & allFaces () const
 Return raw faces.
const pointField & oldAllPoints () const
 Return old mesh motion points.
const labelList & allOwner () const
 Return face owner.
const labelList & allNeighbour () const
 Return face neighbour.
const polyBoundaryMesh & boundaryMesh () const
 Return boundary mesh.
const boundBox & bounds () const
 Return mesh bounding box.
const Vector< label > & directions () const
 Return the vector of valid directions in mesh.
label nGeometricD () const
 Return the number of valid geoemtric dimensions in the mesh.
label nSolutionD () const
 Return the number of valid solution dimensions in the mesh.
const pointZoneMesh & pointZones () const
 Return point zone mesh.
const faceZoneMesh & faceZones () const
 Return face zone mesh.
const cellZoneMesh & cellZones () const
 Return cell zone mesh.
const globalMeshData & globalData () const
 Return parallel info.
bool moving () const
 Is mesh moving.
void setMoving ()
 Set the mesh to be moving.
virtual tmp< scalarField > movePoints (const pointField &)
 Move points, returns volumes swept by faces in motion.
void resetMotion () const
 Reset motion.
pointZoneMesh & pointZones ()
 Return non-const access to the pointZones.
faceZoneMesh & faceZones ()
 Return non-const access to the faceZones.
cellZoneMesh & cellZones ()
 Return non-const access to the cellZones.
void addPatches (const List< polyPatch * > &, const bool validBoundary=true)
 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 &instanceDir) const
 Remove all files from mesh instance.
void removeFiles () const
 Remove all files from mesh instance().

Static Public Attributes

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

Member Typedef Documentation

typedef polyMesh Mesh

Reimplemented in fvMesh.

Definition at line 206 of file polyMesh.H.

Reimplemented in fvMesh.

Definition at line 207 of file polyMesh.H.


Member Enumeration Documentation

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

Enumerator:
UNCHANGED 
POINTS_MOVED 
TOPO_CHANGE 
TOPO_PATCH_CHANGE 

Definition at line 94 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 labelList &  allOwner,
const labelList &  allNeighbour,
const bool  syncPar = true 
)

Construct from components without boundary.

Boundary is added using addPatches() member function

polyMesh ( const IOobject &  io,
const pointField &  points,
const faceList &  faces,
const cellList &  cells,
const bool  syncPar = true 
)

Construct from components with cells rather than owner.

and neighbourwithout 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,
const bool  syncPar = true 
)

Construct from cell shapes.

virtual ~polyMesh (  )  [virtual]


Member Function Documentation

TypeName ( "polyMesh"   ) 

Runtime type information.

virtual const fileName& dbDir (  )  const [virtual]

Over-ride the objectRegistry dbDir.

if this is single-region case

Reimplemented from objectRegistry.

fileName meshDir (  )  const

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

const fileName& pointsInstance (  )  const

Return the current instance directory for points.

Used in the consruction of gemometric mesh data dependent on points

const fileName& facesInstance (  )  const

Return the current instance directory for faces.

void setInstance ( const fileName &   ) 

Set the instance for mesh files.

const pointField& allPoints (  )  const

Return raw points.

const faceList& allFaces (  )  const

Return raw faces.

const pointField& oldAllPoints (  )  const

Return old mesh motion points.

const labelList& allOwner (  )  const

Return face owner.

const labelList& allNeighbour (  )  const

Return face neighbour.

const polyBoundaryMesh& boundaryMesh (  )  const [inline]

Return boundary mesh.

Definition at line 318 of file polyMesh.H.

Referenced by Cloud< Foam::solidParticle >::boundaryFace(), and Cloud< Foam::solidParticle >::facePatch().

Here is the caller graph for this function:

const boundBox& bounds (  )  const [inline]

Return mesh bounding box.

Definition at line 324 of file polyMesh.H.

const Vector<label>& directions (  )  const

Return the vector of valid directions in mesh.

defined according to the presence of empty patches. 1 indicates valid direction and -1 an invalid direction.

label nGeometricD (  )  const

Return the number of valid geoemtric dimensions in the mesh.

label nSolutionD (  )  const

Return the number of valid solution dimensions in the mesh.

For wedge cases this includes the circumferential direction in case of swirl

const pointZoneMesh& pointZones (  )  const [inline]

Return point zone mesh.

Definition at line 347 of file polyMesh.H.

const faceZoneMesh& faceZones (  )  const [inline]

Return face zone mesh.

Definition at line 353 of file polyMesh.H.

const cellZoneMesh& cellZones (  )  const [inline]

Return cell zone mesh.

Definition at line 359 of file polyMesh.H.

const globalMeshData& globalData (  )  const

Return parallel info.

bool moving (  )  const [inline]

Is mesh moving.

Definition at line 371 of file polyMesh.H.

void setMoving (  )  [inline]

Set the mesh to be moving.

Definition at line 377 of file polyMesh.H.

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

Move points, returns volumes swept by faces in motion.

void resetMotion (  )  const

Reset motion.

pointZoneMesh& pointZones (  )  [inline]

Return non-const access to the pointZones.

Definition at line 392 of file polyMesh.H.

faceZoneMesh& faceZones (  )  [inline]

Return non-const access to the faceZones.

Definition at line 398 of file polyMesh.H.

cellZoneMesh& cellZones (  )  [inline]

Return non-const access to the cellZones.

Definition at line 404 of file polyMesh.H.

void addPatches ( const List< polyPatch * > &  ,
const bool  validBoundary = true 
)

Add boundary patches.

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

Add mesh zones.

virtual readUpdateState readUpdate (  )  [virtual]

Update the mesh based on the mesh files saved in.

time directories

Reimplemented in fvMesh.

virtual void updateMesh ( const mapPolyMesh &  mpm  )  [virtual]

Update the mesh corresponding to given map.

Reimplemented in fvMesh.

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.

(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 clearGeom (  ) 

Clear geometry.

Reimplemented from primitiveMesh.

void clearAddressing (  ) 

Clear addressing.

Reimplemented from primitiveMesh.

void clearOut (  ) 

Clear all geometry and addressing unnecessary for CFD.

Reimplemented from primitiveMesh.

Reimplemented in fvMesh.

void clearPrimitives (  ) 

Clear primitive data (points, faces and cells).

Reimplemented from primitiveMesh.

void removeFiles ( const fileName &  instanceDir  )  const

Remove all files from mesh instance.

void removeFiles (  )  const

Remove all files from mesh instance().


Member Data Documentation

word defaultRegion [static]

Return the default region name.

Definition at line 214 of file polyMesh.H.

word meshSubDir [static]

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

Definition at line 217 of file polyMesh.H.


The documentation for this class was generated from the following file: Copyright © 2000-2007 OpenCFD Ltd