FreeFOAM The Cross-Platform CFD Toolkit
surfaceSets.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::surfaceSets
26 
27 Description
28  Various utilities to handle sets relating mesh to surface.
29  Note: work in progress. Used in meshing tools.
30 
31 SourceFiles
32  surfaceSets.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef surfaceSets_H
37 #define surfaceSets_H
38 
39 #include <OpenFOAM/label.H>
40 #include <OpenFOAM/scalar.H>
41 #include <OpenFOAM/fileName.H>
42 #include <OpenFOAM/pointField.H>
43 #include <OpenFOAM/polyMesh.H>
44 #include <triSurface/triSurface.H>
46 #include <meshTools/pointSet.H>
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Forward declaration of classes
54 class polyMesh;
55 class triSurface;
56 class triSurfaceSearch;
57 class pointSet;
58 
59 /*---------------------------------------------------------------------------*\
60  Class surfaceSets Declaration
61 \*---------------------------------------------------------------------------*/
62 
64 {
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  };
74 
75 
76  // Static
77 
79  //static scalar minEdgeLen(const primitiveMesh& mesh, const label pointI);
80  //
82  //static bool usesPoint
83  //(
84  // const primitiveMesh& mesh,
85  // const boolList& selectedPoint,
86  // const label cellI
87  //);
88 
93  //static label removeHangingCells
94  //(
95  // const primitiveMesh&,
96  // const triSurfaceSearch& querySurf,
97  // labelHashSet& internalCells
98  //);
99 
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  //);
113 
114 public:
115 
116  // Static Functions
117 
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,
128 
129  const label nCutLayers,
130 
131  labelHashSet& inside,
132  labelHashSet& outside,
133  labelHashSet& cut
134  );
135 
136  //- Get cells using points on 'outside' only
138  (
139  const primitiveMesh& mesh,
140  const labelHashSet& internalCells
141  );
142 
143 
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 // );
154 
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************ vim: set sw=4 sts=4 et: ************************ //