| 337 | |
| 338 | |
| 339 | void Foam::isoSurface::calcCutTypes |
| 340 | ( |
| 341 | const labelList& boundaryRegion, |
| 342 | const volVectorField& meshC, |
| 343 | const volScalarField& cVals, |
| 344 | const scalarField& pVals |
| 345 | ) |
| 346 | { |
| 347 | const polyBoundaryMesh& patches = mesh_.boundaryMesh(); |
| 348 | const labelList& own = mesh_.faceOwner(); |
| 349 | const labelList& nei = mesh_.faceNeighbour(); |
| 350 | |
| 351 | faceCutType_.setSize(mesh_.nFaces()); |
| 352 | faceCutType_ = NOTCUT; |
| 353 | |
| 354 | for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) |
| 355 | { |
| 356 | // CC edge. |
| 357 | bool ownLower = (cVals[own[facei]] < iso_); |
| 358 | |
| 359 | scalar nbrValue; |
| 360 | point nbrPoint; |
| 361 | getNeighbour |
| 362 | ( |
| 363 | boundaryRegion, |
| 364 | meshC, |
| 365 | cVals, |
| 366 | own[facei], |
| 367 | facei, |
| 368 | nbrValue, |
| 369 | nbrPoint |
| 370 | ); |
| 371 | |
| 372 | bool neiLower = (nbrValue < iso_); |
| 373 | |
| 374 | if (ownLower != neiLower) |
| 375 | { |
| 376 | faceCutType_[facei] = CUT; |
| 377 | } |
| 378 | else |
| 379 | { |
| 380 | // See if any mesh edge is cut by looping over all the edges of the |
| 381 | // face. |
| 382 | const face f = mesh_.faces()[facei]; |
| 383 | |
| 384 | if (isEdgeOfFaceCut(pVals, f, ownLower, neiLower)) |
| 385 | { |
| 386 | faceCutType_[facei] = CUT; |
| 387 | } |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | forAll(patches, patchi) |
| 392 | { |
| 393 | const polyPatch& pp = patches[patchi]; |
| 394 | |
| 395 | label facei = pp.start(); |
| 396 |
no test coverage detected