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 scalar minPopZ = min(boundary()[valvePatchID].patch().localPoints()).z();
19 forAll(cellCentres(),cellI)
21 const vector& v = cellCentres()[cellI];
30 movingCells[nMovingCells] = cellI;
36 movingCells.setSize(nMovingCells);
37 Info << "Number of cells in the moving region poppet valve: " << nMovingCells << endl;
43 "movingCellsTopV"+ Foam::name(i),
54 if(valves_[i-1].bottomPatchID().active())
57 labelList movingCells(nCells());
59 label nMovingCells = 0;
61 label valvePatchID = valves_[i-1].bottomPatchID().index();
62 scalar maxPopZ = max(boundary()[valvePatchID].patch().localPoints()).z();
65 forAll(cellCentres(),cellI)
67 const vector& v = cellCentres()[cellI];
73 v.z() < maxPopZ + SMALL
76 movingCells[nMovingCells] = cellI;
82 movingCells.setSize(nMovingCells);
83 Info << "Number of cells in the moving region bottom valve: " << nMovingCells << endl;
89 "movingCellsBotV"+ Foam::name(i),