Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / engine / engineTopoChangerMesh / thoboisMesh / addMeshModifiersThoboisMesh.H
blobf01c5faa4c33c834bc2678c62150314a2f40b58d
1 //    List<polyMeshModifier*> tm(3*nValves() + 2);
2 //    DynamicList<polyMeshModifier*> tm;
4     label nMods = 0;
6     for (label valveI = 0; valveI < nValves(); valveI++)
7     {
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;
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         }
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;
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;