meshWriter Class Referenceabstract

write OpenFOAM meshes and/or results to another CFD format More...

Inheritance diagram for meshWriter:
Collaboration diagram for meshWriter:

Public Member Functions

 meshWriter (const polyMesh &, const scalar scaleFactor=1.0)
 Create a writer object. More...
 
 meshWriter (const meshWriter &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~meshWriter ()
 Destructor. More...
 
void scaleFactor (const scalar scaling)
 Set points scaling. More...
 
void noBoundary ()
 Suppress writing bnd file. More...
 
virtual bool write (const fileName &timeName=fileName::null) const =0
 Write volume mesh. Subclass must supply this method. More...
 
void operator= (const meshWriter &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Attributes

static string defaultMeshName = "meshExport"
 Specify a default mesh name. More...
 

Protected Attributes

const polyMesh & mesh_
 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

static const cellModel * unknownModel
 Pointers to cell shape models. More...
 
static const cellModel * tetModel
 
static const cellModel * pyrModel
 
static const cellModel * prismModel
 
static const cellModel * hexModel
 

Detailed Description

write OpenFOAM meshes and/or results to another CFD format

- currently just STAR-CD

Files

"constant/boundaryRegion" is an IOMap<dictionary> that contains the boundary type and names. eg,

        (
            0
            {
                BoundaryType    wall;
                Label           Default_Boundary_Region;
            }

            1
            {
                BoundaryType    inlet;
                Label           inlet_1;
            }

            ...

            4
            {
                BoundaryType    pressure;
                Label           outlet;
            }
        )
Source files

Definition at line 89 of file meshWriter.H.

Constructor & Destructor Documentation

◆ meshWriter() [1/2]

meshWriter ( const polyMesh &  mesh,
const scalar  scaleFactor = 1.0 
)

Create a writer object.

Definition at line 71 of file meshWriter.C.

◆ meshWriter() [2/2]

meshWriter ( const meshWriter &  )
delete

Disallow default bitwise copy construction.

◆ ~meshWriter()

~meshWriter ( )
virtual

Destructor.

Definition at line 84 of file meshWriter.C.

Member Function Documentation

◆ scaleFactor()

void scaleFactor ( const scalar  scaling)
inline

Set points scaling.

Definition at line 150 of file meshWriter.H.

◆ noBoundary()

void noBoundary ( )
inline

Suppress writing bnd file.

Definition at line 156 of file meshWriter.H.

References fileName::null, meshWriter::operator=(), timeName, and meshWriter::write().

Here is the call graph for this function:

◆ write()

virtual bool write ( const fileName &  timeName = fileName::null) const
pure virtual

Write volume mesh. Subclass must supply this method.

Implemented in STARCD.

Referenced by meshWriter::noBoundary().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const meshWriter &  )
delete

Disallow default bitwise assignment.

Referenced by meshWriter::noBoundary().

Here is the caller graph for this function:

Member Data Documentation

◆ mesh_

const polyMesh& mesh_
protected

Mesh reference.

Definition at line 96 of file meshWriter.H.

Referenced by STARCD::STARCD(), and STARCD::write().

◆ scaleFactor_

scalar scaleFactor_
protected

Scaling factor for points (eg, [m] -> [mm])

Definition at line 99 of file meshWriter.H.

◆ writeBoundary_

bool writeBoundary_
protected

Write bnd file.

Definition at line 102 of file meshWriter.H.

Referenced by STARCD::write().

◆ boundaryRegion_

boundaryRegion boundaryRegion_
protected

boundaryRegion persistent data saved as a dictionary

Definition at line 105 of file meshWriter.H.

Referenced by STARCD::STARCD().

◆ cellTable_

cellTable cellTable_
protected

cellTable persistent data saved as a dictionary

Definition at line 108 of file meshWriter.H.

Referenced by STARCD::STARCD().

◆ cellTableId_

labelList cellTableId_
protected

cellTable IDs for each cell

Definition at line 111 of file meshWriter.H.

◆ unknownModel

const Foam::cellModel * unknownModel
staticprotected
Initial value:

Pointers to cell shape models.

Definition at line 114 of file meshWriter.H.

◆ tetModel

const Foam::cellModel * tetModel
staticprotected
Initial value:

Definition at line 115 of file meshWriter.H.

◆ pyrModel

const Foam::cellModel * pyrModel
staticprotected
Initial value:

Definition at line 116 of file meshWriter.H.

◆ prismModel

const Foam::cellModel * prismModel
staticprotected
Initial value:

Definition at line 117 of file meshWriter.H.

◆ hexModel

const Foam::cellModel * hexModel
staticprotected
Initial value:

Definition at line 118 of file meshWriter.H.

◆ defaultMeshName

Foam::string defaultMeshName = "meshExport"
static

Specify a default mesh name.

Definition at line 126 of file meshWriter.H.

Referenced by STARCD::write().


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