221 {1} / descriptors::invCs2<V,DESCRIPTOR>())
any_platform {
222 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
223 if (iPop==0) {
224 return rho * (V{1} - vs2 * descriptors::invCs2<V,DESCRIPTOR>()*(V{1}-descriptors::t<V,DESCRIPTOR>(0))
225 - descriptors::t<V,DESCRIPTOR>(0)/V{2}*descriptors::invCs2<V,DESCRIPTOR>()*uSqr)
226 - descriptors::t<V,DESCRIPTOR>(0);
227 }
228 else {
229 V c_u{};
230 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
231 c_u += descriptors::c<DESCRIPTOR>(iPop,iD)*u[iD];
232 }
233 return rho * descriptors::t<V,DESCRIPTOR>(iPop) * descriptors::invCs2<V,DESCRIPTOR>()
234 * (vs2 + c_u
235 + descriptors::invCs2<V,DESCRIPTOR>() / V{2} * c_u*c_u
236 - uSqr / V{2})
237 - descriptors::t<V,DESCRIPTOR>(iPop);
238 }
239 }