Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / accordionEngineMesh / addMeshModifiersAccordionEngineMesh.H
blob3424d9488e8d65241e66036743a0d9ca9cdc50fc
1 //    List<polyMeshModifier*> tm(3*nValves() + 2);
2 //    DynamicList<polyMeshModifier*> tm;
4     label nMods = 0;
6     for (label valveI = 0; valveI < nValves(); valveI++)
7     {
8         
9         
10         // Add attach-detach for valve
11         if
12         (
13             valves_[valveI].detachInCylinderPatchID().active()
14          && valves_[valveI].detachInPortPatchID().active()
15         )
16         {
18             Info << "Adding a attach/detach boundary mesh modifier to the valve " <<
19             valveI + 1 << endl;
20         
21             topoChanger_.setSize(nMods+1);
22             topoChanger_.set
23             (
24                 nMods,
25                 new attachDetach
26                 (
27                     "valveAttachDetach" + Foam::name(valveI + 1),
28                     nMods,
29                     topoChanger_,
30                     "detachFaceZoneV" + Foam::name(valveI + 1),
31                     valves_[valveI].detachInCylinderPatchID().name(),
32                     valves_[valveI].detachInPortPatchID().name(),
33                     scalarField(0),
34                     true                // Manual triggering
35                 )    
36             );
37             nMods++;
38             Info << "Attach detach" << endl;
39         }        
40                    
41     }
43     // Add piston layer addition
44     if (piston().patchID().active())
45     {
48         Info << "Adding a layer addition/removal mesh modifier to the piston" << endl;
49     
50         topoChanger_.setSize(nMods+1);
51         topoChanger_.set
52         (
53             nMods,
54             new layerAdditionRemoval
55             (
56                 "pistonLayer",
57                 nMods,
58                 topoChanger_,
59                 "pistonLayerFaces",
60                 piston().minLayer(),
61                 piston().maxLayer()
62             )    
63         );
64         nMods++;
65         Info << "pistonLayer" << endl;
66         Info << nMods << endl;            
68     }
70     Info << "Adding " << nMods << " topology modifiers" << endl;