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 Searching on (infinite) plane. See plane.H
34 \*---------------------------------------------------------------------------*/
36 #ifndef searchablePlane_H
37 #define searchablePlane_H
39 #include "searchableSurface.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward declaration of classes
49 /*---------------------------------------------------------------------------*\
50 Class searchablePlane Declaration
51 \*---------------------------------------------------------------------------*/
55 public searchableSurface,
60 // Private Member Data
62 mutable wordList regions_;
65 // Private Member Functions
67 pointIndexHit findLine
74 //- Disallow default bitwise copy construct
75 searchablePlane(const searchablePlane&);
77 //- Disallow default bitwise assignment
78 void operator=(const searchablePlane&);
83 //- Runtime type information
84 TypeName("searchablePlane");
89 //- Construct from components
93 const point& basePoint,
97 //- Construct from dictionary (used by searchableSurface)
101 const dictionary& dict
106 virtual ~searchablePlane();
111 virtual const wordList& regions() const;
113 //- Whether supports volume type below
114 virtual bool hasVolumeType() const
119 //- Range of local indices that can be returned.
120 virtual label size() const
125 //- Get representative set of element coordinates
126 // Usually the element centres (should be of length size()).
127 virtual pointField coordinates() const
129 //notImplemented("searchablePlane::coordinates()")
130 return pointField(1, refPoint());
134 // Multiple point queries.
136 virtual void findNearest
138 const pointField& sample,
139 const scalarField& nearestDistSqr,
143 virtual void findLine
145 const pointField& start,
146 const pointField& end,
150 virtual void findLineAny
152 const pointField& start,
153 const pointField& end,
157 //- Get all intersections in order from start to end.
158 virtual void findLineAll
160 const pointField& start,
161 const pointField& end,
162 List<List<pointIndexHit> >&
165 //- From a set of points and indices get the region
166 virtual void getRegion
168 const List<pointIndexHit>&,
172 //- From a set of points and indices get the normal
173 virtual void getNormal
175 const List<pointIndexHit>&,
179 //- Determine type (inside/outside/mixed) for point. unknown if
180 // cannot be determined (e.g. non-manifold surface)
181 virtual void getVolumeType
188 // regIOobject implementation
190 bool writeData(Ostream&) const
192 notImplemented("searchablePlane::writeData(Ostream&) const");
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 } // End namespace Foam
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 // ************************************************************************* //