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 Holds information regarding nearest wall point. Used in wall distance
35 \*---------------------------------------------------------------------------*/
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 // Forward declaration of classes
55 // Forward declaration of friend functions and operators
56 Ostream& operator<<(Ostream&, const wallPoint&);
57 Istream& operator>>(Istream&, wallPoint&);
60 /*---------------------------------------------------------------------------*\
61 Class wallPoint Declaration
62 \*---------------------------------------------------------------------------*/
68 //- position of nearest wall center
71 //- normal distance (squared) from cellcenter to origin
74 // Private Member Functions
76 //- Evaluate distance to point. Update distSqr, origin from whomever
77 // is nearer pt. Return true if w2 is closer to point,
79 template<class TrackingData>
96 //- Construct from origin, distance
103 //- Construct as copy
114 inline const point& origin() const;
116 inline point& origin();
118 inline scalar distSqr() const;
120 inline scalar& distSqr();
123 // Needed by FaceCellWave
125 //- Check whether origin has been changed at all or
126 // still contains original (invalid) value.
127 template<class TrackingData>
128 inline bool valid(TrackingData& td) const;
130 //- Check for identical geometrical data. Used for cyclics checking.
131 template<class TrackingData>
132 inline bool sameGeometry
140 //- Convert any absolute coordinates into relative to (patch)face
142 template<class TrackingData>
143 inline void leaveDomain
147 const label patchFaceI,
148 const point& faceCentre,
152 //- Reverse of leaveDomain
153 template<class TrackingData>
154 inline void enterDomain
158 const label patchFaceI,
159 const point& faceCentre,
163 //- Apply rotation matrix to any coordinates
164 template<class TrackingData>
165 inline void transform
172 //- Influence of neighbouring face.
173 template<class TrackingData>
174 inline bool updateCell
177 const label thisCellI,
178 const label neighbourFaceI,
179 const wallPoint& neighbourInfo,
184 //- Influence of neighbouring cell.
185 template<class TrackingData>
186 inline bool updateFace
189 const label thisFaceI,
190 const label neighbourCellI,
191 const wallPoint& neighbourInfo,
196 //- Influence of different value on same face.
197 template<class TrackingData>
198 inline bool updateFace
201 const label thisFaceI,
202 const wallPoint& neighbourInfo,
207 //- Same (like operator==)
208 template<class TrackingData>
209 inline bool equal(const wallPoint&, TrackingData& td) const;
214 // Needed for List IO
215 inline bool operator==(const wallPoint&) const;
216 inline bool operator!=(const wallPoint&) const;
219 // IOstream Operators
221 friend Ostream& operator<<(Ostream&, const wallPoint&);
222 friend Istream& operator>>(Istream&, wallPoint&);
226 //- Data associated with wallPoint type are contiguous
228 inline bool contiguous<wallPoint>()
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 } // End namespace Foam
238 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
240 #include "wallPointI.H"
242 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
246 // ************************************************************************* //