Skip to content
Projects

mpifield.kernels.gather_quadratic_1d.gather_quadratic_1d_pyccel

Quadratic B-spline interpolation of a 1D grid field at the markers.

The Pyccel version (CPU) of the gather_quadratic_1d kernel; gather_quadratic_1d_cuda.cu next to this file is the CUDA version (GPU), with the same arguments. Both are loaded by :mod:mpifield.kernels.catalog; this file is compiled with Pyccel there.

The transpose of scatter_quadratic_1d: each marker reads its nearest node and the two around it along each axis (quadratic_cell.cuh). With OpenMP the markers are split over the threads in contiguous chunks.

positions is (1, N), field (nx, components) and result (components, N).

Attributes

NameDescription
MIN_PARALLEL_MARKERSNo description.

Functions

NameDescription
gather_quadratic_1dInterpolate field (nx, components) at the markers into result (components, N).

MIN_PARALLEL_MARKERSattributemodule attribute#

MIN_PARALLEL_MARKERS = 4096

gather_quadratic_1dfunction#

def gather_quadratic_1d(positions: float[:, :], field: float[:, :], result: float[:, :], lower_x: float, cell_size_x: float, num_x: int, periodic_x: int) -> None

Interpolate field (nx, components) at the markers into result (components, N).