Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / mesh / cfMesh / utilities / surfaceTools / meshSurfaceEdgeExtractorFUN / meshSurfaceEdgeExtractorFUN.H
blob21b16ad1122b2b1427ed19b6dc85fca515adb7ed
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     meshSurfaceEdgeExtractorFUN
27 Description
28     Stores boundary faces into patches and captures edges and corners
29     by inserting fundamental mesh sheets
31 SourceFiles
32     meshSurfaceEdgeExtractorFUN.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef meshSurfaceEdgeExtractorFUN_H
37 #define meshSurfaceEdgeExtractorFUN_H
39 #include "polyMeshGenModifier.H"
40 #include "boolList.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward declarations
48 class meshOctree;
49 class meshSurfaceEngine;
51 /*---------------------------------------------------------------------------*\
52                 Class meshSurfaceEdgeExtractorFUN Declaration
53 \*---------------------------------------------------------------------------*/
55 class meshSurfaceEdgeExtractorFUN
57     // Private data
58         //- mesh
59         polyMeshGen& mesh_;
61         //- octree
62         const meshOctree& meshOctree_;
64         //- mesh surface pointer
65         meshSurfaceEngine* surfaceEnginePtr_;
67         //- shall the procedure generate an initial wrapper sheet
68         const bool createWrapperSheet_;
70     // Private member functions
72         //- return reference to surface engine
73         meshSurfaceEngine& surfaceEngine();
75         //- clear mesh suirface engine
76         void clearOut();
78         //- distribute boundary faces into patches
79         void distributeBoundaryFaces();
81         //- check whether all corners in the surface mesh are present
82         //- in the volume mesh
83         void reviseCorners();
85         //- check whether all edges in the surface mesh are present
86         //- in the volume mesh
87         void reviseEdges();
89         //- find corner vertices and correct patches
90         void findCornersAndCorrectPatches();
92         //- create fundamental sheets
93         void createBasicFundamentalSheets();
95         //- smooth the surface
96         void smoothMeshSurface();
98         //- modify fundamental sheets
99         void improveQualityOfFundamentalSheets();
101         //- re-map points after edges have been extracted
102         void remapBoundaryPoints();
104         //- Disallow default construct
105         meshSurfaceEdgeExtractorFUN();
107         //- Disallow default bitwise copy construct
108         meshSurfaceEdgeExtractorFUN(const meshSurfaceEdgeExtractorFUN&);
110         //- Disallow default bitwise assignment
111         void operator=(const meshSurfaceEdgeExtractorFUN&);
113 public:
115     // Constructors
117         //- Construct from mesh data
118         meshSurfaceEdgeExtractorFUN
119         (
120             polyMeshGen& mesh,
121             const meshOctree& octree,
122             const bool createWrapperSheet = true
123         );
125     // Destructor
127         ~meshSurfaceEdgeExtractorFUN();
129     // Member Functions
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 } // End namespace Foam
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 #endif
141 // ************************************************************************* //