2 // Add the piston points zone
3 if (piston().patchID().active())
5 IOobject pistonCellsHeader
7 piston().pistonCellSetName(),
8 time().constant()+"/polyMesh/sets/",
13 if(!pistonCellsHeader.headerOk())
17 "deformingEngineMesh::addZonesAndModifiers()"
18 ) << "cellSet called " << piston().pistonCellSetName()
19 << " does not exist. Continuing mesh motion without piston points" << endl;
37 cellSet movingPistonCells(*this, piston().pistonCellSetName());
39 labelList pistonCells = movingPistonCells.toc();
41 labelList movingPistonPoints;
43 const labelListList& cp = cellPoints();
45 boolList count(allPoints().size(), false);
47 forAll (pistonCells, cellI)
49 const labelList& curCellPoints = cp[pistonCells[cellI]];
51 forAll (curCellPoints, i)
53 count[curCellPoints[i]] = true;
59 forAll (count, pointI)
61 if (count[pointI] == true)
67 movingPistonPoints.setSize(nCounted);
71 forAll (count, pointI)
73 if (count[pointI] == true)
75 movingPistonPoints[nCounted] = pointI;
99 IOobject headCellsHeader
102 time().constant()+"/polyMesh/sets/",
107 if(!headCellsHeader.headerOk())
111 "deformingEngineMesh::addZonesAndModifiers()"
112 ) << "cellSet called " << headCellSetName_
113 << " does not exist. Continuing mesh motion without head points" << endl;
129 cellSet fixedHeadCells(*this, headCellSetName_);
131 labelList headCells = fixedHeadCells.toc();
133 labelList fixedHeadPoints;
135 const labelListList& cp = cellPoints();
137 boolList count(allPoints().size(), false);
139 forAll (fixedHeadCells, cellI)
141 const labelList& curCellPoints = cp[headCells[cellI]];
143 forAll (curCellPoints, i)
145 count[curCellPoints[i]] = true;
151 forAll (count, pointI)
153 if (count[pointI] == true)
159 fixedHeadPoints.setSize(nCounted);
161 // Collect the points
163 forAll (count, pointI)
165 if (count[pointI] == true)
167 fixedHeadPoints[nCounted] = pointI;