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/>.
28 Creates cartesian mesh from the octree
33 \*---------------------------------------------------------------------------*/
35 #ifndef tetMeshGenerator_H
36 #define tetMeshGenerator_H
38 #include "polyMeshGen.H"
39 #include "IOdictionary.H"
40 #include "workflowControls.H"
41 //#include "volFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // Forward declarations
53 /*---------------------------------------------------------------------------*\
54 Class tetMeshGenerator Declaration
55 \*---------------------------------------------------------------------------*/
57 class tetMeshGenerator
63 //- pointer to the surface
64 const triSurf* surfacePtr_;
66 //- pointer to the modified surface mesh
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
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 //- capture edges and corners
95 void mapEdgesAndCorners();
97 //- optimise surface mesh
98 void optimiseMeshSurface();
100 //- add boundary layers
101 void generateBoundaryLayers();
103 //- mesh optimisation
104 void optimiseFinalMesh();
106 //- re-project points back on the surface mesh after back-scaling
107 void projectSurfaceAfterBackScaling();
109 //- refine boundary layers
110 void refBoundaryLayers();
112 //- replace boundaries
113 void replaceBoundaries();
115 //- renumber the mesh
121 //- Disallow default bitwise copy construct
122 tetMeshGenerator(const tetMeshGenerator&);
124 //- Disallow default bitwise assignment
125 void operator=(const tetMeshGenerator&);
131 //- Construct from time
132 tetMeshGenerator(const Time&);
142 void writeMesh() const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 // ************************************************************************* //