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/>.
25 Foam::refinementFeatures
28 Encapsulates queries for features.
33 \*---------------------------------------------------------------------------*/
35 #ifndef refinementFeatures_H
36 #define refinementFeatures_H
38 #include "featureEdgeMesh.H"
39 #include "indexedOctree.H"
40 #include "treeDataEdge.H"
41 #include "treeDataPoint.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class refinementFeatures Declaration
50 \*---------------------------------------------------------------------------*/
52 class refinementFeatures
54 public PtrList<featureEdgeMesh>
64 PtrList<indexedOctree<treeDataEdge> > edgeTrees_;
67 PtrList<indexedOctree<treeDataPoint> > pointTrees_;
70 // Private Member Functions
76 //- Construct from components
79 const objectRegistry& io,
80 const PtrList<dictionary>& featDicts
88 const labelList& levels() const
93 const PtrList<indexedOctree<treeDataEdge> >& edgeTrees() const
98 const PtrList<indexedOctree<treeDataPoint> >& pointTrees() const
106 //- Find nearest point on nearest feature edge
109 const pointField& samples,
110 const scalarField& nearestDistSqr,
111 labelList& nearFeature,
112 List<pointIndexHit>& nearInfo
115 //- Find nearest feature point. Is an index into feature points
116 // which itself is an index into the edgeMesh points.
117 // So the point index is
118 // pointTrees()[nearFeature].shapes().pointLabels()[nearIndex]
120 void findNearestPoint
122 const pointField& samples,
123 const scalarField& nearestDistSqr,
124 labelList& nearFeature,
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 // ************************************************************************* //