1 // Moving mask: moving cells inside the valves....
5 for(label i = 1; i <= nValves(); i++)
9 if(valves_[i-1].poppetPatchID().active())
12 labelList movingCells(nCells());
14 label nMovingCells = 0;
16 label valvePatchID = valves_[i-1].poppetPatchID().index();
17 const polyPatch& valveTopPatch = boundaryMesh()[valvePatchID];
18 scalar minPopZ = min(boundary()[valvePatchID].patch().localPoints()).z();
20 forAll(cellCentres(),cellI)
22 const vector& v = cellCentres()[cellI];
31 movingCells[nMovingCells] = cellI;
37 movingCells.setSize(nMovingCells);
38 Info << "Number of cells in the moving region poppet valve: " << nMovingCells << endl;
44 "movingCellsTopV"+ Foam::name(i),
55 if(valves_[i-1].bottomPatchID().active())
58 labelList movingCells(nCells());
60 label nMovingCells = 0;
62 label valvePatchID = valves_[i-1].bottomPatchID().index();
63 const polyPatch& valveBottomPatch = boundaryMesh()[valvePatchID];
64 scalar maxPopZ = max(boundary()[valvePatchID].patch().localPoints()).z();
67 forAll(cellCentres(),cellI)
69 const vector& v = cellCentres()[cellI];
75 v.z() < maxPopZ + SMALL
78 movingCells[nMovingCells] = cellI;
84 movingCells.setSize(nMovingCells);
85 Info << "Number of cells in the moving region bottom valve: " << nMovingCells << endl;
91 "movingCellsBotV"+ Foam::name(i),