MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / move

Function move

src/functionObjects/field/nearWallFields/findCellParticle.C:101–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
100
101bool 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
128bool Foam::findCellParticle::hitPatch

Callers

nothing calls this directly

Calls 4

dataClass · 0.85
positionFunction · 0.85
cellClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected