Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / pistonSliding / addMeshModifiersPistonSliding.H
blob1459e3ba3b3820442d79a764f8927ac30bf411c2
1 //    List<polyMeshModifier*> tm(3*nValves() + 2);
2 //    DynamicList<polyMeshModifier*> tm;
4     label nMods = 0;
6     if
7     (
8         piston().patchID().active()
9         &&
10         piston().bowlInPistonPatchID().active()
11         &&
12         piston().bowlInCylinderPatchID().active()
13     )
14     {
15             Info << "Adding a sliding interface mesh modifier to the piston bowl " << endl;
16             
17             topoChanger_.setSize(nMods+1);
18             
19             topoChanger_.set
20             (
21                 nMods,
22                 new slidingInterface
23                 (
24                     "pistonBowlInterface",
25                     nMods,
26                     topoChanger_,
27                     "bowlInCylinderZone",
28                     "bowlInPistonZone",
29                     "cutPointsPistonBowl",
30                     "cutFaceZonePistonBowl",
31                     piston().bowlInCylinderPatchID().name(),
32                     piston().bowlInPistonPatchID().name(),
33                     slidingInterface::INTEGRAL, // always integral
34                     true,  // attach-detach action
35                     intersection::VISIBLE
36                 )    
37             );
38             nMods++;
39             
40             Info << "pistonBowl" << endl;
41             Info << nMods << endl;            
42     }
44     for (label valveI = 0; valveI < nValves(); valveI++)
45     {
46         // Add valve curtain sliding interface
47         if
48         (
49             valves_[valveI].curtainInCylinderPatchID().active()
50          && valves_[valveI].curtainInPortPatchID().active()
51         )
52         {
53             
54             Info << "Adding a sliding interface mesh modifier to the valve " <<
55             valveI + 1 << endl;
56             
57             topoChanger_.setSize(nMods+1);
58             
59             topoChanger_.set
60             (
61                 nMods,
62                 new slidingInterface
63                 (
64                     "valveSlider" + Foam::name(valveI + 1),
65                     nMods,
66                     topoChanger_,
67                     "curtainPortZoneV" + Foam::name(valveI + 1),
68                     "curtainCylZoneV" + Foam::name(valveI + 1),
69                     "cutPointsV" + Foam::name(valveI + 1),
70                     "cutFaceZoneV" + Foam::name(valveI + 1),
71                     valves_[valveI].curtainInPortPatchID().name(),
72                     valves_[valveI].curtainInCylinderPatchID().name(),
73                     slidingInterface::INTEGRAL, // always integral
74                     true,  // attach-detach action
75                     intersection::VISIBLE
76                 )    
77             );
78             nMods++;
79             
80             Info << "valveSlider" + Foam::name(valveI + 1) << endl;
81             Info << nMods << endl;            
82         }
83         
84         // Add valve poppet layer addition
85         if (valves_[valveI].poppetPatchID().active())
86         {
88             Info << "Adding a layer addition/removal mesh modifier to the poppet of the valve " <<
89             valveI + 1 << endl;
90         
91             topoChanger_.setSize(nMods+1);
92             
93             topoChanger_.set
94             (
95                 nMods,
96                 new layerAdditionRemoval
97                 (
98                     "valvePoppetLayer" + Foam::name(valveI + 1),
99                     nMods,
100                     topoChanger_,
101                     "layeringFacesTopZoneV" + Foam::name(valveI + 1),
102                     valves_[valveI].minTopLayer(),
103                     valves_[valveI].maxTopLayer()
104                 )    
105             );
106             nMods++;
107             Info << "valvePoppetLayer" + Foam::name(valveI + 1) << endl;
108             Info << nMods << endl;            
109             
110         }
112         // Add valve bottom layer addition
113         if (valves_[valveI].bottomPatchID().active())
114         {
115         
116             Info << "Adding a layer addition/removal mesh modifier to the bottom of the valve " <<
117             valveI + 1 << endl;
118         
119             topoChanger_.setSize(nMods+1);
120             
121             topoChanger_.set
122             (
123                 nMods,
124                 new layerAdditionRemoval
125                 (
126                     "valveBottomLayer" + Foam::name(valveI + 1),
127                     nMods,
128                     topoChanger_,
129                     "layeringFacesBottomZoneV" + Foam::name(valveI + 1),
130                     valves_[valveI].minBottomLayer(),
131                     valves_[valveI].maxBottomLayer()
132                 )    
133             );
134             nMods++;
135             Info << "valveBottomLayer" + Foam::name(valveI + 1) << endl;
136             Info << nMods << endl;            
137             
138         }
139         
140     }   
142 #   include "addPistonLayerAdditionRemovalMeshModifier.H"
143     
145     
146     Info << "Adding " << nMods << " topology modifiers" << endl;