Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
polyMesh Class Reference

Mesh consisting of general polyhedral cells. More...

Inheritance diagram for polyMesh:
Inheritance graph
[legend]
Collaboration diagram for polyMesh:
Collaboration graph
[legend]

Public Types

enum  readUpdateState { UNCHANGED, POINTS_MOVED, TOPO_CHANGE, TOPO_PATCH_CHANGE }
 Enumeration defining the state of the mesh after a read update. More...
 
enum  cellDecomposition { FACE_PLANES, FACE_CENTRE_TRIS, FACE_DIAG_TRIS, CELL_TETS }
 Enumeration defining the decomposition of the cell for. More...
 
typedef polyMesh Mesh
 
typedef polyBoundaryMesh BoundaryMesh
 
- Public Types inherited from regIOobject
enum  fileCheckTypes { timeStamp, timeStampMaster, inotify, inotifyMaster }
 Types of communications. More...
 
- Public Types inherited from IOobject
enum  objectState { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
 
enum  readOption { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
 
enum  writeOption { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...
 
- Public Types inherited from HashTable< regIOobject * >
typedef T value_type
 Type of values the HashTable contains. More...
 
typedef Treference
 Type that can be used for storing into HashTable::value_type. More...
 
typedef label size_type
 The type that can represent the size of a HashTable. More...
 

Public Member Functions

 TypeName ("polyMesh")
 Runtime type information. More...
 
 polyMesh (const IOobject &io)
 Construct from IOobject. More...
 
 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 from IOobject or from components. More...
 
 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. More...
 
 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. More...
 
 polyMesh (const IOobject &io, const Xfer< pointField > &points, const cellShapeList &shapes, const faceListList &boundaryFaces, const wordList &boundaryPatchNames, const PtrList< dictionary > &boundaryDicts, const word &defaultBoundaryPatchName, const word &defaultBoundaryPatchType, const bool syncPar=true)
 Construct from cell shapes with patch information in dictionary. More...
 
virtual ~polyMesh ()
 Destructor. More...
 
virtual const fileNamedbDir () const
 Override the objectRegistry dbDir for a single-region case. More...
 
fileName meshDir () const
 Return the local mesh directory (dbDir()/meshSubDir) More...
 
const fileNamepointsInstance () const
 Return the current instance directory for points. More...
 
const fileNamefacesInstance () const
 Return the current instance directory for faces. More...
 
void setInstance (const fileName &)
 Set the instance for mesh files. More...
 
virtual const pointFieldpoints () const
 Return raw points. More...
 
virtual bool upToDatePoints (const regIOobject &io) const
 Return true if io is up-to-date with points. More...
 
virtual void setUpToDatePoints (regIOobject &io) const
 Set io to be up-to-date with points. More...
 
virtual const faceListfaces () const
 Return raw faces. More...
 
virtual const labelListfaceOwner () const
 Return face owner. More...
 
virtual const labelListfaceNeighbour () const
 Return face neighbour. More...
 
virtual const pointFieldoldPoints () const
 Return old points for mesh motion. More...
 
const polyBoundaryMeshboundaryMesh () const
 Return boundary mesh. More...
 
const boundBoxbounds () const
 Return mesh bounding box. More...
 
const Vector< label > & geometricD () const
 Return the vector of geometric directions in mesh. More...
 
label nGeometricD () const
 Return the number of valid geometric dimensions in the mesh. More...
 
const Vector< label > & solutionD () const
 Return the vector of solved-for directions in mesh. More...
 
label nSolutionD () const
 Return the number of valid solved-for dimensions in the mesh. More...
 
const labelListtetBasePtIs () const
 Return the tetBasePtIs. More...
 
const indexedOctree< treeDataCell > & cellTree () const
 Return the cell search tree. More...
 
const pointZoneMeshpointZones () const
 Return point zone mesh. More...
 
const faceZoneMeshfaceZones () const
 Return face zone mesh. More...
 
const cellZoneMeshcellZones () const
 Return cell zone mesh. More...
 
const globalMeshDataglobalData () const
 Return parallel info. More...
 
label comm () const
 Return communicator used for parallel communication. More...
 
labelcomm ()
 Return communicator used for parallel communication. More...
 
const objectRegistrythisDb () const
 Return the object registry. More...
 
bool moving () const
 Is mesh moving. More...
 
bool moving (const bool m)
 Set the mesh to be moving. More...
 
bool topoChanging () const
 Is mesh topology changing. More...
 
bool topoChanging (const bool c)
 Set the mesh topology to be changing. More...
 
bool changing () const
 Is mesh changing (topology changing and/or moving) More...
 
virtual tmp< scalarFieldmovePoints (const pointField &)
 Move points, returns volumes swept by faces in motion. More...
 
void resetMotion () const
 Reset motion. More...
 
pointZoneMeshpointZones ()
 Return non-const access to the pointZones. More...
 
faceZoneMeshfaceZones ()
 Return non-const access to the faceZones. More...
 
cellZoneMeshcellZones ()
 Return non-const access to the cellZones. More...
 
void addPatches (const List< polyPatch * > &, const bool validBoundary=true)
 Add boundary patches. More...
 
void addZones (const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
 Add mesh zones. More...
 
virtual readUpdateState readUpdate ()
 Update the mesh based on the mesh files saved in. More...
 
virtual void updateMesh (const mapPolyMesh &mpm)
 Update the mesh corresponding to given map. More...
 
void removeBoundary ()
 Remove boundary patches. More...
 
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. More...
 
void clearGeom ()
 Clear geometry. More...
 
void clearAddressing (const bool isMeshUpdate=false)
 Clear addressing. More...
 
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD. More...
 
void clearPrimitives ()
 Clear primitive data (points, faces and cells) More...
 
void clearAdditionalGeom ()
 Clear geometry not used for CFD (cellTree, tetBasePtIs) More...
 
void clearCellTree ()
 Clear cell tree data. More...
 
void removeFiles (const fileName &instanceDir) const
 Remove all files from mesh instance. More...
 
void removeFiles () const
 Remove all files from mesh instance() More...
 
virtual bool checkFaceOrthogonality (const bool report=false, labelHashSet *setPtr=NULL) const
 Check non-orthogonality. More...
 
virtual bool checkFaceSkewness (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face skewness. More...
 
virtual bool checkEdgeAlignment (const bool report, const Vector< label > &directions, labelHashSet *setPtr) const
 Check edge alignment for 1D/2D cases. More...
 
virtual bool checkCellDeterminant (const bool report, labelHashSet *setPtr) const
 
virtual bool checkMeshMotion (const pointField &newPoints, const bool report=false, const bool detailedReport=false) const
 Check mesh motion for correctness given motion points. More...
 
virtual bool checkFaceWeight (const bool report, const scalar minWeight=0.05, labelHashSet *setPtr=NULL) const
 Check for face weights. More...
 
virtual bool checkVolRatio (const bool report, const scalar minRatio=0.01, labelHashSet *setPtr=NULL) const
 Check for neighbouring cell volumes. More...
 
void findCellFacePt (const point &p, label &celli, label &tetFacei, label &tetPti) const
 Find the cell, tetFacei and tetPti for point p. More...
 
void findTetFacePt (const label celli, const point &p, label &tetFacei, label &tetPti) const
 Find the tetFacei and tetPti for point p in celli. More...
 
bool pointInCell (const point &p, label celli, const cellDecomposition=CELL_TETS) const
 Test if point p is in the celli. More...
 
label findCell (const point &p, const cellDecomposition=CELL_TETS) const
 Find cell enclosing this location and return index. More...
 
- Public Member Functions inherited from objectRegistry
 TypeName ("objectRegistry")
 Declare type name for this IOobject. More...
 
 objectRegistry (const Time &db, const label nIoObjects=128)
 Construct the time objectRegistry given an initial estimate. More...
 
 objectRegistry (const IOobject &io, const label nIoObjects=128)
 Construct a sub-registry given an IObject to describe the registry. More...
 
virtual ~objectRegistry ()
 Destructor. More...
 
const Timetime () const
 Return time. More...
 
const objectRegistryparent () const
 Return the parent objectRegistry. More...
 
wordList names () const
 Return the list of names of the IOobjects. More...
 
wordList sortedNames () const
 Return the sorted list of names of the IOobjects. More...
 
wordList names (const word &className) const
 Return the list of names of IOobjects of given class name. More...
 
wordList sortedNames (const word &className) const
 Return the sorted list of names of IOobjects of given class name. More...
 
template<class Type >
wordList names () const
 Return the list of names of the IOobjects of given type. More...
 
template<class Type >
wordList names (const wordRe &name) const
 Return the list of objects whose name matches the input regExp. More...
 
template<class Type >
wordList names (const wordReList &name) const
 Return the list of objects whose name matches the input regExp. More...
 
const objectRegistrysubRegistry (const word &name, const bool forceCreate=false) const
 Lookup and return a const sub-objectRegistry. Optionally create. More...
 
template<class Type >
HashTable< const Type * > lookupClass (const bool strict=false) const
 Lookup and return all objects of the given Type. More...
 
template<class Type >
HashTable< Type * > lookupClass (const bool strict=false)
 Lookup and return all objects of the given Type. More...
 
template<class Type >
bool foundObject (const word &name) const
 Is the named Type found? More...
 
template<class Type >
const Type & lookupObject (const word &name) const
 Lookup and return the object of the given Type. More...
 
template<class Type >
Type & lookupObjectRef (const word &name) const
 
label getEvent () const
 Return new event number. More...
 
virtual void rename (const word &newName)
 Rename. More...
 
bool checkIn (regIOobject &) const
 Add an regIOobject to registry. More...
 
bool checkOut (regIOobject &) const
 Remove an regIOobject from registry. More...
 
virtual bool modified () const
 Return true if any of the object's files have been modified. More...
 
void readModifiedObjects ()
 Read the objects that have been modified. More...
 
virtual bool readIfModified ()
 Read object if modified. More...
 
virtual bool writeData (Ostream &) const
 writeData function required by regIOobject but not used More...
 
virtual bool writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write the objects. More...
 
template<class Type >
Foam::wordList names () const
 
template<class Type >
Foam::wordList names (const wordRe &name) const
 
template<class Type >
Foam::wordList names (const wordReList &patterns) const
 
template<class Type >
Foam::HashTable< const Type * > lookupClass (const bool strict) const
 
template<class Type >
Foam::HashTable< Type * > lookupClass (const bool strict)
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 Runtime type information. More...
 
 regIOobject (const IOobject &, const bool isTime=false)
 Construct from IOobject. Optional flag for if IOobject is the. More...
 
 regIOobject (const regIOobject &)
 Construct as copy. More...
 
 regIOobject (const regIOobject &, bool registerCopy)
 Construct as copy, transferring registry registration to copy. More...
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 Construct as copy with new name, transfering registry registration. More...
 
 regIOobject (const IOobject &, const regIOobject &)
 Construct as copy with new IO parameters. More...
 
virtual ~regIOobject ()
 Destructor. More...
 
bool checkIn ()
 Add object to registry. More...
 
bool checkOut ()
 Remove object from registry. More...
 
bool ownedByRegistry () const
 Is this object owned by the registry? More...
 
void store ()
 Transfer ownership of this object to its registry. More...
 
void release ()
 Release ownership of this object from its registry. More...
 
label eventNo () const
 Event number at last update. More...
 
labeleventNo ()
 Event number at last update. More...
 
bool upToDate (const regIOobject &) const
 Return true if up-to-date with respect to given object. More...
 
bool upToDate (const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
void setUpToDate ()
 Set up to date (obviously) More...
 
IstreamreadStream (const word &)
 Return Istream and check object type against that given. More...
 
void close ()
 Close Istream. More...
 
virtual bool readData (Istream &)
 Virtual readData function. More...
 
virtual bool read ()
 Read object. More...
 
label watchIndex () const
 Return file-monitoring handle. More...
 
labelwatchIndex ()
 Return file-monitoring handle. More...
 
virtual bool write () const
 Write using setting from DB. More...
 
void operator= (const IOobject &)
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Runtime type information. More...
 
 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. More...
 
 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. More...
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from path, registry, io options. More...
 
 IOobject (const IOobject &io, const word &name)
 Construct as copy resetting name. More...
 
Foam::autoPtr< IOobjectclone () const
 Clone. More...
 
virtual ~IOobject ()
 Destructor. More...
 
const Timetime () const
 Return time. More...
 
const objectRegistrydb () const
 Return the local objectRegistry. More...
 
const wordname () const
 Return name. More...
 
const wordheaderClassName () const
 Return name of the class name read from header. More...
 
stringnote ()
 Return non-constant access to the optional note. More...
 
const stringnote () const
 Return the optional note. More...
 
bool & registerObject ()
 Register object created from this IOobject with registry if true. More...
 
bool registerObject () const
 Register object created from this IOobject with registry if true. More...
 
readOption readOpt () const
 
readOptionreadOpt ()
 
writeOption writeOpt () const
 
writeOptionwriteOpt ()
 
word group () const
 Return group (extension part of name) More...
 
word member () const
 Return member (name without the extension) More...
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const
 
fileNameinstance ()
 
const fileNamelocal () const
 
fileName path () const
 Return complete path. More...
 
fileName path (const word &instance, const fileName &local="") const
 Return complete path with alternative instance and local. More...
 
fileName objectPath () const
 Return complete path + object name. More...
 
fileName filePath () const
 Return complete path + object name if the file exists. More...
 
bool readHeader (Istream &)
 Read header. More...
 
bool headerOk ()
 Read and check header info. More...
 
bool writeHeader (Ostream &) const
 Write header. More...
 
bool writeHeader (Ostream &, const word &objectType) const
 Write header. Allow override of type. More...
 
bool good () const
 
bool bad () const
 
InfoProxy< IOobjectinfo () const
 Return info proxy. More...
 
void operator= (const IOobject &)
 
template<class Name >
Foam::word groupName (Name name, const word &group)
 
- Public Member Functions inherited from HashTable< regIOobject * >
bool set (const Key &, const T &newElmt)
 Assign a new hashedEntry, overwriting existing entries. More...
 
 HashTable (const label size=128)
 Construct given initial table size. More...
 
 HashTable (Istream &, const label size=128)
 Construct from Istream. More...
 
 HashTable (const HashTable< T, Key, Hash > &)
 Construct as copy. More...
 
 HashTable (const Xfer< HashTable< T, Key, Hash > > &)
 Construct by transferring the parameter contents. More...
 
 ~HashTable ()
 Destructor. More...
 
label capacity () const
 The size of the underlying table. More...
 
label size () const
 Return number of elements in table. More...
 
bool empty () const
 Return true if the hash table is empty. More...
 
bool found (const Key &) const
 Return true if hashedEntry is found in table. More...
 
iterator find (const Key &)
 Find and return an iterator set at the hashedEntry. More...
 
const_iterator find (const Key &) const
 Find and return an const_iterator set at the hashedEntry. More...
 
List< Key > toc () const
 Return the table of contents. More...
 
List< Key > sortedToc () const
 Return the table of contents as a sorted list. More...
 
OstreamprintInfo (Ostream &) const
 Print information. More...
 
bool insert (const Key &, const T &newElmt)
 Insert a new hashedEntry. More...
 
bool erase (const iterator &)
 Erase a hashedEntry specified by given iterator. More...
 
bool erase (const Key &)
 Erase a hashedEntry specified by the given key. More...
 
label erase (const UList< Key > &)
 Remove entries given by the listed keys from this HashTable. More...
 
label erase (const HashTable< AnyType, Key, AnyHash > &)
 Remove entries given by the given keys from this HashTable. More...
 
Foam::label erase (const HashTable< AnyType, Key, AnyHash > &rhs)
 
void resize (const label newSize)
 Resize the hash table for efficiency. More...
 
void clear ()
 Clear all entries from table. More...
 
void clearStorage ()
 Clear the table entries and the table itself. More...
 
void shrink ()
 Shrink the allocated table to approx. twice number of elements. More...
 
void transfer (HashTable< T, Key, Hash > &)
 Transfer the contents of the argument table into this table. More...
 
Xfer< HashTable< T, Key, Hash > > xfer ()
 Transfer contents to the Xfer container. More...
 
Toperator[] (const Key &)
 Find and return a hashedEntry. More...
 
const Toperator[] (const Key &) const
 Find and return a hashedEntry. More...
 
Toperator() (const Key &)
 Find and return a hashedEntry, create it null if not present. More...
 
void operator= (const HashTable< T, Key, Hash > &)
 Assignment. More...
 
bool operator== (const HashTable< T, Key, Hash > &) const
 Equality. Hash tables are equal if the keys and values are equal. More...
 
bool operator!= (const HashTable< T, Key, Hash > &) const
 The opposite of the equality operation. Takes linear time. More...
 
iterator begin ()
 Iterator set to the beginning of the HashTable. More...
 
const_iterator begin () const
 const_iterator set to the beginning of the HashTable More...
 
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable More...
 
- Public Member Functions inherited from primitiveMesh
 ClassName ("primitiveMesh")
 
 primitiveMesh (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Construct from components. More...
 
virtual ~primitiveMesh ()
 
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Reset this primitiveMesh given the primitive array sizes. More...
 
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. More...
 
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. More...
 
label nPoints () const
 
label nEdges () const
 
label nInternalFaces () const
 
label nFaces () const
 
label nCells () const
 
const cellShapeListcellShapes () const
 Return cell shapes. More...
 
const edgeListedges () const
 Return mesh edges. Uses calcEdges. More...
 
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. More...
 
bool isInternalFace (const label faceIndex) const
 Return true if given face label is internal to the mesh. More...
 
bool checkCellsZipUp (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cell zip-up. More...
 
bool checkFaceVertices (const bool report=false, labelHashSet *setPtr=NULL) const
 Check uniqueness of face vertices. More...
 
bool checkFaceFaces (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face-face connectivity. More...
 
bool checkUpperTriangular (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face ordering. More...
 
bool checkClosedBoundary (const bool report=false) const
 Check boundary for closedness. More...
 
bool checkClosedCells (const bool report=false, labelHashSet *setPtr=NULL, labelHashSet *highAspectSetPtr=NULL) const
 Check cells for closedness. More...
 
bool checkFaceAreas (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative face areas. More...
 
bool checkCellVolumes (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative cell volumes. More...
 
bool checkFaceOrthogonality (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for non-orthogonality. More...
 
bool checkFacePyramids (const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL) const
 Check face pyramid volume. More...
 
bool checkFaceSkewness (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face skewness. More...
 
bool checkFaceAngles (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face angles. More...
 
bool checkFaceFlatness (const bool report, labelHashSet *setPtr) const
 Check face warpage: decompose face and check ratio between. More...
 
bool checkEdgeAlignment (const bool report, const Vector< label > &directions, labelHashSet *setPtr=NULL) const
 Check edge alignment for 1D/2D cases. More...
 
bool checkPoints (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for unused points. More...
 
bool checkPointNearness (const bool report, const scalar reportDistSqr, labelHashSet *setPtr=NULL) const
 Check for point-point-nearness,. More...
 
bool checkEdgeLength (const bool report, const scalar minLenSqr, labelHashSet *setPtr=NULL) const
 Check edge length. More...
 
bool checkCellDeterminant (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cell determinant. More...
 
bool checkTopology (const bool report=false) const
 Check mesh topology for correctness. More...
 
bool checkGeometry (const bool report=false) const
 Check mesh geometry (& implicitly topology) for correctness. More...
 
bool checkMesh (const bool report=false) const
 Check mesh for correctness. Returns false for no error. More...
 
bool checkMeshMotion (const pointField &newPoints, const bool report=false) const
 Check mesh motion for correctness given motion points. More...
 
bool pointInCellBB (const point &p, label celli) const
 Is the point in the cell bounding box. More...
 
bool pointInCell (const point &p, label celli) const
 Is the point in the cell. More...
 
label findNearestCell (const point &location) const
 Find the cell with the nearest cell centre to location. More...
 
label findCell (const point &location) const
 Find cell enclosing this location (-1 if not in mesh) More...
 
void printAllocated () const
 Print a list of all the currently allocated mesh data. More...
 
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, dynamicLabelList &) const
 cellCells using cells. More...
 
const labelListcellCells (const label cellI) const
 
const labelListcellPoints (const label cellI, dynamicLabelList &) const
 cellPoints using cells More...
 
const labelListcellPoints (const label cellI) const
 
const labelListpointCells (const label pointI, dynamicLabelList &) const
 pointCells using pointFaces More...
 
const labelListpointCells (const label pointI) const
 
const labelListpointPoints (const label pointI, dynamicLabelList &) const
 pointPoints using edges, pointEdges More...
 
const labelListpointPoints (const label pointI) const
 
const labelListfaceEdges (const label faceI, dynamicLabelList &) const
 faceEdges using pointFaces, edges, pointEdges More...
 
const labelListfaceEdges (const label faceI) const
 
const labelListedgeFaces (const label edgeI, dynamicLabelList &) const
 edgeFaces using pointFaces, edges, pointEdges More...
 
const labelListedgeFaces (const label edgeI) const
 
const labelListedgeCells (const label edgeI, dynamicLabelList &) const
 edgeCells using pointFaces, edges, pointEdges More...
 
const labelListedgeCells (const label edgeI) const
 
const labelListcellEdges (const label cellI, dynamicLabelList &) const
 cellEdges using cells, pointFaces, edges, pointEdges More...
 
const labelListcellEdges (const label cellI) const
 
void clearGeom ()
 Clear geometry. More...
 
void clearAddressing ()
 Clear topological data. More...
 
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD. More...
 
 ClassName ("primitiveMesh")
 
 primitiveMesh (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Construct from components. More...
 
virtual ~primitiveMesh ()
 Destructor. More...
 
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Reset this primitiveMesh given the primitive array sizes. More...
 
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. More...
 
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. More...
 
label nPoints () const
 
label nEdges () const
 
label nInternalFaces () const
 
label nFaces () const
 
label nCells () const
 
label nInternalPoints () const
 Points not on boundary. More...
 
label nInternal0Edges () const
 Internal edges (i.e. not on boundary face) using. More...
 
label nInternal1Edges () const
 Internal edges using 0 or 1 boundary point. More...
 
label nInternalEdges () const
 Internal edges using 0,1 or 2 boundary points. More...
 
const cellShapeListcellShapes () const
 Return cell shapes. More...
 
const edgeListedges () const
 Return mesh edges. Uses calcEdges. More...
 
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. More...
 
bool isInternalFace (const label faceIndex) const
 Return true if given face label is internal to the mesh. More...
 
virtual bool checkUpperTriangular (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face ordering. More...
 
virtual bool checkCellsZipUp (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cell zip-up. More...
 
virtual bool checkFaceVertices (const bool report=false, labelHashSet *setPtr=NULL) const
 Check uniqueness of face vertices. More...
 
virtual bool checkPoints (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for unused points. More...
 
virtual bool checkFaceFaces (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face-face connectivity. More...
 
virtual bool checkClosedBoundary (const bool report=false) const
 Check boundary for closedness. More...
 
virtual bool checkClosedCells (const bool report=false, labelHashSet *setPtr=NULL, labelHashSet *highAspectSetPtr=NULL, const Vector< label > &solutionD=Vector< label >::one) const
 Check cells for closedness. More...
 
virtual bool checkFaceAreas (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative face areas. More...
 
virtual bool checkCellVolumes (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative cell volumes. More...
 
virtual bool checkFacePyramids (const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL) const
 Check face pyramid volume. More...
 
virtual bool checkFaceAngles (const bool report=false, const scalar maxSin=10, labelHashSet *setPtr=NULL) const
 Check face angles. More...
 
virtual bool checkFaceFlatness (const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
 Check face warpage: decompose face and check ratio between. More...
 
virtual bool checkPointNearness (const bool report, const scalar reportDistSqr, labelHashSet *setPtr=NULL) const
 Check for point-point-nearness,. More...
 
virtual bool checkEdgeLength (const bool report, const scalar minLenSqr, labelHashSet *setPtr=NULL) const
 Check edge length. More...
 
virtual bool checkConcaveCells (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for concave cells by the planes of faces. More...
 
virtual bool checkTopology (const bool report=false) const
 Check mesh topology for correctness. More...
 
virtual bool checkGeometry (const bool report=false) const
 Check mesh geometry (& implicitly topology) for correctness. More...
 
virtual bool checkMesh (const bool report=false) const
 Check mesh for correctness. Returns false for no error. More...
 
bool pointInCellBB (const point &p, label celli, scalar inflationFraction=0) const
 Return true if the point in the cell bounding box. More...
 
bool pointInCell (const point &p, label celli) const
 Return true if the point is in the cell. More...
 
label findNearestCell (const point &location) const
 Find the cell with the nearest cell centre to location. More...
 
label findCell (const point &location) const
 Find cell enclosing this location (-1 if not in mesh) More...
 
void printAllocated () const
 Print a list of all the currently allocated mesh data. More...
 
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. More...
 
const labelListcellCells (const label cellI) const
 
const labelListcellPoints (const label cellI, DynamicList< label > &) const
 cellPoints using cells More...
 
const labelListcellPoints (const label cellI) const
 
const labelListpointCells (const label pointI, DynamicList< label > &) const
 pointCells using pointFaces More...
 
const labelListpointCells (const label pointI) const
 
const labelListpointPoints (const label pointI, DynamicList< label > &) const
 pointPoints using edges, pointEdges More...
 
const labelListpointPoints (const label pointI) const
 
const labelListfaceEdges (const label faceI, DynamicList< label > &) const
 faceEdges using pointFaces, edges, pointEdges More...
 
const labelListfaceEdges (const label faceI) const
 
const labelListedgeFaces (const label edgeI, DynamicList< label > &) const
 edgeFaces using pointFaces, edges, pointEdges More...
 
const labelListedgeFaces (const label edgeI) const
 
const labelListedgeCells (const label edgeI, DynamicList< label > &) const
 edgeCells using pointFaces, edges, pointEdges More...
 
const labelListedgeCells (const label edgeI) const
 
const labelListcellEdges (const label cellI, DynamicList< label > &) const
 cellEdges using cells, pointFaces, edges, pointEdges More...
 
const labelListcellEdges (const label cellI) const
 
void clearGeom ()
 Clear geometry. More...
 
void clearAddressing ()
 Clear topological data. More...
 
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD. More...
 

Static Public Attributes

static word defaultRegion = "region0"
 Return the default region name. More...
 
static word meshSubDir = "polyMesh"
 Return the mesh sub-directory name (usually "polyMesh") More...
 
- Static Public Attributes inherited from regIOobject
static const NamedEnum< fileCheckTypes, 4 > fileCheckTypesNames
 
static int fileModificationSkew
 
static fileCheckTypes fileModificationChecking
 
- Static Public Attributes inherited from primitiveMesh
static const unsigned cellsPerEdge_ = 4
 Estimated number of cells per edge. More...
 
static const unsigned cellsPerPoint_ = 8
 Estimated number of cells per point. More...
 
static const unsigned facesPerCell_ = 6
 Estimated number of faces per cell. More...
 
static const unsigned facesPerEdge_ = 4
 Estimated number of faces per edge. More...
 
static const unsigned facesPerPoint_ = 12
 Estimated number of faces per point. More...
 
static const unsigned edgesPerCell_ = 12
 Estimated number of edges per cell. More...
 
static const unsigned edgesPerFace_ = 4
 Estimated number of edges per cell. More...
 
static const unsigned edgesPerPoint_ = 6
 Estimated number of edges per point. More...
 
static const unsigned pointsPerCell_ = 8
 Estimated number of points per cell. More...
 
static const unsigned pointsPerFace_ = 4
 Estimated number of points per face. More...
 
static const debug::tolerancesSwitch closedThreshold_ = 1.0e-6
 Static data to control mesh checking. More...
 
static const debug::tolerancesSwitch aspectThreshold_ = 1000
 Aspect ratio warning threshold. More...
 
static Foam::debug::tolerancesSwitch nonOrthThreshold_ = 70
 Non-orthogonality warning threshold in deg. More...
 
static const debug::tolerancesSwitch skewThreshold_ = 4
 Skewness warning threshold. More...
 
static Foam::debug::tolerancesSwitch faceAngleThreshold_
 Face angle threshold. More...
 
static const debug::tolerancesSwitch faceFlatnessThreshold_
 Face flatness threshold. More...
 

Private Member Functions

 polyMesh (const polyMesh &)
 Disallow construct as copy. More...
 
void operator= (const polyMesh &)
 Disallow default bitwise assignment. More...
 
void initMesh ()
 Initialise the polyMesh from the primitive data. More...
 
void initMesh (cellList &c)
 Initialise the polyMesh from the given set of cells. More...
 
void calcDirections () const
 Calculate the valid directions in the mesh from the boundaries. More...
 
void calcCellShapes () const
 Calculate the cell shapes from the primitive. More...
 
labelListList cellShapePointCells (const cellShapeList &) const
 
labelList facePatchFaceCells (const faceList &patchFaces, const labelListList &pointCells, const faceListList &cellsFaceShapes, const label patchID) const
 
void setTopology (const cellShapeList &cellsAsShapes, const faceListList &boundaryFaces, const wordList &boundaryPatchNames, labelList &patchSizes, labelList &patchStarts, label &defaultPatchStart, label &nFaces, cellList &cells)
 Set faces_, calculate cells and patchStarts. More...
 
bool checkFaceOrthogonality (const vectorField &fAreas, const vectorField &cellCtrs, const bool report, const bool detailedReport, labelHashSet *setPtr) const
 Check non-orthogonality. More...
 
bool checkFaceSkewness (const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs, const bool report, const bool detailedReport, labelHashSet *setPtr) const
 Check face skewness. More...
 
bool checkEdgeAlignment (const pointField &p, const bool report, const Vector< label > &directions, labelHashSet *setPtr) const
 
bool checkCellDeterminant (const vectorField &faceAreas, const bool report, labelHashSet *setPtr, const Vector< label > &meshD) const
 
bool checkFaceWeight (const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs, const bool report, const scalar minWeight, labelHashSet *setPtr) const
 
bool checkVolRatio (const scalarField &cellVols, const bool report, const scalar minRatio, labelHashSet *setPtr) const
 

Private Attributes

pointIOField points_
 Points. More...
 
faceCompactIOList faces_
 Faces. More...
 
labelIOList owner_
 Face owner. More...
 
labelIOList neighbour_
 Face neighbour. More...
 
bool clearedPrimitives_
 Have the primitives been cleared. More...
 
polyBoundaryMesh boundary_
 Boundary mesh. More...
 
boundBox bounds_
 Mesh bounding-box. More...
 
label comm_
 Communicator used for parallel communication. More...
 
Vector< labelgeometricD_
 Vector of non-constrained directions in mesh. More...
 
Vector< labelsolutionD_
 Vector of valid directions in mesh. More...
 
autoPtr< labelListtetBasePtIsPtr_
 Base point for face decomposition into tets. More...
 
autoPtr< indexedOctree< treeDataCell > > cellTreePtr_
 Search tree to allow spatial cell searching. More...
 
pointZoneMesh pointZones_
 Point zones. More...
 
faceZoneMesh faceZones_
 Face zones. More...
 
cellZoneMesh cellZones_
 Cell zones. More...
 
autoPtr< globalMeshDataglobalMeshDataPtr_
 Parallel info. More...
 
bool moving_
 Is the mesh moving. More...
 
bool topoChanging_
 Is the mesh topology changing. More...
 
label curMotionTimeIndex_
 Current time index for mesh motion. More...
 
autoPtr< pointFieldoldPointsPtr_
 Old points (for the last mesh motion) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *)
 Transfer ownership of the given object pointer to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &)
 Transfer ownership of the given object pointer to its registry. More...
 
- Static Public Member Functions inherited from IOobject
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 Split path into instance, local, name components. More...
 
template<class Name >
static word groupName (Name name, const word &group)
 
template<class Stream >
static Stream & writeBanner (Stream &os, bool noHint=false)
 Write the standard OpenFOAM file/dictionary banner. More...
 
template<class Stream >
static Stream & writeDivider (Stream &os)
 Write the standard file section divider. More...
 
template<class Stream >
static Stream & writeEndDivider (Stream &os)
 Write the standard end file divider. More...
 
static void replaceFileName (const word &from, const word &to)
 
- 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. More...
 
static void calcCells (cellList &, const labelUList &own, const labelUList &nei, const label nCells=-1)
 Helper function to calculate cell-face addressing from. More...
 
static bool calcPointOrder (label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
 Helper function to calculate point ordering. Returns true. More...
 
static scalar setClosedThreshold (const scalar)
 Set the closedness ratio warning threshold. More...
 
static scalar setAspectThreshold (const scalar)
 Set the aspect ratio warning threshold. More...
 
static scalar setNonOrthThreshold (const scalar)
 Set the non-orthogonality warning threshold in degrees. More...
 
static scalar setSkewThreshold (const scalar)
 Set the skewness warning threshold as percentage. More...
 
- Data Fields inherited from HashTable< regIOobject * >
const typedef Tconst_reference
 Type that can be used for storing into constant. More...
 
- Protected Member Functions inherited from IOobject
IstreamobjectStream ()
 Construct and return an IFstream for the object. More...
 
IstreamobjectStream (const fileName &)
 Construct and return an IFstream for the object given the. More...
 
void setBad (const string &)
 Set the object state to bad. More...
 
- Protected Member Functions inherited from primitiveMesh
 primitiveMesh ()
 Construct null. More...
 
void calcFaceCentresAndAreas () const
 Calculate face centres and areas. More...
 
void makeFaceCentresAndAreas (const pointField &p, vectorField &fCtrs, vectorField &fAreas) const
 
void calcCellCentresAndVols () const
 Calculate cell centres and volumes. More...
 
void makeCellCentresAndVols (const vectorField &fCtrs, const vectorField &fAreas, vectorField &cellCtrs, scalarField &cellVols) const
 
void calcEdgeVectors () const
 Calculate edge vectors. More...
 
bool checkDuplicateFaces (const label, const Map< label > &, label &nBaffleFaces, labelHashSet *) const
 Check if all points on face are shared with another face. More...
 
bool checkCommonOrder (const label, const Map< label > &, labelHashSet *) const
 Check that shared points are in consecutive order. More...
 
bool checkClosedBoundary (const vectorField &, const bool, const PackedBoolList &) const
 Check boundary for closedness. More...
 
bool checkClosedCells (const vectorField &faceAreas, const scalarField &cellVolumes, const bool report, labelHashSet *setPtr, labelHashSet *aspectSetPtr, const Vector< label > &meshD) const
 Check cells for closedness. More...
 
bool checkFaceAreas (const vectorField &faceAreas, const bool report, const bool detailedReport, labelHashSet *setPtr) const
 Check for negative face areas. More...
 
bool checkCellVolumes (const scalarField &vols, const bool report, const bool detailedReport, labelHashSet *setPtr) const
 Check for negative cell volumes. More...
 
bool checkFaceOrthogonality (const vectorField &fAreas, const vectorField &cellCtrs, const bool report, labelHashSet *setPtr) const
 Check for non-orthogonality. More...
 
bool checkFacePyramids (const pointField &points, const vectorField &ctrs, const bool report, const bool detailedReport, const scalar minPyrVol, labelHashSet *setPtr) const
 Check face pyramid volume. More...
 
bool checkFaceSkewness (const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs, const bool report, labelHashSet *setPtr) const
 Check face skewness. More...
 
bool checkFaceAngles (const pointField &points, const vectorField &faceAreas, const bool report, const scalar maxDeg, labelHashSet *setPtr) const
 Check face angles. More...
 
bool checkFaceFlatness (const pointField &points, const vectorField &faceCentres, const vectorField &faceAreas, const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
 Check face warpage. More...
 
bool checkConcaveCells (const vectorField &fAreas, const pointField &fCentres, const bool report, labelHashSet *setPtr) const
 Check for concave cells by the planes of faces. More...
 
 primitiveMesh ()
 Construct null. More...
 
- Static Protected Attributes inherited from regIOobject
static bool masterOnlyReading = false
 To flag master-only reading of objects. More...
 
- Static Protected Attributes inherited from primitiveMesh
static scalar closedThreshold_
 Static data to control mesh checking. More...
 
static scalar aspectThreshold_
 Aspect ratio warning threshold. More...
 
static scalar nonOrthThreshold_
 Non-orthogonality warning threshold in deg. More...
 
static scalar skewThreshold_
 Skewness warning threshold. More...
 
static scalar planarCosAngle_ = 1.0e-6
 Threshold where faces are considered coplanar. More...
 

Detailed Description

Mesh consisting of general polyhedral cells.

Source files

Definition at line 74 of file polyMesh.H.

Member Typedef Documentation

◆ Mesh

typedef polyMesh Mesh

Definition at line 298 of file polyMesh.H.

◆ BoundaryMesh

Definition at line 299 of file polyMesh.H.

Member Enumeration Documentation

◆ 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

Enumerator
UNCHANGED 
POINTS_MOVED 
TOPO_CHANGE 
TOPO_PATCH_CHANGE 

Definition at line 88 of file polyMesh.H.

◆ cellDecomposition

Enumeration defining the decomposition of the cell for.

inside/outside test

Enumerator
FACE_PLANES 
FACE_CENTRE_TRIS 
FACE_DIAG_TRIS 
CELL_TETS 

Definition at line 98 of file polyMesh.H.

Constructor & Destructor Documentation

◆ polyMesh() [1/6]

polyMesh ( const polyMesh )
private

Disallow construct as copy.

◆ polyMesh() [2/6]

polyMesh ( const IOobject io)
explicit

◆ polyMesh() [3/6]

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 from IOobject or from components.

Boundary is added using addPatches() member function

Definition at line 322 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), Foam::min(), and List::size().

Here is the call graph for this function:

◆ polyMesh() [4/6]

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 474 of file polyMesh.C.

References Foam::abort(), cells, Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), Foam::min(), and List::size().

Here is the call graph for this function:

◆ polyMesh() [5/6]

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() [6/6]

polyMesh ( const IOobject io,
const Xfer< pointField > &  points,
const cellShapeList shapes,
const faceListList boundaryFaces,
const wordList boundaryPatchNames,
const PtrList< dictionary > &  boundaryDicts,
const word defaultBoundaryPatchName,
const word defaultBoundaryPatchType,
const bool  syncPar = true 
)

Construct from cell shapes with patch information in dictionary.

format.

Definition at line 678 of file polyMeshFromShapeMesh.C.

References cells, Foam::polyMeshGenChecks::checkMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, Foam::Info, Foam::name(), Foam::compressible::New(), Foam::reduce(), dictionary::set(), List::size(), Foam::type(), and WarningInFunction.

Here is the call graph for this function:

◆ ~polyMesh()

~polyMesh ( )
virtual

Destructor.

Definition at line 744 of file polyMesh.C.

Member Function Documentation

◆ operator=()

void operator= ( const polyMesh )
private

Disallow default bitwise assignment.

◆ initMesh() [1/2]

void initMesh ( )
private

◆ initMesh() [2/2]

void initMesh ( cellList c)
private

Initialise the polyMesh from the given set of cells.

Definition at line 108 of file polyMeshInitMesh.C.

References Foam::constant::universal::c, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::name(), nPoints, primitiveMesh::reset(), and List::setSize().

Here is the call graph for this function:

◆ calcDirections()

void calcDirections ( ) const
private

Calculate the valid directions in the mesh from the boundaries.

Definition at line 52 of file polyMesh.C.

References polyMesh::boundaryMesh(), wedgePolyPatch::centreNormal(), Foam::cmptMag(), Foam::e, primitiveMesh::faceAreas(), forAll, polyMesh::geometricD_, Foam::mag(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, patchi, Foam::reduce(), HashTable< regIOobject * >::size(), polyMesh::solutionD_, Foam::sum(), and Vector< scalar >::zero.

Referenced by polyMesh::polyMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcCellShapes()

void calcCellShapes ( ) const
private

Calculate the cell shapes from the primitive.

polyhedral information

◆ cellShapePointCells()

Foam::labelListList cellShapePointCells ( const cellShapeList c) const
private

Definition at line 37 of file polyMeshFromShapeMesh.C.

References DynamicList::append(), Foam::constant::universal::c, forAll, points, List::size(), and List::transfer().

Here is the call graph for this function:

◆ facePatchFaceCells()

Foam::labelList facePatchFaceCells ( const faceList patchFaces,
const labelListList pointCells,
const faceListList cellsFaceShapes,
const label  patchID 
) const
private

Definition at line 74 of file polyMeshFromShapeMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, found, and patchFaces().

Here is the call graph for this function:

◆ setTopology()

void setTopology ( const cellShapeList cellsAsShapes,
const faceListList boundaryFaces,
const wordList boundaryPatchNames,
labelList patchSizes,
labelList patchStarts,
label defaultPatchStart,
label nFaces,
cellList cells 
)
private

Set faces_, calculate cells and patchStarts.

Definition at line 132 of file polyMeshFromShapeMesh.C.

References Foam::abort(), cells, Foam::FatalError, FatalErrorInFunction, forAll, found, patchFaces(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ checkFaceOrthogonality() [1/2]

bool checkFaceOrthogonality ( const vectorField fAreas,
const vectorField cellCtrs,
const bool  report,
const bool  detailedReport,
labelHashSet setPtr 
) const
private

Check non-orthogonality.

Definition at line 34 of file polyMeshCheck.C.

References Foam::acos(), Foam::cos(), Foam::degToRad(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), Foam::radToDeg(), Foam::reduce(), and WarningInFunction.

Here is the call graph for this function:

◆ checkFaceSkewness() [1/2]

bool checkFaceSkewness ( const pointField points,
const vectorField fCtrs,
const vectorField fAreas,
const vectorField cellCtrs,
const bool  report,
const bool  detailedReport,
labelHashSet setPtr 
) const
private

Check face skewness.

Definition at line 173 of file polyMeshCheck.C.

References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), points, Foam::reduce(), Foam::skew(), and WarningInFunction.

Here is the call graph for this function:

◆ checkEdgeAlignment() [1/2]

bool checkEdgeAlignment ( const pointField p,
const bool  report,
const Vector< label > &  directions,
labelHashSet setPtr 
) const
private

◆ checkCellDeterminant() [1/2]

bool checkCellDeterminant ( const vectorField faceAreas,
const bool  report,
labelHashSet setPtr,
const Vector< label > &  meshD 
) const
private

◆ checkFaceWeight() [1/2]

bool checkFaceWeight ( const vectorField fCtrs,
const vectorField fAreas,
const vectorField cellCtrs,
const bool  report,
const scalar  minWeight,
labelHashSet setPtr 
) const
private

Definition at line 498 of file polyMeshCheck.C.

References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::min(), and Foam::reduce().

Here is the call graph for this function:

◆ checkVolRatio() [1/2]

bool checkVolRatio ( const scalarField cellVols,
const bool  report,
const scalar  minRatio,
labelHashSet setPtr 
) const
private

Definition at line 595 of file polyMeshCheck.C.

References cellVols, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::min(), and Foam::reduce().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "polyMesh"  )

Runtime type information.

◆ dbDir()

const Foam::fileName & dbDir ( ) const
virtual

Override the objectRegistry dbDir for a single-region case.

Reimplemented from objectRegistry.

Definition at line 753 of file polyMesh.C.

References objectRegistry::dbDir().

Here is the call graph for this function:

◆ meshDir()

Foam::fileName meshDir ( ) const

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

Definition at line 766 of file polyMesh.C.

Referenced by displacementMotionSolver::displacementMotionSolver(), main(), displacementMotionSolver::points0IO(), meshReader::polyBoundaryPatches(), and polyMesh::polyMesh().

Here is the caller graph for this function:

◆ pointsInstance()

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 772 of file polyMesh.C.

Referenced by timeVaryingMappedFixedValuePointPatchField< Type >::checkTable(), fvMesh::delta(), main(), fvMesh::makeC(), fvMesh::makeCf(), fvMesh::makeMagSf(), and fvMesh::makeSf().

Here is the caller graph for this function:

◆ facesInstance()

const Foam::fileName & facesInstance ( ) const

◆ setInstance()

void setInstance ( const fileName inst)

◆ points()

const Foam::pointField & points ( ) const
virtual

Return raw points.

Implements primitiveMesh.

Definition at line 979 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by layerAdditionRemoval::addCellLayer(), autoLayerDriver::addLayers(), polyTopoChange::addMesh(), twoDPointCorrector::calcAddressing(), meshToMesh0::calcAddressing(), volPointInterpolation::calcBoundaryAddressing(), treeDataCell::calcCellBb(), polyDualMesh::calcFeatures(), blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), attachDetach::calcPointMatchMap(), meshToMesh::calcProcMap(), faceHeatShading::calculate(), faceShading::calculate(), medialAxisMeshMover::calculateDisplacement(), meshRefinement::calculateEdgeWeights(), polyTopoChange::changeMesh(), layerAdditionRemoval::changeTopology(), blockMesh::checkBlockMesh(), pointZone::checkParallelSync(), timeVaryingMappedFixedValuePointPatchField< Type >::checkTable(), nearestToPoint::combine(), boxToPoint::combine(), regionToFace::combine(), surfaceToPoint::combine(), Foam::createFIRESelections(), sampledCuttingPlane::createGeometry(), distanceSurface::createGeometry(), geomCellLooper::cut(), geomCellLooper::cutEdge(), meshToMesh::distributeCells(), extractSurface(), faceCoupleInfo::faceCoupleInfo(), mappedPatchBase::facePoint(), tetIndices::faceTri(), localPointRegion::findDuplicateFaces(), hexRef8::getLevel0EdgeLength(), autoLayerDriver::handleWarpedFaces(), volPointInterpolation::interpolateDimensionedInternalField(), cellCuts::loopAnchorConsistent(), main(), volPointInterpolation::makeBoundaryWeights(), volPointInterpolation::makeInternalWeights(), meshRefinement::makePatch(), meshToMeshMethod::maskCells(), meshToMesh::maskCells(), polyMeshAdder::mergePrimitives(), meshCentre(), meshTriangulation::meshTriangulation(), movingConeTopoFvMesh::movingConeTopoFvMesh(), treeDataCell::findIntersectOp::operator()(), tetOverlapVolume::overlappingCells(), partTetMesh::partTetMesh(), fvMeshDistribute::printMeshInfo(), boundaryMesh::read(), cuttingPlane::reCut(), polyTopoChange::resetZones(), fvMeshDistribute::sendMesh(), motionSmootherAlgo::setDisplacement(), boundaryMesh::setFeatureEdges(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), testEdgeSync(), testPackedList(), testPointSync(), testSparseData(), meshRefinement::testSyncPointList(), tetIndices::tet(), medialAxisMeshMover::update(), pointEdgePoint::updateEdge(), removePoints::updateMesh(), displacementMotionSolver::updateMesh(), pointEdgePoint::updatePoint(), velocityDisplacementMotionSolver::velocityDisplacementMotionSolver(), vtkTopo::vtkTopo(), wallLayerCells::wallLayerCells(), meshToMeshMethod::writeConnectivity(), pointSet::writeDebug(), externalCoupledFunctionObject::writeGeometry(), and writeVTK().

Here is the call graph for this function:

◆ upToDatePoints()

bool upToDatePoints ( const regIOobject io) const
virtual

Return true if io is up-to-date with points.

Definition at line 992 of file polyMesh.C.

References regIOobject::upToDate().

Here is the call graph for this function:

◆ setUpToDatePoints()

void setUpToDatePoints ( regIOobject io) const
virtual

Set io to be up-to-date with points.

Definition at line 998 of file polyMesh.C.

References regIOobject::eventNo().

Here is the call graph for this function:

◆ faces()

const Foam::faceList & faces ( ) const
virtual

Return raw faces.

Implements primitiveMesh.

Definition at line 1004 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by layerAdditionRemoval::addCellLayer(), meshCutAndRemove::addEdgeCutsToFace(), meshCutter::addEdgeCutsToFace(), autoLayerDriver::addLayers(), polyTopoChange::addMesh(), cellCuts::calcAnchors(), treeDataCell::calcCellBb(), cellCuts::calcFaceCuts(), polyDualMesh::calcFeatures(), blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), attachDetach::calcPointMatchMap(), meshToMesh::calcProcMap(), changePatchID(), layerAdditionRemoval::changeTopology(), blockMesh::checkBlockMesh(), primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceFlatness(), primitiveMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFacePyramids(), primitiveMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkTriangleTwist(), cellToPoint::combine(), regionToFace::combine(), faceToPoint::combine(), pointToCell::combine(), pointToFace::combine(), inversePointDistanceDiffusivity::correct(), cellCuts::countFaceCuts(), Foam::createFIRESelections(), wallBoundedParticle::currentEdge(), meshToMesh::distributeCells(), dynamicRefineFvMesh::dynamicRefineFvMesh(), extractSurface(), meshCutter::faceCells(), faceCoupleInfo::faceCoupleInfo(), mappedPatchBase::facePoint(), tetIndices::faceTri(), tetIndices::faceTriIs(), localPointRegion::findDuplicateFaces(), detectBoundaryLayers::findHairsForFace(), sampledSet::findNearFace(), insertDuplicateMerge(), hexMatcher::isA(), prismMatcher::isA(), pyrMatcher::isA(), tetMatcher::isA(), tetWedgeMatcher::isA(), wedgeMatcher::isA(), cellCuts::loopFace(), main(), meshRefinement::makePatch(), meshToMeshMethod::maskCells(), meshToMesh::maskCells(), degenerateMatcher::match(), pyrMatcher::matches(), tetMatcher::matches(), tetWedgeMatcher::matches(), wedgeMatcher::matches(), hexMatcher::matches(), prismMatcher::matches(), polyMeshAdder::mergePrimitives(), meshTriangulation::meshTriangulation(), meshCutter::modFace(), multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(), tetIndices::oldFaceTri(), tetIndices::oldTet(), treeDataCell::findIntersectOp::operator()(), partTetMesh::partTetMesh(), wallBoundedStreamLine::read(), layerAdditionRemoval::removeCellLayer(), reorderMesh(), fvMeshDistribute::sendMesh(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), solidBodyMotionFvMesh::solidBodyMotionFvMesh(), testSparseData(), tetIndices::tet(), tetIndices::tetIndices(), particle< Type >::tetNeighbour(), tetDecomposer::triIndex(), autoLayerDriver::truncateDisplacement(), sampledTriSurfaceMesh::update(), directionInfo::updateCell(), removePoints::updateMesh(), vtkTopo::vtkTopo(), wallLayerCells::wallLayerCells(), meshToMeshMethod::writeConnectivity(), Foam::writeFaceSet(), externalCoupledFunctionObject::writeGeometry(), and writeVTK().

Here is the call graph for this function:

◆ faceOwner()

const Foam::labelList & faceOwner ( ) const
virtual

Return face owner.

Implements primitiveMesh.

Definition at line 1017 of file polyMesh.C.

Referenced by layerAdditionRemoval::addCellLayer(), polyTopoChange::addMesh(), polyTopoChange::calcCellInflationMaps(), cellCuts::calcCellLoops(), CFCCellToCellStencil::calcCellStencil(), CFCFaceToCellStencil::calcCellStencil(), polyDualMesh::calcFeatures(), blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), edgeCollapser::calcTargetFaceSizes(), autoLayerDriver::calculateLayerThickness(), changePatchID(), cellCuts::check(), primitiveMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceDotProduct(), primitiveMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFacePyramids(), primitiveMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceTwist(), primitiveMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkVolRatio(), badQualityToCell::combine(), pointToCell::combine(), faceToCell::combine(), cellToFace::combine(), cellDistFuncs::correctBoundaryFaceCells(), fvMeshDistribute::distribute(), meshToMesh::distributeCells(), dynamicRefineFvMesh::dynamicRefineFvMesh(), meshCutter::faceCells(), mappedPatchBase::facePoint(), sampledSet::getBoundaryCell(), sampledSet::getCell(), getFaceOrder(), getRegionFaceOrder(), autoLayerDriver::handleWarpedFaces(), insertDuplicateMerge(), cellToCellStencil::insertFaceCells(), cellToFaceStencil::insertFaceCells(), tetWedgeMatcher::isA(), wedgeMatcher::isA(), hexMatcher::isA(), prismMatcher::isA(), pyrMatcher::isA(), tetMatcher::isA(), main(), degenerateMatcher::match(), wedgeMatcher::matches(), tetWedgeMatcher::matches(), pyrMatcher::matches(), tetMatcher::matches(), hexMatcher::matches(), prismMatcher::matches(), polyMeshAdder::mergeFaceZones(), polyMeshAdder::mergePrimitives(), meshTriangulation::meshTriangulation(), directions::propagateDirection(), sampledSet::pushIn(), layerAdditionRemoval::removeCellLayer(), undoableMeshCutter::removeSplitFaces(), SloanRenumber::renumber(), reorderMesh(), fvMeshDistribute::sendMesh(), MRFZone::setMRFFaces(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), fvMeshDistribute::subsetBoundaryData(), tetIndices::tetIndices(), particle< Type >::tetNeighbour(), meshRefinement::updateIntersections(), regionSizeDistribution::write(), and writeVTK().

◆ faceNeighbour()

const Foam::labelList & faceNeighbour ( ) const
virtual

Return face neighbour.

Implements primitiveMesh.

Definition at line 1023 of file polyMesh.C.

Referenced by layerAdditionRemoval::addCellLayer(), polyTopoChange::addMesh(), polyTopoChange::calcCellInflationMaps(), cellCuts::calcCellLoops(), CFCFaceToCellStencil::calcCellStencil(), CFCCellToCellStencil::calcCellStencil(), blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), edgeCollapser::calcTargetFaceSizes(), cellCuts::check(), primitiveMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceDotProduct(), primitiveMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFacePyramids(), primitiveMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceTwist(), primitiveMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkVolRatio(), badQualityToCell::combine(), pointToCell::combine(), faceToCell::combine(), cellToFace::combine(), meshToMesh::distributeCells(), dynamicRefineFvMesh::dynamicRefineFvMesh(), meshCutter::faceCells(), sampledSet::getCell(), getFaceOrder(), getRegionFaceOrder(), interRegionExplicitPorositySource::initialise(), cellToFaceStencil::insertFaceCells(), cellToCellStencil::insertFaceCells(), main(), polyMeshAdder::mergePrimitives(), layerAdditionRemoval::removeCellLayer(), undoableMeshCutter::removeSplitFaces(), SloanRenumber::renumber(), reorderMesh(), fvMeshDistribute::sendMesh(), MRFZone::setMRFFaces(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), meshRefinement::updateIntersections(), regionSizeDistribution::write(), and writeVTK().

Here is the caller graph for this function:

◆ oldPoints()

const Foam::pointField & oldPoints ( ) const
virtual

Return old points for mesh motion.

Implements primitiveMesh.

Definition at line 1029 of file polyMesh.C.

References Foam::endl(), and WarningInFunction.

Referenced by attachPolyTopoChanger::attach(), tetIndices::oldFaceTri(), and tetIndices::oldTet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ boundaryMesh()

const polyBoundaryMesh& boundaryMesh ( ) const
inline

Return boundary mesh.

Definition at line 421 of file polyMesh.H.

References polyMesh::boundary_.

Referenced by fvMeshAdder::add(), polyMeshAdder::add(), layerAdditionRemoval::addCellLayer(), autoLayerDriver::addLayers(), polyTopoChange::addMesh(), meshRefinement::addPatch(), linearValveLayersFvMesh::addZonesAndModifiers(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), cellToCellStencil::allCoupledFacesPatch(), cellToFaceStencil::allCoupledFacesPatch(), meshRefinement::appendPatch(), attachPolyTopoChanger::attach(), extrudePatchMesh::bottomPatch(), twoDPointCorrector::calcAddressing(), meshToMesh0::calcAddressing(), volPointInterpolation::calcBoundaryAddressing(), CFCFaceToCellStencil::calcCellStencil(), polyMesh::calcDirections(), addPatchCellLayer::calcExtrudeInfo(), polyDualMesh::calcFeatures(), attachDetach::calcPointMatchMap(), surfaceSlipDisplacementPointPatchVectorField::calcProjection(), surfaceDisplacementPointPatchVectorField::calcProjection(), wallShearStress::calcShearStress(), edgeCollapser::calcTargetFaceSizes(), faceHeatShading::calculate(), faceShading::calculate(), meshToMesh::calculate(), autoLayerDriver::calculateLayerThickness(), changeFrontBackPatches(), polyTopoChange::changeMesh(), blockMesh::checkBlockMesh(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), faceZone::checkParallelSync(), timeVaryingMappedFixedValuePointPatchField< Type >::checkTable(), polyMeshGeometry::checkVolRatio(), patchToFace::combine(), nbrToCell::combine(), cellToFace::combine(), polyMeshAdder::combinePatches(), polyTopoChange::compactAndReorder(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), patchInjection::correct(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), sampledCuttingPlane::createGeometry(), parFvFieldReconstructor::createPatchFaceMaps(), thermalBaffleFvPatchScalarField::createPatchMesh(), createReconstructMap(), curvatureSeparation::curvatureSeparation(), structuredDecomp::decompose(), determineCoupledFaces(), autoLayerDriver::determineSidePatches(), globalIndexAndTransform::determineTransforms(), directions::directions(), fvMeshDistribute::distribute(), meshToMesh::distributeCells(), autoLayerDriver::doLayers(), dumpCyclicMatch(), extractSurface(), extrudePatchMesh::extrudeMesh(), extrudePatchMesh::extrudePatchMesh(), FacePostProcessing< CloudType >::FacePostProcessing(), filterPatches(), findBaffles(), STARCD::findDefaultBoundary(), localPointRegion::findDuplicateFacePairs(), fvBoundaryMesh::findIndices(), meshCutter::getFaceInfo(), syncTools::getInternalOrCoupledFaces(), syncTools::getInternalOrMasterFaces(), syncTools::getMasterFaces(), cellDistFuncs::getPatchIDs(), patchWave::getValues(), injectionModelList::info(), thermalBaffleModel::init(), contactAngleForce::initialise(), directionalPressureGradientExplicitSource::initialise(), effectivenessHeatExchangerSource::initialise(), forces::initialiseBins(), globalMeshData::initProcAddr(), interpolationCellPatchConstrained< Type >::interpolate(), regionModel::interRegionAMI(), Foam::loadOrCreateMesh(), main(), polyTopoChange::makeMesh(), meshRefinement::makePatch(), Foam::MapConsistentSubMesh(), mappedPatchFieldBase< Type >::mappedField(), cellDistFuncs::maxPatchSize(), polyMeshAdder::mergePrimitives(), meshTriangulation::meshTriangulation(), KinematicParcel::move(), movingImmersedBoundary::movePoints(), regionModel::nbrCoupledPatchID(), nearestPatch(), regionCoupledBase::neighbPatch(), regionCoupledBase::neighbPatchID(), fvMeshTools::newMesh(), sampledTriSurfaceMesh::nonCoupledboundaryTree(), ParticleErosion< CloudType >::ParticleErosion(), sampledPatch::patchIDs(), boundaryMesh::patchify(), patchInjection::patchInjection(), patchInteractionDataList::patchInteractionDataList(), PatchPostProcessing< CloudType >::PatchPostProcessing(), patchWriter::patchWriter(), meshReader::polyBoundaryPatches(), polyTopoChange::polyTopoChange(), autoLayerDriver::printLayerData(), printMesh(), printMeshData(), procNeighbours(), wallShearStress::read(), nearWallFields::read(), boundaryMesh::read(), forces::read(), readProcAddressing(), ensightParts::recalculate(), fvMeshDistribute::receiveMesh(), redistributeAndWrite(), faceCoupleInfo::regionEdge(), layerAdditionRemoval::removeCellLayer(), fvMeshTools::removeEmptyPatches(), SloanRenumber::renumber(), reorderMesh(), fvMeshTools::reorderPatches(), sampledCuttingPlane::sampledCuttingPlane(), sampledIsoSurface::sampledIsoSurface(), mappedPatchFieldBase< Type >::sampleField(), mappedPatchBase::sampleMesh(), mappedPatchBase::samplePolyPatch(), fvMeshDistribute::sendMesh(), faceSource::setFaceZoneFaces(), MRFZone::setMRFFaces(), autoLayerDriver::setNumLayers(), canopySource::setPatchLanduse(), patchInjectionBase::setPositionAndCell(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), extrudePatchMesh::sidesPatch(), thermalBaffle::solveEnergy(), thermoSingleLayer::Srho(), cellDistFuncs::sumPatchSize(), regionCoupledBase::surfPtr(), mappedPatchBase::surfPtr(), syncPoints(), thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField(), extrudePatchMesh::topPatch(), fvMeshTools::trimPatches(), medialAxisMeshMover::update(), sampledPatch::update(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), thermalBaffleFvPatchScalarField::updateCoeffs(), sampledIsoSurface::updateGeometry(), patchInjectionBase::updateMesh(), perfectInterface::updateMesh(), attachDetach::updateMesh(), slidingInterface::updateMesh(), thermoSingleLayer::updateSurfaceTemperatures(), kinematicSingleLayer::updateSurfaceVelocities(), wallLayerCells::usesCoupledPatch(), cellToCellStencil::validBoundaryFaces(), cellToFaceStencil::validBoundaryFaces(), wallLayerCells::wallLayerCells(), thermalBaffleFvPatchScalarField::write(), domainDecomposition::writeDecomposition(), externalCoupledFunctionObject::writeGeometry(), autoLayerDriver::writeLayerData(), patchWriter::writePatchIDs(), and writeProcAddressing().

◆ bounds()

const boundBox& bounds ( ) const
inline

◆ geometricD()

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 784 of file polyMesh.C.

Referenced by main().

Here is the caller graph for this function:

◆ nGeometricD()

Foam::label nGeometricD ( ) const

Return the number of valid geometric dimensions in the mesh.

Definition at line 795 of file polyMesh.C.

References Foam::cmptSum().

Referenced by InjectionModel< CloudType >::InjectionModel(), and immersedBoundaryFvPatch::makeInvDirichletMatrices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solutionD()

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 801 of file polyMesh.C.

Referenced by InjectionModel< CloudType >::inject(), InjectionModel< CloudType >::injectSteadyState(), and fvMesh::validComponents().

Here is the caller graph for this function:

◆ nSolutionD()

Foam::label nSolutionD ( ) const

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

Definition at line 812 of file polyMesh.C.

References Foam::cmptSum().

Referenced by main(), and GradientDispersionRAS< CloudType >::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tetBasePtIs()

const Foam::labelList & tetBasePtIs ( ) const

◆ cellTree()

const Foam::indexedOctree< Foam::treeDataCell > & cellTree ( ) const

Return the cell search tree.

Definition at line 843 of file polyMesh.C.

References Foam::e, treeBoundBox::extend(), boundBox::max(), boundBox::min(), points, and rndGen().

Referenced by tetOverlapVolume::overlappingCells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pointZones() [1/2]

const pointZoneMesh& pointZones ( ) const
inline

◆ faceZones() [1/2]

const faceZoneMesh& faceZones ( ) const
inline

Return face zone mesh.

Definition at line 463 of file polyMesh.H.

References polyMesh::faceZones_.

Referenced by polyMeshAdder::add(), layerAdditionRemoval::addCellLayer(), surfaceZonesInfo::addFaceZone(), meshReader::addFaceZones(), surfaceZonesInfo::addFaceZonesToMesh(), autoLayerDriver::addLayers(), polyTopoChange::addMesh(), linearValveLayersFvMesh::addZonesAndModifiers(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), movingConeTopoFvMesh::addZonesAndModifiers(), polyTopoChange::calcFaceZonePointMap(), displacementInterpolationMotionSolver::calcInterpolation(), polyTopoChange::changeMesh(), changePatchID(), layerAdditionRemoval::changeTopology(), meshRefinement::checkCoupledFaceZones(), layerAdditionRemoval::checkDefinition(), zoneToFace::combine(), faceZoneToCell::combine(), polyTopoChange::compactAndReorder(), autoLayerDriver::doLayers(), autoSnapDriver::doSnap(), FacePostProcessing< CloudType >::FacePostProcessing(), faceZoneSet::faceZoneSet(), meshCutter::getFaceInfo(), directionalPressureGradientExplicitSource::initialise(), effectivenessHeatExchangerSource::initialise(), insertDuplicateMerge(), Foam::loadOrCreateMesh(), main(), polyTopoChange::makeMesh(), polyMeshAdder::mergeFaceZones(), slidingInterface::modifyMotionPoints(), movingConeTopoFvMesh::movingConeTopoFvMesh(), fvMeshTools::newMesh(), polyTopoChange::polyTopoChange(), FacePostProcessing< CloudType >::postFace(), printAllSets(), fvMeshDistribute::printMeshInfo(), fvMeshDistribute::receiveMesh(), layerAdditionRemoval::removeCellLayer(), removeSet(), reorderMesh(), polyTopoChange::resetZones(), fvMeshDistribute::sendMesh(), faceSource::setFaceZoneFaces(), perfectInterface::setRefinement(), perfectInterface::updateMesh(), attachDetach::updateMesh(), slidingInterface::updateMesh(), and domainDecomposition::writeDecomposition().

◆ cellZones() [1/2]

const cellZoneMesh& cellZones ( ) const
inline

◆ globalData()

const Foam::globalMeshData & globalData ( ) const

◆ comm() [1/2]

Foam::label & comm ( ) const

Return communicator used for parallel communication.

Definition at line 1161 of file polyMesh.C.

Referenced by fvMesh::comm(), and processorPolyPatch::comm().

Here is the caller graph for this function:

◆ comm() [2/2]

label& comm ( )

Return communicator used for parallel communication.

◆ thisDb()

const objectRegistry& thisDb ( ) const
inline

Return the object registry.

Definition at line 484 of file polyMesh.H.

Referenced by regionCoupledBaseGAMGInterface::nbrLduInterface(), and fvMesh::thisDb().

Here is the caller graph for this function:

◆ moving() [1/2]

bool moving ( ) const
inline

◆ moving() [2/2]

bool moving ( const bool  m)
inline

Set the mesh to be moving.

Definition at line 499 of file polyMesh.H.

References polyMesh::moving_.

◆ topoChanging() [1/2]

bool topoChanging ( ) const
inline

Is mesh topology changing.

Definition at line 507 of file polyMesh.H.

References polyMesh::topoChanging_.

Referenced by polyTopoChange::changeMesh(), polyMesh::changing(), and main().

Here is the caller graph for this function:

◆ topoChanging() [2/2]

bool topoChanging ( const bool  c)
inline

Set the mesh topology to be changing.

Definition at line 513 of file polyMesh.H.

References Foam::constant::universal::c, and polyMesh::topoChanging_.

◆ changing()

bool changing ( ) const
inline

Is mesh changing (topology changing and/or moving)

Definition at line 521 of file polyMesh.H.

References polyMesh::moving(), and polyMesh::topoChanging().

Referenced by epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), pyrolysisModelCollection::evolve(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ movePoints()

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

Move points, returns volumes swept by faces in motion.

Reimplemented in fvMesh.

Definition at line 1048 of file polyMesh.C.

References IOobject::AUTO_WRITE, Foam::endl(), Foam::Info, primitiveMesh::movePoints(), Foam::nl, timeIndex, and regIOobject::write().

Referenced by attachPolyTopoChanger::attach(), polyMeshFilter::filterEdges(), polyMeshFilter::filterFaces(), and fvMesh::movePoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetMotion()

void resetMotion ( ) const

Reset motion.

Definition at line 1135 of file polyMesh.C.

Referenced by polyMeshAdder::add().

Here is the caller graph for this function:

◆ pointZones() [2/2]

pointZoneMesh& pointZones ( )
inline

Return non-const access to the pointZones.

Definition at line 536 of file polyMesh.H.

References polyMesh::pointZones_.

◆ faceZones() [2/2]

faceZoneMesh& faceZones ( )
inline

Return non-const access to the faceZones.

Definition at line 542 of file polyMesh.H.

References polyMesh::faceZones_.

◆ cellZones() [2/2]

cellZoneMesh& cellZones ( )
inline

Return non-const access to the cellZones.

Definition at line 548 of file polyMesh.H.

References polyMesh::cellZones_.

◆ addPatches()

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

Add boundary patches.

Definition at line 878 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and p.

Referenced by attachPolyTopoChanger::attach(), meshToMesh::calculate(), changeFrontBackPatches(), filterPatches(), main(), meshReader::mesh(), and domainDecomposition::writeDecomposition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addZones()

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

◆ readUpdate()

Foam::polyMesh::readUpdateState readUpdate ( )
virtual

Update the mesh based on the mesh files saved in.

time directories

Reimplemented in fvMesh.

Definition at line 66 of file polyMeshIO.C.

References cells, Foam::endl(), Foam::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, IOobject::MUST_READ, Foam::name(), polyBoundaryMesh::names(), Foam::nl, IOobject::NO_WRITE, IOobject::objectPath(), polyMesh::POINTS_MOVED, IOobject::READ_IF_PRESENT, PtrList::size(), polyMesh::TOPO_CHANGE, polyMesh::TOPO_PATCH_CHANGE, polyBoundaryMesh::types(), polyMesh::UNCHANGED, and WarningInFunction.

Referenced by fvMesh::readUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
virtual

◆ removeBoundary()

void removeBoundary ( )

Remove boundary patches.

Definition at line 36 of file polyMeshClear.C.

References polyMesh::boundary_, PtrList::clear(), polyMesh::clearOut(), Foam::endl(), Foam::Info, and PtrList::setSize().

Referenced by attachPolyTopoChanger::attach(), changeFrontBackPatches(), filterPatches(), main(), and fvMesh::removeFvBoundary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetPrimitives()

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

Definition at line 642 of file polyMesh.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), Foam::min(), Foam::notNull(), nPoints, points, Foam::returnReduce(), List::size(), and timeName.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearGeom()

void clearGeom ( )

Clear geometry.

Definition at line 55 of file polyMeshClear.C.

References primitiveMesh::clearGeom(), Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ clearAddressing()

void clearAddressing ( const bool  isMeshUpdate = false)

Clear addressing.

Definition at line 99 of file polyMeshClear.C.

References primitiveMesh::clearAddressing(), meshObject::clearUpto(), Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ clearOut()

void clearOut ( )

Clear all geometry and addressing unnecessary for CFD.

Definition at line 173 of file polyMeshClear.C.

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

Here is the caller graph for this function:

◆ clearPrimitives()

void clearPrimitives ( )

Clear primitive data (points, faces and cells)

Definition at line 160 of file polyMeshClear.C.

◆ clearAdditionalGeom()

void clearAdditionalGeom ( )

Clear geometry not used for CFD (cellTree, tetBasePtIs)

Definition at line 83 of file polyMeshClear.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ clearCellTree()

void clearCellTree ( )

Clear cell tree data.

Definition at line 180 of file polyMeshClear.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ removeFiles() [1/2]

void removeFiles ( const fileName instanceDir) const

Remove all files from mesh instance.

Definition at line 1173 of file polyMesh.C.

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

Referenced by main(), and meshReader::writeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFiles() [2/2]

void removeFiles ( ) const

Remove all files from mesh instance()

Definition at line 1197 of file polyMesh.C.

◆ checkFaceOrthogonality() [2/2]

bool checkFaceOrthogonality ( const bool  report = false,
labelHashSet setPtr = NULL 
) const
virtual

Check non-orthogonality.

Could override checkClosedBoundary to not look at (collocated!) coupled.

faces bool Foam::polyMesh::checkClosedBoundary(const bool report) const { return primitiveMesh::checkClosedBoundary ( faceAreas(), report, syncTools::getInternalOrCollocatedCoupledFaces(*this) ); }

Reimplemented from primitiveMesh.

Definition at line 697 of file polyMeshCheck.C.

◆ checkFaceSkewness() [2/2]

bool checkFaceSkewness ( const bool  report = false,
labelHashSet setPtr = NULL 
) const
virtual

Check face skewness.

Reimplemented from primitiveMesh.

Definition at line 714 of file polyMeshCheck.C.

References Foam::polyMeshGenChecks::checkFaceSkewness(), and points.

Here is the call graph for this function:

◆ checkEdgeAlignment() [2/2]

bool checkEdgeAlignment ( const bool  report,
const Vector< label > &  directions,
labelHashSet setPtr 
) const
virtual

Check edge alignment for 1D/2D cases.

Definition at line 733 of file polyMeshCheck.C.

References points.

◆ checkCellDeterminant() [2/2]

bool checkCellDeterminant ( const bool  report,
labelHashSet setPtr 
) const
virtual

Definition at line 750 of file polyMeshCheck.C.

◆ checkMeshMotion()

bool checkMeshMotion ( const pointField newPoints,
const bool  report = false,
const bool  detailedReport = false 
) const
virtual

Check mesh motion for correctness given motion points.

Definition at line 796 of file polyMeshCheck.C.

References cellVols, Foam::polyMeshGenChecks::checkCellVolumes(), Foam::polyMeshGenChecks::checkFaceAreas(), Foam::polyMeshGenChecks::checkFacePyramids(), Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ checkFaceWeight() [2/2]

bool checkFaceWeight ( const bool  report,
const scalar  minWeight = 0.05,
labelHashSet setPtr = NULL 
) const
virtual

Check for face weights.

Definition at line 766 of file polyMeshCheck.C.

◆ checkVolRatio() [2/2]

bool checkVolRatio ( const bool  report,
const scalar  minRatio = 0.01,
labelHashSet setPtr = NULL 
) const
virtual

Check for neighbouring cell volumes.

Definition at line 785 of file polyMeshCheck.C.

◆ findCellFacePt()

void findCellFacePt ( const point p,
label celli,
label tetFacei,
label tetPti 
) const

Find the cell, tetFacei and tetPti for point p.

Definition at line 1204 of file polyMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, indexedOctree::findIndices(), indexedOctree::findNearest(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::index(), p, indexedOctree::shapes(), and Foam::sqr().

Referenced by patchInjectionBase::setPositionAndCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findTetFacePt()

void findTetFacePt ( const label  celli,
const point p,
label tetFacei,
label tetPti 
) const

Find the tetFacei and tetPti for point p in celli.

tetFaceI and tetPtI are set to -1 if not found

Definition at line 1276 of file polyMesh.C.

References tetIndices::face(), polyMeshTetDecomposition::findTet(), mesh, p, and tetIndices::tetPt().

Referenced by sampledSet::pushIn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pointInCell()

bool pointInCell ( const point p,
label  celli,
const cellDecomposition  decompMode = CELL_TETS 
) const

Test if point p is in the celli.

Definition at line 1292 of file polyMesh.C.

References cells, triangle::centre(), f(), tetIndices::faceTri(), forAll, triangle::normal(), p, primitiveMesh::pointInCell(), points, List::size(), and polyMeshTetDecomposition::triangleTetIndices().

Referenced by meshToMesh0::cellAddresses().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findCell()

Foam::label findCell ( const point p,
const cellDecomposition  decompMode = CELL_TETS 
) const

Find cell enclosing this location and return index.

If not found -1 is returned

Definition at line 1411 of file polyMesh.C.

References p, and UPstream::parRun().

Referenced by refinementParameters::findCells(), meshRefinement::findRegion(), sampledSet::getTrackingPoint(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ points_

pointIOField points_
private

◆ faces_

faceCompactIOList faces_
private

Faces.

Definition at line 121 of file polyMesh.H.

Referenced by polyMesh::setInstance().

◆ owner_

labelIOList owner_
private

Face owner.

Definition at line 124 of file polyMesh.H.

Referenced by polyMesh::initMesh(), polyMesh::polyMesh(), and polyMesh::setInstance().

◆ neighbour_

labelIOList neighbour_
private

Face neighbour.

Definition at line 127 of file polyMesh.H.

Referenced by polyMesh::initMesh(), polyMesh::polyMesh(), and polyMesh::setInstance().

◆ clearedPrimitives_

bool clearedPrimitives_
private

Have the primitives been cleared.

Definition at line 130 of file polyMesh.H.

◆ boundary_

polyBoundaryMesh boundary_
mutableprivate

◆ bounds_

boundBox bounds_
private

Mesh bounding-box.

Created from points on construction, updated when the mesh moves

Definition at line 138 of file polyMesh.H.

Referenced by polyMesh::bounds().

◆ comm_

label comm_
private

Communicator used for parallel communication.

Definition at line 141 of file polyMesh.H.

◆ geometricD_

Vector<label> geometricD_
mutableprivate

Vector of non-constrained directions in mesh.

defined according to the presence of empty and wedge patches

Definition at line 145 of file polyMesh.H.

Referenced by polyMesh::calcDirections(), and polyMesh::updateMesh().

◆ solutionD_

Vector<label> solutionD_
mutableprivate

Vector of valid directions in mesh.

defined according to the presence of empty patches

Definition at line 149 of file polyMesh.H.

Referenced by polyMesh::calcDirections(), and polyMesh::updateMesh().

◆ tetBasePtIsPtr_

autoPtr<labelList> tetBasePtIsPtr_
mutableprivate

Base point for face decomposition into tets.

Definition at line 152 of file polyMesh.H.

Referenced by polyMesh::updateMesh().

◆ cellTreePtr_

autoPtr<indexedOctree<treeDataCell> > cellTreePtr_
mutableprivate

Search tree to allow spatial cell searching.

Definition at line 155 of file polyMesh.H.

Referenced by polyMesh::updateMesh().

◆ pointZones_

pointZoneMesh pointZones_
private

Point zones.

Definition at line 161 of file polyMesh.H.

Referenced by polyMesh::pointZones(), polyMesh::setInstance(), and polyMesh::updateMesh().

◆ faceZones_

faceZoneMesh faceZones_
private

Face zones.

Definition at line 164 of file polyMesh.H.

Referenced by polyMesh::faceZones(), polyMesh::setInstance(), and polyMesh::updateMesh().

◆ cellZones_

cellZoneMesh cellZones_
private

Cell zones.

Definition at line 167 of file polyMesh.H.

Referenced by polyMesh::cellZones(), polyMesh::setInstance(), and polyMesh::updateMesh().

◆ globalMeshDataPtr_

autoPtr<globalMeshData> globalMeshDataPtr_
mutableprivate

Parallel info.

Definition at line 171 of file polyMesh.H.

Referenced by polyMesh::updateMesh().

◆ moving_

bool moving_
private

Is the mesh moving.

Definition at line 177 of file polyMesh.H.

Referenced by polyMesh::moving().

◆ topoChanging_

bool topoChanging_
private

Is the mesh topology changing.

Definition at line 180 of file polyMesh.H.

Referenced by polyMesh::topoChanging().

◆ curMotionTimeIndex_

label curMotionTimeIndex_
mutableprivate

Current time index for mesh motion.

Definition at line 183 of file polyMesh.H.

◆ oldPointsPtr_

autoPtr<pointField> oldPointsPtr_
mutableprivate

Old points (for the last mesh motion)

Definition at line 186 of file polyMesh.H.

Referenced by polyMesh::updateMesh().

◆ defaultRegion

word defaultRegion = "region0"
static

◆ meshSubDir

word meshSubDir = "polyMesh"
static

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