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