Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / engine / engineTopoChangerMesh / thoboisMesh / setThoboisMeshConstraints.H
blob0079945d9276383794ac86cd5147d9eb42b95cb4
3     const pointZoneMesh& pZones = pointZones();
5     label constraintSize = 0;
7     forAll(valves_, valveI)
8     {
10         vector valveVel =
11             valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
13         {
15             label movingPtsIndex = pZones.findZoneID("movingPointsV"+Foam::name(valveI + 1));
16             const labelList& movingPointsV = pZones[movingPtsIndex];
18             forAll(movingPointsV, mpI)
19             {
20                 constrainedPoints.append(movingPointsV[mpI]);
21                 constrainedVelocity.append(valveVel);
23                 constraintSize++;
24             }
26         }
28         {
30             label movingInternalPtsIndex = pZones.findZoneID("movingInternalPointsV"+Foam::name(valveI + 1));
31             const labelList& movingInternalPointsV = pZones[movingInternalPtsIndex];
33             forAll(movingInternalPointsV, mipI)
34             {
35                 constrainedPoints.append(movingInternalPointsV[mipI]);
36                 constrainedVelocity.append(valveVel);
38                 constraintSize++;
39             }
41         }
43         {
45             label staticPtsIndex = pZones.findZoneID("staticPointsV"+Foam::name(valveI + 1));
46             const labelList& staticPointsV = pZones[staticPtsIndex];
48             forAll(staticPointsV, spI)
49             {
50                 constrainedPoints.append(staticPointsV[spI]);
51                 constrainedVelocity.append(vector::zero);
52                 constraintSize++;
54             }
56         }
58     }