meshWriter Class Referenceabstract

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

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

Public Member Functions

 meshWriter (const polyMesh &, const scalar scaling=1.0)
 Create a writer object with given output scaling. More...
 
virtual ~meshWriter ()
 Destructor. More...
 
virtual bool write (const fileName &timeName=fileName::null) const =0
 Write volume mesh. Subclass must supply this method. More...
 

Static Public Attributes

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

Protected Attributes

const polyMeshmesh_
 Mesh reference. More...
 
scalar scaleFactor_
 Scaling factor for points (eg, [m] -> [mm]) 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...
 

Detailed Description

Write OpenFOAM meshes and/or results to another CFD format.

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 82 of file meshWriter.H.

Constructor & Destructor Documentation

◆ meshWriter()

meshWriter ( const polyMesh mesh,
const scalar  scaling = 1.0 
)

Create a writer object with given output scaling.

Treats a zero or negative scale factor as unity scaling.

Definition at line 38 of file meshWriter.C.

References meshWriter::scaleFactor_.

◆ ~meshWriter()

~meshWriter ( )
virtual

Destructor.

Definition at line 60 of file meshWriter.C.

Member Function Documentation

◆ write()

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

Write volume mesh. Subclass must supply this method.

Implemented in FIREMeshWriter, and STARCDMeshWriter.

Member Data Documentation

◆ mesh_

const polyMesh& mesh_
protected

Mesh reference.

Definition at line 98 of file meshWriter.H.

Referenced by STARCDMeshWriter::STARCDMeshWriter().

◆ scaleFactor_

scalar scaleFactor_
protected

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

Definition at line 101 of file meshWriter.H.

Referenced by meshWriter::meshWriter().

◆ boundaryRegion_

boundaryRegion boundaryRegion_
protected

boundaryRegion persistent data saved as a dictionary

Definition at line 104 of file meshWriter.H.

Referenced by STARCDMeshWriter::STARCDMeshWriter().

◆ cellTable_

cellTable cellTable_
protected

cellTable persistent data saved as a dictionary

Definition at line 107 of file meshWriter.H.

Referenced by STARCDMeshWriter::STARCDMeshWriter().

◆ cellTableId_

labelList cellTableId_
protected

cellTable IDs for each cell

Definition at line 110 of file meshWriter.H.

◆ defaultMeshName

Foam::string defaultMeshName = "meshExport"
static

Specify a default mesh name.

Definition at line 117 of file meshWriter.H.

Referenced by FIREMeshWriter::write(), and STARCDMeshWriter::write().


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