FreeFOAM The Cross-Platform CFD Toolkit
meshWriter Class Reference

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

#include <conversion/meshWriter.H>


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,
@verbatim 
    (
        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.

+ Inheritance diagram for meshWriter:
+ Collaboration diagram for meshWriter:

List of all members.

Public Member Functions

 meshWriter (const polyMesh &, const scalar scaleFactor=1.0)
 Ccreate a writer obejct.
virtual ~meshWriter ()
 Destructor.
void scaleFactor (const scalar scaling)
 Set points scaling.
void noBoundary ()
 Suppress writing bnd file.
virtual bool write (const fileName &timeName=fileName::null) const =0
 Write volume mesh.
virtual bool writeSurface (const fileName &timeName=fileName::null, const bool &triangulate=false) const
 Write surface mesh with optional triangulation.

Static Public Attributes

static string defaultMeshName = "meshExport"
static string defaultSurfaceName = "surfExport"

Protected Attributes

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

Static Protected Attributes

static const cellModelunknownModel
 Pointers to cell shape models.
static const cellModeltetModel
static const cellModelpyrModel
static const cellModelprismModel
static const cellModelhexModel

Constructor & Destructor Documentation

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

Ccreate a writer obejct.

Definition at line 72 of file meshWriter.C.

~meshWriter ( )
virtual

Destructor.

Definition at line 85 of file meshWriter.C.


Member Function Documentation

void scaleFactor ( const scalar  scaling)
inline

Set points scaling.

Definition at line 157 of file meshWriter.H.

References meshWriter::scaleFactor_.

void noBoundary ( )
inline

Suppress writing bnd file.

Definition at line 163 of file meshWriter.H.

References meshWriter::writeBoundary_.

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

Write volume mesh.

subclass must to supply this method

Implemented in STARCD.

virtual bool writeSurface ( const fileName timeName = fileName::null,
const bool &  triangulate = false 
) const
inlinevirtual

Write surface mesh with optional triangulation.

subclass could supply this information

Reimplemented in STARCD.

Definition at line 181 of file meshWriter.H.


Member Data Documentation

const polyMesh& mesh_
protected

Mesh reference.

Definition at line 105 of file meshWriter.H.

scalar scaleFactor_
protected

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

Definition at line 108 of file meshWriter.H.

Referenced by meshWriter::scaleFactor().

bool writeBoundary_
protected

Write bnd file.

Definition at line 111 of file meshWriter.H.

Referenced by meshWriter::noBoundary().

boundaryRegion boundaryRegion_
protected

boundaryRegion persistent data saved as a dictionary

Definition at line 114 of file meshWriter.H.

cellTable cellTable_
protected

cellTable persistent data saved as a dictionary

Definition at line 117 of file meshWriter.H.

labelList cellTableId_
protected

cellTable IDs for each cell

Definition at line 120 of file meshWriter.H.

const Foam::cellModel * unknownModel
staticprotected
Initial value:

Pointers to cell shape models.

Definition at line 123 of file meshWriter.H.

const Foam::cellModel * tetModel
staticprotected
Initial value:

Definition at line 124 of file meshWriter.H.

const Foam::cellModel * pyrModel
staticprotected
Initial value:

Definition at line 125 of file meshWriter.H.

const Foam::cellModel * prismModel
staticprotected
Initial value:

Definition at line 126 of file meshWriter.H.

const Foam::cellModel * hexModel
staticprotected
Initial value:

Definition at line 127 of file meshWriter.H.

Foam::string defaultMeshName = "meshExport"
static

Definition at line 134 of file meshWriter.H.

Referenced by STARCD::write().

Foam::string defaultSurfaceName = "surfExport"
static

Definition at line 135 of file meshWriter.H.

Referenced by STARCD::writeSurface().


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