1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. 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
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
135 // Used for cyclics checking
136 inline bool sameGeometry
143 //- Convert any absolute coordinates into relative to (patch) face
145 inline void leaveDomain
149 const label patchFaceI,
150 const point& faceCentre
153 //- Reverse of leaveDomain
154 inline void enterDomain
158 const label patchFaceI,
159 const point& faceCentre
162 //- Apply rotation matrix to any coordinates
163 inline void transform
169 //- Influence of neighbouring face.
170 inline bool updateCell
173 const label thisCellI,
174 const label neighbourFaceI,
175 const wallPoint& neighbourInfo,
179 //- Influence of neighbouring cell.
180 inline bool updateFace
183 const label thisFaceI,
184 const label neighbourCellI,
185 const wallPoint& neighbourInfo,
189 //- Influence of different value on same face.
190 inline bool updateFace
193 const label thisFaceI,
194 const wallPoint& neighbourInfo,
201 // Needed for List IO
202 inline bool operator==(const wallPoint&) const;
203 inline bool operator!=(const wallPoint&) const;
206 // IOstream Operators
208 friend Ostream& operator<<(Ostream&, const wallPoint&);
209 friend Istream& operator>>(Istream&, wallPoint&);
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 } // End namespace Foam
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 #include "wallPointI.H"
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 // ************************************************************************* //