1 forAll(globalFaceZones, zoneI)
3 const label curZoneID = globalFaceZones[zoneI];
5 const labelList& curMap =
6 globalToLocalFaceZonePointMap[zoneI];
8 const labelList& curZoneMeshPoints =
9 mesh.faceZones()[curZoneID]().meshPoints();
11 vectorField curGlobalZonePointDispl
13 curZoneMeshPoints.size(),
17 //-Inter-proc points are shared by multiple procs
18 // pointNumProc is the number of procs which a point lies on
19 scalarField pointNumProcs(curZoneMeshPoints.size(), 0);
21 forAll(curGlobalZonePointDispl, globalPointI)
23 label localPoint = curMap[globalPointI];
25 if(curZoneMeshPoints[localPoint] < mesh.nPoints())
27 label procPoint = curZoneMeshPoints[localPoint];
29 curGlobalZonePointDispl[globalPointI] = pointDUI[procPoint];
31 pointNumProcs[globalPointI] = 1;
35 if (Pstream::parRun())
37 reduce(curGlobalZonePointDispl, sumOp<vectorField>());
38 reduce(pointNumProcs, sumOp<scalarField>());
40 //- now average the displacement between all procs
41 curGlobalZonePointDispl /= pointNumProcs;
44 //- The curZonePointsDisplGlobal now contains the correct face zone
45 // displacement in a global master processor order, now convert them
46 // back into the local proc order
48 vectorField curZonePointDispl
50 curZoneMeshPoints.size(),
54 forAll(curGlobalZonePointDispl, globalPointI)
56 label localPoint = curMap[globalPointI];
58 curZonePointDispl[localPoint] =
59 curGlobalZonePointDispl[globalPointI];
62 forAll(curZonePointDispl, pointI)
65 if (curZoneMeshPoints[pointI] >= mesh.nPoints())
67 newPoints[curZoneMeshPoints[pointI]] +=
68 curZonePointDispl[pointI];