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 / boundaryLayers / triangulateNonPlanarBaseFaces / triangulateNonPlanarBaseFaces.H
blob0829c50be74f8d5d220e8413fa6f9c1cd5104fa4
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     triangulateNonPlanarBaseFaces
27 Description
28     Splits selected boundary layer cells into triangular prisms
30 SourceFiles
31     triangulateNonPlanarBaseFaces.C
32     triangulateNonPlanarBaseFacesFunctions.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef triangulateNonPlanarBaseFaces_H
37 #define triangulateNonPlanarBaseFaces_H
39 #include "objectRegistry.H"
40 #include "foamTime.H"
41 #include "polyMeshGenModifier.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declarations
49 class dictionary;
51 /*---------------------------------------------------------------------------*\
52             Class triangulateNonPlanarBaseFaces Declaration
53 \*---------------------------------------------------------------------------*/
55 class triangulateNonPlanarBaseFaces
57     // Private data
58         //- Reference to the mesh
59         polyMeshGen& mesh_;
61         //- boolean list containing information about inverted cells
62         boolList invertedCell_;
64         //- classification of faces in the mesh
65         boolList decomposeFace_;
67         //- relative deviation compared to the layer thickness
68         scalar tol_;
70     // Private member functions
71         //- find faces with non-planarity greater than the required
72         //- layer thickness
73         bool findNonPlanarBoundaryFaces();
75         //- decompose existing faces
76         void decomposeBoundaryFaces();
78         //- decompose adjacent cells into pyramids
79         void decomposeCellsIntoPyramids();
81         //- Disallow bitwise copy construct
82         triangulateNonPlanarBaseFaces
83         (
84             const triangulateNonPlanarBaseFaces&
85         );
87         //- Disallow bitwise assignment
88         void operator=(const triangulateNonPlanarBaseFaces&);
90 public:
92     // Constructors
94         //- Construct from mesh
95         triangulateNonPlanarBaseFaces(polyMeshGen& mesh);
97     // Destructor
98         ~triangulateNonPlanarBaseFaces();
100     // Public member functions
101         //- set the relative tolerance between the requested boundary
102         //- layer thickness and the deviation from planarity
103         //- the default is 1.0
104         void setRelativeTolerance(const scalar tol);
106         //- splits inverted boundary layer prisms into triangular prisms
107         void triangulateLayers();
109     // Static member functions
110         static void readSettings
111         (
112             const dictionary&,
113             triangulateNonPlanarBaseFaces&
114         );
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 } // End namespace Foam
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 #endif
125 // ************************************************************************* //