37 template<
class ParticleType>
51 label facei = faces[i];
52 scalar lam = lambda(C, position, facei);
54 if ((lam > 0) && (lam < 1.0))
62 template<
class ParticleType>
67 const scalar stepFraction,
78 label facei = faces[i];
79 scalar lam = lambda(C, position, facei, stepFraction);
81 if ((lam > 0) && (lam < 1.0))
89 template<
class ParticleType>
90 template<
class TrackData>
98 facei_ = patchFace(patchi, facei_);
102 template<
class ParticleType>
103 template<
class TrackData>
111 refCast<const processorPolyPatch>
112 (cloud_.pMesh().boundaryMesh()[
patchi]);
121 transformPosition(T);
122 static_cast<ParticleType&
>(*this).transformProperties(T);
127 transformPosition(T);
128 static_cast<ParticleType&
>(*this).transformProperties(T);
136 static_cast<ParticleType&
>(*this).transformProperties
144 static_cast<ParticleType&
>(*this).transformProperties
152 if (stepFraction_ > (1.0 - SMALL))
159 facei_ += ppp.
start();
166 template<
class ParticleType>
179 origProc_(Pstream::myProcNo()),
180 origId_(cloud_.getNewParticleID())
184 template<
class ParticleType>
188 position_(p.position_),
191 stepFraction_(p.stepFraction_),
192 origProc_(p.origProc_),
199 template<
class ParticleType>
200 template<
class TrackData>
203 const vector& endPosition,
210 while(!onBoundary() && stepFraction_ < 1.0 - SMALL)
212 stepFraction_ += trackToFace(endPosition, td)*(1.0 - stepFraction_);
220 template<
class ParticleType>
224 return track(endPosition, dummyTd);
227 template<
class ParticleType>
228 template<
class TrackData>
231 const vector& endPosition,
238 findFaces(endPosition, faces);
241 scalar trackFraction = 0.0;
246 position_ = endPosition;
250 scalar lambdaMin = GREAT;
252 if (faces.
size() == 1)
254 lambdaMin = lambda(position_, endPosition, faces[0], stepFraction_);
267 lambda(position_, endPosition, faces[i], stepFraction_);
277 bool internalFace = cloud_.internalFace(facei_);
286 if (lambdaMin <= 1.0)
288 trackFraction = lambdaMin;
289 position_ += trackFraction*(endPosition - position_);
294 position_ = endPosition;
297 else if (static_cast<ParticleType&>(*this).softImpact())
303 position_ = endPosition;
321 "Particle::trackToFace(const vector&, TrackData&)"
322 )<<
"addressing failure" <<
nl
328 ParticleType&
p =
static_cast<ParticleType&
>(*this);
334 position_ = endPosition;
337 label patchi = patch(facei_);
340 if (!p.hitPatch(patch, td, patchi))
342 if (isA<wedgePolyPatch>(patch))
346 static_cast<const wedgePolyPatch&>(patch), td
349 else if (isA<symmetryPolyPatch>(patch))
353 static_cast<const symmetryPolyPatch&>(patch), td
356 else if (isA<cyclicPolyPatch>(patch))
360 static_cast<const cyclicPolyPatch&>(patch), td
363 else if (isA<processorPolyPatch>(patch))
367 static_cast<const processorPolyPatch&>(patch), td
370 else if (isA<wallPolyPatch>(patch))
374 static_cast<const wallPolyPatch&>(patch), td
379 p.hitPatch(patch, td);
391 if (trackFraction < SMALL)
393 position_ += 1.0e-3*(mesh.
cellCentres()[celli_] - position_);
396 return trackFraction;
399 template<
class ParticleType>
406 return trackToFace(endPosition, dummyTd);
409 template<
class ParticleType>
416 template<
class ParticleType>
421 template<
class ParticleType>
426 template<
class ParticleType>
427 template<
class TrackData>
439 template<
class ParticleType>
440 template<
class TrackData>
450 static_cast<ParticleType&
>(*this).transformProperties(
I - 2.0*nf*nf);
454 template<
class ParticleType>
455 template<
class TrackData>
465 static_cast<ParticleType&
>(*this).transformProperties(
I - 2.0*nf*nf);
469 template<
class ParticleType>
470 template<
class TrackData>
477 label patchFacei_ = cpp.
whichFace(facei_);
481 celli_ = cloud_.polyMesh_.faceOwner()[facei_];
487 transformPosition(T);
488 static_cast<ParticleType&
>(*this).transformProperties(T);
493 static_cast<ParticleType&
>(*this).transformProperties
501 template<
class ParticleType>
502 template<
class TrackData>
511 template<
class ParticleType>
512 template<
class TrackData>
521 template<
class ParticleType>
522 template<
class TrackData>