1 if (mergePatchPairs.size())
3 Info<< "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 =
30 mesh.boundaryMesh()[masterPatchName];
32 labelList isf(masterPatch.size());
36 isf[i] = masterPatch.start() + i;
39 fz[3*pairI] = new faceZone
41 mergeName + "MasterZone",
43 boolList(masterPatch.size(), false),
49 const word slavePatchName(mergePatchPairs[pairI].second());
50 const polyPatch& slavePatch =
51 mesh.boundaryMesh()[slavePatchName];
53 labelList osf(slavePatch.size());
57 osf[i] = slavePatch.start() + i;
60 fz[3*pairI + 1] = new faceZone
62 mergeName + "SlaveZone",
64 boolList(slavePatch.size(), false),
69 // Add empty zone for cut faces
70 fz[3*pairI + 2] = new faceZone
72 mergeName + "CutFaceZone",
78 } // end of all merge pairs
80 Info<< "Adding point and face zones" << endl;
81 mesh.addZones(pz, fz, cz);
84 Info<< "Creating attachPolyTopoChanger" << endl;
85 polyTopoChanger polyMeshAttacher(mesh);
86 polyMeshAttacher.setSize(mergePatchPairs.size());
88 forAll(mergePatchPairs, pairI)
92 mergePatchPairs[pairI].first()
93 + mergePatchPairs[pairI].second()
97 // Add the sliding interface mesh modifier
103 "couple" + name(pairI),
106 mergeName + "MasterZone",
107 mergeName + "SlaveZone",
108 mergeName + "CutPointZone",
109 mergeName + "CutFaceZone",
110 mergePatchPairs[pairI].first(),
111 mergePatchPairs[pairI].second(),
112 slidingInterface::INTEGRAL, // always integral
114 intersection::VISIBLE
119 polyMeshAttacher.changeMesh();