1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::meshTriangulation
29 Triangulation of mesh faces. Generates (multiply connected) trisurface.
31 All patch faces keep their patchID as triangle region.
32 Internal faces get the supplied region number.
37 \*---------------------------------------------------------------------------*/
40 #ifndef meshTriangulation_H
41 #define meshTriangulation_H
43 #include "triSurface.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 // Forward declaration of classes
55 /*---------------------------------------------------------------------------*\
56 Class meshTriangulation Declaration
57 \*---------------------------------------------------------------------------*/
59 class meshTriangulation
65 //- Number of triangles in this that are internal to the surface.
66 label nInternalFaces_;
68 //- From triangle to mesh face
71 // Private Member Functions
73 //- Is face internal to the subset.
74 static bool isInternalFace
77 const boolList& includedCell,
81 //- find boundary faces of subset.
85 const boolList& includedCell,
91 //- Add triangulation of face to triangles. Optionally reverse.
99 List<labelledTri>& triangles,
106 ClassName("meshTriangulation");
114 //- Construct from selected mesh cell and region number to be used
115 // for triangles resulting from internal faces. (all boundary triangles
116 // get polyMesh patch id).
117 // faceCentreDecomposition = true : decomposition around face centre
118 // false : decomposition using
123 const label internalFacesPatch,
124 const boolList& includedCell,
125 const bool faceCentreDecomposition = false
131 //- number of triangles in *this which are internal to the surface
132 label nInternalFaces() const
134 return nInternalFaces_;
137 //- from triangle to mesh face
138 const labelList& faceMap() const
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 // ************************************************************************* //