1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 A namespace for holding various types of mesh writers.
35 write OpenFOAM meshes and/or results to another CFD format
36 - currently just STAR-CD
40 "constant/boundaryRegion" is an IOMap<dictionary> that contains
41 the boundary type and names. eg,
47 Label Default_Boundary_Region;
60 BoundaryType pressure;
72 \*---------------------------------------------------------------------------*/
78 #include "boundaryRegion.H"
79 #include "cellTable.H"
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 /*---------------------------------------------------------------------------*\
87 Class meshWriter Declaration
88 \*---------------------------------------------------------------------------*/
92 // Private Member Functions
94 //- Disallow default bitwise copy construct
95 meshWriter(const meshWriter&);
97 //- Disallow default bitwise assignment
98 void operator=(const meshWriter&);
106 const polyMesh& mesh_;
108 //- Scaling factor for points (eg, [m] -> [mm])
114 //- boundaryRegion persistent data saved as a dictionary
115 boundaryRegion boundaryRegion_;
117 //- cellTable persistent data saved as a dictionary
118 cellTable cellTable_;
120 //- cellTable IDs for each cell
121 labelList cellTableId_;
123 //- Pointers to cell shape models
124 static const cellModel* unknownModel;
125 static const cellModel* tetModel;
126 static const cellModel* pyrModel;
127 static const cellModel* prismModel;
128 static const cellModel* hexModel;
133 // Static data members
135 //- Specify a default mesh name
136 static string defaultMeshName;
140 //- Create a writer obejct
144 const scalar scaleFactor = 1.0
149 virtual ~meshWriter();
156 //- Set points scaling
157 void scaleFactor(const scalar scaling)
159 scaleFactor_ = scaling;
162 //- Suppress writing bnd file
165 writeBoundary_ = false;
170 //- Write volume mesh. Subclass must supply this method
173 const fileName& timeName = fileName::null
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************************************************************* //