Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / thoboisMesh / addMeshModifiersThoboisMesh.H
blob0c12c45673459dc0b96800d98583f2332ec7bbca
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     {
47         Info << "Adding a layer addition/removal mesh modifier to the piston" << endl;
48     
49         topoChanger_.setSize(nMods+1);
50         topoChanger_.set
51         (
52             nMods,
53             new layerAdditionRemoval
54             (
55                 "pistonLayer",
56                 nMods,
57                 topoChanger_,
58                 "pistonLayerFaces",
59                 piston().minLayer(),
60                 piston().maxLayer()
61             )    
62         );
63         nMods++;
64         Info << "pistonLayer" << endl;
65         Info << nMods << endl;            
66     }
68     Info << "Adding " << nMods << " topology modifiers" << endl;