2 // currently unused - commented out below
3 //const pointZoneMesh& pZones = pointZones();
5 label constraintSize = 0;
7 forAll(valves_, valveI)
10 valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
12 if(valves_[valveI].curLift() > valves_[valveI].deformationLift())
14 valveVel = vector::zero;
19 // label movingPtsIndex = pZones.findZoneID("movingPointsV"+Foam::name(valveI + 1));
20 // const labelList& movingPointsV = pZones[movingPtsIndex];
22 labelList movingPointsV;
25 label valveMovingCellsIndex = cellZones().findZoneID
27 "movingCellsZoneV" + Foam::name(valveI + 1)
30 if (valveMovingCellsIndex < 0)
32 FatalErrorIn("bool verticalValves::update()")
33 << "movingCellsZoneV"+ Foam::name(valveI+1)
37 const labelList& movingCellsZoneV =
38 cellZones()[valveMovingCellsIndex];
40 const labelListList& cp = cellPoints();
42 boolList count(newPoints.size(), false);
44 forAll (movingCellsZoneV, cellI)
46 const labelList& curCellPoints =
47 cp[movingCellsZoneV[cellI]];
49 forAll (curCellPoints, i)
51 count[curCellPoints[i]] = true;
57 forAll (count, pointI)
59 if (count[pointI] == true)
65 movingPointsV.setSize(nCounted);
69 forAll (count, pointI)
71 if (count[pointI] == true)
73 movingPointsV[nCounted] = pointI;
80 forAll(movingPointsV, mpI)
82 constrainedPoints.append(movingPointsV[mpI]);
83 constrainedVelocity.append(valveVel);
92 // label staticPtsIndex = pZones.findZoneID("staticPointsV"+Foam::name(valveI + 1));
93 // const labelList& staticPointsV = pZones[staticPtsIndex];
95 labelList staticPointsV;
98 label valveStaticCellsIndex = cellZones().findZoneID("staticCellsZoneV" + Foam::name(valveI + 1));
100 if (valveStaticCellsIndex < 0)
102 FatalErrorIn("bool verticalValves::update()")
103 << "staticCellsZoneV"+ Foam::name(valveI+1)
104 << abort(FatalError);
107 const labelList& staticCellsZoneV = cellZones()[valveStaticCellsIndex];
109 const labelListList& cp = cellPoints();
111 boolList count(newPoints.size(), false);
113 forAll (staticCellsZoneV, cellI)
115 const labelList& curCellPoints = cp[staticCellsZoneV[cellI]];
117 forAll (curCellPoints, i)
119 count[curCellPoints[i]] = true;
125 forAll (count, pointI)
127 if (count[pointI] == true)
133 staticPointsV.setSize(nCounted);
135 // Collect the points
137 forAll (count, pointI)
139 if (count[pointI] == true)
141 staticPointsV[nCounted] = pointI;
149 forAll(staticPointsV, spI)
151 constrainedPoints.append(staticPointsV[spI]);
152 constrainedVelocity.append(vector::zero);