Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / pistonSliding / setPistonSlidingConstraint
blobb674e4f29bbc79d445970158b84d833d6de9baeb
3 const faceZoneMesh& fZones = faceZones();
4 const pointZoneMesh& pZones = pointZones();
5 const cellZoneMesh& cZones = cellZones();
7 label constraintSize = 0;
9 forAll(valves_, valveI)
11     
12     vector valveVel =
13         valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
15     {
16     
17         label movingPtsIndex = pZones.findZoneID("movingPointsV"+Foam::name(valveI + 1));
18         const labelList& movingPointsV = pZones[movingPtsIndex];
19     
20         forAll(movingPointsV, mpI)
21         {
22             constrainedPoints.append(movingPointsV[mpI]);
23             constrainedVelocity.append(valveVel);
24            
25             constraintSize++;
26         }
27     
28     }
30     {
31     
32         label movingInternalPtsIndex = pZones.findZoneID("movingInternalPointsV"+Foam::name(valveI + 1));
33         const labelList& movingInternalPointsV = pZones[movingInternalPtsIndex];
34     
35         forAll(movingInternalPointsV, mipI)
36         {
37             constrainedPoints.append(movingInternalPointsV[mipI]);
38             constrainedVelocity.append(valveVel);
39             
40             constraintSize++;
41         }
42     
43     }
45     {
47         label staticPtsIndex = pZones.findZoneID("staticPointsV"+Foam::name(valveI + 1));
48         const labelList& staticPointsV = pZones[staticPtsIndex];
49     
50         forAll(staticPointsV, spI)
51         {
52             constrainedPoints.append(staticPointsV[spI]);
53             constrainedVelocity.append(vector::zero);
54             constraintSize++;
56         }
58     }
60     /*
61     {
62     
63         label movingCellsIndex = cZones.findZoneID("movingCellsZoneV"+Foam::name(valveI + 1));
64         const labelList& movingCellsV = pZones[movingCellsIndex];
65     
66         forAll(movingCellsV, mcI)
67         {
68             constrainedPoints.append(movingCellsV[mcI]+points().size());
69             constrainedVelocity.append(valveVel);
70             constraintSize++;
71         }
73     }
75     Info << "movingFacesIndex" << endl;
76     
77     {
78     
79         label staticCellsIndex = cZones.findZoneID("staticCellsZoneV"+Foam::name(valveI + 1));
80         const labelList& staticCellsV = pZones[staticCellsIndex];
81     
82         forAll(staticCellsV, scI)
83         {
84             constrainedPoints.append(staticCellsV[scI]+points().size());
85             constrainedVelocity.append(vector::zero);
86             constraintSize++;
87         }
89     }