Loading...
Searching...
No Matches
meshReader Class Referenceabstract

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

#include <meshReader.H>

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 scaling=1.0)
 Construct from fileName.
virtual ~meshReader ()=default
 Destructor.
virtual autoPtr< polyMeshmesh (const objectRegistry &)
 Create and return polyMesh.
void writeAux (const objectRegistry &) const
 Write auxiliary information.
void writeMesh (const polyMesh &, IOstreamOption streamOpt=IOstreamOption(IOstreamOption::BINARY)) const
 Write mesh.

Static Public Member Functions

static void warnDuplicates (const word &context, const wordList &)
 Warn about repeated names.

Protected Member Functions

virtual bool readGeometry (const scalar scaleFactor=1.0)=0
 Subclasses are required to supply this information.

Protected Attributes

fileName geometryFile_
 Referenced filename.
scalar scaleFactor_
 Geometry scaling.
pointField points_
 Points supporting the mesh.
labelList origCellId_
 Lookup original Cell number for a given cell.
List< List< cellFaceIdentifier > > boundaryIds_
 Identify boundary faces by cells and their faces.
wordList patchTypes_
 Boundary patch types.
wordList patchNames_
 Boundary patch names.
wordList patchPhysicalTypes_
 Boundary patch physical types.
labelList patchStarts_
 Polyhedral mesh boundary patch start indices and dimensions.
labelList patchSizes_
label nInternalFaces_
 Number of internal faces for polyMesh.
faceList meshFaces_
 Global face list for polyMesh.
faceListList cellFaces_
 List of faces for every cell.
faceList baffleFaces_
 List of each baffle face.
labelList cellTableId_
 Cell table id for each cell.
cellTable cellTable_
 Cell table persistent data saved as a dictionary.

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

Constructor & Destructor Documentation

◆ meshReader()

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

◆ ~meshReader()

virtual ~meshReader ( )
virtualdefault

Destructor.

References IOstreamOption::BINARY.

Member Function Documentation

◆ readGeometry()

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

Subclasses are required to supply this information.

Implemented in ensightMeshReader, FIREMeshReader, and STARCDMeshReader.

Referenced by mesh().

Here is the caller graph for this function:

◆ warnDuplicates()

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

Warn about repeated names.

Definition at line 29 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().

Referenced by mesh().

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.

Reimplemented in FIREMeshReader.

Definition at line 74 of file meshReader.C.

References IOobjectOption::AUTO_WRITE, TimePaths::constant(), polyMesh::defaultRegion, Foam::endl(), Foam::Info, mesh(), meshFaces_, meshPtr, autoPtr< T >::New(), nInternalFaces_, IOobjectOption::NO_READ, points_, readGeometry(), objectRegistry::time(), and warnDuplicates().

Referenced by mesh(), and writeMesh().

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

References IOstreamOption::ASCII, IOstreamOption::BINARY, cellTable_, cellTableId_, and origCellId_.

Referenced by writeMesh().

Here is the caller graph for this function:

◆ writeMesh()

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

Write mesh.

Definition at line 119 of file meshReader.C.

References Foam::endl(), Foam::Info, mesh(), and writeAux().

Here is the call graph for this function:

Member Data Documentation

◆ geometryFile_

fileName geometryFile_
protected

Referenced filename.

Definition at line 261 of file meshReader.H.

Referenced by meshReader(), FIREMeshReader::readGeometry(), and STARCDMeshReader::readGeometry().

◆ scaleFactor_

scalar scaleFactor_
protected

Geometry scaling.

Definition at line 266 of file meshReader.H.

Referenced by FIREMeshReader::mesh(), and meshReader().

◆ points_

pointField points_
protected

◆ origCellId_

labelList origCellId_
protected

Lookup original Cell number for a given cell.

Definition at line 276 of file meshReader.H.

Referenced by meshReader(), STARCDMeshReader::readCells(), and writeAux().

◆ boundaryIds_

List<List<cellFaceIdentifier> > boundaryIds_
protected

Identify boundary faces by cells and their faces.

for each patch

Definition at line 283 of file meshReader.H.

Referenced by meshReader(), and STARCDMeshReader::readBoundary().

◆ patchTypes_

wordList patchTypes_
protected

Boundary patch types.

Definition at line 288 of file meshReader.H.

Referenced by meshReader(), and STARCDMeshReader::readBoundary().

◆ patchNames_

wordList patchNames_
protected

Boundary patch names.

Definition at line 293 of file meshReader.H.

Referenced by FIREMeshReader::addPatches(), meshReader(), STARCDMeshReader::readBoundary(), and FIREMeshReader::reorganize().

◆ patchPhysicalTypes_

wordList patchPhysicalTypes_
protected

Boundary patch physical types.

Definition at line 298 of file meshReader.H.

Referenced by meshReader(), and STARCDMeshReader::readBoundary().

◆ patchStarts_

labelList patchStarts_
protected

Polyhedral mesh boundary patch start indices and dimensions.

Definition at line 303 of file meshReader.H.

Referenced by FIREMeshReader::addPatches(), meshReader(), and FIREMeshReader::reorganize().

◆ patchSizes_

labelList patchSizes_
protected

◆ nInternalFaces_

label nInternalFaces_
protected

Number of internal faces for polyMesh.

Definition at line 309 of file meshReader.H.

Referenced by FIREMeshReader::addPatches(), mesh(), meshReader(), and FIREMeshReader::reorganize().

◆ meshFaces_

◆ cellFaces_

faceListList cellFaces_
protected

List of faces for every cell.

Definition at line 319 of file meshReader.H.

Referenced by STARCDMeshReader::cullPoints(), meshReader(), and STARCDMeshReader::readCells().

◆ baffleFaces_

faceList baffleFaces_
protected

List of each baffle face.

Definition at line 324 of file meshReader.H.

Referenced by STARCDMeshReader::cullPoints(), meshReader(), and STARCDMeshReader::readCells().

◆ cellTableId_

labelList cellTableId_
protected

◆ cellTable_

cellTable cellTable_
protected

Cell table persistent data saved as a dictionary.

Definition at line 334 of file meshReader.H.

Referenced by FIREMeshReader::mesh(), meshReader(), STARCDMeshReader::readAux(), STARCDMeshReader::readCells(), FIREMeshReader::readSelections(), and writeAux().


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