Walks cell circumference. Updates face, edge, vertex. Position on face is given by: vertI == -1, facei != -1, edgeI != -1 on edge of face. Cross edge to neighbouring face. vertI != -1, edgeI != -1, facei == -1 coming from edge onto vertex vertI. Need to step to one of the faces not using edgeI. vertI != -1, edgeI == -1, facei != -1 coming from vertex on side of face. Step to one of the faces u
| 370 | // coming from vertex on side of face. Step to one of the faces |
| 371 | // using vertI but not facei |
| 372 | void Foam::topoCellLooper::walkSplitHex |
| 373 | ( |
| 374 | const label celli, |
| 375 | const cellFeatures& features, |
| 376 | const label fromFacei, |
| 377 | const label fromEdgeI, |
| 378 | const label fromVertI, |
| 379 | |
| 380 | DynamicList<label>& loop, |
| 381 | DynamicList<scalar>& loopWeights |
| 382 | ) const |
| 383 | { |
| 384 | // Work vars giving position on cell |
| 385 | label facei = fromFacei; |
| 386 | label edgeI = fromEdgeI; |
| 387 | label vertI = fromVertI; |
| 388 | |
| 389 | do |
| 390 | { |
| 391 | if (debug) |
| 392 | { |
| 393 | Pout<< "Entering walk with : cell:" << celli << " face:" << facei; |
| 394 | if (facei != -1) |
| 395 | { |
| 396 | Pout<< " verts:" << mesh().faces()[facei]; |
| 397 | } |
| 398 | Pout<< " edge:" << edgeI; |
| 399 | if (edgeI != -1) |
| 400 | { |
| 401 | Pout<< " verts:" << mesh().edges()[edgeI]; |
| 402 | } |
| 403 | Pout<< " vert:" << vertI << endl; |
| 404 | } |
| 405 | |
| 406 | label startLoop = -1; |
| 407 | |
| 408 | if |
| 409 | ( |
| 410 | (vertI != -1) |
| 411 | && ( |
| 412 | (startLoop = |
| 413 | findIndex |
| 414 | ( |
| 415 | loop, |
| 416 | vertToEVert(vertI) |
| 417 | ) |
| 418 | ) |
| 419 | != -1 |
| 420 | ) |
| 421 | ) |
| 422 | { |
| 423 | // Breaking walk since vertI already cut |
| 424 | label firstFree = loop.size(); |
| 425 | |
| 426 | subsetList(startLoop, firstFree, loop); |
| 427 | subsetList(startLoop, firstFree, loopWeights); |
| 428 | |
| 429 | break; |
no test coverage detected