trackedParticle.H
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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef trackedParticle_H
00039 #define trackedParticle_H
00040
00041 #include "ExactParticle.H"
00042 #include "autoPtr.H"
00043
00044
00045
00046 namespace Foam
00047 {
00048
00049 class trackedParticleCloud;
00050
00051
00052
00053
00054
00055 class trackedParticle
00056 :
00057 public ExactParticle<trackedParticle>
00058 {
00059
00060
00061
00062 point end_;
00063
00064
00065 label level_;
00066
00067
00068 label i_;
00069
00070
00071 label j_;
00072
00073 public:
00074
00075 friend class Cloud<trackedParticle>;
00076
00077
00078 class trackData
00079 {
00080
00081 Cloud<trackedParticle>& cloud_;
00082
00083 labelList& maxLevel_;
00084
00085 public:
00086
00087 bool switchProcessor;
00088 bool keepParticle;
00089
00090
00091
00092
00093 trackData(Cloud<trackedParticle>& cloud, labelList& maxLevel)
00094 :
00095 cloud_(cloud),
00096 maxLevel_(maxLevel)
00097 {}
00098
00099
00100
00101
00102 Cloud<trackedParticle>& cloud()
00103 {
00104 return cloud_;
00105 }
00106
00107 labelList& maxLevel()
00108 {
00109 return maxLevel_;
00110 }
00111 };
00112
00113
00114
00115
00116
00117
00118 trackedParticle
00119 (
00120 const Cloud<trackedParticle>& c,
00121 const vector& position,
00122 const label celli,
00123 const point& end,
00124 const label level,
00125 const label i,
00126 const label j
00127 );
00128
00129
00130 trackedParticle
00131 (
00132 const Cloud<trackedParticle>& c,
00133 Istream& is,
00134 bool readFields = true
00135 );
00136
00137
00138 autoPtr<trackedParticle> clone() const
00139 {
00140 return autoPtr<trackedParticle>(new trackedParticle(*this));
00141 }
00142
00143
00144
00145
00146
00147 point& end()
00148 {
00149 return end_;
00150 }
00151
00152
00153 label& i()
00154 {
00155 return i_;
00156 }
00157
00158
00159 label& j()
00160 {
00161 return j_;
00162 }
00163
00164
00165
00166
00167
00168
00169 bool move(trackData&);
00170
00171
00172
00173
00174 bool hitPatch
00175 (
00176 const polyPatch&,
00177 trackedParticle::trackData& td,
00178 const label patchI
00179 );
00180 bool hitPatch
00181 (
00182 const polyPatch&,
00183 int&,
00184 const label patchI
00185 );
00186
00187
00188 void hitWedgePatch
00189 (
00190 const wedgePolyPatch&,
00191 trackedParticle::trackData& td
00192 );
00193 void hitWedgePatch
00194 (
00195 const wedgePolyPatch&,
00196 int&
00197 );
00198
00199
00200
00201 void hitSymmetryPatch
00202 (
00203 const symmetryPolyPatch&,
00204 trackedParticle::trackData& td
00205 );
00206 void hitSymmetryPatch
00207 (
00208 const symmetryPolyPatch&,
00209 int&
00210 );
00211
00212
00213 void hitCyclicPatch
00214 (
00215 const cyclicPolyPatch&,
00216 trackedParticle::trackData& td
00217 );
00218 void hitCyclicPatch
00219 (
00220 const cyclicPolyPatch&,
00221 int&
00222 );
00223
00224
00225
00226 void hitProcessorPatch
00227 (
00228 const processorPolyPatch&,
00229 trackedParticle::trackData& td
00230 );
00231 void hitProcessorPatch
00232 (
00233 const processorPolyPatch&,
00234 int&
00235 );
00236
00237
00238 void hitWallPatch
00239 (
00240 const wallPolyPatch&,
00241 trackedParticle::trackData& td
00242 );
00243 void hitWallPatch
00244 (
00245 const wallPolyPatch&,
00246 int&
00247 );
00248
00249
00250 void hitPatch
00251 (
00252 const polyPatch&,
00253 trackedParticle::trackData& td
00254 );
00255 void hitPatch
00256 (
00257 const polyPatch&,
00258 int&
00259 );
00260
00261
00262
00263
00264 friend Ostream& operator<<(Ostream&, const trackedParticle&);
00265
00266
00267 };
00268
00269
00270 template<>
00271 inline bool contiguous<trackedParticle>()
00272 {
00273 return true;
00274 }
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285 }
00286
00287
00288
00289 #endif
00290
00291
Copyright © 2000-2009 OpenCFD Ltd