2 for (label valveI = 0; valveI < nValves(); valveI++)
5 // for each valve the following zones have to be created:
12 IOobject movingCellsHeader
14 valves_[valveI].movingCellsName(),
15 time().constant()+"/polyMesh/sets/",
20 if(!movingCellsHeader.headerOk())
24 "deformingEngineMesh::addZonesAndModifiers()"
25 ) << "cellSet called " << valves_[valveI].movingCellsName()
26 << " does not exist. Continuing mesh motion without rigid motion points for valve " << valves_[valveI].name() << endl;
32 "movingPointsV" + Foam::name(valveI + 1),
44 cellSet movingCellsSet(*this, valves_[valveI].movingCellsName());
46 labelList movingCells = movingCellsSet.toc();
48 labelList movingPoints;
50 const labelListList& cp = cellPoints();
52 boolList count(allPoints().size(), false);
54 forAll (movingCells, cellI)
56 const labelList& curCellPoints = cp[movingCells[cellI]];
58 forAll (curCellPoints, i)
60 count[curCellPoints[i]] = true;
66 forAll (count, pointI)
68 if (count[pointI] == true)
74 movingPoints.setSize(nCounted);
78 forAll (count, pointI)
80 if (count[pointI] == true)
82 movingPoints[nCounted] = pointI;
91 "movingPointsV" + Foam::name(valveI + 1),
101 IOobject staticCellsHeader
103 valves_[valveI].staticCellsName(),
104 time().constant()+"/polyMesh/sets/",
109 if(!staticCellsHeader.headerOk())
113 "deformingEngineMesh::addZonesAndModifiers()"
114 ) << "cellSet called " << valves_[valveI].staticCellsName()
115 << " does not exist. Continuing mesh motion without static points for valve " << valves_[valveI].name() << endl;
121 "staticPointsV" + Foam::name(valveI + 1),
133 cellSet staticCellSet(*this, valves_[valveI].staticCellsName());
135 labelList staticCells = staticCellSet.toc();
137 labelList staticPoints;
139 const labelListList& cp = cellPoints();
141 boolList count(allPoints().size(), false);
143 forAll (staticCells, cellI)
145 const labelList& curCellPoints = cp[staticCells[cellI]];
147 forAll (curCellPoints, i)
149 count[curCellPoints[i]] = true;
155 forAll (count, pointI)
157 if (count[pointI] == true)
163 staticPoints.setSize(nCounted);
165 // Collect the points
167 forAll (count, pointI)
169 if (count[pointI] == true)
171 staticPoints[nCounted] = pointI;
180 "staticPointsV" + Foam::name(valveI + 1),