1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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
26 Foam::searchableSurfaceCollection
29 Set of transformed searchableSurfaces. Does not do boolean operations.
30 So when meshing might find parts 'inside'.
33 searchableSurfaceCollection.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef searchableSurfaceCollection_H
38 #define searchableSurfaceCollection_H
40 #include "searchableSurface.H"
41 #include "treeBoundBox.H"
42 #include "coordinateSystem.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 // Forward declaration of classes
53 /*---------------------------------------------------------------------------*\
54 Class searchableSurfaceCollection Declaration
55 \*---------------------------------------------------------------------------*/
57 class searchableSurfaceCollection
59 public searchableSurface
63 // Private Member Data
74 PtrList<coordinateSystem> transform_;
76 UPtrList<searchableSurface> subGeom_;
78 Switch mergeSubRegions_;
81 mutable wordList regions_;
82 //- From individual regions to collection regions
83 mutable labelList regionOffset_;
86 // Private Member Functions
88 //- Find point nearest to sample. Updates minDistSqr. Sets nearestInfo
92 const pointField& samples,
93 scalarField& minDistSqr,
94 List<pointIndexHit>& nearestInfo,
95 labelList& nearestSurf
99 //- Disallow default bitwise copy construct
100 searchableSurfaceCollection(const searchableSurfaceCollection&);
102 //- Disallow default bitwise assignment
103 void operator=(const searchableSurfaceCollection&);
108 //- Runtime type information
109 TypeName("searchableSurfaceCollection");
114 //- Construct from dictionary (used by searchableSurface)
115 searchableSurfaceCollection
118 const dictionary& dict
123 virtual ~searchableSurfaceCollection();
128 virtual const wordList& regions() const;
130 //- Whether supports volume type below
131 virtual bool hasVolumeType() const
136 //- Range of local indices that can be returned.
137 virtual label size() const;
140 // Multiple point queries.
142 virtual void findNearest
144 const pointField& sample,
145 const scalarField& nearestDistSqr,
149 virtual void findLine
151 const pointField& start,
152 const pointField& end,
156 virtual void findLineAny
158 const pointField& start,
159 const pointField& end,
163 //- Get all intersections in order from start to end.
164 virtual void findLineAll
166 const pointField& start,
167 const pointField& end,
168 List<List<pointIndexHit> >&
171 //- From a set of points and indices get the region
172 virtual void getRegion
174 const List<pointIndexHit>&,
178 //- From a set of points and indices get the normal
179 virtual void getNormal
181 const List<pointIndexHit>&,
185 //- Determine type (inside/outside/mixed) for point. unknown if
186 // cannot be determined (e.g. non-manifold surface)
187 virtual void getVolumeType
194 // regIOobject implementation
196 bool writeData(Ostream&) const
200 "searchableSurfaceCollection::writeData(Ostream&) const"
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 } // End namespace Foam
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 // ************************************************************************* //