This class supports creating polyMeshes with baffles. More...
Data Structures | |
class | cellFaceIdentifier |
Identify cell faces in terms of cell Id and face Id. More... | |
Public Member Functions | |
meshReader (const fileName &, const scalar scaleFactor=1.0) | |
Construct from fileName. More... | |
virtual | ~meshReader () |
Destructor. More... | |
virtual autoPtr< polyMesh > | mesh (const objectRegistry &) |
Create and return polyMesh. More... | |
void | writeAux (const objectRegistry &) const |
Write auxiliary information. More... | |
void | writeMesh (const polyMesh &, IOstream::streamFormat fmt=IOstream::BINARY) const |
Write mesh. More... | |
Static Public Member Functions | |
static void | warnDuplicates (const word &context, const wordList &) |
Warn about repeated names. More... | |
Protected Member Functions | |
virtual bool | readGeometry (const scalar scaleFactor=1.0)=0 |
Subclasses are required to supply this information. More... | |
Protected Attributes | |
fileName | geometryFile_ |
Referenced filename. More... | |
scalar | scaleFactor_ |
Geometry scaling. More... | |
pointField | points_ |
Points supporting the mesh. More... | |
labelList | origCellId_ |
Lookup original Cell number for a given cell. More... | |
List< List< cellFaceIdentifier > > | boundaryIds_ |
Identify boundary faces by cells and their faces. More... | |
wordList | patchTypes_ |
Boundary patch types. More... | |
wordList | patchNames_ |
Boundary patch names. More... | |
wordList | patchPhysicalTypes_ |
Boundary patch physical types. More... | |
faceListList | cellFaces_ |
List of faces for every cell. More... | |
faceList | baffleFaces_ |
List of each baffle face. More... | |
labelList | cellTableId_ |
Cell table id for each cell. More... | |
cellTable | cellTable_ |
Cell table persistent data saved as a dictionary. More... | |
Static Protected Attributes | |
static const cellModel * | unknownModel |
Pointers to cell shape models. More... | |
static const cellModel * | tetModel |
static const cellModel * | pyrModel |
static const cellModel * | prismModel |
static const cellModel * | hexModel |
Private Member Functions | |
meshReader (const meshReader &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const meshReader &) |
Disallow default bitwise assignment. More... | |
void | calcPointCells () const |
Calculate pointCells. More... | |
const labelListList & | pointCells () const |
void | createPolyCells () |
Make polyhedral cells and global faces if the mesh is polyhedral. More... | |
void | addPolyBoundaryFace (const label cellId, const label cellFaceId, const label nCreatedFaces) |
Add in boundary face. More... | |
void | addPolyBoundaryFace (const cellFaceIdentifier &identifier, const label nCreatedFaces) |
Add in boundary face. More... | |
void | addCellZones (polyMesh &) const |
Add cellZones based on cellTable Id. More... | |
void | addFaceZones (polyMesh &) const |
Add faceZones based on monitoring boundary conditions. More... | |
void | createPolyBoundary () |
Make polyhedral boundary from shape boundary. More... | |
List< polyPatch * > | polyBoundaryPatches (const polyMesh &) |
Add polyhedral boundary. More... | |
void | clearExtraStorage () |
Clear extra storage before creation of the mesh to remove. More... | |
void | writeInterfaces (const objectRegistry &) const |
void | writeMeshLabelList (const objectRegistry ®istry, const word &propertyName, const labelList &list, IOstream::streamFormat fmt=IOstream::ASCII) const |
Write List<label> in constant/polyMesh. More... | |
faceListList & | cellFaces () const |
Return list of faces for every cell. More... | |
Private Attributes | |
labelListList * | pointCellsPtr_ |
Point-cell addressing. Used for topological analysis. More... | |
label | nInternalFaces_ |
Number of internal faces for polyMesh. More... | |
labelList | patchStarts_ |
Polyhedral mesh boundary patch start indices and dimensions. More... | |
labelList | patchSizes_ |
List< labelPair > | interfaces_ |
Association between two faces. More... | |
List< List< cellFaceIdentifier > > | baffleIds_ |
List of cells/faces id pairs for each baffle. More... | |
faceList | meshFaces_ |
Global face list for polyMesh. More... | |
cellList | cellPolys_ |
Cells as polyhedra for polyMesh. More... | |
HashTable< List< label >, word, string::hash > | monitoringSets_ |
Face sets for monitoring. More... | |
This class supports creating polyMeshes with baffles.
The derived classes are responsible for providing the protected data. This implementation is somewhat messy, but could/should be restructured to provide a more generalized reader (at the moment it has been written for converting pro-STAR data).
The meshReader supports cellTable information (see new user's guide entry).
Definition at line 73 of file meshReader.H.
|
private |
Disallow default bitwise copy construct.
meshReader | ( | const fileName & | fileOrPrefix, |
const scalar | scaleFactor = 1.0 |
||
) |
Construct from fileName.
Definition at line 195 of file meshReader.C.
|
virtual |
Destructor.
Definition at line 225 of file meshReader.C.
References Foam::deleteDemandDrivenData().
|
private |
Disallow default bitwise assignment.
|
private |
Calculate pointCells.
Definition at line 34 of file calcPointCells.C.
References Foam::abort(), meshReader::cellFaces(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, found, Foam::Info, Foam::inplaceRenumber(), Foam::inplaceReorder(), nPoints, meshReader::pointCellsPtr_, meshReader::points_, List::setSize(), and List::size().
|
private |
Definition at line 161 of file calcPointCells.C.
Referenced by meshReader::createPolyCells().
|
private |
Make polyhedral cells and global faces if the mesh is polyhedral.
Definition at line 40 of file createPolyCells.C.
References Foam::abort(), meshReader::baffleFaces_, meshReader::baffleIds_, meshReader::cellFaces(), meshReader::cellPolys_, List::clear(), face::compare(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, found, Foam::Info, meshReader::meshFaces_, meshReader::nInternalFaces_, meshReader::origCellId_, meshReader::pointCells(), List::setSize(), and List::size().
|
private |
Add in boundary face.
Definition at line 45 of file createPolyBoundary.C.
References cellId, Foam::endl(), and Foam::Info.
Referenced by meshReader::createPolyBoundary().
|
private |
Add in boundary face.
Definition at line 88 of file createPolyBoundary.C.
References meshReader::cellFaceIdentifier::cell, and meshReader::cellFaceIdentifier::face.
|
private |
Add cellZones based on cellTable Id.
Definition at line 69 of file meshReader.C.
References cellTable::addCellZones(), meshReader::cellTable_, meshReader::cellTableId_, meshReader::mesh(), and meshReader::warnDuplicates().
|
private |
Add faceZones based on monitoring boundary conditions.
Definition at line 76 of file meshReader.C.
References IOobject::AUTO_WRITE, Foam::endl(), polyMesh::faceZones(), Foam::Info, mesh, and ZoneMesh::names().
|
private |
Make polyhedral boundary from shape boundary.
(adds more faces to the face list)
Definition at line 99 of file createPolyBoundary.C.
References meshReader::addPolyBoundaryFace(), meshReader::baffleFaces_, meshReader::baffleIds_, meshReader::boundaryIds_, meshReader::cellFaces(), cellId, meshReader::cellPolys_, Foam::endl(), faceId(), forAll, Foam::Info, meshReader::interfaces_, meshReader::meshFaces_, meshReader::monitoringSets_, meshReader::nInternalFaces_, Foam::nl, meshReader::origCellId_, meshReader::patchNames_, meshReader::patchPhysicalTypes_, meshReader::patchSizes_, meshReader::patchStarts_, List::setSize(), and List::size().
|
private |
Add polyhedral boundary.
Definition at line 373 of file createPolyBoundary.C.
References dictionary::add(), polyMesh::boundaryMesh(), defaultFacesType, Foam::endl(), forAll, Foam::identity(), Foam::Info, Foam::inplaceReorder(), IOobject::instance(), mesh, polyMesh::meshDir(), polyPatch::New(), nPatches, p, patchDicts, and Foam::preservePatchTypes().
|
private |
Clear extra storage before creation of the mesh to remove.
a memory peak
Definition at line 181 of file meshReader.C.
References Foam::deleteDemandDrivenData().
|
private |
Definition at line 75 of file meshReaderAux.C.
References TimePaths::constant(), Foam::endl(), Foam::Info, meshReader::interfaces_, polyMesh::meshSubDir, IOobject::name(), IOobject::NO_READ, IOobject::NO_WRITE, IOobject::note(), IOobject::objectPath(), objectRegistry::time(), IOobject::writeEndDivider(), and IOobject::writeHeader().
|
private |
Write List<label> in constant/polyMesh.
Definition at line 105 of file meshReaderAux.C.
References IOobject::AUTO_WRITE, TimePaths::constant(), IOstream::currentVersion, Foam::endl(), Foam::Info, polyMesh::meshSubDir, IOobject::name(), IOobject::NO_READ, IOobject::note(), IOobject::objectPath(), objectRegistry::time(), IOstream::UNCOMPRESSED, and regIOobject::writeObject().
|
inlineprivate |
Return list of faces for every cell.
Definition at line 232 of file meshReader.H.
References meshReader::cellFaces_.
Referenced by meshReader::calcPointCells(), meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
protectedpure virtual |
Subclasses are required to supply this information.
Implemented in STARCD.
Warn about repeated names.
Definition at line 34 of file meshReaderAux.C.
References Foam::endl(), HashTable::find(), forAll, forAllConstIter(), Foam::Info, HashTable::insert(), Foam::nl, and List::size().
Referenced by meshReader::addCellZones().
|
virtual |
Create and return polyMesh.
Definition at line 120 of file meshReader.C.
References polyMesh::addPatches(), TimePaths::constant(), polyMesh::defaultRegion, Foam::endl(), Foam::Info, mesh, objectRegistry::time(), and Foam::xferMove().
Referenced by meshReader::addCellZones().
void writeAux | ( | const objectRegistry & | registry | ) | const |
Write auxiliary information.
Definition at line 147 of file meshReaderAux.C.
References IOstream::ASCII, and IOstream::BINARY.
void writeMesh | ( | const polyMesh & | mesh, |
IOstream::streamFormat | fmt = IOstream::BINARY |
||
) | const |
Write mesh.
Definition at line 163 of file meshReader.C.
References IOstream::currentVersion, Foam::endl(), Foam::Info, mesh, polyMesh::removeFiles(), IOstream::UNCOMPRESSED, and objectRegistry::writeObject().
|
mutableprivate |
Point-cell addressing. Used for topological analysis.
Warning. This point cell addressing list potentially contains duplicate cell entries. Use additional checking
Definition at line 147 of file meshReader.H.
Referenced by meshReader::calcPointCells().
|
private |
Number of internal faces for polyMesh.
Definition at line 150 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
private |
Polyhedral mesh boundary patch start indices and dimensions.
Definition at line 153 of file meshReader.H.
Referenced by meshReader::createPolyBoundary().
|
private |
Definition at line 154 of file meshReader.H.
Referenced by meshReader::createPolyBoundary().
Association between two faces.
Definition at line 157 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::writeInterfaces().
|
private |
List of cells/faces id pairs for each baffle.
Definition at line 160 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
private |
Global face list for polyMesh.
Definition at line 163 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
private |
Cells as polyhedra for polyMesh.
Definition at line 166 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
private |
Face sets for monitoring.
Definition at line 169 of file meshReader.H.
Referenced by meshReader::createPolyBoundary().
|
staticprotected |
Pointers to cell shape models.
Definition at line 243 of file meshReader.H.
|
staticprotected |
Definition at line 244 of file meshReader.H.
|
staticprotected |
Definition at line 245 of file meshReader.H.
|
staticprotected |
Definition at line 246 of file meshReader.H.
|
staticprotected |
Definition at line 247 of file meshReader.H.
|
protected |
Referenced filename.
Definition at line 250 of file meshReader.H.
|
protected |
Geometry scaling.
Definition at line 253 of file meshReader.H.
|
protected |
Points supporting the mesh.
Definition at line 256 of file meshReader.H.
Referenced by meshReader::calcPointCells().
|
protected |
Lookup original Cell number for a given cell.
Definition at line 259 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
protected |
Identify boundary faces by cells and their faces.
for each patch
Definition at line 263 of file meshReader.H.
Referenced by meshReader::createPolyBoundary().
|
protected |
Boundary patch types.
Definition at line 266 of file meshReader.H.
|
protected |
Boundary patch names.
Definition at line 269 of file meshReader.H.
Referenced by meshReader::createPolyBoundary().
|
protected |
Boundary patch physical types.
Definition at line 272 of file meshReader.H.
Referenced by meshReader::createPolyBoundary().
|
protected |
List of faces for every cell.
Definition at line 275 of file meshReader.H.
Referenced by meshReader::cellFaces().
|
protected |
List of each baffle face.
Definition at line 278 of file meshReader.H.
Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().
|
protected |
Cell table id for each cell.
Definition at line 281 of file meshReader.H.
Referenced by meshReader::addCellZones().
|
protected |
Cell table persistent data saved as a dictionary.
Definition at line 284 of file meshReader.H.
Referenced by meshReader::addCellZones().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.