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 wall distance
36 \*---------------------------------------------------------------------------*/
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 // Forward declaration of classes
56 // Forward declaration of friend functions and operators
57 Ostream& operator<<(Ostream&, const wallPoint&);
58 Istream& operator>>(Istream&, wallPoint&);
61 /*---------------------------------------------------------------------------*\
62 Class wallPoint Declaration
63 \*---------------------------------------------------------------------------*/
69 //- position of nearest wall center
72 //- normal distance (squared) from cellcenter to origin
75 // Private Member Functions
77 //- Evaluate distance to point. Update distSqr, origin from whomever
78 // is nearer pt. Return true if w2 is closer to point,
90 // Static data members
92 //- initial point far away.
93 static point greatPoint;
101 //- Construct from origin, distance
108 //- Construct as copy
119 inline const point& origin() const;
121 inline point& origin();
123 inline scalar distSqr() const;
125 inline scalar& distSqr();
128 // Needed by FaceCellWave
130 //- Check whether origin has been changed at all or
131 // still contains original (invalid) value.
132 inline bool valid() const;
134 //- Check for identical geometrical data. Used for cyclics checking.
135 inline bool sameGeometry
142 //- Convert any absolute coordinates into relative to (patch)face
144 inline void leaveDomain
148 const label patchFaceI,
149 const point& faceCentre
152 //- Reverse of leaveDomain
153 inline void enterDomain
157 const label patchFaceI,
158 const point& faceCentre
161 //- Apply rotation matrix to any coordinates
162 inline void transform
168 //- Influence of neighbouring face.
169 inline bool updateCell
172 const label thisCellI,
173 const label neighbourFaceI,
174 const wallPoint& neighbourInfo,
178 //- Influence of neighbouring cell.
179 inline bool updateFace
182 const label thisFaceI,
183 const label neighbourCellI,
184 const wallPoint& neighbourInfo,
188 //- Influence of different value on same face.
189 inline bool updateFace
192 const label thisFaceI,
193 const wallPoint& neighbourInfo,
200 // Needed for List IO
201 inline bool operator==(const wallPoint&) const;
202 inline bool operator!=(const wallPoint&) const;
205 // IOstream Operators
207 friend Ostream& operator<<(Ostream&, const wallPoint&);
208 friend Istream& operator>>(Istream&, wallPoint&);
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 } // End namespace Foam
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 #include "wallPointI.H"
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 // ************************************************************************* //