32namespace Interpolation {
45template <
int order,
typename Kernel>
51 auto const block = detail::ll_and_dist<order>(pos, grid_spacing, offset);
54 std::array<double, order> w_y;
55 std::array<double, order> w_z;
56 std::array<double, order>
dw_y;
57 std::array<double, order>
dw_z;
58 for (
int i = 0; i <
order; i++) {
65 std::array<int, 3> ind;
66 for (
int i = 0; i <
order; i++) {
67 ind[0] =
block.corner[0] + i;
71 ind[1] =
block.corner[1] +
j;
72 for (
int k = 0; k <
order; k++) {
73 ind[2] =
block.corner[2] + k;
75 w_x * w_y[
j] *
dw_z[k]});
84template <
int order,
typename T,
typename Kernel>
87 Vector3d const &offset, T
const &init) {
91 [&value, &kernel](
const std::array<int, 3> &ind,
const Vector3d &w) {
94 grid_spacing, offset);
Vector implementation and trait types for boost qvm interoperability.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
static double * block(double *p, std::size_t index, std::size_t size)
T bspline_3d_gradient_accumulate(Vector3d const &pos, Kernel const &kernel, Vector3d const &grid_spacing, Vector3d const &offset, T const &init)
cardinal B-spline weighted sum.
void bspline_3d_gradient(Vector3d const &pos, Kernel const &kernel, Vector3d const &grid_spacing, Vector3d const &offset)
cardinal B-spline gradient interpolation with internal iteration.
DEVICE_QUALIFIER auto bspline(int i, T x) -> T requires((order > 0) and(order<=7))
Formula of the B-spline.
Matrix< T, N, M > tensor_product(const Vector< T, N > &x, const Vector< T, M > &y)