108 virtual void process(plb::Box3D domain, plb::BlockLattice3D<T, Descriptor> &lattice)
110 Dot3D absoluteOffset = lattice.getLocation();
113 double gfrac = std::fmod((*this->LEcurrentDisplacement), 1.0);
114 plint globalX, globalY;
115 plint globalZ0 = absoluteOffset.z + domain.z0;
116 plint globalZ1 = absoluteOffset.z + domain.z1;
117 Cell<T, Descriptor> curCell;
118 Cell<T, Descriptor> s1Cell;
119 Cell<T, Descriptor> s2Cell;
123 plb::Array<T, Descriptor<T>::d> j;
125 if (globalZ1 == this->nz - 1)
127 for (
plint iX = domain.x0; iX <= domain.x1; ++iX)
129 globalX = absoluteOffset.x + iX;
130 for (
plint iY = domain.y0; iY <= domain.y1; ++iY)
132 globalY = absoluteOffset.y + iY;
133 curCell = lattice.get(iX, iY, domain.z1);
136 curCell.getDynamics().computeRhoBarJ(curCell, rhoBar, j);
137 curCell.getDynamics().collideExternal(curCell, rhoBar, plb::Array<T,3>(this->topVelocity, 0.0, 0.0),
T(), lattice.getInternalStatistics());
145 s1Cell = lattice.get(s1, iY, domain.z1);
146 s2Cell = lattice.get(s2, iY, domain.z1);
149 (*this->topPopulations)[globalX][globalY][3] = gfrac * s1Cell[3] + (1 - gfrac) * s2Cell[3];
150 (*this->topPopulations)[globalX][globalY][6] = gfrac * s1Cell[16] + (1 - gfrac) * s2Cell[16];
151 (*this->topPopulations)[globalX][globalY][8] = gfrac * s1Cell[8] + (1 - gfrac) * s2Cell[8];
152 (*this->topPopulations)[globalX][globalY][16] = gfrac * s1Cell[6] + (1 - gfrac) * s2Cell[6];
153 (*this->topPopulations)[globalX][globalY][18] = gfrac * s1Cell[18] + (1 - gfrac) * s2Cell[18];
159 for (
plint iX = domain.x0; iX <= domain.x1; ++iX)
161 globalX = absoluteOffset.x + iX;
162 for (
plint iY = domain.y0; iY <= domain.y1; ++iY)
164 globalY = absoluteOffset.y + iY;
165 curCell = lattice.get(iX, iY, domain.z0);
168 curCell.getDynamics().computeRhoBarJ(curCell, rhoBar, j);
169 curCell.getDynamics().collideExternal(curCell, rhoBar, plb::Array<T,3>(this->bottomVelocity, 0.0, 0.0),
T(), lattice.getInternalStatistics());
177 s1Cell = lattice.get(s1, iY, domain.z0);
178 s2Cell = lattice.get(s2, iY, domain.z0);
181 (*this->bottomPopulations)[globalX][globalY][7] = gfrac * s1Cell[15] + (1 - gfrac) * s2Cell[15];
182 (*this->bottomPopulations)[globalX][globalY][9] = gfrac * s1Cell[9] + (1 - gfrac) * s2Cell[9];
183 (*this->bottomPopulations)[globalX][globalY][12] = gfrac * s1Cell[12] + (1 - gfrac) * s2Cell[12];
184 (*this->bottomPopulations)[globalX][globalY][15] = gfrac * s1Cell[7] + (1 - gfrac) * s2Cell[7];
185 (*this->bottomPopulations)[globalX][globalY][17] = gfrac * s1Cell[17] + (1 - gfrac) * s2Cell[17];