| 591 | |
| 592 | |
| 593 | void Foam::meshToMesh::constructFromCuttingPatches |
| 594 | ( |
| 595 | const word& methodName, |
| 596 | const word& AMIMethodName, |
| 597 | const HashTable<word>& patchMap, |
| 598 | const wordList& cuttingPatches |
| 599 | ) |
| 600 | { |
| 601 | srcPatchID_.setSize(patchMap.size()); |
| 602 | tgtPatchID_.setSize(patchMap.size()); |
| 603 | |
| 604 | label i = 0; |
| 605 | forAllConstIter(HashTable<word>, patchMap, iter) |
| 606 | { |
| 607 | const word& tgtPatchName = iter.key(); |
| 608 | const word& srcPatchName = iter(); |
| 609 | |
| 610 | const polyPatch& srcPatch = srcRegion_.boundaryMesh()[srcPatchName]; |
| 611 | const polyPatch& tgtPatch = tgtRegion_.boundaryMesh()[tgtPatchName]; |
| 612 | |
| 613 | srcPatchID_[i] = srcPatch.index(); |
| 614 | tgtPatchID_[i] = tgtPatch.index(); |
| 615 | i++; |
| 616 | } |
| 617 | |
| 618 | // calculate volume addressing and weights |
| 619 | calculate(methodName); |
| 620 | |
| 621 | // calculate patch addressing and weights |
| 622 | calculatePatchAMIs(AMIMethodName); |
| 623 | |
| 624 | // set IDs of cutting patches on target mesh |
| 625 | cuttingPatches_.setSize(cuttingPatches.size()); |
| 626 | forAll(cuttingPatches_, i) |
| 627 | { |
| 628 | const word& patchName = cuttingPatches[i]; |
| 629 | cuttingPatches_[i] = tgtRegion_.boundaryMesh().findPatchID(patchName); |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | |
| 634 | // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // |
no test coverage detected