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 (coordinate and normal) regarding nearest wall point.
30 Is like wallPoint but transfer extra (passive) data.
31 Used e.g. in wall distance calculation with wall reflection vectors.
37 \*---------------------------------------------------------------------------*/
39 #ifndef wallPointData_H
40 #define wallPointData_H
42 #include "wallPoint.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 template<class Type> class wallPointData;
51 // Forward declaration of friend functions and operators
53 template<class Type> Istream& operator>>(Istream&, wallPointData<Type>&);
54 template<class Type> Ostream& operator<<(Ostream&, const wallPointData<Type>&);
57 /*---------------------------------------------------------------------------*\
58 Class wallPointData Declaration
59 \*---------------------------------------------------------------------------*/
68 //- Data at nearest wall center
72 // Private Member Functions
74 //- Evaluate distance to point. Update distSqr, origin from whomever
75 // is nearer pt. Return true if w2 is closer to point,
80 const wallPointData<Type>& w2,
87 typedef Type dataType;
93 inline wallPointData();
95 //- Construct from origin, normal, distance
108 inline const Type& data() const;
111 // Needed by meshWave
113 //- Influence of neighbouring face.
114 // Calls update(...) with cellCentre of cellI
115 inline bool updateCell
117 const polyMesh& mesh,
118 const label thisCellI,
119 const label neighbourFaceI,
120 const wallPointData<Type>& neighbourWallInfo,
124 //- Influence of neighbouring cell.
125 // Calls update(...) with faceCentre of faceI
126 inline bool updateFace
128 const polyMesh& mesh,
129 const label thisFaceI,
130 const label neighbourCellI,
131 const wallPointData<Type>& neighbourWallInfo,
135 //- Influence of different value on same face.
136 // Merge new and old info.
137 // Calls update(...) with faceCentre of faceI
138 inline bool updateFace
140 const polyMesh& mesh,
141 const label thisFaceI,
142 const wallPointData<Type>& neighbourWallInfo,
148 // IOstream Operators
150 friend Ostream& operator<< <Type>(Ostream&, const wallPointData<Type>&);
151 friend Istream& operator>> <Type>(Istream&, wallPointData<Type>&);
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 } // End namespace Foam
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 # include "wallPointData.C"
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 #include "wallPointDataI.H"
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 // ************************************************************************* //