Template Class ExplicitBiCubicSplineInterpolator
Defined in File spline_interpolator.hpp
Inheritance Relationships
Base Type
public pcms::BiCubicSplineInterpolator< T, MemorySpace >(Template Class BiCubicSplineInterpolator)
Class Documentation
-
template<typename T, typename MemorySpace>
class ExplicitBiCubicSplineInterpolator : public pcms::BiCubicSplineInterpolator<T, MemorySpace> BiCubicSplineInterpolator class This class provides methods for 2D explicit bicubic spline interpolation. It inherits from ExplicitCubicSplineInterpolator and implements the bicubic representation of cubic spline coefficients.
The 2D explicit bicubic spline are evaluated using the following formula: s(x,y)= C11 + dx*C21 + dx**2*C31 + dx**3*C41 +dy*(C12 + dx*C22 + dx**2*C32 + dx**3*C42) +dy**2*(C13 + dx*C23 + dx**2*C33 + dx**3*C43) +dy**3*(C14 + dx*C24 + dx**2*C34 + dx**3*C44) where Cij are the coefficients of the bicubic spline.
Public Types
-
using execution_space = typename MemorySpace::execution_space
-
using member_type = typename Kokkos::TeamPolicy<execution_space>::member_type
Public Functions
-
ExplicitBiCubicSplineInterpolator(Rank1View<T, MemorySpace> x, Rank1View<T, MemorySpace> y, Rank1View<T, MemorySpace> values, BoundaryCondition ibcxmin, Rank1View<T, MemorySpace> bcxmin, BoundaryCondition ibcxmax, Rank1View<T, MemorySpace> bcxmax, BoundaryCondition ibcymin, Rank1View<T, MemorySpace> bcymin, BoundaryCondition ibcymax, Rank1View<T, MemorySpace> bcymax)
Construct the interpolator object and set up the coefficients.
The boundary condition flags take the same values as in CubicSplineInterpolator at each direction.
- Parameters:
x – input grid points in x direction
y – input grid points in y direction
values – values of given grid points
ibcxmin – boundary condition flag at x(0)
bcxmin – boundary condition data at x(0)
ibcxmax – boundary condition flag at x(-1)
bcxmax – boundary condition data at x(-1)
ibcymin – boundary condition flag at y(0)
bcymin – boundary condition data at y(0)
ibcymax – boundary condition flag at y(-1)
bcymax – boundary condition data at y(-1)
-
ExplicitBiCubicSplineInterpolator(Rank1View<T, MemorySpace> x, Rank1View<T, MemorySpace> y, Rank1View<T, MemorySpace> values)
Construct the interpolator object and set up the coefficients with default boundary conditions.
- Parameters:
x – input grid points in x direction
y – input grid points in y direction
values – values of given grid points
-
virtual void evaluate(Rank1View<T, MemorySpace> xvec, Rank1View<T, MemorySpace> yvec, Rank2View<T, MemorySpace> fval) override
Evaluate the bicubic spline at given points.
- Parameters:
xvec – input points in x direction where the spline is evaluated
yvec – input points in y direction where the spline is evaluated
fval – output values of the spline at given points
-
virtual void evaluate(Kokkos::View<LO*, MemorySpace> iselect, Rank1View<T, MemorySpace> xvec, Rank1View<T, MemorySpace> yvec, Rank2View<T, MemorySpace> fval, T lookup_tol = 4.0e-7) override
Evaluate the bicubic spline at given points with selector.
The selector follows the the following rules: iselect(1)=1 – evaluate f iselect(2)=1 – evaluate df/dx iselect(3)=1 – evaluate df/dy iselect(4)=1 – evaluate d2f/dx2 iselect(5)=1 – evaluate d2f/dy2 iselect(6)=1 – evaluate d2f/dxdy
- Parameters:
iselect – selector array indicating which derivatives to compute
xvec – input points in x direction where the spline is evaluated
yvec – input points in y direction where the spline is evaluated
fval – output values of the spline at given points
lookup_tol – tolerance for the lookup
-
using execution_space = typename MemorySpace::execution_space