Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / src / mesh / cfMesh / cartesianMesh / cartesianMeshGenerator / cartesianMeshGenerator.H
blob6c52591145c146bab1cd5de90279a8c0722421cf
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6      \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     cartesianMeshGenerator
27 Description
28     Creates cartesian mesh from the octree
30 SourceFiles
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declarations
49 class triSurf;
50 class meshOctree;
51 class Time;
53 /*---------------------------------------------------------------------------*\
54                            Class cartesianMeshGenerator Declaration
55 \*---------------------------------------------------------------------------*/
57 class cartesianMeshGenerator
59     // Private data
60         //- reference to Time
61         const Time& db_;
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_;
75         //- mesh
76         polyMeshGen mesh_;
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
116         void renumberMesh();
118         //- generate mesh
119         void generateMesh();
121         //- Disallow default bitwise copy construct
122         cartesianMeshGenerator(const cartesianMeshGenerator&);
124         //- Disallow default bitwise assignment
125         void operator=(const cartesianMeshGenerator&);
127 public:
129     // Constructors
131         //- Construct from time
132         cartesianMeshGenerator(const Time&);
134     // Destructor
136         ~cartesianMeshGenerator();
139     // Member Functions
141         //- write the mesh
142         void writeMesh() const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #endif
154 // ************************************************************************* //