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
29 Holds information regarding nearest wall point. Used in pointEdgeWave.
30 (so not standard meshWave)
32 To be used in wall distance calculation.
38 \*---------------------------------------------------------------------------*/
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 // Class forward declarations
57 /*---------------------------------------------------------------------------*\
58 Class pointData Declaration
59 \*---------------------------------------------------------------------------*/
65 //- position of nearest wall center
68 //- normal distance (squared) from point to origin
71 //- additional information.
74 //- additional information.
78 // Private Member Functions
80 //- Evaluate distance to point. Update distSqr, origin from whomever
81 // is nearer pt. Return true if w2 is closer to point,
90 //- Combine current with w2. Update distSqr, origin if w2 has smaller
91 // quantities and returns true.
105 //- Construct from origin, distance
109 const scalar distSqr,
114 //- Construct as copy
115 inline pointData(const pointData&);
122 inline const point& origin() const;
124 inline scalar distSqr() const;
126 inline scalar s() const;
128 inline const vector& v() const;
131 // Needed by meshWave
133 //- Check whether origin has been changed at all or
134 // still contains original (invalid) value.
135 inline bool valid() const;
137 //- Check for identical geometrical data. Used for cyclics checking.
138 inline bool sameGeometry(const pointData&, const scalar tol)
141 //- Convert origin to relative vector to leaving point
142 // (= point coordinate)
143 inline void leaveDomain
145 const polyPatch& patch,
146 const label patchPointI,
150 //- Convert relative origin to absolute by adding entering point
151 inline void enterDomain
153 const polyPatch& patch,
154 const label patchPointI,
158 //- Apply rotation matrix to origin
159 inline void transform(const tensor& rotTensor);
161 //- Influence of edge on point
162 inline bool updatePoint
164 const polyMesh& mesh,
167 const pointData& edgeInfo,
171 //- Influence of different value on same point.
172 // Merge new and old info.
173 inline bool updatePoint
175 const polyMesh& mesh,
177 const pointData& newPointInfo,
181 //- Influence of different value on same point.
182 // No information about current position whatsoever.
183 inline bool updatePoint
185 const pointData& newPointInfo,
189 //- Influence of point on edge.
190 inline bool updateEdge
192 const polyMesh& mesh,
195 const pointData& pointInfo,
202 //Note: Used to determine whether to call update.
203 inline bool operator==(const pointData&) const;
205 inline bool operator!=(const pointData&) const;
208 // IOstream Operators
210 friend Ostream& operator<<(Ostream&, const pointData&);
211 friend Istream& operator>>(Istream&, pointData&);
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 } // End namespace Foam
219 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 #include "pointDataI.H"
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 // ************************************************************************* //