BUG: PointEdgeWave : n cyclics bool instead of label
[OpenFOAM-1.6.x.git] / src / meshTools / searchableSurface / searchablePlane.H
blobc0b58cc8ac2d0c086deca4a4dda306756a295623
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::searchablePlane
28 Description
29     Searching on (infinite) plane. See plane.H
31 SourceFiles
32     searchablePlane.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef searchablePlane_H
37 #define searchablePlane_H
39 #include "searchableSurface.H"
40 #include "plane.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward declaration of classes
49 /*---------------------------------------------------------------------------*\
50                            Class searchablePlane Declaration
51 \*---------------------------------------------------------------------------*/
53 class searchablePlane
55     public searchableSurface,
56     public plane
58 private:
60     // Private Member Data
62         mutable wordList regions_;
65     // Private Member Functions
67         pointIndexHit findLine
68         (
69             const point& start,
70             const point& end
71         ) const;
74         //- Disallow default bitwise copy construct
75         searchablePlane(const searchablePlane&);
77         //- Disallow default bitwise assignment
78         void operator=(const searchablePlane&);
81 public:
83     //- Runtime type information
84     TypeName("searchablePlane");
87     // Constructors
89         //- Construct from components
90         searchablePlane
91         (
92             const IOobject& io,
93             const point& basePoint,
94             const vector& normal
95         );
97         //- Construct from dictionary (used by searchableSurface)
98         searchablePlane
99         (
100             const IOobject& io,
101             const dictionary& dict
102         );
104     // Destructor
106         virtual ~searchablePlane();
109     // Member Functions
111         virtual const wordList& regions() const;
113         //- Whether supports volume type below
114         virtual bool hasVolumeType() const
115         {
116             return false;
117         }
119         //- Range of local indices that can be returned.
120         virtual label size() const
121         {
122             return 1;
123         }
125         //- Get representative set of element coordinates
126         //  Usually the element centres (should be of length size()).
127         virtual pointField coordinates() const
128         {
129             //notImplemented("searchablePlane::coordinates()")
130             return pointField(1, refPoint());
131         }
134         // Multiple point queries.
136             virtual void findNearest
137             (
138                 const pointField& sample,
139                 const scalarField& nearestDistSqr,
140                 List<pointIndexHit>&
141             ) const;
143             virtual void findLine
144             (
145                 const pointField& start,
146                 const pointField& end,
147                 List<pointIndexHit>&
148             ) const;
150             virtual void findLineAny
151             (
152                 const pointField& start,
153                 const pointField& end,
154                 List<pointIndexHit>&
155             ) const;
157             //- Get all intersections in order from start to end.
158             virtual void findLineAll
159             (
160                 const pointField& start,
161                 const pointField& end,
162                 List<List<pointIndexHit> >&
163             ) const;
165             //- From a set of points and indices get the region
166             virtual void getRegion
167             (
168                 const List<pointIndexHit>&,
169                 labelList& region
170             ) const;
172             //- From a set of points and indices get the normal
173             virtual void getNormal
174             (
175                 const List<pointIndexHit>&,
176                 vectorField& normal
177             ) const;
179             //- Determine type (inside/outside/mixed) for point. unknown if
180             //  cannot be determined (e.g. non-manifold surface)
181             virtual void getVolumeType
182             (
183                 const pointField&,
184                 List<volumeType>&
185             ) const;
188         // regIOobject implementation
190             bool writeData(Ostream&) const
191             {
192                 notImplemented("searchablePlane::writeData(Ostream&) const");
193                 return false;
194             }
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 } // End namespace Foam
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 #endif
207 // ************************************************************************* //