meshReader Class Referenceabstract

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

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

Classes

class  cellFaceIdentifier
 Identify cell faces in terms of cell Id and face Id. More...
 

Public Member Functions

 meshReader (const fileName &, const scalar scaling=1.0)
 Construct from fileName. More...
 
virtual ~meshReader ()=default
 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 &, IOstreamOption streamOpt=IOstreamOption(IOstreamOption::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...
 
labelList patchStarts_
 Polyhedral mesh boundary patch start indices and dimensions. More...
 
labelList patchSizes_
 
label nInternalFaces_
 Number of internal faces for polyMesh. More...
 
faceList meshFaces_
 Global face list for polyMesh. 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...
 

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 PROSTAR 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 68 of file meshReader.H.

Constructor & Destructor Documentation

◆ meshReader()

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

Construct from fileName.

Definition at line 151 of file meshReader.C.

References meshReader::scaleFactor_.

◆ ~meshReader()

virtual ~meshReader ( )
virtualdefault

Destructor.

Member Function Documentation

◆ readGeometry()

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

Subclasses are required to supply this information.

Implemented in FIREMeshReader, and STARCDMeshReader.

◆ warnDuplicates()

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

Warn about repeated names.

Definition at line 36 of file meshReaderAux.C.

References Foam::endl(), HashTable< T, Key, Hash >::find(), forAllConstIters, Foam::Info, HashTable< T, Key, Hash >::insert(), Foam::nl, and UList< T >::size().

Here is the call graph for this function:

◆ mesh()

Foam::autoPtr< Foam::polyMesh > mesh ( const objectRegistry registry)
virtual

Create and return polyMesh.

Reimplemented in FIREMeshReader.

Definition at line 81 of file meshReader.C.

References polyMesh::addPatches(), IOobject::AUTO_WRITE, polyMesh::boundaryMesh(), TimePaths::constant(), polyMesh::defaultRegion, Foam::endl(), Foam::Info, mesh, meshPtr, polyBoundaryMesh::names(), Time::New(), IOobject::NO_READ, and objectRegistry::time().

Here is the call graph for this function:

◆ writeAux()

void writeAux ( const objectRegistry registry) const

Write auxiliary information.

Definition at line 145 of file meshReaderAux.C.

References IOstreamOption::ASCII, and IOstreamOption::BINARY.

◆ writeMesh()

void writeMesh ( const polyMesh mesh,
IOstreamOption  streamOpt = IOstreamOption(IOstreamOption::BINARY) 
) const

Write mesh.

Definition at line 124 of file meshReader.C.

References Foam::endl(), Foam::Info, mesh, polyMesh::removeFiles(), and fvMesh::writeObject().

Here is the call graph for this function:

Member Data Documentation

◆ geometryFile_

fileName geometryFile_
protected

Referenced filename.

Definition at line 210 of file meshReader.H.

◆ scaleFactor_

scalar scaleFactor_
protected

Geometry scaling.

Definition at line 213 of file meshReader.H.

Referenced by meshReader::meshReader().

◆ points_

pointField points_
protected

Points supporting the mesh.

Definition at line 216 of file meshReader.H.

Referenced by FIREMeshReader::readPoints().

◆ origCellId_

labelList origCellId_
protected

Lookup original Cell number for a given cell.

Definition at line 219 of file meshReader.H.

◆ boundaryIds_

List<List<cellFaceIdentifier> > boundaryIds_
protected

Identify boundary faces by cells and their faces.

for each patch

Definition at line 223 of file meshReader.H.

◆ patchTypes_

wordList patchTypes_
protected

Boundary patch types.

Definition at line 226 of file meshReader.H.

◆ patchNames_

wordList patchNames_
protected

Boundary patch names.

Definition at line 229 of file meshReader.H.

◆ patchPhysicalTypes_

wordList patchPhysicalTypes_
protected

Boundary patch physical types.

Definition at line 232 of file meshReader.H.

◆ patchStarts_

labelList patchStarts_
protected

Polyhedral mesh boundary patch start indices and dimensions.

Definition at line 235 of file meshReader.H.

◆ patchSizes_

labelList patchSizes_
protected

Definition at line 236 of file meshReader.H.

◆ nInternalFaces_

label nInternalFaces_
protected

Number of internal faces for polyMesh.

Definition at line 239 of file meshReader.H.

◆ meshFaces_

faceList meshFaces_
protected

Global face list for polyMesh.

Definition at line 242 of file meshReader.H.

◆ cellFaces_

faceListList cellFaces_
protected

List of faces for every cell.

Definition at line 245 of file meshReader.H.

◆ baffleFaces_

faceList baffleFaces_
protected

List of each baffle face.

Definition at line 248 of file meshReader.H.

◆ cellTableId_

labelList cellTableId_
protected

Cell table id for each cell.

Definition at line 251 of file meshReader.H.

◆ cellTable_

cellTable cellTable_
protected

Cell table persistent data saved as a dictionary.

Definition at line 254 of file meshReader.H.

Referenced by STARCDMeshReader::readAux().


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