1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Various utilities to handle sets relating mesh to surface.
29 Note: work in progress. Used in meshing tools.
34 \*---------------------------------------------------------------------------*/
42 #include "pointField.H"
44 #include "triSurface.H"
45 #include "triSurfaceSearch.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 // Forward declaration of classes
56 class triSurfaceSearch;
59 /*---------------------------------------------------------------------------*\
60 Class surfaceSets Declaration
61 \*---------------------------------------------------------------------------*/
65 //- Visibility of points: from inside cells, from outside cells or
78 ////- Min length of connected mesh edges
79 //static scalar minEdgeLen
81 // const primitiveMesh& mesh,
85 ////- Returns true if cell uses at least one selected point
86 //static bool usesPoint
88 // const primitiveMesh& mesh,
89 // const boolList& selectedPoint,
93 ////- Find points used only by internalCells and remove from
94 //// internalCells all
95 //// cells which don't use any internal point. Return number of
97 //static label removeHangingCells
99 // const primitiveMesh&,
100 // const triSurfaceSearch& querySurf,
101 // labelHashSet& internalCells
104 ////- Select all points out of pointSet where the distance to
105 //// the surface is less than a factor times a local length
106 //// scale (minimum length of connected edges)
107 //static void getNearPoints
109 // const primitiveMesh& mesh,
110 // const triSurface& surf,
111 // const triSurfaceSearch& querySurf,
112 // const scalar edgeFactor,
113 // const pointSet& candidateSet,
114 // pointSet& nearPointSet
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
126 const polyMesh& mesh,
127 const fileName& surfName,
128 const triSurface& surf,
129 const triSurfaceSearch& querySurf,
130 const pointField& outsidePts,
132 const label nCutLayers,
134 labelHashSet& inside,
135 labelHashSet& outside,
139 //- Get cells using points on 'outside' only
140 static labelHashSet getHangingCells
142 const primitiveMesh& mesh,
143 const labelHashSet& internalCells
147 // //- Write cell sets with cells 'inside' and 'outside' surface.
148 // static void writeSurfaceSets
150 // const polyMesh& mesh,
151 // const fileName& surfName,
152 // const triSurface& surf,
153 // const triSurfaceSearch& querySurf,
154 // const pointField& outsidePts,
155 // const scalar edgeFactor
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 // ************************************************************************* //