1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
25 cartesianMeshGenerator
28 Creates cartesian mesh from the octree
31 cartesianMeshGenerator.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef cartesianMeshGenerator_H
36 #define cartesianMeshGenerator_H
38 #include "polyMeshGen.H"
39 #include "IOdictionary.H"
40 #include "workflowControls.H"
41 //#include "volFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // Forward declarations
53 /*---------------------------------------------------------------------------*\
54 Class cartesianMeshGenerator Declaration
55 \*---------------------------------------------------------------------------*/
57 class cartesianMeshGenerator
63 //- pointer to the surface
64 const triSurf* surfacePtr_;
66 //- pointer to the modified surface
67 const triSurf* modSurfacePtr_;
69 //- IOdictionary containing information about cell sizes, etc..
70 IOdictionary meshDict_;
72 //- pointer to the octree
73 meshOctree* octreePtr_;
78 //- workflow controller
79 workflowControls controller_;
81 // Private member functions
82 //- create cartesian mesh
83 void createCartesianMesh();
85 //- prepare mesh surface
86 void surfacePreparation();
88 //- map mesh to the surface and untangle surface
89 void mapMeshToSurface();
91 //- capture edges and corners
92 void extractPatches();
94 //- map points at feature edges and corners
95 void mapEdgesAndCorners();
97 //- optimise surface mesh
98 void optimiseMeshSurface();
100 //- add boundary layers
101 void generateBoundaryLayers();
103 //- refine boundary layers
104 void refBoundaryLayers();
106 //- mesh optimisation
107 void optimiseFinalMesh();
109 //- re-project points back on the surface mesh after back-scaling
110 void projectSurfaceAfterBackScaling();
112 //- replace boundaries
113 void replaceBoundaries();
115 //- renumber the mesh
121 //- Disallow default bitwise copy construct
122 cartesianMeshGenerator(const cartesianMeshGenerator&);
124 //- Disallow default bitwise assignment
125 void operator=(const cartesianMeshGenerator&);
131 //- Construct from time
132 cartesianMeshGenerator(const Time&);
136 ~cartesianMeshGenerator();
142 void writeMesh() const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 // ************************************************************************* //