103 int latIntPos[3] = {0};
104 T latPhysPos[3] = {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;
111 d[2] = (input[2] - latPhysPos[2]) * deltaRinv;
117 this->_blockLattice.get(latIntPos[0], latIntPos[1],
118 latIntPos[2]).computeRhoU(rho, u);
119 volume = e[0] * e[1] * e[2];
120 output[0] = u[0] * volume;
121 output[1] = u[1] * volume;
122 output[2] = u[2] * volume;
124 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1,
125 latIntPos[2]).computeRhoU(rho, u);
126 volume = e[0] * d[1] * e[2];
127 output[0] += u[0] * volume;
128 output[1] += u[1] * volume;
129 output[2] += u[2] * volume;
131 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1],
132 latIntPos[2]).computeRhoU(rho, u);
133 volume = d[0] * e[1] * e[2];
134 output[0] += u[0] * volume;
135 output[1] += u[1] * volume;
136 output[2] += u[2] * volume;
138 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1,
139 latIntPos[2]).computeRhoU(rho, u);
140 volume = d[0] * d[1] * e[2];
141 output[0] += u[0] * volume;
142 output[1] += u[1] * volume;
143 output[2] += u[2] * volume;
145 this->_blockLattice.get(latIntPos[0], latIntPos[1],
146 latIntPos[2] + 1).computeRhoU(rho,
148 volume = e[0] * e[1] * d[2];
149 output[0] += u[0] * volume;
150 output[1] += u[1] * volume;
151 output[2] += u[2] * volume;
153 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1,
154 latIntPos[2] + 1).computeRhoU(rho,
156 volume = e[0] * d[1] * d[2];
157 output[0] += u[0] * volume;
158 output[1] += u[1] * volume;
159 output[2] += u[2] * volume;
161 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1],
162 latIntPos[2] + 1).computeRhoU(rho,
164 volume = d[0] * e[1] * d[2];
165 output[0] += u[0] * volume;
166 output[1] += u[1] * volume;
167 output[2] += u[2] * volume;
169 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1,
170 latIntPos[2] + 1).computeRhoU(rho,
172 volume = d[0] * d[1] * d[2];
173 output[0] += u[0] * volume;
174 output[1] += u[1] * volume;
175 output[2] += u[2] * volume;
177 output[0] = this->_converter.getPhysVelocity(output[0]);
178 output[1] = this->_converter.getPhysVelocity(output[1]);
179 output[2] = this->_converter.getPhysVelocity(output[2]);