All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
surfaceSets.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
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 "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"
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 
63 class surfaceSets
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
80  //(
81  // const primitiveMesh& mesh,
82  // const label pointi
83  //);
84  //
86  // static bool usesPoint
87  //(
88  // const primitiveMesh& mesh,
89  // const boolList& selectedPoint,
90  // const label celli
91  //);
92 
97  // static label removeHangingCells
98  //(
99  // const primitiveMesh&,
100  // const triSurfaceSearch& querySurf,
101  // labelHashSet& internalCells
102  //);
103 
107  // static void getNearPoints
108  //(
109  // const primitiveMesh& mesh,
110  // const triSurface& surf,
111  // const triSurfaceSearch& querySurf,
112  // const scalar edgeFactor,
113  // const pointSet& candidateSet,
114  // pointSet& nearPointSet
115  //);
116 
117 public:
118 
119  // Static Functions
120 
121  //- Divide cells into cut,inside and outside
122  // nCutLayers>0 : remove cutCells (set to type inside) if further
123  // than nCutLayers away from outside type cell.
124  static void getSurfaceSets
125  (
126  const polyMesh& mesh,
127  const fileName& surfName,
128  const triSurface& surf,
129  const triSurfaceSearch& querySurf,
130  const pointField& outsidePts,
131 
132  const label nCutLayers,
133 
134  labelHashSet& inside,
135  labelHashSet& outside,
136  labelHashSet& cut
137  );
138 
139  //- Get cells using points on 'outside' only
141  (
142  const primitiveMesh& mesh,
143  const labelHashSet& internalCells
144  );
145 
146 
147 // //- Write cell sets with cells 'inside' and 'outside' surface.
148 // static void writeSurfaceSets
149 // (
150 // const polyMesh& mesh,
151 // const fileName& surfName,
152 // const triSurface& surf,
153 // const triSurfaceSearch& querySurf,
154 // const pointField& outsidePts,
155 // const scalar edgeFactor
156 // );
157 
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:82
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:75
Various utilities to handle sets relating mesh to surface. Note: work in progress....
Definition: surfaceSets.H:63
static labelHashSet getHangingCells(const primitiveMesh &mesh, const labelHashSet &internalCells)
Get cells using points on 'outside' only.
Definition: surfaceSets.C:282
static void getSurfaceSets(const polyMesh &mesh, const fileName &surfName, const triSurface &surf, const triSurfaceSearch &querySurf, const pointField &outsidePts, const label nCutLayers, labelHashSet &inside, labelHashSet &outside, labelHashSet &cut)
Divide cells into cut,inside and outside.
Definition: surfaceSets.C:223
Helper class to search on triSurface.
Triangulated surface description with patch information.
Definition: triSurface.H:69
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59