103 int latIntPos[2] = {0};
104 T latPhysPos[2] = {T()};
105 _cuboid.getFloorLatticeR(latIntPos, &input[0]);
106 _cuboid.getPhysR(latPhysPos, latIntPos);
108 T deltaRinv = 1. / _cuboid.getDeltaR();
109 d[0] = (input[0] - latPhysPos[0]) * deltaRinv;
110 d[1] = (input[1] - latPhysPos[1]) * deltaRinv;
115 this->_blockLattice.get(latIntPos[0], latIntPos[1]).computeRhoU(rho, u);
116 volume = e[0] * e[1];
117 output[0] = u[0] * volume;
118 output[1] = u[1] * volume;
120 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1).computeRhoU(rho, u);
121 volume = e[0] * d[1];
122 output[0] += u[0] * volume;
123 output[1] += u[1] * volume;
125 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1]).computeRhoU(rho, u);
126 volume = d[0] * e[1];
127 output[0] += u[0] * volume;
128 output[1] += u[1] * volume;
130 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1).computeRhoU(rho, u);
131 volume = d[0] * d[1];
132 output[0] += u[0] * volume;
133 output[1] += u[1] * volume;
135 output[0] = this->_converter.getPhysVelocity(output[0]);
136 output[1] = this->_converter.getPhysVelocity(output[1]);