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 #include "cellClassification.H"
00028 #include "polyMesh.H"
00029
00030
00031
00032
00033 inline bool Foam::cellInfo::update
00034 (
00035 const cellInfo& w2,
00036 const label thisFaceI,
00037 const label thisCellI,
00038 const label neighbourFaceI,
00039 const label neighbourCellI
00040 )
00041 {
00042 if
00043 (
00044 (w2.type() == cellClassification::NOTSET)
00045 || (w2.type() == cellClassification::CUT)
00046 )
00047 {
00048 FatalErrorIn("cellInfo::update(const cellInfo&)")
00049 << "Problem: trying to propagate NOTSET or CUT type:" << w2.type()
00050 << " into cell/face with type:" << type() << endl
00051 << "thisFaceI:" << thisFaceI
00052 << " thisCellI:" << thisCellI
00053 << " neighbourFaceI:" << neighbourFaceI
00054 << " neighbourCellI:" << neighbourCellI
00055 << abort(FatalError);
00056 return false;
00057 }
00058
00059 if (type() == cellClassification::NOTSET)
00060 {
00061 type_ = w2.type();
00062
00063 return true;
00064 }
00065
00066 if (type() == cellClassification::CUT)
00067 {
00068
00069 return false;
00070 }
00071
00072 if (type() == w2.type())
00073 {
00074
00075 return false;
00076 }
00077
00078
00079 FatalErrorIn("cellInfo::update(const cellInfo&)")
00080 << "Problem: trying to propagate conflicting types:" << w2.type()
00081 << " into cell/face with type:" << type() << endl
00082 << "thisFaceI:" << thisFaceI
00083 << " thisCellI:" << thisCellI
00084 << " neighbourFaceI:" << neighbourFaceI
00085 << " neighbourCellI:" << neighbourCellI
00086 << abort(FatalError);
00087
00088 return false;
00089 }
00090
00091
00092
00093
00094
00095 inline Foam::cellInfo::cellInfo()
00096 :
00097 type_(cellClassification::NOTSET)
00098 {}
00099
00100
00101
00102 inline Foam::cellInfo::cellInfo(const label type)
00103 :
00104 type_(type)
00105 {}
00106
00107
00108
00109 inline Foam::cellInfo::cellInfo(const cellInfo& w2)
00110 :
00111 type_(w2.type())
00112 {}
00113
00114
00115
00116
00117 inline bool Foam::cellInfo::valid() const
00118 {
00119 return type_ != cellClassification::NOTSET;
00120 }
00121
00122
00123
00124 inline bool Foam::cellInfo::sameGeometry
00125 (
00126 const polyMesh&,
00127 const cellInfo& w2,
00128 const scalar tol
00129 )
00130 const
00131 {
00132 return true;
00133 }
00134
00135
00136
00137 inline void Foam::cellInfo::leaveDomain
00138 (
00139 const polyMesh&,
00140 const polyPatch& patch,
00141 const label patchFaceI,
00142 const point& faceCentre
00143 )
00144 {}
00145
00146
00147
00148 inline void Foam::cellInfo::transform
00149 (
00150 const polyMesh&,
00151 const tensor& rotTensor
00152 )
00153 {}
00154
00155
00156
00157 inline void Foam::cellInfo::enterDomain
00158 (
00159 const polyMesh&,
00160 const polyPatch& patch,
00161 const label patchFaceI,
00162 const point& faceCentre
00163 )
00164 {}
00165
00166
00167
00168 inline bool Foam::cellInfo::updateCell
00169 (
00170 const polyMesh&,
00171 const label thisCellI,
00172 const label neighbourFaceI,
00173 const cellInfo& neighbourInfo,
00174 const scalar tol
00175 )
00176 {
00177 return update
00178 (
00179 neighbourInfo,
00180 -1,
00181 thisCellI,
00182 neighbourFaceI,
00183 -1
00184 );
00185 }
00186
00187
00188
00189 inline bool Foam::cellInfo::updateFace
00190 (
00191 const polyMesh&,
00192 const label thisFaceI,
00193 const label neighbourCellI,
00194 const cellInfo& neighbourInfo,
00195 const scalar tol
00196 )
00197 {
00198 return update
00199 (
00200 neighbourInfo,
00201 thisFaceI,
00202 -1,
00203 -1,
00204 neighbourCellI
00205 );
00206 }
00207
00208
00209 inline bool Foam::cellInfo::updateFace
00210 (
00211 const polyMesh&,
00212 const label thisFaceI,
00213 const cellInfo& neighbourInfo,
00214 const scalar tol
00215 )
00216 {
00217 return update
00218 (
00219 neighbourInfo,
00220 thisFaceI,
00221 -1,
00222 -1,
00223 -1
00224 );
00225 }
00226
00227
00228
00229
00230 inline bool Foam::cellInfo::operator==(const Foam::cellInfo& rhs) const
00231 {
00232 return type() == rhs.type();
00233 }
00234
00235
00236 inline bool Foam::cellInfo::operator!=(const Foam::cellInfo& rhs) const
00237 {
00238 return !(*this == rhs);
00239 }
00240
00241
00242
Copyright © 2000-2007 OpenCFD Ltd