/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/interpolation/linear_interpolator_1d.hh Source File#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
linear_interpolator_1d.hh
Go to the documentation of this file.
150 NT KOKKOS_FUNCTION operator()(const typename Coordinates::ctype x) const { return at(index(x)); }
A linear interpolator for 1D data, callable from host AND device code.
Definition linear_interpolator_1d.hh:36
ViewType device_data
Definition linear_interpolator_1d.hh:180
NT KOKKOS_FUNCTION at(const typename Coordinates::ctype idx) const
Interpolate at a grid index previously obtained from index().
Definition linear_interpolator_1d.hh:134
HostViewType host_data
Definition linear_interpolator_1d.hh:181
KOKKOS_DEFAULTED_FUNCTION LinearInterpolator1D(const LinearInterpolator1D &)=default
Shallow copy of BOTH views, valid in host and in device code.
const Coordinates coordinates
Definition linear_interpolator_1d.hh:177
NT KOKKOS_FUNCTION operator()(const typename Coordinates::ctype x) const
Interpolate the data at a given point.
Definition linear_interpolator_1d.hh:150
KOKKOS_FORCEINLINE_FUNCTION NT value(const size_t i) const
Read one element from whichever buffer belongs to the executing side.
Definition linear_interpolator_1d.hh:171
typename ViewType::host_mirror_type HostViewType
Definition linear_interpolator_1d.hh:42
Coordinates::ctype KOKKOS_FUNCTION index(const typename Coordinates::ctype x) const
Map a physical coordinate onto the grid index.
Definition linear_interpolator_1d.hh:126
NT operator[](size_t i) const
Host-side element access. Always valid, including on a copy.
Definition linear_interpolator_1d.hh:113
void update(const NT2 *in_data)
Replace the data, leaving host AND device current. The only mutator.
Definition linear_interpolator_1d.hh:95
LinearInterpolator1D(const Coordinates &coordinates)
Construct a LinearInterpolator1D with internal, zeroed data and a coordinate system.
Definition linear_interpolator_1d.hh:60
const NT * data() const
Read-only handle to the host values.
Definition linear_interpolator_1d.hh:165
static constexpr bool has_separate_device
Definition linear_interpolator_1d.hh:47
typename Coordinates::ctype ctype
Definition linear_interpolator_1d.hh:51
static constexpr bool periodic
Definition linear_interpolator_1d.hh:39
const Coordinates & get_coordinates() const
Get the coordinate system of the data.
Definition linear_interpolator_1d.hh:157
Kokkos::View< NT *, GPU_memory, Kokkos::MemoryTraits< Kokkos::RandomAccess > > ViewType
Definition linear_interpolator_1d.hh:41
Definition complex_math.hh:10
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
constexpr bool is_periodic_coordinate_v
Whether a 1D coordinate class describes a periodic axis, i.e. one where the last grid point is follow...
Definition coordinates.hh:43
Definition kokkos.hh:538
Generated by