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

Function changeTet

src/lagrangian/basic/particle/particle.C:236–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235
236void Foam::particle::changeTet(const label tetTriI)
237{
238 const bool isOwner = mesh_.faceOwner()[tetFacei_] == celli_;
239
240 const label firstTetPtI = 1;
241 const label lastTetPtI = mesh_.faces()[tetFacei_].size() - 2;
242
243 if (tetTriI == 1)
244 {
245 changeFace(tetTriI);
246 }
247 else if (tetTriI == 2)
248 {
249 if (isOwner)
250 {
251 if (tetPti_ == lastTetPtI)
252 {
253 changeFace(tetTriI);
254 }
255 else
256 {
257 reflect();
258 tetPti_ += 1;
259 }
260 }
261 else
262 {
263 if (tetPti_ == firstTetPtI)
264 {
265 changeFace(tetTriI);
266 }
267 else
268 {
269 reflect();
270 tetPti_ -= 1;
271 }
272 }
273 }
274 else if (tetTriI == 3)
275 {
276 if (isOwner)
277 {
278 if (tetPti_ == firstTetPtI)
279 {
280 changeFace(tetTriI);
281 }
282 else
283 {
284 reflect();
285 tetPti_ -= 1;
286 }
287 }
288 else
289 {
290 if (tetPti_ == lastTetPtI)
291 {
292 changeFace(tetTriI);
293 }

Callers 1

particle.CFile · 0.85

Calls 5

changeFaceFunction · 0.85
reflectFunction · 0.85
exitFunction · 0.50
sizeMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected