1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
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(const primitiveMesh& mesh, const label pointI);
81 ////- Returns true if cell uses at least one selected point
82 //static bool usesPoint
84 // const primitiveMesh& mesh,
85 // const boolList& selectedPoint,
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
93 //static label removeHangingCells
95 // const primitiveMesh&,
96 // const triSurfaceSearch& querySurf,
97 // labelHashSet& internalCells
100 ////- Select all points out of pointSet where the distance to the surface
102 //// than a factor times a local length scale (minimum length of
103 //// connected edges)
104 //static void getNearPoints
106 // const primitiveMesh& mesh,
107 // const triSurface& surf,
108 // const triSurfaceSearch& querySurf,
109 // const scalar edgeFactor,
110 // const pointSet& candidateSet,
111 // pointSet& nearPointSet
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
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,
136 //- Get cells using points on 'outside' only
137 static labelHashSet getHangingCells
139 const primitiveMesh& mesh,
140 const labelHashSet& internalCells
144 // //- Write cell sets with cells 'inside' and 'outside' surface.
145 // static void writeSurfaceSets
147 // const polyMesh& mesh,
148 // const fileName& surfName,
149 // const triSurface& surf,
150 // const triSurfaceSearch& querySurf,
151 // const pointField& outsidePts,
152 // const scalar edgeFactor
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 // ************************************************************************* //