| 99 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |
| 100 | |
| 101 | bool Foam::findCellParticle::move |
| 102 | ( |
| 103 | trackingData& td, |
| 104 | const scalar maxTrackLen |
| 105 | ) |
| 106 | { |
| 107 | td.switchProcessor = false; |
| 108 | td.keepParticle = true; |
| 109 | |
| 110 | while (td.keepParticle && !td.switchProcessor && stepFraction() < 1) |
| 111 | { |
| 112 | const scalar f = 1 - stepFraction(); |
| 113 | trackToFace(f*(end_ - start_), f, td); |
| 114 | } |
| 115 | |
| 116 | if (stepFraction() == 1 || !td.keepParticle) |
| 117 | { |
| 118 | // Hit endpoint or patch. If patch hit could do fancy stuff but just |
| 119 | // to use the patch point is good enough for now. |
| 120 | td.cellToData()[cell()].append(data()); |
| 121 | td.cellToEnd()[cell()].append(position()); |
| 122 | } |
| 123 | |
| 124 | return td.keepParticle; |
| 125 | } |
| 126 | |
| 127 | |
| 128 | bool Foam::findCellParticle::hitPatch |