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 (coordinate and normal) regarding nearest wall point.
31 Is like wallPoint but transfer extra (passive) data.
32 Used e.g. in wall distance calculation with wall reflection vectors.
38 \*---------------------------------------------------------------------------*/
40 #ifndef wallPointData_H
41 #define wallPointData_H
43 #include "wallPoint.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 template<class Type> class wallPointData;
52 // Forward declaration of friend functions and operators
54 template<class Type> Istream& operator>>(Istream&, wallPointData<Type>&);
55 template<class Type> Ostream& operator<<(Ostream&, const wallPointData<Type>&);
58 /*---------------------------------------------------------------------------*\
59 Class wallPointData Declaration
60 \*---------------------------------------------------------------------------*/
69 //- data at nearest wall center
73 // Private Member Functions
75 //- Evaluate distance to point. Update distSqr, origin from whomever
76 // is nearer pt. Return true if w2 is closer to point,
81 const wallPointData<Type>& w2,
88 typedef Type dataType;
94 inline wallPointData();
96 //- Construct from origin, normal, distance
109 inline const Type& data() const;
112 // Needed by meshWave
114 //- Influence of neighbouring face.
115 // Calls update(...) with cellCentre of cellI
116 inline bool updateCell
118 const polyMesh& mesh,
119 const label thisCellI,
120 const label neighbourFaceI,
121 const wallPointData<Type>& neighbourWallInfo,
125 //- Influence of neighbouring cell.
126 // Calls update(...) with faceCentre of faceI
127 inline bool updateFace
129 const polyMesh& mesh,
130 const label thisFaceI,
131 const label neighbourCellI,
132 const wallPointData<Type>& neighbourWallInfo,
136 //- Influence of different value on same face.
137 // Merge new and old info.
138 // Calls update(...) with faceCentre of faceI
139 inline bool updateFace
141 const polyMesh& mesh,
142 const label thisFaceI,
143 const wallPointData<Type>& neighbourWallInfo,
149 // IOstream Operators
151 friend Ostream& operator<< <Type>(Ostream&, const wallPointData<Type>&);
152 friend Istream& operator>> <Type>(Istream&, wallPointData<Type>&);
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 # include "wallPointData.C"
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 #include "wallPointDataI.H"
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 // ************************************************************************* //