/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/interpolation/linear_interpolator_2d.hh Source File#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
linear_interpolator_2d.hh
Go to the documentation of this file.
A linear interpolator for 2D data, callable from host AND device code.
Definition linear_interpolator_2d.hh:19
ViewType device_data
Definition linear_interpolator_2d.hh:168
typename ViewType::host_mirror_type HostViewType
Definition linear_interpolator_2d.hh:26
const NT * data() const
Read-only handle to the host values, in the mirror's storage order.
Definition linear_interpolator_2d.hh:155
static constexpr bool periodic_x
Definition linear_interpolator_2d.hh:22
device::array< typename Coordinates::ctype, 2 > KOKKOS_FUNCTION index(const typename Coordinates::ctype x, const typename Coordinates::ctype y) const
Map physical coordinates onto grid indices.
Definition linear_interpolator_2d.hh:98
const device::array< size_t, 2 > sizes
Definition linear_interpolator_2d.hh:166
KOKKOS_DEFAULTED_FUNCTION LinearInterpolator2D(const LinearInterpolator2D &)=default
Shallow copy of BOTH views, valid in host and in device code. See LinearInterpolator1D.
NT operator[](size_t i) const
Host-side element access, in the row-major order update() takes its input in.
Definition linear_interpolator_2d.hh:78
NT KOKKOS_FUNCTION operator()(const typename Coordinates::ctype x, const typename Coordinates::ctype y) const
Interpolate the data at a given point.
Definition linear_interpolator_2d.hh:136
const Coordinates & get_coordinates() const
Get the coordinate system of the data.
Definition linear_interpolator_2d.hh:147
HostViewType host_data
Definition linear_interpolator_2d.hh:169
NT KOKKOS_FUNCTION at(const device::array< typename Coordinates::ctype, 2 > &idx) const
Interpolate at grid indices previously obtained from index().
Definition linear_interpolator_2d.hh:106
static constexpr bool periodic_y
Definition linear_interpolator_2d.hh:23
Kokkos::View< NT **, GPU_memory, Kokkos::MemoryTraits< Kokkos::RandomAccess > > ViewType
Definition linear_interpolator_2d.hh:25
const Coordinates coordinates
Definition linear_interpolator_2d.hh:165
static constexpr bool has_separate_device
Definition linear_interpolator_2d.hh:28
LinearInterpolator2D(const Coordinates &coordinates)
Construct a LinearInterpolator2D with internal, zeroed data and a coordinate system.
Definition linear_interpolator_2d.hh:41
KOKKOS_FORCEINLINE_FUNCTION NT value(const size_t i, const size_t j) const
Read one element from whichever buffer belongs to the executing side.
Definition linear_interpolator_2d.hh:159
void update(const NT2 *in_data)
Replace the data, leaving host AND device current. The only mutator.
Definition linear_interpolator_2d.hh:62
typename Coordinates::ctype ctype
Definition linear_interpolator_2d.hh:32
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