| 470 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |
| 471 | |
| 472 | void Foam::boundaryMesh::read(const polyMesh& mesh) |
| 473 | { |
| 474 | patches_.clear(); |
| 475 | |
| 476 | patches_.setSize(mesh.boundaryMesh().size()); |
| 477 | |
| 478 | // Number of boundary faces |
| 479 | label nBFaces = mesh.nFaces() - mesh.nInternalFaces(); |
| 480 | |
| 481 | faceList bFaces(nBFaces); |
| 482 | |
| 483 | meshFace_.setSize(nBFaces); |
| 484 | |
| 485 | label bFacei = 0; |
| 486 | |
| 487 | // Collect all boundary faces. |
| 488 | forAll(mesh.boundaryMesh(), patchi) |
| 489 | { |
| 490 | const polyPatch& pp = mesh.boundaryMesh()[patchi]; |
| 491 | |
| 492 | patches_.set |
| 493 | ( |
| 494 | patchi, |
| 495 | new boundaryPatch |
| 496 | ( |
| 497 | pp.name(), |
| 498 | patchi, |
| 499 | pp.size(), |
| 500 | bFacei, |
| 501 | pp.type() |
| 502 | ) |
| 503 | ); |
| 504 | |
| 505 | // Collect all faces in global numbering. |
| 506 | forAll(pp, patchFacei) |
| 507 | { |
| 508 | meshFace_[bFacei] = pp.start() + patchFacei; |
| 509 | |
| 510 | bFaces[bFacei] = pp[patchFacei]; |
| 511 | |
| 512 | bFacei++; |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | |
| 517 | if (debug) |
| 518 | { |
| 519 | Pout<< "read : patches now:" << endl; |
| 520 | |
| 521 | forAll(patches_, patchi) |
| 522 | { |
| 523 | const boundaryPatch& bp = patches_[patchi]; |
| 524 | |
| 525 | Pout<< " name : " << bp.name() << endl |
| 526 | << " size : " << bp.size() << endl |
| 527 | << " start : " << bp.start() << endl |
| 528 | << " type : " << bp.physicalType() << endl |
| 529 | << endl; |
nothing calls this directly
no test coverage detected