meshWriter.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "meshWriter.H"
27 #include "cellModeller.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 Foam::string Foam::meshWriter::defaultMeshName = "meshExport";
32 
33 
34 const Foam::cellModel* Foam::meshWriter::unknownModel = Foam::cellModeller::
35 lookup
36 (
37  "unknown"
38 );
39 
40 
41 const Foam::cellModel* Foam::meshWriter::tetModel = Foam::cellModeller::
42 lookup
43 (
44  "tet"
45 );
46 
47 
48 const Foam::cellModel* Foam::meshWriter::pyrModel = Foam::cellModeller::
49 lookup
50 (
51  "pyr"
52 );
53 
54 
55 const Foam::cellModel* Foam::meshWriter::prismModel = Foam::cellModeller::
56 lookup
57 (
58  "prism"
59 );
60 
61 
62 const Foam::cellModel* Foam::meshWriter::hexModel = Foam::cellModeller::
63 lookup
64 (
65  "hex"
66 );
67 
68 
69 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
70 
71 Foam::meshWriter::meshWriter(const polyMesh& mesh, const scalar scaleFactor)
72 :
73  mesh_(mesh),
74  scaleFactor_(scaleFactor),
75  writeBoundary_(true),
76  boundaryRegion_(),
77  cellTable_(),
78  cellTableId_()
79 {}
80 
81 
82 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
83 
85 {}
86 
87 
88 // ************************************************************************* //
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
Definition: cellModeller.C:100
dynamicFvMesh & mesh
Maps a geometry to a set of cell primitives, which enables geometric cell data to be calculated witho...
Definition: cellModel.H:64
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
meshWriter(const polyMesh &, const scalar scaleFactor=1.0)
Create a writer object.
Definition: meshWriter.C:71
A class for handling character strings derived from std::string.
Definition: string.H:76
virtual ~meshWriter()
Destructor.
Definition: meshWriter.C:84