103 auto latIntPos = _cuboid.getFloorLatticeR(&input[0]);
104 auto latPhysPos = _cuboid.getPhysR(latIntPos);
106 T deltaRinv = 1. / _cuboid.getDeltaR();
107 d[0] = (input[0] - latPhysPos[0]) * deltaRinv;
108 d[1] = (input[1] - latPhysPos[1]) * deltaRinv;
109 d[2] = (input[2] - latPhysPos[2]) * deltaRinv;
115 this->_blockLattice.get(latIntPos[0], latIntPos[1],
116 latIntPos[2]).computeRhoU(rho, u);
117 volume = e[0] * e[1] * e[2];
118 output[0] = u[0] * volume;
119 output[1] = u[1] * volume;
120 output[2] = u[2] * volume;
122 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1,
123 latIntPos[2]).computeRhoU(rho, u);
124 volume = e[0] * d[1] * e[2];
125 output[0] += u[0] * volume;
126 output[1] += u[1] * volume;
127 output[2] += u[2] * volume;
129 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1],
130 latIntPos[2]).computeRhoU(rho, u);
131 volume = d[0] * e[1] * e[2];
132 output[0] += u[0] * volume;
133 output[1] += u[1] * volume;
134 output[2] += u[2] * volume;
136 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1,
137 latIntPos[2]).computeRhoU(rho, u);
138 volume = d[0] * d[1] * e[2];
139 output[0] += u[0] * volume;
140 output[1] += u[1] * volume;
141 output[2] += u[2] * volume;
143 this->_blockLattice.get(latIntPos[0], latIntPos[1],
144 latIntPos[2] + 1).computeRhoU(rho,
146 volume = e[0] * e[1] * d[2];
147 output[0] += u[0] * volume;
148 output[1] += u[1] * volume;
149 output[2] += u[2] * volume;
151 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1,
152 latIntPos[2] + 1).computeRhoU(rho,
154 volume = e[0] * d[1] * d[2];
155 output[0] += u[0] * volume;
156 output[1] += u[1] * volume;
157 output[2] += u[2] * volume;
159 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1],
160 latIntPos[2] + 1).computeRhoU(rho,
162 volume = d[0] * e[1] * d[2];
163 output[0] += u[0] * volume;
164 output[1] += u[1] * volume;
165 output[2] += u[2] * volume;
167 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1,
168 latIntPos[2] + 1).computeRhoU(rho,
170 volume = d[0] * d[1] * d[2];
171 output[0] += u[0] * volume;
172 output[1] += u[1] * volume;
173 output[2] += u[2] * volume;
175 output[0] = this->_converter.getPhysVelocity(output[0]);
176 output[1] = this->_converter.getPhysVelocity(output[1]);
177 output[2] = this->_converter.getPhysVelocity(output[2]);