| 491 | |
| 492 | |
| 493 | void Foam::meshToMesh::calculatePatchAMIs(const word& AMIMethodName) |
| 494 | { |
| 495 | if (!patchAMIs_.empty()) |
| 496 | { |
| 497 | FatalErrorInFunction |
| 498 | << "patch AMI already calculated" |
| 499 | << exit(FatalError); |
| 500 | } |
| 501 | |
| 502 | patchAMIs_.setSize(srcPatchID_.size()); |
| 503 | |
| 504 | forAll(srcPatchID_, i) |
| 505 | { |
| 506 | label srcPatchi = srcPatchID_[i]; |
| 507 | label tgtPatchi = tgtPatchID_[i]; |
| 508 | |
| 509 | const polyPatch& srcPP = srcRegion_.boundaryMesh()[srcPatchi]; |
| 510 | const polyPatch& tgtPP = tgtRegion_.boundaryMesh()[tgtPatchi]; |
| 511 | |
| 512 | Info<< "Creating AMI between source patch " << srcPP.name() |
| 513 | << " and target patch " << tgtPP.name() |
| 514 | << " using " << AMIMethodName |
| 515 | << endl; |
| 516 | |
| 517 | Info<< incrIndent; |
| 518 | |
| 519 | patchAMIs_.set |
| 520 | ( |
| 521 | i, |
| 522 | new AMIPatchToPatchInterpolation |
| 523 | ( |
| 524 | srcPP, |
| 525 | tgtPP, |
| 526 | faceAreaIntersect::tmMesh, |
| 527 | false, |
| 528 | AMIMethodName, |
| 529 | -1, |
| 530 | true // flip target patch since patch normals are aligned |
| 531 | ) |
| 532 | ); |
| 533 | |
| 534 | Info<< decrIndent; |
| 535 | } |
| 536 | } |
| 537 | |
| 538 | |
| 539 | void Foam::meshToMesh::constructNoCuttingPatches |