00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "polyMesh.H"
00030
00031
00032
00033
00034 inline bool Foam::wallNormalInfo::update(const wallNormalInfo& w2)
00035 {
00036 if (!w2.valid())
00037 {
00038 FatalErrorIn
00039 (
00040 "wallNormalInfo::update(const wallNormalInfo&)"
00041 ) << "Problem: w2 is not valid" << abort(FatalError);
00042
00043 return false;
00044 }
00045 else if (valid())
00046 {
00047
00048 return false;
00049 }
00050 else
00051 {
00052 normal_ = w2.normal();
00053
00054 return true;
00055 }
00056 }
00057
00058
00059
00060
00061
00062 inline Foam::wallNormalInfo::wallNormalInfo()
00063 :
00064 normal_(greatVector)
00065 {}
00066
00067
00068
00069 inline Foam::wallNormalInfo::wallNormalInfo(const vector& normal)
00070 :
00071 normal_(normal)
00072 {}
00073
00074
00075
00076 inline Foam::wallNormalInfo::wallNormalInfo(const wallNormalInfo& wpt)
00077 :
00078 normal_(wpt.normal())
00079 {}
00080
00081
00082
00083
00084 inline const Foam::vector& Foam::wallNormalInfo::normal() const
00085 {
00086 return normal_;
00087 }
00088
00089
00090 inline bool Foam::wallNormalInfo::valid() const
00091 {
00092 return normal_ != greatVector;
00093 }
00094
00095
00096
00097 inline bool Foam::wallNormalInfo::sameGeometry
00098 (
00099 const polyMesh&,
00100 const wallNormalInfo& w2,
00101 const scalar tol
00102 ) const
00103 {
00104 return true;
00105 }
00106
00107
00108
00109 inline void Foam::wallNormalInfo::leaveDomain
00110 (
00111 const polyMesh&,
00112 const polyPatch& patch,
00113 const label patchFaceI,
00114 const point& faceCentre
00115 )
00116 {}
00117
00118
00119
00120 inline void Foam::wallNormalInfo::transform
00121 (
00122 const polyMesh&,
00123 const tensor& rotTensor
00124 )
00125 {}
00126
00127
00128
00129 inline void Foam::wallNormalInfo::enterDomain
00130 (
00131 const polyMesh&,
00132 const polyPatch& patch,
00133 const label patchFaceI,
00134 const point& faceCentre
00135 )
00136 {}
00137
00138
00139
00140 inline bool Foam::wallNormalInfo::updateCell
00141 (
00142 const polyMesh&,
00143 const label thisCellI,
00144 const label neighbourFaceI,
00145 const wallNormalInfo& neighbourWallInfo,
00146 const scalar tol
00147 )
00148 {
00149 return update(neighbourWallInfo);
00150 }
00151
00152
00153
00154 inline bool Foam::wallNormalInfo::updateFace
00155 (
00156 const polyMesh&,
00157 const label thisFaceI,
00158 const label neighbourCellI,
00159 const wallNormalInfo& neighbourWallInfo,
00160 const scalar tol
00161 )
00162 {
00163 return update(neighbourWallInfo);
00164 }
00165
00166
00167
00168 inline bool Foam::wallNormalInfo::updateFace
00169 (
00170 const polyMesh&,
00171 const label thisFaceI,
00172 const wallNormalInfo& neighbourWallInfo,
00173 const scalar tol
00174 )
00175 {
00176 return update(neighbourWallInfo);
00177 }
00178
00179
00180
00181
00182 inline bool Foam::wallNormalInfo::operator==(const Foam::wallNormalInfo& rhs)
00183 const
00184 {
00185 return normal() == rhs.normal();
00186 }
00187
00188
00189 inline bool Foam::wallNormalInfo::operator!=(const Foam::wallNormalInfo& rhs)
00190 const
00191 {
00192 return !(*this == rhs);
00193 }
00194
00195
00196
Copyright © 2000-2007 OpenCFD Ltd