meshReader Class Referenceabstract

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

Inheritance diagram for meshReader:
Collaboration diagram for meshReader:

Classes

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...
 
 meshReader (const meshReader &)=delete
 Disallow default bitwise copy construction. 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...
 
void operator= (const meshReader &)=delete
 Disallow default bitwise assignment. 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
 

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 generalised 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 72 of file meshReader.H.

Constructor & Destructor Documentation

◆ meshReader() [1/2]

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

Construct from fileName.

Definition at line 199 of file meshReader.C.

◆ meshReader() [2/2]

meshReader ( const meshReader )
delete

Disallow default bitwise copy construction.

◆ ~meshReader()

~meshReader ( )
virtual

Destructor.

Definition at line 230 of file meshReader.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

Member Function Documentation

◆ 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 33 of file meshReaderAux.C.

References HashTableCore::end(), Foam::endl(), HashTable< T, Key, Hash >::find(), forAll, forAllConstIter, Foam::Info, HashTable< T, Key, Hash >::insert(), Foam::nl, and List< T >::size().

Here is the call 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 TimePaths::constant(), polyMesh::defaultRegion, Foam::endl(), Foam::Info, Foam::polyMeshUnMergeCyclics(), and objectRegistry::time().

Here is the call graph for this function:

◆ writeAux()

void writeAux ( const objectRegistry registry) const

Write auxiliary information.

Definition at line 148 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 166 of file meshReader.C.

References IOstream::currentVersion, Foam::endl(), Foam::Info, polyMesh::removeFiles(), IOstream::UNCOMPRESSED, and polyMesh::writeObject().

Here is the call graph for this function:

◆ operator=()

void operator= ( const meshReader )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ unknownModel

const Foam::cellModel * unknownModel
staticprotected
Initial value:
(
"unknown"
)
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
Definition: cellModeller.C:100

Pointers to cell shape models.

Definition at line 236 of file meshReader.H.

◆ tetModel

const Foam::cellModel * tetModel
staticprotected
Initial value:

Definition at line 237 of file meshReader.H.

◆ pyrModel

const Foam::cellModel * pyrModel
staticprotected
Initial value:

Definition at line 238 of file meshReader.H.

◆ prismModel

const Foam::cellModel * prismModel
staticprotected
Initial value:

Definition at line 239 of file meshReader.H.

◆ hexModel

const Foam::cellModel * hexModel
staticprotected
Initial value:

Definition at line 240 of file meshReader.H.

◆ geometryFile_

fileName geometryFile_
protected

Referenced filename.

Definition at line 243 of file meshReader.H.

◆ scaleFactor_

scalar scaleFactor_
protected

Geometry scaling.

Definition at line 246 of file meshReader.H.

◆ points_

pointField points_
protected

Points supporting the mesh.

Definition at line 249 of file meshReader.H.

◆ origCellId_

labelList origCellId_
protected

Lookup original Cell number for a given cell.

Definition at line 252 of file meshReader.H.

◆ boundaryIds_

List<List<cellFaceIdentifier> > boundaryIds_
protected

Identify boundary faces by cells and their faces.

for each patch

Definition at line 256 of file meshReader.H.

◆ patchTypes_

wordList patchTypes_
protected

Boundary patch types.

Definition at line 259 of file meshReader.H.

◆ patchNames_

wordList patchNames_
protected

Boundary patch names.

Definition at line 262 of file meshReader.H.

◆ patchPhysicalTypes_

wordList patchPhysicalTypes_
protected

Boundary patch physical types.

Definition at line 265 of file meshReader.H.

◆ cellFaces_

faceListList cellFaces_
protected

List of faces for every cell.

Definition at line 268 of file meshReader.H.

◆ baffleFaces_

faceList baffleFaces_
protected

List of each baffle face.

Definition at line 271 of file meshReader.H.

◆ cellTableId_

labelList cellTableId_
protected

Cell table id for each cell.

Definition at line 274 of file meshReader.H.

◆ cellTable_

cellTable cellTable_
protected

Cell table persistent data saved as a dictionary.

Definition at line 277 of file meshReader.H.


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