Mesh consisting of general polyhedral cells. More...
#include <OpenFOAM/polyMesh.H>
Mesh consisting of general polyhedral cells.
Definition at line 70 of file polyMesh.H.
Public Types | |
enum | readUpdateState { UNCHANGED, POINTS_MOVED, TOPO_CHANGE, TOPO_PATCH_CHANGE } |
Enumeration defining the state of the mesh after a read update. More... | |
typedef polyMesh | Mesh |
typedef polyBoundaryMesh | BoundaryMesh |
Public Member Functions | |
TypeName ("polyMesh") | |
Runtime type information. | |
polyMesh (const IOobject &io) | |
Construct from IOobject. | |
polyMesh (const IOobject &io, const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< labelList > &owner, const Xfer< labelList > &neighbour, const bool syncPar=true) | |
Construct without boundary from components. | |
polyMesh (const IOobject &io, const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< cellList > &cells, const bool syncPar=true) | |
Construct without boundary with cells rather than owner/neighbour. | |
polyMesh (const IOobject &io, const Xfer< pointField > &points, const cellShapeList &shapes, const faceListList &boundaryFaces, const wordList &boundaryPatchNames, const wordList &boundaryPatchTypes, const word &defaultBoundaryPatchName, const word &defaultBoundaryPatchType, const wordList &boundaryPatchPhysicalTypes, const bool syncPar=true) | |
Construct from cell shapes. | |
virtual | ~polyMesh () |
virtual const fileName & | dbDir () const |
Override the objectRegistry dbDir for a single-region case. | |
fileName | meshDir () const |
Return the local mesh directory (dbDir()/meshSubDir) | |
const fileName & | pointsInstance () const |
Return the current instance directory for points. | |
const fileName & | facesInstance () const |
Return the current instance directory for faces. | |
void | setInstance (const fileName &) |
Set the instance for mesh files. | |
virtual const pointField & | points () const |
Return raw points. | |
virtual const faceList & | faces () const |
Return raw faces. | |
virtual const labelList & | faceOwner () const |
Return face owner. | |
virtual const labelList & | faceNeighbour () const |
Return face neighbour. | |
virtual const pointField & | oldPoints () const |
Return old points for mesh motion. | |
const polyBoundaryMesh & | boundaryMesh () const |
Return boundary mesh. | |
const boundBox & | bounds () const |
Return mesh bounding box. | |
const Vector< label > & | geometricD () const |
Return the vector of geometric directions in mesh. | |
label | nGeometricD () const |
Return the number of valid geometric dimensions in the mesh. | |
const Vector< label > & | solutionD () const |
Return the vector of solved-for directions in mesh. | |
label | nSolutionD () const |
Return the number of valid solved-for dimensions in the mesh. | |
const pointZoneMesh & | pointZones () const |
Return point zone mesh. | |
const faceZoneMesh & | faceZones () const |
Return face zone mesh. | |
const cellZoneMesh & | cellZones () const |
Return cell zone mesh. | |
const globalMeshData & | globalData () const |
Return parallel info. | |
const objectRegistry & | thisDb () const |
Return the object registry. | |
bool | moving () const |
Is mesh moving. | |
bool | moving (const bool m) |
Set the mesh to be moving. | |
bool | changing () const |
Is mesh changing (topology changing and/or moving) | |
bool | changing (const bool c) |
Set the mesh to be changing. | |
virtual tmp< scalarField > | movePoints (const pointField &) |
Move points, returns volumes swept by faces in motion. | |
void | resetMotion () const |
Reset motion. | |
pointZoneMesh & | pointZones () |
Return non-const access to the pointZones. | |
faceZoneMesh & | faceZones () |
Return non-const access to the faceZones. | |
cellZoneMesh & | cellZones () |
Return non-const access to the cellZones. | |
void | addPatches (const List< polyPatch * > &, const bool validBoundary=true) |
Add boundary patches. | |
void | addZones (const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz) |
Add mesh zones. | |
virtual readUpdateState | readUpdate () |
Update the mesh based on the mesh files saved in. | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update the mesh corresponding to given map. | |
void | removeBoundary () |
Remove boundary patches. | |
void | resetPrimitives (const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< labelList > &owner, const Xfer< labelList > &neighbour, const labelList &patchSizes, const labelList &patchStarts, const bool validBoundary=true) |
Reset mesh primitive data. Assumes all patch info correct. | |
void | clearGeom () |
Clear geometry. | |
void | clearAddressing () |
Clear addressing. | |
void | clearOut () |
Clear all geometry and addressing unnecessary for CFD. | |
void | clearPrimitives () |
Clear primitive data (points, faces and cells) | |
void | removeFiles (const fileName &instanceDir) const |
Remove all files from mesh instance. | |
void | removeFiles () const |
Remove all files from mesh instance() | |
![]() | |
TypeName ("objectRegistry") | |
Declare type name for this IOobject. | |
objectRegistry (const Time &db, const label nIoObjects=128) | |
Construct the time objectRegistry given an initial estimate. | |
objectRegistry (const IOobject &io, const label nIoObjects=128) | |
Construct a sub-registry given an IObject to describe the registry. | |
virtual | ~objectRegistry () |
const Time & | time () const |
Return time. | |
const objectRegistry & | parent () const |
Return the parent objectRegistry. | |
wordList | names () const |
Return the list of names of the IOobjects. | |
wordList | names (const word &className) const |
Return the list of names of the IOobjects of given class name. | |
template<class Type > | |
wordList | names () const |
Return the list of names of the IOobjects of given type. | |
const objectRegistry & | subRegistry (const word &name) const |
Lookup and return a const sub-objectRegistry. | |
template<class Type > | |
HashTable< const Type * > | lookupClass () const |
Lookup and return all the object of the given Type. | |
template<class Type > | |
bool | foundObject (const word &name) const |
Is the named Type. | |
template<class Type > | |
const Type & | lookupObject (const word &name) const |
Lookup and return the object of the given Type. | |
label | getEvent () const |
Return new event number. | |
virtual void | rename (const word &newName) |
Rename. | |
bool | checkIn (regIOobject &) const |
Add an regIOobject to registry. | |
bool | checkOut (regIOobject &) const |
Remove an regIOobject from registry. | |
virtual bool | modified () const |
Return true if any of the object's files have been modified. | |
void | readModifiedObjects () |
Read the objects that have been modified. | |
virtual bool | readIfModified () |
Read object if modified. | |
virtual bool | writeData (Ostream &) const |
writeData function required by regIOobject but not used | |
virtual bool | writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const |
Write the objects. | |
![]() | |
TypeName ("regIOobject") | |
Runtime type information. | |
regIOobject (const IOobject &, const bool isTime=false) | |
Construct from IOobject. Optional flag for if IOobject is the. | |
regIOobject (const regIOobject &) | |
Construct as copy. | |
regIOobject (const regIOobject &, bool registerCopy) | |
Construct as copy, and transferring registry registration to copy. | |
virtual | ~regIOobject () |
bool | checkIn () |
Add object to registry. | |
bool | checkOut () |
Remove object from registry. | |
bool | ownedByRegistry () const |
Is this object owned by the registry? | |
void | store () |
Transfer ownership of this object to its registry. | |
void | release () |
Release ownership of this object from its registry. | |
label | eventNo () const |
Event number at last update. | |
label & | eventNo () |
Event number at last update. | |
bool | upToDate (const word &) const |
Am I uptodate with respect to other regIOobjects. | |
bool | upToDate (const word &, const word &) const |
bool | upToDate (const word &, const word &, const word &) const |
bool | upToDate (const word &, const word &, const word &, const word &) const |
void | setUpToDate () |
Flag me as up to date. | |
Istream & | readStream (const word &) |
Return Istream and check object type against that given. | |
void | close () |
Close Istream. | |
virtual bool | readData (Istream &) |
Virtual readData function. | |
virtual bool | read () |
Read object. | |
virtual bool | write () const |
Write using setting from DB. | |
void | operator= (const IOobject &) |
![]() | |
TypeName ("IOobject") | |
Runtime type information. | |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, registry, io options. | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, local, registry, io options. | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from path, registry, io options. | |
Foam::autoPtr< IOobject > | clone () const |
Clone. | |
virtual | ~IOobject () |
const objectRegistry & | db () const |
Return the local objectRegistry. | |
const word & | name () const |
Return name. | |
const word & | headerClassName () const |
Return name of the class name read from header. | |
string & | note () |
Return non-constant access to the optional note. | |
const string & | note () const |
Return the optional note. | |
bool | registerObject () const |
Register object created from this IOobject with registry if true. | |
readOption | readOpt () const |
readOption & | readOpt () |
writeOption | writeOpt () const |
writeOption & | writeOpt () |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const |
fileName & | instance () |
const fileName & | local () const |
fileName | path () const |
Return complete path. | |
fileName | path (const word &instance, const fileName &local="") const |
Return complete path with alternative instance and local. | |
fileName | objectPath () const |
Return complete path + object name. | |
fileName | filePath () const |
Return complete path + object name if the file exists. | |
bool | readHeader (Istream &) |
Read header. | |
bool | headerOk () |
Read and check header info. | |
bool | writeHeader (Ostream &) const |
Write header. | |
bool | good () const |
bool | bad () const |
InfoProxy< IOobject > | info () const |
Return info proxy. | |
![]() | |
bool | set (const word &, const regIOobject *&newElmt) |
Assign a new hashedEntry, overwriting existing entries. | |
HashTable (const label size=128) | |
Construct given initial table size. | |
HashTable (Istream &, const label size=128) | |
Construct from Istream. | |
HashTable (const HashTable< regIOobject *, word, string::hash > &) | |
Construct as copy. | |
HashTable (const Xfer< HashTable< regIOobject *, word, string::hash > > &) | |
Construct by transferring the parameter contents. | |
~HashTable () | |
label | size () const |
Return number of elements in table. | |
bool | empty () const |
Return true if the hash table is empty. | |
bool | found (const word &) const |
Return true if hashedEntry is found in table. | |
iterator | find (const word &) |
Find and return an iterator set at the hashedEntry. | |
const_iterator | find (const word &) const |
Find and return an const_iterator set at the hashedEntry. | |
List< word > | toc () const |
Return the table of contents. | |
List< word > | sortedToc () const |
Return the table of contents as a sorted list. | |
Ostream & | printInfo (Ostream &) const |
Print information. | |
bool | insert (const word &, const regIOobject *&newElmt) |
Insert a new hashedEntry. | |
bool | erase (const iterator &) |
Erase an hashedEntry specified by given iterator. | |
bool | erase (const word &) |
Erase an hashedEntry specified by given key if in table. | |
label | erase (const UList< word > &) |
Remove entries given by the listed keys from this HashTable. | |
label | erase (const HashTable< AnyType, word, AnyHash > &) |
Remove entries given by the given keys from this HashTable. | |
void | resize (const label newSize) |
Resize the hash table for efficiency. | |
void | clear () |
Clear all entries from table. | |
void | clearStorage () |
Clear the table entries and the table itself. | |
void | transfer (HashTable< regIOobject *, word, string::hash > &) |
Transfer the contents of the argument table into this table. | |
Xfer< HashTable< regIOobject *, word, string::hash > > | xfer () |
Transfer contents to the Xfer container. | |
regIOobject *& | operator[] (const word &) |
Find and return an hashedEntry. | |
const regIOobject *& | operator[] (const word &) const |
Find and return an hashedEntry. | |
regIOobject *& | operator() (const word &) |
Find and return an hashedEntry, create it null if not present. | |
void | operator= (const HashTable< regIOobject *, word, string::hash > &) |
Assignment. | |
bool | operator== (const HashTable< regIOobject *, word, string::hash > &) const |
Equality. Two hash tables are equal if all contents of first are. | |
bool | operator!= (const HashTable< regIOobject *, word, string::hash > &) const |
The opposite of the equality operation. Takes linear time. | |
iterator | begin () |
iterator set to the begining of the HashTable | |
const_iterator | begin () const |
const_iterator set to the beginning of the HashTable | |
const iterator & | end () |
iterator set to beyond the end of the HashTable | |
const const_iterator & | end () const |
const_iterator set to beyond the end of the HashTable | |
const_iterator | cbegin () const |
const_iterator set to the beginning of the HashTable | |
const const_iterator & | cend () const |
const_iterator set to beyond the end of the HashTable | |
![]() | |
ClassName ("primitiveMesh") | |
primitiveMesh (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells) | |
Construct from components. | |
virtual | ~primitiveMesh () |
void | reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells) |
Reset this primitiveMesh given the primitive array sizes. | |
void | reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, cellList &cells) |
Reset this primitiveMesh given the primitive array sizes and cells. | |
void | reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, const Xfer< cellList > &cells) |
Reset this primitiveMesh given the primitive array sizes and cells. | |
label | nPoints () const |
label | nEdges () const |
label | nInternalFaces () const |
label | nFaces () const |
label | nCells () const |
label | nInternalPoints () const |
Points not on boundary. | |
label | nInternal0Edges () const |
Internal edges (i.e. not on boundary face) using. | |
label | nInternal1Edges () const |
Internal edges using 0 or 1 boundary point. | |
label | nInternalEdges () const |
Internal edges using 0,1 or 2 boundary points. | |
const cellShapeList & | cellShapes () const |
Return cell shapes. | |
const edgeList & | edges () const |
Return mesh edges. Uses calcEdges. | |
const labelListList & | cellCells () const |
const labelListList & | edgeCells () const |
const labelListList & | pointCells () const |
const cellList & | cells () const |
const labelListList & | edgeFaces () const |
const labelListList & | pointFaces () const |
const labelListList & | cellEdges () const |
const labelListList & | faceEdges () const |
const labelListList & | pointEdges () const |
const labelListList & | pointPoints () const |
const labelListList & | cellPoints () const |
const vectorField & | cellCentres () const |
const vectorField & | faceCentres () const |
const scalarField & | cellVolumes () const |
const vectorField & | faceAreas () const |
tmp< scalarField > | movePoints (const pointField &p, const pointField &oldP) |
Move points, returns volumes swept by faces in motion. | |
bool | isInternalFace (const label faceIndex) const |
Return true if given face label is internal to the mesh. | |
bool | checkCellsZipUp (const bool report=false, labelHashSet *setPtr=NULL) const |
Check cell zip-up. | |
bool | checkFaceVertices (const bool report=false, labelHashSet *setPtr=NULL) const |
Check uniqueness of face vertices. | |
bool | checkFaceFaces (const bool report=false, labelHashSet *setPtr=NULL) const |
Check face-face connectivity. | |
bool | checkUpperTriangular (const bool report=false, labelHashSet *setPtr=NULL) const |
Check face ordering. | |
bool | checkClosedBoundary (const bool report=false) const |
Check boundary for closedness. | |
bool | checkClosedCells (const bool report=false, labelHashSet *setPtr=NULL, labelHashSet *highAspectSetPtr=NULL, const Vector< label > &solutionD=Vector< label >::one) const |
Check cells for closedness. | |
bool | checkFaceAreas (const bool report=false, labelHashSet *setPtr=NULL) const |
Check for negative face areas. | |
bool | checkCellVolumes (const bool report=false, labelHashSet *setPtr=NULL) const |
Check for negative cell volumes. | |
bool | checkFaceOrthogonality (const bool report=false, labelHashSet *setPtr=NULL) const |
Check for non-orthogonality. | |
bool | checkFacePyramids (const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL) const |
Check face pyramid volume. | |
bool | checkFaceSkewness (const bool report=false, labelHashSet *setPtr=NULL) const |
Check face skewness. | |
bool | checkFaceAngles (const bool report=false, const scalar maxSin=10, labelHashSet *setPtr=NULL) const |
Check face angles. | |
bool | checkFaceFlatness (const bool report, const scalar warnFlatness, labelHashSet *setPtr) const |
Check face warpage: decompose face and check ratio between. | |
bool | checkEdgeAlignment (const bool report, const Vector< label > &directions, labelHashSet *setPtr=NULL) const |
Check edge alignment for 1D/2D cases. | |
bool | checkPoints (const bool report=false, labelHashSet *setPtr=NULL) const |
Check for unused points. | |
bool | checkPointNearness (const bool report, const scalar reportDistSqr, labelHashSet *setPtr=NULL) const |
Check for point-point-nearness,. | |
bool | checkEdgeLength (const bool report, const scalar minLenSqr, labelHashSet *setPtr=NULL) const |
Check edge length. | |
bool | checkCellDeterminant (const bool report=false, labelHashSet *setPtr=NULL, const Vector< label > &solutionD=Vector< label >::one) const |
Check cell determinant. | |
bool | checkTopology (const bool report=false) const |
Check mesh topology for correctness. | |
bool | checkGeometry (const bool report=false) const |
Check mesh geometry (& implicitly topology) for correctness. | |
bool | checkMesh (const bool report=false) const |
Check mesh for correctness. Returns false for no error. | |
bool | checkMeshMotion (const pointField &newPoints, const bool report=false) const |
Check mesh motion for correctness given motion points. | |
bool | pointInCellBB (const point &p, label celli) const |
Is the point in the cell bounding box. | |
bool | pointInCell (const point &p, label celli) const |
Is the point in the cell. | |
label | findNearestCell (const point &location) const |
Find the cell with the nearest cell centre to location. | |
label | findCell (const point &location) const |
Find cell enclosing this location (-1 if not in mesh) | |
void | printAllocated () const |
Print a list of all the currently allocated mesh data. | |
bool | hasCellShapes () const |
bool | hasEdges () const |
bool | hasCellCells () const |
bool | hasEdgeCells () const |
bool | hasPointCells () const |
bool | hasCells () const |
bool | hasEdgeFaces () const |
bool | hasPointFaces () const |
bool | hasCellEdges () const |
bool | hasFaceEdges () const |
bool | hasPointEdges () const |
bool | hasPointPoints () const |
bool | hasCellPoints () const |
bool | hasCellCentres () const |
bool | hasFaceCentres () const |
bool | hasCellVolumes () const |
bool | hasFaceAreas () const |
const labelList & | cellCells (const label cellI, DynamicList< label > &) const |
cellCells using cells. | |
const labelList & | cellCells (const label cellI) const |
const labelList & | cellPoints (const label cellI, DynamicList< label > &) const |
cellPoints using cells | |
const labelList & | cellPoints (const label cellI) const |
const labelList & | pointCells (const label pointI, DynamicList< label > &) const |
pointCells using pointFaces | |
const labelList & | pointCells (const label pointI) const |
const labelList & | pointPoints (const label pointI, DynamicList< label > &) const |
pointPoints using edges, pointEdges | |
const labelList & | pointPoints (const label pointI) const |
const labelList & | faceEdges (const label faceI, DynamicList< label > &) const |
faceEdges using pointFaces, edges, pointEdges | |
const labelList & | faceEdges (const label faceI) const |
const labelList & | edgeFaces (const label edgeI, DynamicList< label > &) const |
edgeFaces using pointFaces, edges, pointEdges | |
const labelList & | edgeFaces (const label edgeI) const |
const labelList & | edgeCells (const label edgeI, DynamicList< label > &) const |
edgeCells using pointFaces, edges, pointEdges | |
const labelList & | edgeCells (const label edgeI) const |
const labelList & | cellEdges (const label cellI, DynamicList< label > &) const |
cellEdges using cells, pointFaces, edges, pointEdges | |
const labelList & | cellEdges (const label cellI) const |
Static Public Attributes | |
static word | defaultRegion = "region0" |
Return the default region name. | |
static word | meshSubDir = "polyMesh" |
Return the mesh sub-directory name (usually "polyMesh") | |
![]() | |
static const unsigned | cellsPerEdge_ = 4 |
Estimated number of cells per edge. | |
static const unsigned | cellsPerPoint_ = 8 |
Estimated number of cells per point. | |
static const unsigned | facesPerCell_ = 6 |
Estimated number of faces per cell. | |
static const unsigned | facesPerEdge_ = 4 |
Estimated number of faces per edge. | |
static const unsigned | facesPerPoint_ = 12 |
Estimated number of faces per point. | |
static const unsigned | edgesPerCell_ = 12 |
Estimated number of edges per cell. | |
static const unsigned | edgesPerFace_ = 4 |
Estimated number of edges per cell. | |
static const unsigned | edgesPerPoint_ = 6 |
Estimated number of edges per point. | |
static const unsigned | pointsPerCell_ = 8 |
Estimated number of points per cell. | |
static const unsigned | pointsPerFace_ = 4 |
Estimated number of points per face. |
Additional Inherited Members | |
![]() | |
static void | calcCells (cellList &, const unallocLabelList &own, const unallocLabelList &nei, const label nCells=-1) |
Helper function to calculate cell-face addressing from. | |
static bool | calcPointOrder (label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints) |
Helper function to calculate point ordering. Returns true. | |
static scalar | setClosedThreshold (const scalar) |
Set the closedness ratio warning threshold. | |
static scalar | setAspectThreshold (const scalar) |
Set the aspect ratio warning threshold. | |
static scalar | setNonOrthThreshold (const scalar) |
Set the non-orthogonality warning threshold in degrees. | |
static scalar | setSkewThreshold (const scalar) |
Set the skewness warning threshold as percentage. | |
![]() | |
primitiveMesh () | |
Construct null. |
Reimplemented in fvMesh.
Definition at line 201 of file polyMesh.H.
typedef polyBoundaryMesh BoundaryMesh |
Reimplemented in fvMesh.
Definition at line 202 of file polyMesh.H.
enum readUpdateState |
Enumeration defining the state of the mesh after a read update.
Used for post-processing applications, where the mesh needs to update based on the files written in time directores
Definition at line 84 of file polyMesh.H.
Construct from IOobject.
Definition at line 138 of file polyMesh.C.
References Foam::endl(), Foam::exists(), polyMesh::meshDir(), polyMesh::meshSubDir, IOobject::MUST_READ, primitiveMesh::nCells(), IOobject::NO_WRITE, primitiveMesh::nPoints(), IOobject::objectPath(), Foam::returnReduce(), objectRegistry::time(), polyBoundaryMesh::updateMesh(), WarningIn, and regIOobject::write().
polyMesh | ( | const IOobject & | io, |
const Xfer< pointField > & | points, | ||
const Xfer< faceList > & | faces, | ||
const Xfer< labelList > & | owner, | ||
const Xfer< labelList > & | neighbour, | ||
const bool | syncPar = true |
||
) |
Construct without boundary from components.
Boundary is added using addPatches() member function
Definition at line 314 of file polyMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, Foam::max(), Foam::min(), and List< T >::size().
polyMesh | ( | const IOobject & | io, |
const Xfer< pointField > & | points, | ||
const Xfer< faceList > & | faces, | ||
const Xfer< cellList > & | cells, | ||
const bool | syncPar = true |
||
) |
Construct without boundary with cells rather than owner/neighbour.
Boundary is added using addPatches() member function
Definition at line 471 of file polyMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, Foam::max(), Foam::min(), and List< T >::size().
polyMesh | ( | const IOobject & | io, |
const Xfer< pointField > & | points, | ||
const cellShapeList & | shapes, | ||
const faceListList & | boundaryFaces, | ||
const wordList & | boundaryPatchNames, | ||
const wordList & | boundaryPatchTypes, | ||
const word & | defaultBoundaryPatchName, | ||
const word & | defaultBoundaryPatchType, | ||
const wordList & | boundaryPatchPhysicalTypes, | ||
const bool | syncPar = true |
||
) |
Construct from cell shapes.
Definition at line 136 of file polyMeshFromShapeMesh.C.
References Foam::abort(), cells, Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::Info, polyPatch::New(), List< T >::setSize(), List< T >::size(), and WarningIn.
|
virtual |
Definition at line 775 of file polyMesh.C.
TypeName | ( | "polyMesh" | ) |
Runtime type information.
|
virtual |
Override the objectRegistry dbDir for a single-region case.
Reimplemented from objectRegistry.
Definition at line 784 of file polyMesh.C.
References objectRegistry::dbDir().
Foam::fileName meshDir | ( | ) | const |
Return the local mesh directory (dbDir()/meshSubDir)
Definition at line 797 of file polyMesh.C.
Referenced by polyMesh::polyMesh().
const Foam::fileName & pointsInstance | ( | ) | const |
Return the current instance directory for points.
Used in the consruction of gemometric mesh data dependent on points
Definition at line 803 of file polyMesh.C.
const Foam::fileName & facesInstance | ( | ) | const |
Return the current instance directory for faces.
Definition at line 809 of file polyMesh.C.
Referenced by attachPolyTopoChanger::attach(), and manualDecomp::decompose().
void setInstance | ( | const fileName & | inst | ) |
Set the instance for mesh files.
Definition at line 32 of file polyMeshIO.C.
References IOobject::AUTO_WRITE, Foam::endl(), Foam::Info, IOobject::instance(), and IOobject::writeOpt().
Referenced by autoLayerDriver::addLayers(), attachPolyTopoChanger::attach(), Foam::polyMeshZipUpCells(), and polyMesh::updateMesh().
|
virtual |
Return raw points.
Implements primitiveMesh.
Definition at line 962 of file polyMesh.C.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
Referenced by autoLayerDriver::addLayers(), polyTopoChange::addMesh(), polyDualMesh::calcFeatures(), polyTopoChange::changeMesh(), motionSmoother::checkMesh(), inversePointDistanceDiffusivity::correct(), pointLinear< Type >::correction(), geomCellLooper::cut(), faceCoupleInfo::faceCoupleInfo(), polyMeshAdder::findSharedPoints(), cellPointWeight::findTetrahedron(), cellPointWeight::findTriangle(), meshRefinement::makePatch(), polyMeshAdder::mergePoints(), MeshedSurface< Face >::MeshedSurface(), meshTriangulation::meshTriangulation(), layeredEngineMesh::move(), movingConeTopoFvMesh::movingConeTopoFvMesh(), Foam::polyMeshZipUpCells(), boundaryMesh::read(), boundaryMesh::setFeatureEdges(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), ExactParticle< ParticleType >::trackToFace(), triSurfaceTools::triangulate(), triSurfaceTools::triangulateFaceCentre(), cellMotionFvPatchField< Type >::updateCoeffs(), pointEdgePoint::updateEdge(), pointData::updateEdge(), pointEdgePoint::updatePoint(), pointData::updatePoint(), wallLayerCells::wallLayerCells(), and ensightPart::writeGeometry().
|
virtual |
Return raw faces.
Implements primitiveMesh.
Definition at line 975 of file polyMesh.C.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
Referenced by polyTopoChange::addMesh(), polyDualMesh::calcFeatures(), polyMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkTriangleTwist(), inversePointDistanceDiffusivity::correct(), pointLinear< Type >::correction(), dynamicRefineFvMesh::dynamicRefineFvMesh(), ensightPartFaces::ensightPartFaces(), faceCoupleInfo::faceCoupleInfo(), sampledSet::findNearFace(), cellPointWeight::findTetrahedron(), cellPointWeight::findTriangle(), autoSnapDriver::getZoneSurfacePoints(), Particle< ParticleType >::lambda(), meshRefinement::makePatch(), polyMeshAdder::mergePoints(), MeshedSurface< Face >::MeshedSurface(), meshTriangulation::meshTriangulation(), Foam::polyMeshZipUpCells(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), syncTools::syncEdgeMap(), ExactParticle< ParticleType >::trackToFace(), directionInfo::updateCell(), wallLayerCells::wallLayerCells(), and reflectParcel::wallTreatment().
|
virtual |
Return face owner.
Implements primitiveMesh.
Definition at line 988 of file polyMesh.C.
Referenced by polyTopoChange::addMesh(), polyMeshGeometry::affectedCells(), decompositionMethod::calcCellCells(), scotchDecomp::calcCSR(), polyDualMesh::calcFeatures(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkVolRatio(), cellDistFuncs::correctBoundaryFaceCells(), dynamicRefineFvMesh::dynamicRefineFvMesh(), dynamicRefineFvMesh::extendMarkedCells(), sampledSet::getBoundaryCell(), sampledSet::getCell(), cellToCellStencil::insertFaceCells(), cellToFaceStencil::insertFaceCells(), polyMeshAdder::mergePoints(), meshTriangulation::meshTriangulation(), sampledSet::pushIn(), undoableMeshCutter::removeSplitFaces(), errorDrivenRefinement::setRefinement(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), ExactParticle< ParticleType >::trackToFace(), and Particle< ParticleType >::trackToFace().
|
virtual |
Return face neighbour.
Implements primitiveMesh.
Definition at line 994 of file polyMesh.C.
Referenced by addPatchCellLayer::addedCells(), polyTopoChange::addMesh(), polyMeshGeometry::affectedCells(), decompositionMethod::calcCellCells(), scotchDecomp::calcCSR(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkVolRatio(), dynamicRefineFvMesh::dynamicRefineFvMesh(), dynamicRefineFvMesh::extendMarkedCells(), sampledSet::getCell(), cellToCellStencil::insertFaceCells(), cellToFaceStencil::insertFaceCells(), polyMeshAdder::mergePoints(), undoableMeshCutter::removeSplitFaces(), errorDrivenRefinement::setRefinement(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), ExactParticle< ParticleType >::trackToFace(), and Particle< ParticleType >::trackToFace().
|
virtual |
Return old points for mesh motion.
Implements primitiveMesh.
Definition at line 1001 of file polyMesh.C.
References Foam::endl(), and WarningIn.
Referenced by attachPolyTopoChanger::attach(), Particle< ParticleType >::lambda(), movingWallVelocityFvPatchVectorField::updateCoeffs(), and reflectParcel::wallTreatment().
|
inline |
Return boundary mesh.
Definition at line 304 of file polyMesh.H.
Referenced by fvMeshAdder::add(), polyMeshAdder::add(), autoLayerDriver::addLayers(), polyTopoChange::addMesh(), meshRefinement::addPatch(), cellToCellStencil::allCoupledFacesPatch(), cellToFaceStencil::allCoupledFacesPatch(), attachPolyTopoChanger::attach(), scotchDecomp::calcCSR(), extendedCellToFaceStencil::calcDistributeMap(), polyDualMesh::calcFeatures(), cellPointWeightWallModified::cellPointWeightWallModified(), polyTopoChange::changeMesh(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), faceZone::checkParallelSync(), polyMeshGeometry::checkVolRatio(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), wallDistData< TransferType >::correct(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), directions::directions(), fvMeshDistribute::distribute(), autoLayerDriver::doLayers(), extendedCellToFaceStencil::extendedCellToFaceStencil(), extendedFaceToCellStencil::extendedFaceToCellStencil(), Cloud< BasicReactingParcel< ThermoType > >::facePatch(), patchProbes::findElements(), syncTools::getMasterEdges(), syncTools::getMasterFaces(), syncTools::getMasterPoints(), cellDistFuncs::getPatchIDs(), interpolationCellPatchConstrained< Type >::interpolate(), turbulentTemperatureCoupledBaffleFvPatchScalarField::K(), Particle< ParticleType >::lambda(), LocalInteraction< CloudType >::LocalInteraction(), localPointRegion::localPointRegion(), polyTopoChange::makeMesh(), meshRefinement::makePatch(), cellDistFuncs::maxPatchSize(), polyMeshAdder::mergePoints(), meshTriangulation::meshTriangulation(), solidParticle::move(), DsmcParcel< ParcelType >::move(), Cloud< ParticleType >::move(), parcel::move(), KinematicParcel< ParcelType >::move(), MRFZone::MRFZone(), Cloud< BasicReactingParcel< ThermoType > >::patchFace(), boundaryMesh::patchify(), sampledPatch::patchIndex(), Foam::polyMeshZipUpCells(), polyTopoChange::polyTopoChange(), forces::read(), boundaryMesh::read(), ensightParts::recalculate(), autoSnapDriver::repatchToSurface(), sampledCuttingPlane::sampledCuttingPlane(), sampledIsoSurface::sampledIsoSurface(), directMappedPatchBase::sampleMesh(), directMappedPatchBase::samplePolyPatch(), perfectInterface::setRefinement(), meshCutAndRemove::setRefinement(), fvMatrix< Type >::setValues(), cellDistFuncs::sumPatchSize(), faceSet::sync(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), syncTools::syncFaceList(), syncTools::syncPointList(), syncTools::syncPointMap(), ExactParticle< ParticleType >::trackToFace(), Particle< ParticleType >::trackToFace(), sampledPatch::update(), directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), directMappedFixedValueFvPatchField< Type >::updateCoeffs(), surfaceDisplacementPointPatchVectorField::updateCoeffs(), perfectInterface::updateMesh(), attachDetach::updateMesh(), slidingInterface::updateMesh(), cellToCellStencil::validBoundaryFaces(), cellToFaceStencil::validBoundaryFaces(), wallLayerCells::wallLayerCells(), and dsmcFields::write().
|
inline |
Return mesh bounding box.
Definition at line 310 of file polyMesh.H.
Referenced by Foam::meshTools::constrainToMeshCentre(), refinementParameters::findCells(), and Kmesh::Kmesh().
const Foam::Vector< Foam::label > & geometricD | ( | ) | const |
Return the vector of geometric directions in mesh.
Defined according to the presence of empty and wedge patches. 1 indicates unconstrained direction and -1 a constrained direction.
Definition at line 815 of file polyMesh.C.
Referenced by Foam::meshTools::constrainToMeshCentre().
Foam::label nGeometricD | ( | ) | const |
Return the number of valid geometric dimensions in the mesh.
Definition at line 826 of file polyMesh.C.
References Foam::cmptSum().
const Foam::Vector< Foam::label > & solutionD | ( | ) | const |
Return the vector of solved-for directions in mesh.
Differs from geometricD in that it includes for wedge cases the circumferential direction in case of swirl. 1 indicates valid direction and -1 an invalid direction.
Definition at line 832 of file polyMesh.C.
Referenced by KinematicParcel< ParcelType >::calcVelocity(), InjectionModel< CloudType >::inject(), and DsmcParcel< ParcelType >::move().
Foam::label nSolutionD | ( | ) | const |
Return the number of valid solved-for dimensions in the mesh.
Definition at line 843 of file polyMesh.C.
References Foam::cmptSum().
Referenced by fvDOM::fvDOM().
|
inline |
Return point zone mesh.
Definition at line 334 of file polyMesh.H.
Referenced by polyMeshAdder::add(), polyTopoChange::addMesh(), polyTopoChange::changeMesh(), polyTopoChange::makeMesh(), slidingInterface::modifyMotionPoints(), pointZoneSet::pointZoneSet(), polyTopoChange::polyTopoChange(), fvMeshDistribute::printMeshInfo(), and slidingInterface::updateMesh().
|
inline |
Return face zone mesh.
Definition at line 340 of file polyMesh.H.
Referenced by polyMeshAdder::add(), polyTopoChange::addMesh(), polyTopoChange::changeMesh(), meshRefinement::checkCoupledFaceZones(), displacementInterpolationFvMotionSolver::displacementInterpolationFvMotionSolver(), faceZoneSet::faceZoneSet(), autoSnapDriver::getZoneSurfacePoints(), polyTopoChange::makeMesh(), polyMeshAdder::mergePoints(), slidingInterface::modifyMotionPoints(), movingConeTopoFvMesh::movingConeTopoFvMesh(), Foam::polyMeshZipUpCells(), polyTopoChange::polyTopoChange(), fvMeshDistribute::printMeshInfo(), autoSnapDriver::repatchToSurface(), perfectInterface::setRefinement(), perfectInterface::updateMesh(), attachDetach::updateMesh(), and slidingInterface::updateMesh().
|
inline |
Return cell zone mesh.
Definition at line 346 of file polyMesh.H.
Referenced by polyMeshAdder::add(), cellTable::addCellZones(), polyTopoChange::addMesh(), cellZoneSet::cellZoneSet(), polyTopoChange::changeMesh(), polyTopoChange::makeMesh(), porousZone::modifyDdt(), cellTable::operator=(), polyTopoChange::polyTopoChange(), fvMeshDistribute::printMeshInfo(), ensightParts::recalculate(), sampledPlane::sampledPlane(), and sampledPlane::update().
const Foam::globalMeshData & globalData | ( | ) | const |
Return parallel info.
Definition at line 1116 of file polyMesh.C.
References Foam::endl(), Foam::nl, and Foam::Pout.
Referenced by extendedCellToFaceStencil::calcDistributeMap(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), polyMeshAdder::findSharedPoints(), syncTools::getMasterEdges(), syncTools::getMasterPoints(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), syncTools::syncPointList(), syncTools::syncPointMap(), and dynamicRefineFvMesh::update().
|
inline |
Return the object registry.
Reimplemented in fvMesh.
Definition at line 355 of file polyMesh.H.
Referenced by polyMesh::updateMesh().
|
inline |
Is mesh moving.
Definition at line 363 of file polyMesh.H.
Referenced by Foam::fvc::DDt(), Foam::MULES::explicitSolve(), fvMesh::fvMesh(), Particle< ParticleType >::lambda(), Foam::MULES::limiter(), Foam::fvc::makeAbsolute(), Foam::fvc::makeRelative(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), fvMesh::Vsc(), fvMesh::Vsc0(), and reflectParcel::wallTreatment().
|
inline |
Set the mesh to be moving.
Definition at line 369 of file polyMesh.H.
|
inline |
Is mesh changing (topology changing and/or moving)
Definition at line 378 of file polyMesh.H.
Referenced by ignitionSite::cells(), polyTopoChange::changeMesh(), cubeRootVolDelta::correct(), maxDeltaxyz::correct(), maxhxhyhzDelta::correct(), PrandtlDelta::correct(), LamBremhorstKE::correct(), LienLeschzinerLowRe::correct(), SpalartAllmaras::correct(), LaunderGibsonRSTM::correct(), LienCubicKELowRe::correct(), smoothDelta::correct(), kOmegaSSTSAS::correct(), kOmegaSST::correct(), and dynamicRefineFvMesh::update().
|
inline |
Set the mesh to be changing.
Definition at line 384 of file polyMesh.H.
|
virtual |
Move points, returns volumes swept by faces in motion.
Reimplemented in fvMesh.
Definition at line 1021 of file polyMesh.C.
References IOobject::AUTO_WRITE, primitiveMesh::checkMeshMotion(), Foam::deleteDemandDrivenData(), Foam::endl(), Foam::Info, pointMesh::movePoints(), primitiveMesh::movePoints(), Foam::nl, and timeIndex.
Referenced by attachPolyTopoChanger::attach(), and fvMesh::movePoints().
void resetMotion | ( | ) | const |
Reset motion.
Definition at line 1108 of file polyMesh.C.
References Foam::deleteDemandDrivenData().
Referenced by polyMeshAdder::add().
|
inline |
Return non-const access to the pointZones.
Definition at line 401 of file polyMesh.H.
|
inline |
Return non-const access to the faceZones.
Definition at line 407 of file polyMesh.H.
|
inline |
Return non-const access to the cellZones.
Definition at line 413 of file polyMesh.H.
Add boundary patches.
Definition at line 851 of file polyMesh.C.
References Foam::abort(), Foam::deleteDemandDrivenData(), Foam::FatalError, FatalErrorIn, forAll, and List< T >::size().
Referenced by polyMeshAdder::add(), attachPolyTopoChanger::attach(), and meshReader::mesh().
void addZones | ( | const List< pointZone * > & | pz, |
const List< faceZone * > & | fz, | ||
const List< cellZone * > & | cz | ||
) |
Add mesh zones.
Definition at line 898 of file polyMesh.C.
References Foam::abort(), IOobject::AUTO_WRITE, Foam::FatalError, FatalErrorIn, forAll, and List< T >::size().
Referenced by polyTopoChange::makeMesh().
|
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(), forAll, Foam::Info, IOobject::MUST_READ, Foam::name(), polyBoundaryMesh::names(), Foam::nl, IOobject::NO_WRITE, polyMesh::POINTS_MOVED, IOobject::READ_IF_PRESENT, PtrList< T >::setSize(), PtrList< T >::size(), polyMesh::TOPO_CHANGE, polyMesh::TOPO_PATCH_CHANGE, polyBoundaryMesh::types(), polyMesh::UNCHANGED, and WarningIn.
Referenced by fvMesh::readUpdate().
|
virtual |
Update the mesh corresponding to given map.
Reimplemented in fvMesh.
Definition at line 37 of file polyMeshUpdate.C.
References ZoneMesh< ZoneType, MeshType >::clearAddressing(), forAll, objectRegistry::foundObject(), objectRegistry::lookupObject(), Field< Type >::map(), mapPolyMesh::pointMap(), polyMesh::setInstance(), List< T >::setSize(), List< T >::size(), polyMesh::thisDb(), objectRegistry::time(), timeName, pointMesh::updateMesh(), polyBoundaryMesh::updateMesh(), and globalMeshData::updateMesh().
Referenced by fvMesh::updateMesh().
void removeBoundary | ( | ) |
Remove boundary patches.
Definition at line 35 of file polyMeshClear.C.
References PtrList< T >::clear(), polyMesh::clearOut(), Foam::endl(), Foam::Info, and PtrList< T >::setSize().
Referenced by attachPolyTopoChanger::attach(), and fvMesh::removeFvBoundary().
void resetPrimitives | ( | const Xfer< pointField > & | points, |
const Xfer< faceList > & | faces, | ||
const Xfer< labelList > & | owner, | ||
const Xfer< labelList > & | neighbour, | ||
const labelList & | patchSizes, | ||
const labelList & | patchStarts, | ||
const bool | validBoundary = true |
||
) |
Reset mesh primitive data. Assumes all patch info correct.
(so does e.g. parallel communication). If not use validBoundary=false (still assumes patchStarts[0] = nInternalFaces and last patch ends at nActiveFaces) and change patches with addPatches.
Definition at line 652 of file polyMesh.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::max(), Foam::min(), Foam::name(), nPoints, points, Foam::returnReduce(), List< T >::size(), and timeName.
Referenced by polyMeshAdder::add(), polyTopoChange::changeMesh(), and Foam::polyMeshZipUpCells().
void clearGeom | ( | ) |
Clear geometry.
Reimplemented from primitiveMesh.
Definition at line 54 of file polyMeshClear.C.
References primitiveMesh::clearGeom(), MeshObject< polyMesh, pointMesh >::Delete(), Foam::endl(), forAll, and Foam::Info.
void clearAddressing | ( | ) |
Clear addressing.
Reimplemented from primitiveMesh.
Definition at line 78 of file polyMeshClear.C.
References primitiveMesh::clearAddressing(), MeshObject< polyMesh, pointMesh >::Delete(), Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Info.
void clearOut | ( | ) |
Clear all geometry and addressing unnecessary for CFD.
Reimplemented from primitiveMesh.
Reimplemented in fvMesh.
Definition at line 114 of file polyMeshClear.C.
Referenced by fvMesh::clearOut(), Foam::polyMeshZipUpCells(), and polyMesh::removeBoundary().
void clearPrimitives | ( | ) |
Clear primitive data (points, faces and cells)
Definition at line 101 of file polyMeshClear.C.
void removeFiles | ( | const fileName & | instanceDir | ) | const |
Remove all files from mesh instance.
Definition at line 1136 of file polyMesh.C.
References Foam::isDir(), fileName::path(), Foam::rm(), and Foam::rmDir().
Referenced by meshReader::writeMesh().
void removeFiles | ( | ) | const |
Remove all files from mesh instance()
Definition at line 1159 of file polyMesh.C.
|
static |
Return the default region name.
Definition at line 209 of file polyMesh.H.
Referenced by probes::checkFieldTypes(), regIOobject::checkIn(), meshReader::mesh(), and sampledSets::sampledSets().
|
static |
Return the mesh sub-directory name (usually "polyMesh")
Definition at line 212 of file polyMesh.H.
Referenced by polyMesh::polyMesh().