35 using vec = sycl::vec<T, 3>;
38 return sycl::vec<T, 3>{a.v_0, a.v_1, a.v_2};
41 auto force_val = tensor_to_sycl(dM_k.t1 * a_k.t0);
42 if constexpr (order >= 2) {
43 force_val += tensor_to_sycl(dM_k.t2 * a_k.t1) / 1;
45 if constexpr (order >= 3) {
46 force_val += tensor_to_sycl(dM_k.t3 * a_k.t2) / 2;
48 if constexpr (order >= 4) {
49 force_val += tensor_to_sycl(dM_k.t4 * a_k.t3) / 6;
51 if constexpr (order >= 5) {
52 force_val += tensor_to_sycl(dM_k.t5 * a_k.t4) / 24;
sycl::vec< T, 3 > contract_grav_moment_to_force(const shammath::SymTensorCollection< T, 0, order - 1 > &a_k, const shammath::SymTensorCollection< T, 1, order > &dM_k)
Contract the gravitational moment and the displacement to get a force.