triangulateNonPlanarBaseFaces.H 3.76 KB
Newer Older
franjo's avatar
franjo committed
1 2
/*---------------------------------------------------------------------------*\
  =========                 |
Tomislav Lugaric's avatar
Tomislav Lugaric committed
3
  \\      /  F ield         | cfMesh: A library for mesh generation
franjo's avatar
franjo committed
4
   \\    /   O peration     |
Tomislav Lugaric's avatar
Tomislav Lugaric committed
5 6
    \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
     \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
franjo's avatar
franjo committed
7 8
-------------------------------------------------------------------------------
License
Tomislav Lugaric's avatar
Tomislav Lugaric committed
9
    This file is part of cfMesh.
franjo's avatar
franjo committed
10

Tomislav Lugaric's avatar
Tomislav Lugaric committed
11
    cfMesh is free software; you can redistribute it and/or modify it
franjo's avatar
franjo committed
12
    under the terms of the GNU General Public License as published by the
Tomislav Lugaric's avatar
Tomislav Lugaric committed
13
    Free Software Foundation; either version 3 of the License, or (at your
franjo's avatar
franjo committed
14 15
    option) any later version.

Tomislav Lugaric's avatar
Tomislav Lugaric committed
16
    cfMesh is distributed in the hope that it will be useful, but WITHOUT
franjo's avatar
franjo committed
17 18 19 20 21
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
Tomislav Lugaric's avatar
Tomislav Lugaric committed
22
    along with cfMesh.  If not, see <http://www.gnu.org/licenses/>.
franjo's avatar
franjo committed
23

Franjo's avatar
Franjo committed
24
Class
25
    triangulateNonPlanarBaseFaces
Franjo's avatar
Franjo committed
26

franjo's avatar
franjo committed
27
Description
Franjo's avatar
Franjo committed
28 29 30
    Splits selected boundary layer cells into triangular prisms

SourceFiles
31 32
    triangulateNonPlanarBaseFaces.C
    triangulateNonPlanarBaseFacesFunctions.C
franjo's avatar
franjo committed
33 34 35

\*---------------------------------------------------------------------------*/

36 37
#ifndef triangulateNonPlanarBaseFaces_H
#define triangulateNonPlanarBaseFaces_H
Franjo's avatar
Franjo committed
38 39

#include "polyMeshGenModifier.H"
franjo's avatar
franjo committed
40 41 42 43 44 45

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

Franjo's avatar
Franjo committed
46
// Forward declarations
47
class dictionary;
Franjo's avatar
Franjo committed
48 49

/*---------------------------------------------------------------------------*\
50
            Class triangulateNonPlanarBaseFaces Declaration
Franjo's avatar
Franjo committed
51 52
\*---------------------------------------------------------------------------*/

53
class triangulateNonPlanarBaseFaces
franjo's avatar
franjo committed
54
{
Franjo's avatar
Franjo committed
55 56 57 58
    // Private data
        //- Reference to the mesh
        polyMeshGen& mesh_;

59 60 61 62
        //- boolean list containing information about inverted cells
        boolList invertedCell_;

        //- classification of faces in the mesh
63
        boolList decomposeFace_;
Franjo's avatar
Franjo committed
64

65 66
        //- relative deviation compared to the layer thickness
        scalar tol_;
Franjo's avatar
Franjo committed
67 68

    // Private member functions
69 70 71
        //- find faces with non-planarity greater than the required
        //- layer thickness
        bool findNonPlanarBoundaryFaces();
72

73 74
        //- decompose existing faces
        void decomposeBoundaryFaces();
75

76 77
        //- decompose adjacent cells into pyramids
        void decomposeCellsIntoPyramids();
Franjo's avatar
Franjo committed
78 79

        //- Disallow bitwise copy construct
80
        triangulateNonPlanarBaseFaces
Franjo's avatar
Franjo committed
81
        (
82
            const triangulateNonPlanarBaseFaces&
Franjo's avatar
Franjo committed
83 84 85
        );

        //- Disallow bitwise assignment
86
        void operator=(const triangulateNonPlanarBaseFaces&);
87

Franjo's avatar
Franjo committed
88 89 90 91 92
public:

    // Constructors

        //- Construct from mesh
93
        triangulateNonPlanarBaseFaces(polyMeshGen& mesh);
Franjo's avatar
Franjo committed
94 95

    // Destructor
96
        ~triangulateNonPlanarBaseFaces();
Franjo's avatar
Franjo committed
97 98

    // Public member functions
99 100 101 102
        //- set the relative tolerance between the requested boundary
        //- layer thickness and the deviation from planarity
        //- the default is 1.0
        void setRelativeTolerance(const scalar tol);
Franjo's avatar
Franjo committed
103

104 105
        //- splits inverted boundary layer prisms into triangular prisms
        void triangulateLayers();
106 107 108 109 110 111 112

    // Static member functions
        static void readSettings
        (
            const dictionary&,
            triangulateNonPlanarBaseFaces&
        );
Franjo's avatar
Franjo committed
113
};
franjo's avatar
franjo committed
114 115 116 117 118

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

Franjo's avatar
Franjo committed
119 120 121 122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif

franjo's avatar
franjo committed
123
// ************************************************************************* //