1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Various utilities to handle sets relating mesh to surface.
30 Note: work in progress. Used in meshing tools.
35 \*---------------------------------------------------------------------------*/
43 #include "pointField.H"
45 #include "triSurface.H"
46 #include "triSurfaceSearch.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 // Forward declaration of classes
57 class triSurfaceSearch;
60 /*---------------------------------------------------------------------------*\
61 Class surfaceSets Declaration
62 \*---------------------------------------------------------------------------*/
66 //- Visibility of points: from inside cells, from outside cells or
79 ////- Min length of connected mesh edges
80 //static scalar minEdgeLen(const primitiveMesh& mesh, const label pointI);
82 ////- Returns true if cell uses at least one selected point
83 //static bool usesPoint
85 // const primitiveMesh& mesh,
86 // const boolList& selectedPoint,
90 ////- Find points used only by internalCells and remove from
91 //// internalCells all
92 //// cells which don't use any internal point. Return number of
94 //static label removeHangingCells
96 // const primitiveMesh&,
97 // const triSurfaceSearch& querySurf,
98 // labelHashSet& internalCells
101 ////- Select all points out of pointSet where the distance to the surface
103 //// than a factor times a local length scale (minimum length of
104 //// connected edges)
105 //static void getNearPoints
107 // const primitiveMesh& mesh,
108 // const triSurface& surf,
109 // const triSurfaceSearch& querySurf,
110 // const scalar edgeFactor,
111 // const pointSet& candidateSet,
112 // pointSet& nearPointSet
119 //- Divide cells into cut,inside and outside
120 // nCutLayers>0 : remove cutCells (set to type inside) if further
121 // than nCutLayers away from outside type cell.
122 static void getSurfaceSets
124 const polyMesh& mesh,
125 const fileName& surfName,
126 const triSurface& surf,
127 const triSurfaceSearch& querySurf,
128 const pointField& outsidePts,
130 const label nCutLayers,
132 labelHashSet& inside,
133 labelHashSet& outside,
137 //- Get cells using points on 'outside' only
138 static labelHashSet getHangingCells
140 const primitiveMesh& mesh,
141 const labelHashSet& internalCells
145 // //- Write cell sets with cells 'inside' and 'outside' surface.
146 // static void writeSurfaceSets
148 // const polyMesh& mesh,
149 // const fileName& surfName,
150 // const triSurface& surf,
151 // const triSurfaceSearch& querySurf,
152 // const pointField& outsidePts,
153 // const scalar edgeFactor
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 // ************************************************************************* //