Forward compatibility: flex
[foam-extend-3.2.git] / src / meshTools / surfaceSets / surfaceSets.H
blob10688d319fdcdee7f647718d731826dccdadd09f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::surfaceSets
27 Description
28     Various utilities to handle sets relating mesh to surface.
29     Note: work in progress. Used in meshing tools.
31 SourceFiles
32     surfaceSets.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef surfaceSets_H
37 #define surfaceSets_H
39 #include "label.H"
40 #include "scalar.H"
41 #include "fileName.H"
42 #include "pointField.H"
43 #include "polyMesh.H"
44 #include "triSurface.H"
45 #include "triSurfaceSearch.H"
46 #include "pointSet.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 namespace Foam
53 // Forward declaration of classes
54 class polyMesh;
55 class triSurface;
56 class triSurfaceSearch;
57 class pointSet;
59 /*---------------------------------------------------------------------------*\
60                            Class surfaceSets Declaration
61 \*---------------------------------------------------------------------------*/
63 class surfaceSets
65     //- Visibility of points: from inside cells, from outside cells or
66     //  from both
67     enum pointStatus
68     {
69         NOTSET,
70         INSIDE,
71         MIXED,
72         OUTSIDE
73     };
76     // Static
78         ////- Min length of connected mesh edges
79         //static scalar minEdgeLen(const primitiveMesh& mesh, const label pointI);
80         //
81         ////- Returns true if cell uses at least one selected point
82         //static bool usesPoint
83         //(
84         //    const primitiveMesh& mesh,
85         //    const boolList& selectedPoint,
86         //    const label cellI
87         //);
89         ////- Find points used only by internalCells and remove from
90         ////  internalCells all
91         ////  cells which don't use any internal point. Return number of
92         ////  removed cells.
93         //static label removeHangingCells
94         //(
95         //    const primitiveMesh&,
96         //    const triSurfaceSearch& querySurf,
97         //    labelHashSet& internalCells
98         //);
100         ////- Select all points out of pointSet where the distance to the surface
101         ////  is less
102         ////  than a factor times a local length scale (minimum length of
103         ////  connected edges)
104         //static void getNearPoints
105         //(
106         //    const primitiveMesh& mesh,
107         //    const triSurface& surf,
108         //    const triSurfaceSearch& querySurf,
109         //    const scalar edgeFactor,
110         //    const pointSet& candidateSet,
111         //    pointSet& nearPointSet
112         //);
114 public:
116     // Static Functions
118         //- Divide cells into cut,inside and outside
119         //  nCutLayers>0 : remove cutCells (set to type inside) if further
120         //  than nCutLayers away from outside type cell.
121         static void getSurfaceSets
122         (
123             const polyMesh& mesh,
124             const fileName& surfName,
125             const triSurface& surf,
126             const triSurfaceSearch& querySurf,
127             const pointField& outsidePts,
129             const label nCutLayers,
131             labelHashSet& inside,
132             labelHashSet& outside,
133             labelHashSet& cut
134         );
136         //- Get cells using points on 'outside' only
137         static labelHashSet getHangingCells
138         (
139             const primitiveMesh& mesh,
140             const labelHashSet& internalCells
141         );
144 //        //- Write cell sets with cells 'inside' and 'outside' surface.
145 //        static void writeSurfaceSets
146 //        (
147 //            const polyMesh& mesh,
148 //            const fileName& surfName,
149 //            const triSurface& surf,
150 //            const triSurfaceSearch& querySurf,
151 //            const pointField& outsidePts,
152 //            const scalar edgeFactor
153 //        );
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 #endif
167 // ************************************************************************* //