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

Function constructFromCuttingPatches

src/sampling/meshToMesh/meshToMesh.C:593–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591
592
593void 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 * * * * * * * * * * * * * * //

Callers 1

meshToMesh.CFile · 0.85

Calls 8

calculatePatchAMIsFunction · 0.85
calculateFunction · 0.70
forAllConstIterFunction · 0.50
forAllFunction · 0.50
setSizeMethod · 0.45
sizeMethod · 0.45
keyMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected