1 if (mergePatchPairs.size() > 0)
3 Info<< nl << "Creating merge patch pairs" << nl << endl;
5 // Create and add point and face zones and mesh modifiers
6 List<pointZone*> pz(mergePatchPairs.size());
7 List<faceZone*> fz(3*mergePatchPairs.size());
10 forAll (mergePatchPairs, pairI)
14 mergePatchPairs[pairI].first()
15 + mergePatchPairs[pairI].second()
19 pz[pairI] = new pointZone
21 mergeName + "CutPointZone",
28 const word masterPatchName(mergePatchPairs[pairI].first());
29 const polyPatch& masterPatch =
32 mesh.boundaryMesh().findPatchID(masterPatchName)
35 labelList isf(masterPatch.size());
39 isf[i] = masterPatch.start() + i;
42 fz[3*pairI] = new faceZone
44 mergeName + "MasterZone",
46 boolList(masterPatch.size(), false),
52 const word slavePatchName(mergePatchPairs[pairI].second());
53 const polyPatch& slavePatch =
56 mesh.boundaryMesh().findPatchID(slavePatchName)
59 labelList osf(slavePatch.size());
63 osf[i] = slavePatch.start() + i;
66 fz[3*pairI + 1] = new faceZone
68 mergeName + "SlaveZone",
70 boolList(slavePatch.size(), false),
75 // Add empty zone for cut faces
76 fz[3*pairI + 2] = new faceZone
78 mergeName + "CutFaceZone",
84 } // end of all merge pairs
86 Info << "Adding point and face zones" << endl;
87 mesh.addZones(pz, fz, cz);
90 Info << "Creating attachPolyTopoChanger" << endl;
91 attachPolyTopoChanger polyMeshAttacher(mesh);
92 polyMeshAttacher.setSize(mergePatchPairs.size());
94 forAll (mergePatchPairs, pairI)
98 mergePatchPairs[pairI].first()
99 + mergePatchPairs[pairI].second()
103 // Add the sliding interface mesh modifier
109 "couple" + name(pairI),
112 mergeName + "MasterZone",
113 mergeName + "SlaveZone",
114 mergeName + "CutPointZone",
115 mergeName + "CutFaceZone",
116 mergePatchPairs[pairI].first(),
117 mergePatchPairs[pairI].second(),
118 slidingInterface::INTEGRAL, // always integral
119 intersection::VISIBLE
124 polyMeshAttacher.attach(true);