1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::meshTriangulation
28 Triangulation of mesh faces. Generates (multiply connected) trisurface.
30 All patch faces keep their patchID as triangle region.
31 Internal faces get the supplied region number.
36 \*---------------------------------------------------------------------------*/
39 #ifndef meshTriangulation_H
40 #define meshTriangulation_H
42 #include "triSurface.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 // Forward declaration of classes
54 /*---------------------------------------------------------------------------*\
55 Class meshTriangulation Declaration
56 \*---------------------------------------------------------------------------*/
58 class meshTriangulation
64 //- Number of triangles in this that are internal to the surface.
65 label nInternalFaces_;
67 //- From triangle to mesh face
70 // Private Member Functions
72 //- Is face internal to the subset.
73 static bool isInternalFace
76 const boolList& includedCell,
80 //- find boundary faces of subset.
84 const boolList& includedCell,
90 //- Add triangulation of face to triangles. Optionally reverse.
98 List<labelledTri>& triangles,
105 ClassName("meshTriangulation");
113 //- Construct from selected mesh cell and region number to be used
114 // for triangles resulting from internal faces. (all boundary triangles
115 // get polyMesh patch id).
116 // faceCentreDecomposition = true : decomposition around face centre
117 // false : decomposition using
122 const label internalFacesPatch,
123 const boolList& includedCell,
124 const bool faceCentreDecomposition = false
130 //- number of triangles in *this which are internal to the surface
131 label nInternalFaces() const
133 return nInternalFaces_;
136 //- from triangle to mesh face
137 const labelList& faceMap() const
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 } // End namespace Foam
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 // ************************************************************************* //