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 voronoi mesh template from the octree
31 voronoiMeshGenerator.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef voronoiMeshGenerator_H
36 #define voronoiMeshGenerator_H
38 #include "polyMeshGen.H"
39 #include "IOdictionary.H"
40 #include "workflowControls.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward declarations
52 /*---------------------------------------------------------------------------*\
53 Class voronoiMeshGenerator Declaration
54 \*---------------------------------------------------------------------------*/
56 class voronoiMeshGenerator
62 //- pointer to the surface
63 const triSurf* surfacePtr_;
65 //- pointer to the modifier surface
66 const triSurf* modSurfacePtr_;
68 //- pointer to the octree
69 meshOctree* octreePtr_;
71 //- pointer to the list patches for boundary vertices
72 labelList* pointRegionsPtr_;
74 //- IOdictionary containing information about cell sizes, etc..
75 IOdictionary meshDict_;
80 //- workflow controller
81 workflowControls controller_;
83 // Private member functions
84 //- create voronoi mesh
85 void createVoronoiMesh();
87 //- prepare mesh surface
88 void surfacePreparation();
90 //- map mesh to the surface and untangle surface
91 void mapMeshToSurface();
93 //- assign patches to boundary faces
94 void extractPatches();
96 //- capture edges and corners
97 void mapEdgesAndCorners();
99 //- optimise surface mesh
100 void optimiseMeshSurface();
102 //- add boundary layers
103 void generateBoudaryLayers();
105 //- mesh optimisation
106 void optimiseFinalMesh();
108 //- re-project points back on the surface mesh after back-scaling
109 void projectSurfaceAfterBackScaling();
111 //- refine boundary layer
112 void refBoundaryLayers();
114 //- replace boundaries
115 void replaceBoundaries();
117 //- renumber the mesh
123 //- Disallow default bitwise copy construct
124 voronoiMeshGenerator(const voronoiMeshGenerator&);
126 //- Disallow default bitwise assignment
127 void operator=(const voronoiMeshGenerator&);
133 //- Construct from time
134 voronoiMeshGenerator(const Time&);
136 //- Construct from time and desired cell size
137 //voronoiMeshGenerator(const Time&, const volScalarField&);
141 ~voronoiMeshGenerator();
147 void writeMesh() const;
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 // ************************************************************************* //