1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, 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
104 virtual ~searchablePlane();
109 virtual const wordList& regions() const;
111 //- Whether supports volume type below
112 virtual bool hasVolumeType() const
117 //- Range of local indices that can be returned.
118 virtual label size() const
123 //- Get representative set of element coordinates
124 // Usually the element centres (should be of length size()).
125 virtual pointField coordinates() const
127 //notImplemented("searchablePlane::coordinates()")
128 return pointField(1, refPoint());
132 // Multiple point queries.
134 virtual void findNearest
136 const pointField& sample,
137 const scalarField& nearestDistSqr,
141 virtual void findLine
143 const pointField& start,
144 const pointField& end,
148 virtual void findLineAny
150 const pointField& start,
151 const pointField& end,
155 //- Get all intersections in order from start to end.
156 virtual void findLineAll
158 const pointField& start,
159 const pointField& end,
160 List<List<pointIndexHit> >&
163 //- From a set of points and indices get the region
164 virtual void getRegion
166 const List<pointIndexHit>&,
170 //- From a set of points and indices get the normal
171 virtual void getNormal
173 const List<pointIndexHit>&,
177 //- Determine type (inside/outside/mixed) for point. unknown if
178 // cannot be determined (e.g. non-manifold surface)
179 virtual void getVolumeType
186 // regIOobject implementation
188 bool writeData(Ostream&) const
190 notImplemented("searchablePlane::writeData(Ostream&) const");
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 // ************************************************************************* //