Quadratic. 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 x0, Scalar values[num_knot]) |
| Calculate the value of the spline at all knots.
|
|
template<typename Scalar> |
static KOKKOS_INLINE_FUNCTION void | gradient (const Scalar x0, const Scalar rdx, Scalar gradients[num_knot]) |
| Calculate the value of the gradient of the spline in the physical frame.
|
|
|
static constexpr int | order = 2 |
| Order.
|
|
static constexpr int | num_knot = 3 |
| The number of non-zero knots in the spline.
|
|
Quadratic. Defined on the dual grid.
◆ gradient()
template<typename Scalar>
static KOKKOS_INLINE_FUNCTION void Cabana::Grid::Spline< 2 >::gradient |
( |
const Scalar | x0, |
|
|
const Scalar | rdx, |
|
|
Scalar | gradients[num_knot] ) |
|
inlinestatic |
Calculate the value of the gradient of the spline in the physical frame.
- Parameters
-
x0 | The coordinate at which to evaluate the spline in the logical grid space. |
rdx | 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< 2 >::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 quadratic 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< 2 >::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< 2 >::value |
( |
const Scalar | x0, |
|
|
Scalar | values[num_knot] ) |
|
inlinestatic |
Calculate the value of the spline at all knots.
- Parameters
-
x0 | 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: