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