Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Static Private Attributes
STARCD Class Reference

Writes polyMesh in pro-STAR (v4) bnd/cel/vrt format. More...

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

Public Member Functions

 STARCD (const polyMesh &, const scalar scaleFactor=1.0)
 Open a file for writing. More...
 
virtual ~STARCD ()
 Destructor. More...
 
void rmFiles (const fileName &baseName) const
 Remove STAR-CD files for the baseName. More...
 
virtual bool write (const fileName &meshName=fileName::null) const
 Write volume mesh. More...
 
- Public Member Functions inherited from meshWriter
 meshWriter (const polyMesh &, const scalar scaleFactor=1.0)
 Create a writer obejct. More...
 
virtual ~meshWriter ()
 Destructor. More...
 
void scaleFactor (const scalar scaling)
 Set points scaling. More...
 
void noBoundary ()
 Suppress writing bnd file. More...
 

Static Public Attributes

static const label foamToStarFaceAddr [4][6]
 Face addressing from OpenFOAM faces -> pro-STAR faces. More...
 
- Static Public Attributes inherited from meshWriter
static string defaultMeshName = "meshExport"
 Specify a default mesh name. More...
 

Private Member Functions

 STARCD (const STARCD &)
 Disallow default bitwise copy construct. More...
 
void operator= (const STARCD &)
 Disallow default bitwise assignment. More...
 
void writePoints (const fileName &baseName) const
 Write points. More...
 
void writeCells (const fileName &baseName) const
 Write cells. More...
 
void writeBoundary (const fileName &baseName) const
 Write boundary. More...
 
void getCellTable ()
 
label findDefaultBoundary () const
 

Static Private Member Functions

static void writeHeader (Ostream &, const char *filetype)
 Pro-STAR 4+ header format. More...
 

Static Private Attributes

static const char * defaultBoundaryName
 

Additional Inherited Members

- Protected Attributes inherited from meshWriter
const polyMeshmesh_
 Mesh reference. More...
 
scalar scaleFactor_
 Scaling factor for points (eg, [m] -> [mm]) More...
 
bool writeBoundary_
 Write bnd file. More...
 
boundaryRegion boundaryRegion_
 boundaryRegion persistent data saved as a dictionary More...
 
cellTable cellTable_
 cellTable persistent data saved as a dictionary More...
 
labelList cellTableId_
 cellTable IDs for each cell More...
 
- Static Protected Attributes inherited from meshWriter
static const cellModelunknownModel
 Pointers to cell shape models. More...
 
static const cellModeltetModel
 
static const cellModelpyrModel
 
static const cellModelprismModel
 
static const cellModelhexModel
 

Detailed Description

Writes polyMesh in pro-STAR (v4) bnd/cel/vrt format.

The cellTableId and cellTable information are used (if available). Otherwise the cellZones are used (if available).

Source files

Definition at line 55 of file STARCDMeshWriter.H.

Constructor & Destructor Documentation

◆ STARCD() [1/2]

STARCD ( const STARCD )
private

Disallow default bitwise copy construct.

◆ STARCD() [2/2]

STARCD ( const polyMesh mesh,
const scalar  scaleFactor = 1.0 
)

Open a file for writing.

Definition at line 468 of file STARCDMeshWriter.C.

◆ ~STARCD()

~STARCD ( )
virtual

Destructor.

Definition at line 483 of file STARCDMeshWriter.C.

Member Function Documentation

◆ operator=()

void operator= ( const STARCD )
private

Disallow default bitwise assignment.

◆ writeHeader()

void writeHeader ( Ostream os,
const char *  filetype 
)
staticprivate

Pro-STAR 4+ header format.

Definition at line 174 of file STARCDMeshWriter.C.

References Foam::endl(), and Foam::nl.

Here is the call graph for this function:

◆ writePoints()

void writePoints ( const fileName baseName) const
private

Write points.

Definition at line 189 of file STARCDMeshWriter.C.

References Foam::endl(), OSstream::flush(), forAll, Foam::Info, OFstream::name(), Foam::nl, points, OSstream::precision(), and IOstream::setf().

Here is the call graph for this function:

◆ writeCells()

void writeCells ( const fileName baseName) const
private

Write cells.

Definition at line 219 of file STARCDMeshWriter.C.

References cellId, cells, dict, Foam::endl(), f(), forAll, cellModel::index(), Foam::Info, cellShape::model(), OFstream::name(), Foam::nl, and List::size().

Here is the call graph for this function:

◆ writeBoundary()

void writeBoundary ( const fileName baseName) const
private

Write boundary.

Definition at line 361 of file STARCDMeshWriter.C.

References cellId, cells, Foam::endl(), cellShape::faces(), Foam::findIndex(), forAll, cellModel::index(), Foam::Info, cellShape::model(), OFstream::name(), Foam::name(), and patches.

Here is the call graph for this function:

◆ getCellTable()

void getCellTable ( )
private

◆ findDefaultBoundary()

Foam::label findDefaultBoundary ( ) const
private

Definition at line 48 of file STARCDMeshWriter.C.

References polyMesh::boundaryMesh(), STARCD::defaultBoundaryName, forAll, meshWriter::mesh_, Foam::name(), and patches.

Here is the call graph for this function:

◆ rmFiles()

void rmFiles ( const fileName baseName) const

Remove STAR-CD files for the baseName.

Definition at line 489 of file STARCDMeshWriter.C.

References Foam::rm().

Here is the call graph for this function:

◆ write()

bool write ( const fileName meshName = fileName::null) const
virtual

Write volume mesh.

Implements meshWriter.

Definition at line 498 of file STARCDMeshWriter.C.

References meshWriter::defaultMeshName, and meshName.

Field Documentation

◆ defaultBoundaryName

const char * defaultBoundaryName
staticprivate
Initial value:
=
"Default_Boundary_Region"

Definition at line 61 of file STARCDMeshWriter.H.

Referenced by STARCD::findDefaultBoundary().

◆ foamToStarFaceAddr

const Foam::label foamToStarFaceAddr
static
Initial value:
=
{
{ 4, 5, 2, 3, 0, 1 },
{ 0, 1, 4, 5, 2, -1 },
{ 5, 4, 2, 0, -1, -1 },
{ 0, 4, 3, 5, 2, -1 }
}

Face addressing from OpenFOAM faces -> pro-STAR faces.

Definition at line 94 of file STARCDMeshWriter.H.


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