Read pro-STAR vrt/cel/bnd files. The protected data in meshReader are filled. More...
#include <conversion/STARCDMeshReader.H>
Read pro-STAR vrt/cel/bnd files. The protected data in meshReader are filled.
Starting with pro-STAR version 4, the files have become easier to read.
Definition at line 62 of file STARCDMeshReader.H.
Inheritance diagram for STARCD:
Collaboration diagram for STARCD:Public Member Functions | |
| STARCD (const fileName &prefix, const objectRegistry &, const scalar scaleFactor=1.0) | |
| Construct from case name. | |
| virtual | ~STARCD () |
| Destructor. | |
Public Member Functions inherited from meshReader | |
| meshReader (const fileName &, const scalar scaleFactor=1.0) | |
| Construct from fileName. | |
| virtual | ~meshReader () |
| Destructor. | |
| virtual autoPtr< polyMesh > | mesh (const objectRegistry &) |
| Create and return polyMesh. | |
| void | writeAux (const objectRegistry &) const |
| Write auxiliary information. | |
| void | writeMesh (const polyMesh &, IOstream::streamFormat fmt=IOstream::BINARY) const |
| Write mesh. | |
Static Public Attributes | |
| static bool | keepSolids = false |
| Keep solids (default false) | |
Protected Types | |
| enum | cellType { starcdFluidType = 1, starcdSolidType = 2, starcdBaffleType = 3, starcdShellType = 4, starcdLineType = 5, starcdPointType = 6 } |
| enum | shapeType { starcdPoint = 1, starcdLine = 2, starcdShell = 3, starcdHex = 11, starcdPrism = 12, starcdTet = 13, starcdPyr = 14, starcdPoly = 255 } |
Protected Member Functions | |
| STARCD (const STARCD &) | |
| Disallow default bitwise copy construct. | |
| void | operator= (const STARCD &) |
| Disallow default bitwise assignment. | |
| virtual bool | readGeometry (const scalar scaleFactor=1.0) |
| Read the mesh from the file(s) | |
| void | readPoints (const fileName &, const scalar scaleFactor) |
| Read points from file. | |
| virtual void | readCells (const fileName &) |
| Read cell connectivities from file. | |
| void | cullPoints () |
| Remove unused points. | |
| void | readBoundary (const fileName &) |
| Read boundary (cell/face) definitions. | |
| void | readAux (const objectRegistry &) |
| Read auxiliary data from constant/{boundaryRegion,cellTable}. | |
Static Protected Member Functions | |
| static void | readToNewline (IFstream &) |
| Read and discard to newline. | |
| static bool | readHeader (IFstream &, word fileSignature) |
| Read header. | |
Protected Attributes | |
| cellShapeList | cellShapes_ |
| Cell shapes. | |
| labelList | mapToFoamPointId_ |
| Point labels (imported Point numbering not necessarily contiguous) | |
| labelList | mapToFoamCellId_ |
| Cell labels (imported Cell numbering not necessarily contiguous) | |
| boundaryRegion | boundaryRegion_ |
| Boundary region data. | |
Protected Attributes inherited from meshReader | |
| 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. | |
| 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. | |
Static Protected Attributes | |
| static const char * | defaultBoundaryName = "Default_Boundary_Region" |
| static const char * | defaultSolidBoundaryName = "Default_Boundary_Solid" |
| static const int | starToFoamFaceAddr [4][6] |
| Face addressing from pro-STAR faces -> OpenFOAM faces. | |
Static Protected Attributes inherited from meshReader | |
| static const cellModel * | unknownModel |
| Pointers to cell shape models. | |
| static const cellModel * | tetModel |
| static const cellModel * | pyrModel |
| static const cellModel * | prismModel |
| static const cellModel * | hexModel |
Additional Inherited Members | |
Static Public Member Functions inherited from meshReader | |
| static void | warnDuplicates (const word &context, const wordList &) |
| Warn about repeated names. | |
|
protected |
| starcdFluidType | |
| starcdSolidType | |
| starcdBaffleType | |
| starcdShellType | |
| starcdLineType | |
| starcdPointType |
Definition at line 125 of file STARCDMeshReader.H.
|
protected |
Definition at line 135 of file STARCDMeshReader.H.
| STARCD | ( | const fileName & | prefix, |
| const objectRegistry & | registry, | ||
| const scalar | scaleFactor = 1.0 |
||
| ) |
Construct from case name.
Definition at line 1058 of file STARCDMeshReader.C.
|
virtual |
Destructor.
Definition at line 1075 of file STARCDMeshReader.C.
|
protected |
Disallow default bitwise assignment.
|
protectedvirtual |
Read the mesh from the file(s)
Implements meshReader.
Definition at line 1042 of file STARCDMeshReader.C.
|
protected |
Read points from file.
original Point number for a given vertex
might need again in the future labelList origPointId(nPoints); origPointId = -1;
Definition at line 120 of file STARCDMeshReader.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, Foam::Info, Foam::max(), nPoints, and y.
|
protectedvirtual |
Read cell connectivities from file.
Definition at line 245 of file STARCDMeshReader.C.
References Foam::abort(), face::collapse(), Foam::endl(), f(), Foam::FatalError, FatalErrorIn, Foam::Info, Foam::max(), Foam::nl, List< T >::setSize(), and List< T >::size().
|
protected |
Remove unused points.
Definition at line 982 of file STARCDMeshReader.C.
References Foam::endl(), forAll, Foam::Info, Foam::inplaceRenumber(), Foam::inplaceReorder(), and nPoints.
|
protected |
Read boundary (cell/face) definitions.
Definition at line 636 of file STARCDMeshReader.C.
References HashTable< T, label, Hash< label > >::end(), Foam::endl(), HashTable< T, Key, Hash >::find(), forAll, forAllIter, HashTable< T, Key, Hash >::found(), IOstream::good(), Foam::identity(), Foam::Info, Foam::inplaceReorder(), HashTable< T, Key, Hash >::insert(), Foam::max(), Foam::name(), nPatches, List< T >::setSize(), List< T >::size(), and Foam::sortedOrder().
|
protected |
Read auxiliary data from constant/{boundaryRegion,cellTable}.
Definition at line 99 of file STARCDMeshReader.C.
|
staticprotected |
Read and discard to newline.
Definition at line 57 of file STARCDMeshReader.C.
Read header.
Definition at line 68 of file STARCDMeshReader.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, IOstream::good(), Foam::Info, and IFstream::name().
|
staticprotected |
Definition at line 71 of file STARCDMeshReader.H.
|
staticprotected |
Definition at line 72 of file STARCDMeshReader.H.
|
staticprotected |
Face addressing from pro-STAR faces -> OpenFOAM faces.
Definition at line 75 of file STARCDMeshReader.H.
|
protected |
Cell shapes.
Definition at line 78 of file STARCDMeshReader.H.
|
protected |
Point labels (imported Point numbering not necessarily contiguous)
Definition at line 81 of file STARCDMeshReader.H.
|
protected |
Cell labels (imported Cell numbering not necessarily contiguous)
Definition at line 84 of file STARCDMeshReader.H.
|
protected |
Boundary region data.
Definition at line 87 of file STARCDMeshReader.H.
|
static |
Keep solids (default false)
Definition at line 153 of file STARCDMeshReader.H.