FreeFOAM The Cross-Platform CFD Toolkit
polyMesh Class Reference

Mesh consisting of general polyhedral cells. More...

#include <OpenFOAM/polyMesh.H>


Detailed Description

+ Inheritance diagram for polyMesh:
+ Collaboration diagram for polyMesh:

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...
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 Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< labelList > &owner, const Xfer< labelList > &neighbour, const bool syncPar=true)
 Construct without boundary from components.
 polyMesh (const IOobject &io, const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< cellList > &cells, const bool syncPar=true)
 Construct without boundary with cells rather than owner/neighbour.
 polyMesh (const IOobject &io, const Xfer< pointField > &points, const cellShapeList &shapes, const faceListList &boundaryFaces, const wordList &boundaryPatchNames, const wordList &boundaryPatchTypes, const word &defaultBoundaryPatchName, const word &defaultBoundaryPatchType, const wordList &boundaryPatchPhysicalTypes, const bool syncPar=true)
 Construct from cell shapes.
virtual ~polyMesh ()
virtual const fileNamedbDir () const
 Override the objectRegistry dbDir for a single-region case.
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.
virtual const pointFieldpoints () const
 Return raw points.
virtual const faceListfaces () const
 Return raw faces.
virtual const labelListfaceOwner () const
 Return face owner.
virtual const labelListfaceNeighbour () const
 Return face neighbour.
virtual const pointFieldoldPoints () const
 Return old points for mesh motion.
const polyBoundaryMeshboundaryMesh () const
 Return boundary mesh.
const boundBoxbounds () const
 Return mesh bounding box.
const Vector< label > & geometricD () const
 Return the vector of geometric directions in mesh.
label nGeometricD () const
 Return the number of valid geometric dimensions in the mesh.
const Vector< label > & solutionD () const
 Return the vector of solved-for directions in mesh.
label nSolutionD () const
 Return the number of valid solved-for dimensions in the mesh.
const pointZoneMeshpointZones () const
 Return point zone mesh.
const faceZoneMeshfaceZones () const
 Return face zone mesh.
const cellZoneMeshcellZones () const
 Return cell zone mesh.
const globalMeshDataglobalData () const
 Return parallel info.
const objectRegistrythisDb () const
 Return the object registry.
bool moving () const
 Is mesh moving.
bool moving (const bool m)
 Set the mesh to be moving.
bool changing () const
 Is mesh changing (topology changing and/or moving)
bool changing (const bool c)
 Set the mesh to be changing.
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 * > &, 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 Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< labelList > &owner, const Xfer< labelList > &neighbour, 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()
- Public Member Functions inherited from objectRegistry
 TypeName ("objectRegistry")
 Declare type name for this IOobject.
 objectRegistry (const Time &db, const label nIoObjects=128)
 Construct the time objectRegistry given an initial estimate.
 objectRegistry (const IOobject &io, const label nIoObjects=128)
 Construct a sub-registry given an IObject to describe the registry.
virtual ~objectRegistry ()
const Timetime () const
 Return time.
const objectRegistryparent () const
 Return the parent objectRegistry.
wordList names () const
 Return the list of names of the IOobjects.
wordList names (const word &className) const
 Return the list of names of the IOobjects of given class name.
template<class Type >
wordList names () const
 Return the list of names of the IOobjects of given type.
const objectRegistrysubRegistry (const word &name) const
 Lookup and return a const sub-objectRegistry.
template<class Type >
HashTable< const Type * > lookupClass () const
 Lookup and return all the object of the given Type.
template<class Type >
bool foundObject (const word &name) const
 Is the named Type.
template<class Type >
const Type & lookupObject (const word &name) const
 Lookup and return the object of the given Type.
label getEvent () const
 Return new event number.
virtual void rename (const word &newName)
 Rename.
bool checkIn (regIOobject &) const
 Add an regIOobject to registry.
bool checkOut (regIOobject &) const
 Remove an regIOobject from registry.
virtual bool modified () const
 Return true if any of the object's files have been modified.
void readModifiedObjects ()
 Read the objects that have been modified.
virtual bool readIfModified ()
 Read object if modified.
virtual bool writeData (Ostream &) const
 writeData function required by regIOobject but not used
virtual bool writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write the objects.
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information.
 regIOobject (const IOobject &, const bool isTime=false)
 Construct from IOobject. Optional flag for if IOobject is the.
 regIOobject (const regIOobject &)
 Construct as copy.
 regIOobject (const regIOobject &, bool registerCopy)
 Construct as copy, and transferring registry registration to copy.
virtual ~regIOobject ()
bool checkIn ()
 Add object to registry.
bool checkOut ()
 Remove object from registry.
bool ownedByRegistry () const
 Is this object owned by the registry?
void store ()
 Transfer ownership of this object to its registry.
void release ()
 Release ownership of this object from its registry.
label eventNo () const
 Event number at last update.
label & eventNo ()
 Event number at last update.
bool upToDate (const word &) const
 Am I uptodate with respect to other regIOobjects.
bool upToDate (const word &, const word &) const
bool upToDate (const word &, const word &, const word &) const
bool upToDate (const word &, const word &, const word &, const word &) const
void setUpToDate ()
 Flag me as up to date.
IstreamreadStream (const word &)
 Return Istream and check object type against that given.
void close ()
 Close Istream.
virtual bool readData (Istream &)
 Virtual readData function.
virtual bool read ()
 Read object.
virtual bool write () const
 Write using setting from DB.
void operator= (const IOobject &)
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Runtime type information.
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, registry, io options.
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, local, registry, io options.
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from path, registry, io options.
Foam::autoPtr< IOobjectclone () const
 Clone.
virtual ~IOobject ()
const objectRegistrydb () const
 Return the local objectRegistry.
const wordname () const
 Return name.
const wordheaderClassName () const
 Return name of the class name read from header.
stringnote ()
 Return non-constant access to the optional note.
const stringnote () const
 Return the optional note.
bool registerObject () const
 Register object created from this IOobject with registry if true.
readOption readOpt () const
readOptionreadOpt ()
writeOption writeOpt () const
writeOptionwriteOpt ()
const fileNamerootPath () const
const fileNamecaseName () const
const fileNameinstance () const
fileNameinstance ()
const fileNamelocal () const
fileName path () const
 Return complete path.
fileName path (const word &instance, const fileName &local="") const
 Return complete path with alternative instance and local.
fileName objectPath () const
 Return complete path + object name.
fileName filePath () const
 Return complete path + object name if the file exists.
bool readHeader (Istream &)
 Read header.
bool headerOk ()
 Read and check header info.
bool writeHeader (Ostream &) const
 Write header.
bool good () const
bool bad () const
InfoProxy< IOobjectinfo () const
 Return info proxy.
- Public Member Functions inherited from HashTable< regIOobject * >
bool set (const word &, const regIOobject *&newElmt)
 Assign a new hashedEntry, overwriting existing entries.
 HashTable (const label size=128)
 Construct given initial table size.
 HashTable (Istream &, const label size=128)
 Construct from Istream.
 HashTable (const HashTable< regIOobject *, word, string::hash > &)
 Construct as copy.
 HashTable (const Xfer< HashTable< regIOobject *, word, string::hash > > &)
 Construct by transferring the parameter contents.
 ~HashTable ()
label size () const
 Return number of elements in table.
bool empty () const
 Return true if the hash table is empty.
bool found (const word &) const
 Return true if hashedEntry is found in table.
iterator find (const word &)
 Find and return an iterator set at the hashedEntry.
const_iterator find (const word &) const
 Find and return an const_iterator set at the hashedEntry.
List< wordtoc () const
 Return the table of contents.
List< wordsortedToc () const
 Return the table of contents as a sorted list.
OstreamprintInfo (Ostream &) const
 Print information.
bool insert (const word &, const regIOobject *&newElmt)
 Insert a new hashedEntry.
bool erase (const iterator &)
 Erase an hashedEntry specified by given iterator.
bool erase (const word &)
 Erase an hashedEntry specified by given key if in table.
label erase (const UList< word > &)
 Remove entries given by the listed keys from this HashTable.
label erase (const HashTable< AnyType, word, AnyHash > &)
 Remove entries given by the given keys from this HashTable.
void resize (const label newSize)
 Resize the hash table for efficiency.
void clear ()
 Clear all entries from table.
void clearStorage ()
 Clear the table entries and the table itself.
void transfer (HashTable< regIOobject *, word, string::hash > &)
 Transfer the contents of the argument table into this table.
Xfer< HashTable< regIOobject
*, word, string::hash > > 
xfer ()
 Transfer contents to the Xfer container.
regIOobject *& operator[] (const word &)
 Find and return an hashedEntry.
const regIOobject *& operator[] (const word &) const
 Find and return an hashedEntry.
regIOobject *& operator() (const word &)
 Find and return an hashedEntry, create it null if not present.
void operator= (const HashTable< regIOobject *, word, string::hash > &)
 Assignment.
bool operator== (const HashTable< regIOobject *, word, string::hash > &) const
 Equality. Two hash tables are equal if all contents of first are.
bool operator!= (const HashTable< regIOobject *, word, string::hash > &) const
 The opposite of the equality operation. Takes linear time.
iterator begin ()
 iterator set to the begining of the HashTable
const_iterator begin () const
 const_iterator set to the beginning of the HashTable
const iterator & end ()
 iterator set to beyond the end of the HashTable
const const_iterator & end () const
 const_iterator set to beyond the end of the HashTable
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable
const const_iterator & cend () const
 const_iterator set to beyond the end of the HashTable
- Public Member Functions inherited from primitiveMesh
 ClassName ("primitiveMesh")
 primitiveMesh (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Construct from components.
virtual ~primitiveMesh ()
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Reset this primitiveMesh given the primitive array sizes.
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, cellList &cells)
 Reset this primitiveMesh given the primitive array sizes and cells.
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, const Xfer< cellList > &cells)
 Reset this primitiveMesh given the primitive array sizes and cells.
label nPoints () const
label nEdges () const
label nInternalFaces () const
label nFaces () const
label nCells () const
label nInternalPoints () const
 Points not on boundary.
label nInternal0Edges () const
 Internal edges (i.e. not on boundary face) using.
label nInternal1Edges () const
 Internal edges using 0 or 1 boundary point.
label nInternalEdges () const
 Internal edges using 0,1 or 2 boundary points.
const cellShapeListcellShapes () const
 Return cell shapes.
const edgeListedges () const
 Return mesh edges. Uses calcEdges.
const labelListListcellCells () const
const labelListListedgeCells () const
const labelListListpointCells () const
const cellListcells () const
const labelListListedgeFaces () const
const labelListListpointFaces () const
const labelListListcellEdges () const
const labelListListfaceEdges () const
const labelListListpointEdges () const
const labelListListpointPoints () const
const labelListListcellPoints () const
const vectorFieldcellCentres () const
const vectorFieldfaceCentres () const
const scalarFieldcellVolumes () const
const vectorFieldfaceAreas () const
tmp< scalarFieldmovePoints (const pointField &p, const pointField &oldP)
 Move points, returns volumes swept by faces in motion.
bool isInternalFace (const label faceIndex) const
 Return true if given face label is internal to the mesh.
bool checkCellsZipUp (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cell zip-up.
bool checkFaceVertices (const bool report=false, labelHashSet *setPtr=NULL) const
 Check uniqueness of face vertices.
bool checkFaceFaces (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face-face connectivity.
bool checkUpperTriangular (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face ordering.
bool checkClosedBoundary (const bool report=false) const
 Check boundary for closedness.
bool checkClosedCells (const bool report=false, labelHashSet *setPtr=NULL, labelHashSet *highAspectSetPtr=NULL, const Vector< label > &solutionD=Vector< label >::one) const
 Check cells for closedness.
bool checkFaceAreas (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative face areas.
bool checkCellVolumes (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative cell volumes.
bool checkFaceOrthogonality (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for non-orthogonality.
bool checkFacePyramids (const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL) const
 Check face pyramid volume.
bool checkFaceSkewness (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face skewness.
bool checkFaceAngles (const bool report=false, const scalar maxSin=10, labelHashSet *setPtr=NULL) const
 Check face angles.
bool checkFaceFlatness (const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
 Check face warpage: decompose face and check ratio between.
bool checkEdgeAlignment (const bool report, const Vector< label > &directions, labelHashSet *setPtr=NULL) const
 Check edge alignment for 1D/2D cases.
bool checkPoints (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for unused points.
bool checkPointNearness (const bool report, const scalar reportDistSqr, labelHashSet *setPtr=NULL) const
 Check for point-point-nearness,.
bool checkEdgeLength (const bool report, const scalar minLenSqr, labelHashSet *setPtr=NULL) const
 Check edge length.
bool checkCellDeterminant (const bool report=false, labelHashSet *setPtr=NULL, const Vector< label > &solutionD=Vector< label >::one) const
 Check cell determinant.
bool checkTopology (const bool report=false) const
 Check mesh topology for correctness.
bool checkGeometry (const bool report=false) const
 Check mesh geometry (& implicitly topology) for correctness.
bool checkMesh (const bool report=false) const
 Check mesh for correctness. Returns false for no error.
bool checkMeshMotion (const pointField &newPoints, const bool report=false) const
 Check mesh motion for correctness given motion points.
bool pointInCellBB (const point &p, label celli) const
 Is the point in the cell bounding box.
bool pointInCell (const point &p, label celli) const
 Is the point in the cell.
label findNearestCell (const point &location) const
 Find the cell with the nearest cell centre to location.
label findCell (const point &location) const
 Find cell enclosing this location (-1 if not in mesh)
void printAllocated () const
 Print a list of all the currently allocated mesh data.
bool hasCellShapes () const
bool hasEdges () const
bool hasCellCells () const
bool hasEdgeCells () const
bool hasPointCells () const
bool hasCells () const
bool hasEdgeFaces () const
bool hasPointFaces () const
bool hasCellEdges () const
bool hasFaceEdges () const
bool hasPointEdges () const
bool hasPointPoints () const
bool hasCellPoints () const
bool hasCellCentres () const
bool hasFaceCentres () const
bool hasCellVolumes () const
bool hasFaceAreas () const
const labelListcellCells (const label cellI, DynamicList< label > &) const
 cellCells using cells.
const labelListcellCells (const label cellI) const
const labelListcellPoints (const label cellI, DynamicList< label > &) const
 cellPoints using cells
const labelListcellPoints (const label cellI) const
const labelListpointCells (const label pointI, DynamicList< label > &) const
 pointCells using pointFaces
const labelListpointCells (const label pointI) const
const labelListpointPoints (const label pointI, DynamicList< label > &) const
 pointPoints using edges, pointEdges
const labelListpointPoints (const label pointI) const
const labelListfaceEdges (const label faceI, DynamicList< label > &) const
 faceEdges using pointFaces, edges, pointEdges
const labelListfaceEdges (const label faceI) const
const labelListedgeFaces (const label edgeI, DynamicList< label > &) const
 edgeFaces using pointFaces, edges, pointEdges
const labelListedgeFaces (const label edgeI) const
const labelListedgeCells (const label edgeI, DynamicList< label > &) const
 edgeCells using pointFaces, edges, pointEdges
const labelListedgeCells (const label edgeI) const
const labelListcellEdges (const label cellI, DynamicList< label > &) const
 cellEdges using cells, pointFaces, edges, pointEdges
const labelListcellEdges (const label cellI) const

Static Public Attributes

static word defaultRegion = "region0"
 Return the default region name.
static word meshSubDir = "polyMesh"
 Return the mesh sub-directory name (usually "polyMesh")
- Static Public Attributes inherited from primitiveMesh
static const unsigned cellsPerEdge_ = 4
 Estimated number of cells per edge.
static const unsigned cellsPerPoint_ = 8
 Estimated number of cells per point.
static const unsigned facesPerCell_ = 6
 Estimated number of faces per cell.
static const unsigned facesPerEdge_ = 4
 Estimated number of faces per edge.
static const unsigned facesPerPoint_ = 12
 Estimated number of faces per point.
static const unsigned edgesPerCell_ = 12
 Estimated number of edges per cell.
static const unsigned edgesPerFace_ = 4
 Estimated number of edges per cell.
static const unsigned edgesPerPoint_ = 6
 Estimated number of edges per point.
static const unsigned pointsPerCell_ = 8
 Estimated number of points per cell.
static const unsigned pointsPerFace_ = 4
 Estimated number of points per face.

Additional Inherited Members

- Static Public Member Functions inherited from primitiveMesh
static void calcCells (cellList &, const unallocLabelList &own, const unallocLabelList &nei, const label nCells=-1)
 Helper function to calculate cell-face addressing from.
static bool calcPointOrder (label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
 Helper function to calculate point ordering. Returns true.
static scalar setClosedThreshold (const scalar)
 Set the closedness ratio warning threshold.
static scalar setAspectThreshold (const scalar)
 Set the aspect ratio warning threshold.
static scalar setNonOrthThreshold (const scalar)
 Set the non-orthogonality warning threshold in degrees.
static scalar setSkewThreshold (const scalar)
 Set the skewness warning threshold as percentage.
- Protected Member Functions inherited from primitiveMesh
 primitiveMesh ()
 Construct null.

Member Typedef Documentation

typedef polyMesh Mesh

Reimplemented in fvMesh.

Definition at line 201 of file polyMesh.H.

Reimplemented in fvMesh.

Definition at line 202 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 84 of file polyMesh.H.


Constructor & Destructor Documentation

polyMesh ( const IOobject io,
const Xfer< pointField > &  points,
const Xfer< faceList > &  faces,
const Xfer< labelList > &  owner,
const Xfer< labelList > &  neighbour,
const bool  syncPar = true 
)

Construct without boundary from components.

Boundary is added using addPatches() member function

Definition at line 314 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, Foam::max(), Foam::min(), and List< T >::size().

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

Construct without boundary with cells rather than owner/neighbour.

Boundary is added using addPatches() member function

Definition at line 471 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, Foam::max(), Foam::min(), and List< T >::size().

polyMesh ( const IOobject io,
const Xfer< pointField > &  points,
const cellShapeList shapes,
const faceListList boundaryFaces,
const wordList boundaryPatchNames,
const wordList boundaryPatchTypes,
const word defaultBoundaryPatchName,
const word defaultBoundaryPatchType,
const wordList boundaryPatchPhysicalTypes,
const bool  syncPar = true 
)
~polyMesh ( )
virtual

Definition at line 775 of file polyMesh.C.


Member Function Documentation

TypeName ( "polyMesh"  )

Runtime type information.

const Foam::fileName & dbDir ( ) const
virtual

Override the objectRegistry dbDir for a single-region case.

Reimplemented from objectRegistry.

Definition at line 784 of file polyMesh.C.

References objectRegistry::dbDir().

Foam::fileName meshDir ( ) const

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

Definition at line 797 of file polyMesh.C.

Referenced by polyMesh::polyMesh().

const Foam::fileName & pointsInstance ( ) const

Return the current instance directory for points.

Used in the consruction of gemometric mesh data dependent on points

Definition at line 803 of file polyMesh.C.

const Foam::fileName & facesInstance ( ) const

Return the current instance directory for faces.

Definition at line 809 of file polyMesh.C.

Referenced by attachPolyTopoChanger::attach(), and manualDecomp::decompose().

void setInstance ( const fileName inst)
const Foam::pointField & oldPoints ( ) const
virtual
const polyBoundaryMesh& boundaryMesh ( ) const
inline

Return boundary mesh.

Definition at line 304 of file polyMesh.H.

Referenced by fvMeshAdder::add(), polyMeshAdder::add(), autoLayerDriver::addLayers(), polyTopoChange::addMesh(), meshRefinement::addPatch(), cellToCellStencil::allCoupledFacesPatch(), cellToFaceStencil::allCoupledFacesPatch(), attachPolyTopoChanger::attach(), scotchDecomp::calcCSR(), extendedCellToFaceStencil::calcDistributeMap(), polyDualMesh::calcFeatures(), cellPointWeightWallModified::cellPointWeightWallModified(), polyTopoChange::changeMesh(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), faceZone::checkParallelSync(), polyMeshGeometry::checkVolRatio(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), wallDistData< TransferType >::correct(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), directions::directions(), fvMeshDistribute::distribute(), autoLayerDriver::doLayers(), extendedCellToFaceStencil::extendedCellToFaceStencil(), extendedFaceToCellStencil::extendedFaceToCellStencil(), Cloud< BasicReactingParcel< ThermoType > >::facePatch(), patchProbes::findElements(), syncTools::getMasterEdges(), syncTools::getMasterFaces(), syncTools::getMasterPoints(), cellDistFuncs::getPatchIDs(), interpolationCellPatchConstrained< Type >::interpolate(), turbulentTemperatureCoupledBaffleFvPatchScalarField::K(), Particle< ParticleType >::lambda(), LocalInteraction< CloudType >::LocalInteraction(), localPointRegion::localPointRegion(), polyTopoChange::makeMesh(), meshRefinement::makePatch(), cellDistFuncs::maxPatchSize(), polyMeshAdder::mergePoints(), meshTriangulation::meshTriangulation(), solidParticle::move(), DsmcParcel< ParcelType >::move(), Cloud< ParticleType >::move(), parcel::move(), KinematicParcel< ParcelType >::move(), MRFZone::MRFZone(), Cloud< BasicReactingParcel< ThermoType > >::patchFace(), boundaryMesh::patchify(), sampledPatch::patchIndex(), Foam::polyMeshZipUpCells(), polyTopoChange::polyTopoChange(), forces::read(), boundaryMesh::read(), ensightParts::recalculate(), autoSnapDriver::repatchToSurface(), sampledCuttingPlane::sampledCuttingPlane(), sampledIsoSurface::sampledIsoSurface(), directMappedPatchBase::sampleMesh(), directMappedPatchBase::samplePolyPatch(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), fvMatrix< Type >::setValues(), cellDistFuncs::sumPatchSize(), faceSet::sync(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), syncTools::syncFaceList(), syncTools::syncPointList(), syncTools::syncPointMap(), ExactParticle< ParticleType >::trackToFace(), Particle< ParticleType >::trackToFace(), sampledPatch::update(), directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), directMappedFixedValueFvPatchField< Type >::updateCoeffs(), surfaceDisplacementPointPatchVectorField::updateCoeffs(), perfectInterface::updateMesh(), attachDetach::updateMesh(), slidingInterface::updateMesh(), cellToCellStencil::validBoundaryFaces(), cellToFaceStencil::validBoundaryFaces(), wallLayerCells::wallLayerCells(), and dsmcFields::write().

const boundBox& bounds ( ) const
inline

Return mesh bounding box.

Definition at line 310 of file polyMesh.H.

Referenced by Foam::meshTools::constrainToMeshCentre(), refinementParameters::findCells(), and Kmesh::Kmesh().

const Foam::Vector< Foam::label > & geometricD ( ) const

Return the vector of geometric directions in mesh.

Defined according to the presence of empty and wedge patches. 1 indicates unconstrained direction and -1 a constrained direction.

Definition at line 815 of file polyMesh.C.

Referenced by Foam::meshTools::constrainToMeshCentre().

Foam::label nGeometricD ( ) const

Return the number of valid geometric dimensions in the mesh.

Definition at line 826 of file polyMesh.C.

References Foam::cmptSum().

const Foam::Vector< Foam::label > & solutionD ( ) const

Return the vector of solved-for directions in mesh.

Differs from geometricD in that it includes for wedge cases the circumferential direction in case of swirl. 1 indicates valid direction and -1 an invalid direction.

Definition at line 832 of file polyMesh.C.

Referenced by KinematicParcel< ParcelType >::calcVelocity(), InjectionModel< CloudType >::inject(), and DsmcParcel< ParcelType >::move().

Foam::label nSolutionD ( ) const

Return the number of valid solved-for dimensions in the mesh.

Definition at line 843 of file polyMesh.C.

References Foam::cmptSum().

Referenced by fvDOM::fvDOM().

const objectRegistry& thisDb ( ) const
inline

Return the object registry.

Reimplemented in fvMesh.

Definition at line 355 of file polyMesh.H.

Referenced by polyMesh::updateMesh().

bool moving ( const bool  m)
inline

Set the mesh to be moving.

Definition at line 369 of file polyMesh.H.

bool changing ( const bool  c)
inline

Set the mesh to be changing.

Definition at line 384 of file polyMesh.H.

Foam::tmp< Foam::scalarField > movePoints ( const pointField newPoints)
virtual
void resetMotion ( ) const

Reset motion.

Definition at line 1108 of file polyMesh.C.

References Foam::deleteDemandDrivenData().

Referenced by polyMeshAdder::add().

pointZoneMesh& pointZones ( )
inline

Return non-const access to the pointZones.

Definition at line 401 of file polyMesh.H.

faceZoneMesh& faceZones ( )
inline

Return non-const access to the faceZones.

Definition at line 407 of file polyMesh.H.

cellZoneMesh& cellZones ( )
inline

Return non-const access to the cellZones.

Definition at line 413 of file polyMesh.H.

void addPatches ( const List< polyPatch * > &  p,
const bool  validBoundary = true 
)
void addZones ( const List< pointZone * > &  pz,
const List< faceZone * > &  fz,
const List< cellZone * > &  cz 
)

Add mesh zones.

Definition at line 898 of file polyMesh.C.

References Foam::abort(), IOobject::AUTO_WRITE, Foam::FatalError, FatalErrorIn, forAll, and List< T >::size().

Referenced by polyTopoChange::makeMesh().

void removeBoundary ( )
void resetPrimitives ( const Xfer< pointField > &  points,
const Xfer< faceList > &  faces,
const Xfer< labelList > &  owner,
const Xfer< labelList > &  neighbour,
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.

Definition at line 652 of file polyMesh.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::max(), Foam::min(), Foam::name(), nPoints, points, Foam::returnReduce(), List< T >::size(), and timeName.

Referenced by polyMeshAdder::add(), polyTopoChange::changeMesh(), and Foam::polyMeshZipUpCells().

void clearGeom ( )

Clear geometry.

Reimplemented from primitiveMesh.

Definition at line 54 of file polyMeshClear.C.

References primitiveMesh::clearGeom(), MeshObject< polyMesh, pointMesh >::Delete(), Foam::endl(), forAll, and Foam::Info.

void clearAddressing ( )
void clearOut ( )

Clear all geometry and addressing unnecessary for CFD.

Reimplemented from primitiveMesh.

Reimplemented in fvMesh.

Definition at line 114 of file polyMeshClear.C.

Referenced by fvMesh::clearOut(), Foam::polyMeshZipUpCells(), and polyMesh::removeBoundary().

void clearPrimitives ( )

Clear primitive data (points, faces and cells)

Definition at line 101 of file polyMeshClear.C.

void removeFiles ( const fileName instanceDir) const

Remove all files from mesh instance.

Definition at line 1136 of file polyMesh.C.

References Foam::isDir(), fileName::path(), Foam::rm(), and Foam::rmDir().

Referenced by meshReader::writeMesh().

void removeFiles ( ) const

Remove all files from mesh instance()

Definition at line 1159 of file polyMesh.C.


Member Data Documentation

Foam::word defaultRegion = "region0"
static

Return the default region name.

Definition at line 209 of file polyMesh.H.

Referenced by probes::checkFieldTypes(), regIOobject::checkIn(), meshReader::mesh(), and sampledSets::sampledSets().

Foam::word meshSubDir = "polyMesh"
static

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

Definition at line 212 of file polyMesh.H.

Referenced by polyMesh::polyMesh().


The documentation for this class was generated from the following files: