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

Function constructNoCuttingPatches

src/sampling/meshToMesh/meshToMesh.C:539–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537
538
539void 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
593void Foam::meshToMesh::constructFromCuttingPatches

Callers 1

meshToMesh.CFile · 0.85

Calls 9

calculatePatchAMIsFunction · 0.85
calculateFunction · 0.70
forAllFunction · 0.50
exitFunction · 0.50
sizeMethod · 0.45
appendMethod · 0.45
indexMethod · 0.45
nameMethod · 0.45
transferMethod · 0.45

Tested by

no test coverage detected