Loading...
Searching...
No Matches
meshWriter Class Referenceabstract

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

#include <meshWriter.H>

Inheritance diagram for meshWriter:
Collaboration diagram for meshWriter:

Public Member Functions

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

Static Public Attributes

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

Protected Attributes

const polyMeshmesh_
 Mesh reference.
scalar scaleFactor_
 Scaling factor for points (eg, [m] -> [mm]).
boundaryRegion boundaryRegion_
 boundaryRegion persistent data saved as a dictionary
cellTable cellTable_
 cellTable persistent data saved as a dictionary
labelList cellTableId_
 cellTable IDs for each cell

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 78 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 31 of file meshWriter.C.

References boundaryRegion_, cellTable_, cellTableId_, mesh, mesh_, and scaleFactor_.

◆ ~meshWriter()

~meshWriter ( )
virtual

Destructor.

Definition at line 53 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.

References fileName::null, and timeName.

Member Data Documentation

◆ mesh_

const polyMesh& mesh_
protected

◆ scaleFactor_

scalar scaleFactor_
protected

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

Definition at line 105 of file meshWriter.H.

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

◆ boundaryRegion_

boundaryRegion boundaryRegion_
protected

boundaryRegion persistent data saved as a dictionary

Definition at line 110 of file meshWriter.H.

Referenced by meshWriter(), and STARCDMeshWriter::STARCDMeshWriter().

◆ cellTable_

cellTable cellTable_
protected

cellTable persistent data saved as a dictionary

Definition at line 115 of file meshWriter.H.

Referenced by meshWriter(), and STARCDMeshWriter::STARCDMeshWriter().

◆ cellTableId_

labelList cellTableId_
protected

cellTable IDs for each cell

Definition at line 120 of file meshWriter.H.

Referenced by meshWriter().

◆ defaultMeshName

Foam::string defaultMeshName = "meshExport"
static

Specify a default mesh name.

Definition at line 129 of file meshWriter.H.

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


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