100{
101 T u[3], rho, volume;
103 int latIntPos[3] = {0};
104 T latPhysPos[3] = {T()};
105 _cuboid.getFloorLatticeR(latIntPos, &input[0]);
106 _cuboid.getPhysR(latPhysPos, latIntPos);
107
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;
112
116
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;
123
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;
130
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;
137
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;
144
146 latIntPos[2] + 1).computeRhoU(rho,
147 u);
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;
152
154 latIntPos[2] + 1).computeRhoU(rho,
155 u);
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;
160
162 latIntPos[2] + 1).computeRhoU(rho,
163 u);
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;
168
170 latIntPos[2] + 1).computeRhoU(rho,
171 u);
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;
176
177 output[0] = this->
_converter.getPhysVelocity(output[0]);
178 output[1] = this->
_converter.getPhysVelocity(output[1]);
179 output[2] = this->
_converter.getPhysVelocity(output[2]);
180}
BlockLattice< T, DESCRIPTOR > & _blockLattice
const UnitConverter< T, DESCRIPTOR > & _converter
constexpr int d() any_platform