/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/interpolation/linear_interpolator_3d.hh Source File#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
linear_interpolator_3d.hh
Go to the documentation of this file.
A linear interpolator for 3D data, callable from host AND device code.
Definition linear_interpolator_3d.hh:20
Kokkos::View< NT ***, GPU_memory, Kokkos::MemoryTraits< Kokkos::RandomAccess > > ViewType
Definition linear_interpolator_3d.hh:27
const Coordinates coordinates
Definition linear_interpolator_3d.hh:179
HostViewType host_data
Definition linear_interpolator_3d.hh:183
device::array< ctype, 3 > KOKKOS_FUNCTION index(const ctype &x, const ctype &y, const ctype &z) const
Map physical coordinates onto grid indices.
Definition linear_interpolator_3d.hh:100
static constexpr bool has_separate_device
Definition linear_interpolator_3d.hh:30
static constexpr bool periodic_x
Definition linear_interpolator_3d.hh:23
NT KOKKOS_FUNCTION at(const device::array< ctype, 3 > &idx) const
Interpolate at grid indices previously obtained from index().
Definition linear_interpolator_3d.hh:108
NT KOKKOS_FUNCTION operator()(const ctype &x, const ctype &y, const ctype &z) const
Interpolate the data at a given point.
Definition linear_interpolator_3d.hh:152
static constexpr bool periodic_z
Definition linear_interpolator_3d.hh:25
typename Coordinates::ctype ctype
Definition linear_interpolator_3d.hh:34
ViewType device_data
Definition linear_interpolator_3d.hh:182
KOKKOS_FORCEINLINE_FUNCTION NT value(const size_t i, const size_t j, const size_t k) const
Read one element from whichever buffer belongs to the executing side.
Definition linear_interpolator_3d.hh:173
const NT * data() const
Read-only handle to the host values, in the mirror's storage order.
Definition linear_interpolator_3d.hh:169
static constexpr bool periodic_y
Definition linear_interpolator_3d.hh:24
NT operator[](size_t i) const
Host-side element access, in the row-major order update() takes its input in.
Definition linear_interpolator_3d.hh:78
const Coordinates & get_coordinates() const
Get the coordinate system of the data.
Definition linear_interpolator_3d.hh:162
const device::array< size_t, 3 > sizes
Definition linear_interpolator_3d.hh:180
LinearInterpolator3D(const Coordinates &coordinates)
Construct a LinearInterpolator3D with internal, zeroed data and a coordinate system.
Definition linear_interpolator_3d.hh:43
KOKKOS_DEFAULTED_FUNCTION LinearInterpolator3D(const LinearInterpolator3D &)=default
Shallow copy of BOTH views, valid in host and in device code. See LinearInterpolator1D.
void update(const NT2 *in_data)
Replace the data, leaving host AND device current. The only mutator.
Definition linear_interpolator_3d.hh:61
typename ViewType::host_mirror_type HostViewType
Definition linear_interpolator_3d.hh:28
Definition complex_math.hh:10
constexpr bool is_periodic_axis_v
Whether axis i of a (possibly multi-dimensional) coordinate system is periodic. Falls back to false f...
Definition coordinates.hh:59
KOKKOS_FORCEINLINE_FUNCTION InterpolationStencil< CT > make_interpolation_stencil(CT idx, const size_t n)
Resolve a fractional grid index into the linear-interpolation stencil along one axis.
Definition interpolation_stencil.hh:34
Definition kokkos.hh:538
Generated by