3 const pointZoneMesh& pZones = pointZones();
5 label constraintSize = 0;
7 forAll(valves_, valveI)
11 valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
13 if(valves_[valveI].curLift() > valves_[valveI].deformationLift())
15 valveVel = vector::zero;
21 // label movingPtsIndex = pZones.findZoneID("movingPointsV"+Foam::name(valveI + 1));
22 // const labelList& movingPointsV = pZones[movingPtsIndex];
24 labelList movingPointsV;
27 label valveMovingCellsIndex = cellZones().findZoneID("movingCellsZoneV" + Foam::name(valveI + 1));
29 if (valveMovingCellsIndex < 0)
31 FatalErrorIn("bool verticalValves::update()")
32 << "movingCellsZoneV"+ Foam::name(valveI+1)
36 const labelList& movingCellsZoneV = cellZones()[valveMovingCellsIndex];
38 const labelListList& cp = cellPoints();
40 boolList count(newPoints.size(), false);
42 forAll (movingCellsZoneV, cellI)
44 const labelList& curCellPoints = cp[movingCellsZoneV[cellI]];
46 forAll (curCellPoints, i)
48 count[curCellPoints[i]] = true;
54 forAll (count, pointI)
56 if (count[pointI] == true)
62 movingPointsV.setSize(nCounted);
66 forAll (count, pointI)
68 if (count[pointI] == true)
70 movingPointsV[nCounted] = pointI;
77 forAll(movingPointsV, mpI)
79 constrainedPoints.append(movingPointsV[mpI]);
80 constrainedVelocity.append(valveVel);
89 // label staticPtsIndex = pZones.findZoneID("staticPointsV"+Foam::name(valveI + 1));
90 // const labelList& staticPointsV = pZones[staticPtsIndex];
92 labelList staticPointsV;
95 label valveStaticCellsIndex = cellZones().findZoneID("staticCellsZoneV" + Foam::name(valveI + 1));
97 if (valveStaticCellsIndex < 0)
99 FatalErrorIn("bool verticalValves::update()")
100 << "staticCellsZoneV"+ Foam::name(valveI+1)
101 << abort(FatalError);
104 const labelList& staticCellsZoneV = cellZones()[valveStaticCellsIndex];
106 const labelListList& cp = cellPoints();
108 boolList count(newPoints.size(), false);
110 forAll (staticCellsZoneV, cellI)
112 const labelList& curCellPoints = cp[staticCellsZoneV[cellI]];
114 forAll (curCellPoints, i)
116 count[curCellPoints[i]] = true;
122 forAll (count, pointI)
124 if (count[pointI] == true)
130 staticPointsV.setSize(nCounted);
132 // Collect the points
134 forAll (count, pointI)
136 if (count[pointI] == true)
138 staticPointsV[nCounted] = pointI;
146 forAll(staticPointsV, spI)
148 constrainedPoints.append(staticPointsV[spI]);
149 constrainedVelocity.append(vector::zero);