Data Structures | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes
meshReader Class Referenceabstract

This class supports creating polyMeshes with baffles. More...

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

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< polyMeshmesh (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 cellModelunknownModel
 Pointers to cell shape models. More...
 
static const cellModeltetModel
 
static const cellModelpyrModel
 
static const cellModelprismModel
 
static const cellModelhexModel
 

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 labelListListpointCells () 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 &registry, const word &propertyName, const labelList &list, IOstream::streamFormat fmt=IOstream::ASCII) const
 Write List<label> in constant/polyMesh. More...
 
faceListListcellFaces () const
 Return list of faces for every cell. More...
 

Private Attributes

labelListListpointCellsPtr_
 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< labelPairinterfaces_
 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::hashmonitoringSets_
 Face sets for monitoring. More...
 

Detailed Description

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).

Note
The boundary definitions are given as cell/face.
Source files

Definition at line 73 of file meshReader.H.

Constructor & Destructor Documentation

◆ meshReader() [1/2]

meshReader ( const meshReader )
private

Disallow default bitwise copy construct.

◆ meshReader() [2/2]

meshReader ( const fileName fileOrPrefix,
const scalar  scaleFactor = 1.0 
)

Construct from fileName.

Definition at line 195 of file meshReader.C.

◆ ~meshReader()

~meshReader ( )
virtual

Destructor.

Definition at line 225 of file meshReader.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

void operator= ( const meshReader )
private

Disallow default bitwise assignment.

◆ calcPointCells()

void calcPointCells ( ) const
private

◆ pointCells()

const Foam::labelListList & pointCells ( ) const
private

Definition at line 161 of file calcPointCells.C.

Referenced by meshReader::createPolyCells().

Here is the caller graph for this function:

◆ createPolyCells()

void createPolyCells ( )
private

◆ addPolyBoundaryFace() [1/2]

void addPolyBoundaryFace ( const label  cellId,
const label  cellFaceId,
const label  nCreatedFaces 
)
private

Add in boundary face.

Definition at line 45 of file createPolyBoundary.C.

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

Referenced by meshReader::createPolyBoundary().

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

◆ addPolyBoundaryFace() [2/2]

void addPolyBoundaryFace ( const cellFaceIdentifier identifier,
const label  nCreatedFaces 
)
private

Add in boundary face.

Definition at line 88 of file createPolyBoundary.C.

References meshReader::cellFaceIdentifier::cell, and meshReader::cellFaceIdentifier::face.

◆ addCellZones()

void addCellZones ( polyMesh mesh) const
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().

Here is the call graph for this function:

◆ addFaceZones()

void addFaceZones ( polyMesh mesh) const
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().

Here is the call graph for this function:

◆ createPolyBoundary()

void createPolyBoundary ( )
private

◆ polyBoundaryPatches()

Foam::List< Foam::polyPatch * > polyBoundaryPatches ( const polyMesh mesh)
private

◆ clearExtraStorage()

void clearExtraStorage ( )
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().

Here is the call graph for this function:

◆ writeInterfaces()

void writeInterfaces ( const objectRegistry registry) const
private

◆ writeMeshLabelList()

void writeMeshLabelList ( const objectRegistry registry,
const word propertyName,
const labelList list,
IOstream::streamFormat  fmt = IOstream::ASCII 
) const
private

◆ cellFaces()

faceListList& cellFaces ( ) const
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().

Here is the caller graph for this function:

◆ readGeometry()

virtual bool readGeometry ( const scalar  scaleFactor = 1.0)
protectedpure virtual

Subclasses are required to supply this information.

Implemented in STARCD.

◆ warnDuplicates()

void warnDuplicates ( const word context,
const wordList list 
)
static

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().

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

◆ mesh()

Foam::autoPtr< Foam::polyMesh > mesh ( const objectRegistry registry)
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().

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

◆ writeAux()

void writeAux ( const objectRegistry registry) const

Write auxiliary information.

Definition at line 147 of file meshReaderAux.C.

References IOstream::ASCII, and IOstream::BINARY.

◆ writeMesh()

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().

Here is the call graph for this function:

Field Documentation

◆ pointCellsPtr_

labelListList* pointCellsPtr_
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().

◆ nInternalFaces_

label nInternalFaces_
private

Number of internal faces for polyMesh.

Definition at line 150 of file meshReader.H.

Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().

◆ patchStarts_

labelList patchStarts_
private

Polyhedral mesh boundary patch start indices and dimensions.

Definition at line 153 of file meshReader.H.

Referenced by meshReader::createPolyBoundary().

◆ patchSizes_

labelList patchSizes_
private

Definition at line 154 of file meshReader.H.

Referenced by meshReader::createPolyBoundary().

◆ interfaces_

List<labelPair> interfaces_
private

Association between two faces.

Definition at line 157 of file meshReader.H.

Referenced by meshReader::createPolyBoundary(), and meshReader::writeInterfaces().

◆ baffleIds_

List<List<cellFaceIdentifier> > baffleIds_
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().

◆ meshFaces_

faceList meshFaces_
private

Global face list for polyMesh.

Definition at line 163 of file meshReader.H.

Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().

◆ cellPolys_

cellList cellPolys_
private

Cells as polyhedra for polyMesh.

Definition at line 166 of file meshReader.H.

Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().

◆ monitoringSets_

HashTable<List<label>, word, string::hash> monitoringSets_
private

Face sets for monitoring.

Definition at line 169 of file meshReader.H.

Referenced by meshReader::createPolyBoundary().

◆ unknownModel

const Foam::cellModel * unknownModel
staticprotected
Initial value:
(
"unknown"
)

Pointers to cell shape models.

Definition at line 243 of file meshReader.H.

◆ tetModel

const Foam::cellModel * tetModel
staticprotected
Initial value:

Definition at line 244 of file meshReader.H.

◆ pyrModel

const Foam::cellModel * pyrModel
staticprotected
Initial value:

Definition at line 245 of file meshReader.H.

◆ prismModel

const Foam::cellModel * prismModel
staticprotected
Initial value:

Definition at line 246 of file meshReader.H.

◆ hexModel

const Foam::cellModel * hexModel
staticprotected
Initial value:

Definition at line 247 of file meshReader.H.

◆ geometryFile_

fileName geometryFile_
protected

Referenced filename.

Definition at line 250 of file meshReader.H.

◆ scaleFactor_

scalar scaleFactor_
protected

Geometry scaling.

Definition at line 253 of file meshReader.H.

◆ points_

pointField points_
protected

Points supporting the mesh.

Definition at line 256 of file meshReader.H.

Referenced by meshReader::calcPointCells().

◆ origCellId_

labelList origCellId_
protected

Lookup original Cell number for a given cell.

Definition at line 259 of file meshReader.H.

Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().

◆ boundaryIds_

List<List<cellFaceIdentifier> > boundaryIds_
protected

Identify boundary faces by cells and their faces.

for each patch

Definition at line 263 of file meshReader.H.

Referenced by meshReader::createPolyBoundary().

◆ patchTypes_

wordList patchTypes_
protected

Boundary patch types.

Definition at line 266 of file meshReader.H.

◆ patchNames_

wordList patchNames_
protected

Boundary patch names.

Definition at line 269 of file meshReader.H.

Referenced by meshReader::createPolyBoundary().

◆ patchPhysicalTypes_

wordList patchPhysicalTypes_
protected

Boundary patch physical types.

Definition at line 272 of file meshReader.H.

Referenced by meshReader::createPolyBoundary().

◆ cellFaces_

faceListList cellFaces_
protected

List of faces for every cell.

Definition at line 275 of file meshReader.H.

Referenced by meshReader::cellFaces().

◆ baffleFaces_

faceList baffleFaces_
protected

List of each baffle face.

Definition at line 278 of file meshReader.H.

Referenced by meshReader::createPolyBoundary(), and meshReader::createPolyCells().

◆ cellTableId_

labelList cellTableId_
protected

Cell table id for each cell.

Definition at line 281 of file meshReader.H.

Referenced by meshReader::addCellZones().

◆ cellTable_

cellTable cellTable_
protected

Cell table persistent data saved as a dictionary.

Definition at line 284 of file meshReader.H.

Referenced by meshReader::addCellZones().


The documentation for this class was generated from the following files:
Foam::cellModeller::lookup
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or NULL.
Definition: cellModeller.C:91