1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 A topoSetSource to selects points based on relation to surface.
33 - inside/outside status to surface
34 (Uses normal of nearest surface triangle so requires valid surface
40 \*---------------------------------------------------------------------------*/
42 #ifndef surfaceToPoint_H
43 #define surfaceToPoint_H
45 #include "topoSetSource.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 class triSurfaceSearch;
54 /*---------------------------------------------------------------------------*\
55 Class surfaceToPoint Declaration
56 \*---------------------------------------------------------------------------*/
66 static addToUsageTable usage_;
68 //- Name of surface file
71 //- if > 0 : include points with distance to surface less than nearDist.
74 //- include all points on opposite sign of normal on nearest surface.
77 //- include all points on this sign of normal on nearest surface.
81 // Private Member Functions
83 //- Depending on surface add to or delete from pointSet.
84 void combine(topoSet& set, const bool add) const;
86 //- Check settings at construction time.
87 void checkSettings() const;
91 //- Runtime type information
92 TypeName("surfaceToPoint");
96 //- Construct from components
100 const fileName& surfName,
101 const scalar nearDist,
102 const bool includeInside,
103 const bool includeOutside
106 //- Construct from dictionary
109 const polyMesh& mesh,
110 const dictionary& dict
113 //- Construct from Istream
116 const polyMesh& mesh,
123 virtual ~surfaceToPoint();
128 virtual void applyToSet
130 const topoSetSource::setAction action,
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //