|
|
|
wallPointData.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::wallPointData 00027 00028 Description 00029 Holds information (coordinate and normal) regarding nearest wall point. 00030 00031 Is like wallPoint but transfer extra (passive) data. 00032 Used e.g. in wall distance calculation with wall reflection vectors. 00033 00034 SourceFiles 00035 wallPointDataI.H 00036 wallPointData.C 00037 00038 \*---------------------------------------------------------------------------*/ 00039 00040 #ifndef wallPointData_H 00041 #define wallPointData_H 00042 00043 #include "wallPoint.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 template<class Type> class wallPointData; 00051 00052 // Forward declaration of friend functions and operators 00053 00054 template<class Type> Istream& operator>>(Istream&, wallPointData<Type>&); 00055 template<class Type> Ostream& operator<<(Ostream&, const wallPointData<Type>&); 00056 00057 00058 /*---------------------------------------------------------------------------*\ 00059 Class wallPointData Declaration 00060 \*---------------------------------------------------------------------------*/ 00061 00062 template <class Type> 00063 class wallPointData 00064 : 00065 public wallPoint 00066 { 00067 // Private data 00068 00069 //- data at nearest wall center 00070 Type data_; 00071 00072 00073 // Private Member Functions 00074 00075 //- Evaluate distance to point. Update distSqr, origin from whomever 00076 // is nearer pt. Return true if w2 is closer to point, 00077 // false otherwise. 00078 inline bool update 00079 ( 00080 const point&, 00081 const wallPointData<Type>& w2, 00082 const scalar tol 00083 ); 00084 00085 00086 public: 00087 00088 typedef Type dataType; 00089 00090 00091 // Constructors 00092 00093 //- Construct null 00094 inline wallPointData(); 00095 00096 //- Construct from origin, normal, distance 00097 inline wallPointData 00098 ( 00099 const point& origin, 00100 const Type& data, 00101 const scalar distSqr 00102 ); 00103 00104 00105 // Member Functions 00106 00107 // Access 00108 00109 inline const Type& data() const; 00110 inline Type& data(); 00111 00112 // Needed by meshWave 00113 00114 //- Influence of neighbouring face. 00115 // Calls update(...) with cellCentre of cellI 00116 inline bool updateCell 00117 ( 00118 const polyMesh& mesh, 00119 const label thisCellI, 00120 const label neighbourFaceI, 00121 const wallPointData<Type>& neighbourWallInfo, 00122 const scalar tol 00123 ); 00124 00125 //- Influence of neighbouring cell. 00126 // Calls update(...) with faceCentre of faceI 00127 inline bool updateFace 00128 ( 00129 const polyMesh& mesh, 00130 const label thisFaceI, 00131 const label neighbourCellI, 00132 const wallPointData<Type>& neighbourWallInfo, 00133 const scalar tol 00134 ); 00135 00136 //- Influence of different value on same face. 00137 // Merge new and old info. 00138 // Calls update(...) with faceCentre of faceI 00139 inline bool updateFace 00140 ( 00141 const polyMesh& mesh, 00142 const label thisFaceI, 00143 const wallPointData<Type>& neighbourWallInfo, 00144 const scalar tol 00145 ); 00146 00147 // Member Operators 00148 00149 // IOstream Operators 00150 00151 friend Ostream& operator<< <Type>(Ostream&, const wallPointData<Type>&); 00152 friend Istream& operator>> <Type>(Istream&, wallPointData<Type>&); 00153 }; 00154 00155 00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00157 00158 00159 } // End namespace Foam 00160 00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00162 00163 #ifdef NoRepository 00164 # include "wallPointData.C" 00165 #endif 00166 00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00168 00169 #include "wallPointDataI.H" 00170 00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00172 00173 #endif 00174 00175 // ************************************************************************* // |