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 Searching on (infinite) plane. See plane.H
33 \*---------------------------------------------------------------------------*/
35 #ifndef searchablePlane_H
36 #define searchablePlane_H
38 #include "searchableSurface.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Forward declaration of classes
48 /*---------------------------------------------------------------------------*\
49 Class searchablePlane Declaration
50 \*---------------------------------------------------------------------------*/
54 public searchableSurface,
59 // Private Member Data
61 mutable wordList regions_;
64 // Private Member Functions
66 pointIndexHit findLine
73 //- Disallow default bitwise copy construct
74 searchablePlane(const searchablePlane&);
76 //- Disallow default bitwise assignment
77 void operator=(const searchablePlane&);
82 //- Runtime type information
83 TypeName("searchablePlane");
88 //- Construct from components
92 const point& basePoint,
96 //- Construct from dictionary (used by searchableSurface)
100 const dictionary& dict
105 virtual ~searchablePlane();
110 virtual const wordList& regions() const;
112 //- Whether supports volume type below
113 virtual bool hasVolumeType() const
118 //- Range of local indices that can be returned.
119 virtual label size() const
124 //- Get representative set of element coordinates
125 // Usually the element centres (should be of length size()).
126 virtual pointField coordinates() const
128 //notImplemented("searchablePlane::coordinates()")
129 return pointField(1, refPoint());
133 // Multiple point queries.
135 virtual void findNearest
137 const pointField& sample,
138 const scalarField& nearestDistSqr,
142 virtual void findLine
144 const pointField& start,
145 const pointField& end,
149 virtual void findLineAny
151 const pointField& start,
152 const pointField& end,
156 //- Get all intersections in order from start to end.
157 virtual void findLineAll
159 const pointField& start,
160 const pointField& end,
161 List<List<pointIndexHit> >&
164 //- From a set of points and indices get the region
165 virtual void getRegion
167 const List<pointIndexHit>&,
171 //- From a set of points and indices get the normal
172 virtual void getNormal
174 const List<pointIndexHit>&,
178 //- Determine type (inside/outside/mixed) for point. unknown if
179 // cannot be determined (e.g. non-manifold surface)
180 virtual void getVolumeType
187 // regIOobject implementation
189 bool writeData(Ostream&) const
191 notImplemented("searchablePlane::writeData(Ostream&) const");
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 } // End namespace Foam
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 // ************************************************************************* //