Zero-order (Nearest Grid Point Interpolation). Defined on the dual grid.
More...
#include <Cabana_Grid_Splines.hpp>
|
template<class Scalar> |
static KOKKOS_INLINE_FUNCTION Scalar | mapToLogicalGrid (const Scalar xp, const Scalar rdx, const Scalar low_x) |
| Map a physical location to the logical space of the dual grid in a single dimension.
|
|
static KOKKOS_INLINE_FUNCTION void | offsets (int indices[num_knot]) |
| Get the logical space stencil offsets of the spline. The stencil defines the offsets into a grid field about a logical coordinate.
|
|
template<class Scalar> |
static KOKKOS_INLINE_FUNCTION void | stencil (const Scalar x0, int indices[num_knot]) |
| Compute the stencil indices for a given logical space location.
|
|
template<typename Scalar> |
static KOKKOS_INLINE_FUNCTION void | value (const Scalar, Scalar values[num_knot]) |
| Calculate the value of the spline at all knots.
|
|
template<typename Scalar> |
static KOKKOS_INLINE_FUNCTION void | gradient (const Scalar, const Scalar, Scalar gradients[num_knot]) |
| Calculate the value of the gradient of the spline in the physical frame.
|
|
|
static constexpr int | order = 0 |
| Order.
|
|
static constexpr int | num_knot = 1 |
| The number of non-zero knots in the spline.
|
|
Zero-order (Nearest Grid Point Interpolation). Defined on the dual grid.
◆ gradient()
template<typename Scalar>
static KOKKOS_INLINE_FUNCTION void Cabana::Grid::Spline< 0 >::gradient |
( |
const Scalar | , |
|
|
const Scalar | , |
|
|
Scalar | gradients[num_knot] ) |
|
inlinestatic |
Calculate the value of the gradient of the spline in the physical frame.
- Note
- x0 (unused) The coordinate at which to evaluate the spline in the logical grid space.
-
rdx (unused) The inverse of the physical distance between grid locations.
-
gradients Basis gradient values at the knots in the physical frame. Ordered from lowest to highest in terms of knot location.
◆ mapToLogicalGrid()
template<class Scalar>
static KOKKOS_INLINE_FUNCTION Scalar Cabana::Grid::Spline< 0 >::mapToLogicalGrid |
( |
const Scalar | xp, |
|
|
const Scalar | rdx, |
|
|
const Scalar | low_x ) |
|
inlinestatic |
Map a physical location to the logical space of the dual grid in a single dimension.
- Parameters
-
xp | The coordinate to map to the logical space. |
rdx | The inverse of the physical distance between grid locations. |
low_x | The physical location of the low corner of the dual grid. |
- Returns
- The coordinate in the logical dual grid space.
- Note
- Casting this result to an integer yields the index at the center of the stencil.
-
A zero-order spline uses the dual grid.
◆ offsets()
Get the logical space stencil offsets of the spline. The stencil defines the offsets into a grid field about a logical coordinate.
- Parameters
-
indices | The stencil index offsets. |
◆ stencil()
template<class Scalar>
static KOKKOS_INLINE_FUNCTION void Cabana::Grid::Spline< 0 >::stencil |
( |
const Scalar | x0, |
|
|
int | indices[num_knot] ) |
|
inlinestatic |
Compute the stencil indices for a given logical space location.
- Parameters
-
x0 | The coordinate at which to evaluate the spline stencil. |
indices | The indices of the stencil. |
◆ value()
template<typename Scalar>
static KOKKOS_INLINE_FUNCTION void Cabana::Grid::Spline< 0 >::value |
( |
const Scalar | , |
|
|
Scalar | values[num_knot] ) |
|
inlinestatic |
Calculate the value of the spline at all knots.
- Note
- x0 (unused) The coordinate at which to evaluate the spline in the logical grid space.
-
values Basis values at the knots. Ordered from lowest to highest in terms of knot location.
The documentation for this struct was generated from the following file: