30 template<
class ParticleType>
31 template<
class TrackingData>
41 while (!this->onBoundary() && this->stepFraction_ < 1.0 - SMALL)
43 this->stepFraction_ +=
44 trackToFace(endPosition, td)
45 *(1.0 - this->stepFraction_);
52 template<
class ParticleType>
59 return track(endPosition, dummyTd);
63 template<
class ParticleType>
64 template<
class TrackingData>
75 scalar trackFraction = VGREAT;
78 const vector vec = endPosition-this->position_;
82 label facei = cFaces[i];
84 if (facei != this->
face())
92 intersection::HALF_RAY
95 if (inter.
hit() && inter.
distance() < trackFraction)
115 if (trackFraction >= (1.0-SMALL))
119 this->position_ = endPosition;
125 this->position_ = intersection;
126 this->facei_ = hitFacei;
133 bool internalFace = this->
cloud().internalFace(this->facei_);
138 if (this->celli_ == mesh.
faceOwner()[this->facei_])
144 this->celli_ = mesh.
faceOwner()[this->facei_];
150 "ExactParticle::trackToFace"
151 "(const vector&, TrackingData&)"
152 )<<
"addressing failure" <<
nl
158 ParticleType&
p =
static_cast<ParticleType&
>(*this);
164 this->position_ = endPosition;
167 label
patchi = patch(this->facei_);
170 if (isA<wedgePolyPatch>(patch))
174 static_cast<const wedgePolyPatch&>(patch), td
177 else if (isA<symmetryPolyPatch>(patch))
181 static_cast<const symmetryPolyPatch&>(patch), td
184 else if (isA<cyclicPolyPatch>(patch))
188 static_cast<const cyclicPolyPatch&>(patch), td
191 else if (isA<processorPolyPatch>(patch))
195 static_cast<const processorPolyPatch&>(patch), td
198 else if (isA<wallPolyPatch>(patch))
202 static_cast<const wallPolyPatch&>(patch), td
205 else if (isA<polyPatch>(patch))
209 static_cast<const polyPatch&>(patch), td
216 "ExactParticle::trackToFace"
217 "(const vector& endPosition, scalar& trackFraction)"
218 )<<
"patch type " << patch.type() <<
" not suported" <<
nl
229 if (trackFraction < SMALL)
232 1.0e-6*(mesh.
cellCentres()[this->celli_] - this->position_);
235 return trackFraction;
239 template<
class ParticleType>
246 return trackToFace(endPosition, dummyTd);
250 template<
class ParticleType>
257 return operator<<(os, static_cast<const Particle<ParticleType>&>(
p));