Formatting
[foam-extend-3.2.git] / src / engine / engineTopoChangerMesh / engineValveSliding / addValvesFacesPointZonesEngineValveSliding.H
blob37d87a442f1ccb9ec304a9d73c0083182062091e
2     // adding face zones for the vertical valves
4     for (label valveI = 0; valveI < nValves(); valveI++)
5     {
6         // If both sides of the interface exist, add sliding interface
7         // for a valve
8         if
9         (
10             valves_[valveI].curtainInCylinderPatchID().active()
11          && valves_[valveI].curtainInPortPatchID().active()
12         )
13         {
14             Info<< "Adding sliding interface zones for curtain of valve "
15                 << valveI + 1 << endl;
17             pz.append
18             (
19                 new pointZone
20                 (
21                     "cutPointsV" + Foam::name(valveI + 1),
22                     labelList(0),
23                     nPointZones,
24                     pointZones()
25                 )
26             );
28             nPointZones++;
30             const polyPatch& cylCurtain =
31                 boundaryMesh()
32                     [valves_[valveI].curtainInCylinderPatchID().index()];
34             labelList cylCurtainLabels(cylCurtain.size(), cylCurtain.start());
36             forAll (cylCurtainLabels, i)
37             {
38                 cylCurtainLabels[i] += i;
39             }
41             fz.append
42             (
43                 new faceZone
44                 (
45                     "curtainCylZoneV" + Foam::name(valveI + 1),
46                     cylCurtainLabels,
47                     boolList(cylCurtainLabels.size(), false),
48                     nFaceZones,
49                     faceZones()
50                 )
51             );
53             nFaceZones++;
55             const polyPatch& portCurtain =
56                 boundaryMesh()
57                     [valves_[valveI].curtainInPortPatchID().index()];
59             labelList portCurtainLabels
60             (
61                 portCurtain.size(),
62                 portCurtain.start()
63             );
65             forAll (portCurtainLabels, i)
66             {
67                 portCurtainLabels[i] += i;
68             }
70             fz.append
71             (
72                 new faceZone
73                 (
74                     "curtainPortZoneV" + Foam::name(valveI + 1),
75                     portCurtainLabels,
76                     boolList(portCurtainLabels.size(), false),
77                     nFaceZones,
78                     faceZones()
79                 )
80             );
82             nFaceZones++;
84             // Add empty zone for cut faces
86             fz.append
87             (
88                 new faceZone
89                 (
90                     "cutFaceZoneV" + Foam::name(valveI + 1),
91                     labelList(0),
92                     boolList(0, false),
93                     nFaceZones,
94                     faceZones()
95                 )
96             );
98             nFaceZones++;
100         }
101         else
102         {
103             Info << "No valve curtain for valve " << valveI + 1 << endl;
104         }
108         // for each valve the following zones have to be created:
109         //
110         //  - movingFaceZone
111         //  - movingPointZone
112         //  - staticFaceZone
113         //  - staticPointZone
116         faceSet layeringFacesTop(*this, valves_[valveI].layeringFacesTopName());
118         fz.append
119         (
120             new faceZone
121             (
122                 "layeringFacesTopZoneV" + Foam::name(valveI + 1),
123                 layeringFacesTop.toc(),
124                 boolList(layeringFacesTop.size(), true),
125                 nFaceZones,
126                 faceZones()
127             )
128         );
130         nFaceZones++;
132         cellSet movingCellsTop(*this, valves_[valveI].movingCellsTopName());
134         cz.append
135         (
136             new cellZone
137             (
138                 "movingCellsTopZoneV" + Foam::name(valveI + 1),
139                 movingCellsTop.toc(),
140                 nCellZones,
141                 cellZones()
142             )
143         );
145         nCellZones++;
148         pointSet movingPointsTop(*this, valves_[valveI].movingPointsTopName());
150         pz.append
151         (
152             new pointZone
153             (
154                 "movingPointsTopZoneV" + Foam::name(valveI + 1),
155                 movingPointsTop.toc(),
156                 nPointZones,
157                 pointZones()
158             )
159         );
161         nPointZones++;
164         cellSet movingCells(*this, valves_[valveI].movingCellsName());
166         cz.append
167         (
168             new cellZone
169             (
170                 "movingCellsZoneV" + Foam::name(valveI + 1),
171                 movingCells.toc(),
172                 nCellZones,
173                 cellZones()
174             )
175         );
177         nCellZones++;
179         cellSet staticCells(*this, valves_[valveI].staticCellsName());
181         cz.append
182         (
183             new cellZone
184             (
185                 "staticCellsZoneV" + Foam::name(valveI + 1),
186                 staticCells.toc(),
187                 nCellZones,
188                 cellZones()
189             )
190         );
192         nCellZones++;
195         pointSet movingPoints(*this, valves_[valveI].movingPointsName());
197         pz.append
198         (
199             new pointZone
200             (
201                 "movingPointsV" + Foam::name(valveI + 1),
202                 movingPoints.toc(),
203                 nPointZones,
204                 pointZones()
205             )
206         );
208         nPointZones++;
212         pointSet staticPoints(*this, valves_[valveI].staticPointsName());
214         pz.append
215         (
216             new pointZone
217             (
218                 "staticPointsV" + Foam::name(valveI + 1),
219                 staticPoints.toc(),
220                 nPointZones,
221                 pointZones()
222             )
223         );
225         nPointZones++;