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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::surfaceSets
28
29Description
30 Various utilities to handle sets relating mesh to surface.
31 Note: work in progress. Used in meshing tools.
32
33SourceFiles
34 surfaceSets.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef surfaceSets_H
39#define surfaceSets_H
40
41#include "label.H"
42#include "scalar.H"
43#include "fileName.H"
44#include "pointField.H"
45#include "polyMesh.H"
46#include "triSurface.H"
47#include "triSurfaceSearch.H"
48#include "pointSet.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
54
55// Forward declaration of classes
56class polyMesh;
57class triSurface;
58class triSurfaceSearch;
59class pointSet;
60
61/*---------------------------------------------------------------------------*\
62 Class surfaceSets Declaration
63\*---------------------------------------------------------------------------*/
65class surfaceSets
66{
67 //- Visibility of points: from inside cells, from outside cells or
68 // from both
69 enum pointStatus
70 {
71 NOTSET,
72 INSIDE,
73 MIXED,
74 OUTSIDE
75 };
76
77
78 // Static
79
81 //static scalar minEdgeLen
82 //(
83 // const primitiveMesh& mesh,
84 // const label pointi
85 //);
86 //
88 //static bool usesPoint
89 //(
90 // const primitiveMesh& mesh,
91 // const boolList& selectedPoint,
92 // const label celli
93 //);
94
99 //static label removeHangingCells
100 //(
101 // const primitiveMesh&,
102 // const triSurfaceSearch& querySurf,
103 // labelHashSet& internalCells
104 //);
105
109 //static void getNearPoints
110 //(
111 // const primitiveMesh& mesh,
112 // const triSurface& surf,
113 // const triSurfaceSearch& querySurf,
114 // const scalar edgeFactor,
115 // const pointSet& candidateSet,
116 // pointSet& nearPointSet
117 //);
118
119public:
120
121 // Static Functions
122
123 //- Divide cells into cut,inside and outside
124 // nCutLayers>0 : remove cutCells (set to type inside) if further
125 // than nCutLayers away from outside type cell.
126 static void getSurfaceSets
127 (
128 const polyMesh& mesh,
129 const fileName& surfName,
130 const triSurface& surf,
131 const triSurfaceSearch& querySurf,
132 const pointField& outsidePts,
133
134 const label nCutLayers,
135
136 labelHashSet& inside,
137 labelHashSet& outside,
139 );
140
141 //- Get cells using points on 'outside' only
143 (
144 const primitiveMesh& mesh,
145 const labelHashSet& internalCells
146 );
147
148
149// //- Write cell sets with cells 'inside' and 'outside' surface.
150// static void writeSurfaceSets
151// (
152// const polyMesh& mesh,
153// const fileName& surfName,
154// const triSurface& surf,
155// const triSurfaceSearch& querySurf,
156// const pointField& outsidePts,
157// const scalar edgeFactor
158// );
159
160};
161
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165} // End namespace Foam
166
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#endif
171
172// ************************************************************************* //
A class for handling file names.
Definition: fileName.H:76
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:79
Patchify triangles based on orientation w.r.t other (triangulated or triangulatable) surfaces.
Various utilities to handle sets relating mesh to surface. Note: work in progress....
Definition: surfaceSets.H:65
static labelHashSet getHangingCells(const primitiveMesh &mesh, const labelHashSet &internalCells)
Get cells using points on 'outside' only.
Definition: surfaceSets.C:281
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:222
Helper class to search on triSurface.
Triangulated surface description with patch information.
Definition: triSurface.H:79
dynamicFvMesh & mesh
Namespace for OpenFOAM.