FreeFOAM The Cross-Platform CFD Toolkit
mergePolyMesh Class Reference

Add a given mesh to the original mesh to create a single new mesh. More...


Detailed Description

Add a given mesh to the original mesh to create a single new mesh.

Source files

Definition at line 52 of file mergePolyMesh.H.

+ Inheritance diagram for mergePolyMesh:
+ Collaboration diagram for mergePolyMesh:

List of all members.

Public Member Functions

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

Additional Inherited Members

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

Constructor & Destructor Documentation

mergePolyMesh ( const IOobject io)

Construct from IOobject.

virtual ~mergePolyMesh ( )
inlinevirtual

Definition at line 107 of file mergePolyMesh.H.


Member Function Documentation

TypeName ( "mergePolyMesh"  )

Runtime type information.

void addMesh ( const polyMesh m)

Add a mesh.

void merge ( )

Merge meshes.


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