| 537 | |
| 538 | |
| 539 | void Foam::meshToMesh::constructNoCuttingPatches |
| 540 | ( |
| 541 | const word& methodName, |
| 542 | const word& AMIMethodName, |
| 543 | const bool interpAllPatches |
| 544 | ) |
| 545 | { |
| 546 | if (interpAllPatches) |
| 547 | { |
| 548 | const polyBoundaryMesh& srcBM = srcRegion_.boundaryMesh(); |
| 549 | const polyBoundaryMesh& tgtBM = tgtRegion_.boundaryMesh(); |
| 550 | |
| 551 | DynamicList<label> srcPatchID(srcBM.size()); |
| 552 | DynamicList<label> tgtPatchID(tgtBM.size()); |
| 553 | forAll(srcBM, patchi) |
| 554 | { |
| 555 | const polyPatch& pp = srcBM[patchi]; |
| 556 | |
| 557 | // We want to map all the global patches, including constraint |
| 558 | // patches (since they might have mappable properties, e.g. |
| 559 | // jumpCyclic). We'll fix the value afterwards. |
| 560 | if (!isA<processorPolyPatch>(pp)) |
| 561 | { |
| 562 | srcPatchID.append(pp.index()); |
| 563 | |
| 564 | label tgtPatchi = tgtBM.findPatchID(pp.name()); |
| 565 | |
| 566 | if (tgtPatchi != -1) |
| 567 | { |
| 568 | tgtPatchID.append(tgtPatchi); |
| 569 | } |
| 570 | else |
| 571 | { |
| 572 | FatalErrorInFunction |
| 573 | << "Source patch " << pp.name() |
| 574 | << " not found in target mesh. " |
| 575 | << "Available target patches are " << tgtBM.names() |
| 576 | << exit(FatalError); |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | srcPatchID_.transfer(srcPatchID); |
| 582 | tgtPatchID_.transfer(tgtPatchID); |
| 583 | } |
| 584 | |
| 585 | // calculate volume addressing and weights |
| 586 | calculate(methodName); |
| 587 | |
| 588 | // calculate patch addressing and weights |
| 589 | calculatePatchAMIs(AMIMethodName); |
| 590 | } |
| 591 | |
| 592 | |
| 593 | void Foam::meshToMesh::constructFromCuttingPatches |
no test coverage detected