MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / calculatePatchAMIs

Function calculatePatchAMIs

src/sampling/meshToMesh/meshToMesh.C:493–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491
492
493void 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
539void Foam::meshToMesh::constructNoCuttingPatches

Callers 2

Calls 7

exitFunction · 0.50
forAllFunction · 0.50
emptyMethod · 0.45
setSizeMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected