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 cartesian2DMeshGenerator
28 Creates a 2D cartesian mesh from the quadtree
31 cartesian2DMeshGenerator.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef cartesian2DMeshGenerator_H
36 #define cartesian2DMeshGenerator_H
38 #include "polyMeshGen.H"
39 #include "IOdictionary.H"
40 #include "workflowControls.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward declarations
52 /*---------------------------------------------------------------------------*\
53 Class cartesian2DMeshGenerator Declaration
54 \*---------------------------------------------------------------------------*/
56 class cartesian2DMeshGenerator
62 //- pointer to the surface
63 const triSurf* surfacePtr_;
65 //- pointer to the modified surface mesh
66 const triSurf* modSurfacePtr_;
68 //- IOdictionary containing information about cell sizes, etc..
69 IOdictionary meshDict_;
71 //- pointer to the octree
72 meshOctree* octreePtr_;
77 //- workflow controller
78 workflowControls controller_;
80 // Private member functions
81 //- create cartesian mesh
82 void createCartesianMesh();
84 //- prepare mesh surface
85 void surfacePreparation();
87 //- map mesh to the surface and untangle surface
88 void mapMeshToSurface();
90 //- capture edges and corners
91 void extractPatches();
93 //- capture edges and corners
94 void mapEdgesAndCorners();
96 //- optimise surface mesh
97 void optimiseMeshSurface();
99 //- add boundary layers
100 void generateBoundaryLayers();
102 //- refine boundary layers
103 void refBoundaryLayers();
105 //- replace boundaries
106 void replaceBoundaries();
108 //- renumber the mesh
114 //- Disallow default bitwise copy construct
115 cartesian2DMeshGenerator(const cartesian2DMeshGenerator&);
117 //- Disallow default bitwise assignment
118 void operator=(const cartesian2DMeshGenerator&);
124 //- Construct from time
125 cartesian2DMeshGenerator(const Time&);
129 ~cartesian2DMeshGenerator();
135 void writeMesh() const;
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //