#include <tricub.hpp>
|
| Tricub (const View< double *, HostType > &r, const View< double *, HostType > &z, const View< double *, HostType > &phi, const View< double ***, CLayout, HostType > &val, bool keep_positive=false) |
|
template<class Device2 > |
Tricub< Device2 > | mirror () const |
|
| Tricub () |
|
KOKKOS_INLINE_FUNCTION void | der_zero (double x, double y, double z, double &f000) const |
|
KOKKOS_INLINE_FUNCTION void | der_one (double x, double y, double z, double &f000, double &f100, double &f010, double &f001) const |
|
|
KOKKOS_INLINE_FUNCTION void | eval_tricub_0 (double x, double y, double z, double xc, double yc, double zc, const double(&acoeff)[4][4][4], double &f000) const |
|
KOKKOS_INLINE_FUNCTION void | eval_tricub_1 (double x, double y, double z, double xc, double yc, double zc, const double(&acoeff)[4][4][4], double &f000, double &f100, double &f010, double &f001) const |
|
template<> |
| Tricub (const View< double *, HostType > &r, const View< double *, HostType > &z, const View< double *, HostType > &p, const View< double ***, CLayout, HostType > &val, bool keep_positive) |
|
|
static KOKKOS_INLINE_FUNCTION
double | interp_1d (const double(&coeff1d)[4], double dx) |
|
static KOKKOS_INLINE_FUNCTION
double | slope_1d (const double(&coeff1d)[4], double dx) |
|
static KOKKOS_INLINE_FUNCTION
double | interp_2d (const double(&coeff2d)[4][4], double dx, double dy) |
|
|
int | nr |
|
int | nz |
|
int | np |
| Number of points in r and z directions. More...
|
|
double | rmin |
|
double | zmin |
|
double | pmin |
| First r and z point. More...
|
|
double | dr_inv |
|
double | dz_inv |
|
double | dp_inv |
| Inverse of the cell size. More...
|
|
Kokkos::View< double
*, Kokkos::LayoutRight, Device > | rc |
| Array containing the r coordinates of the grid points. More...
|
|
Kokkos::View< double
*, Kokkos::LayoutRight, Device > | zc |
| Array containing the z coordinates of the grid points. More...
|
|
Kokkos::View< double
*, Kokkos::LayoutRight, Device > | pc |
| Array containing the phi coordinates of the grid points. More...
|
|
Kokkos::View< TricubCoeff
***, Kokkos::LayoutRight,
Device > | acoeff_all |
| The field for interpolation. More...
|
|
|
template<class Device2 > |
class | Tricub |
|
template<class Device >
KOKKOS_INLINE_FUNCTION void Tricub< Device >::der_one |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double & |
f000, |
|
|
double & |
f100, |
|
|
double & |
f010, |
|
|
double & |
f001 |
|
) |
| const |
Determine nearest interpolation grid points, then get first derivatives
- Parameters
-
[in] | x | Location in r |
[in] | y | Location in z |
[in] | z | Location in p |
[out] | f000 | f(x,y) |
[out] | f100 | df/dx |
[out] | f010 | df/dy |
[out] | f001 | df/dz |
template<class Device >
KOKKOS_INLINE_FUNCTION void Tricub< Device >::der_zero |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double & |
f000 |
|
) |
| const |
Determine nearest interpolation grid points, then get first derivatives
- Parameters
-
[in] | x | Location in r |
[in] | y | Location in z |
[in] | z | Location in phi |
[out] | f000 | f(x,y) |
template<class Device >
KOKKOS_INLINE_FUNCTION void Tricub< Device >::eval_tricub_0 |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
xc, |
|
|
double |
yc, |
|
|
double |
zc, |
|
|
const double(&) |
acoeff[4][4][4], |
|
|
double & |
f000 |
|
) |
| const |
|
private |
Evaluate tricubic polynomial f(x,y)
- Parameters
-
[in] | x | Location in r |
[in] | y | Location in z |
[in] | xc | Offset or center of box in x |
[in] | yc | Offset or center of box in y |
[in] | acoeff | Data to interpolate from |
[out] | f000 | f(x,y,z) |
template<class Device >
KOKKOS_INLINE_FUNCTION void Tricub< Device >::eval_tricub_1 |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
xc, |
|
|
double |
yc, |
|
|
double |
zc, |
|
|
const double(&) |
acoeff[4][4][4], |
|
|
double & |
f000, |
|
|
double & |
f100, |
|
|
double & |
f010, |
|
|
double & |
f001 |
|
) |
| const |
|
private |
Evaluate tricubic polynomial f(x,y) and first derivatives
- Parameters
-
[in] | x | Location in r |
[in] | y | Location in z |
[in] | z | Location in phi |
[in] | xc | Offset or center of box in x |
[in] | yc | Offset or center of box in y |
[in] | zc | Offset or center of box in z |
[in] | acoeff | Data to interpolate from |
[out] | f000 | f(x,y,z) |
[out] | f100 | df/dx |
[out] | f010 | df/dy |
[out] | f001 | df/dz |
template<class Device >
KOKKOS_INLINE_FUNCTION double Tricub< Device >::interp_1d |
( |
const double(&) |
coeff1d[4], |
|
|
double |
dx |
|
) |
| |
|
staticprivate |
Compute the interpolated position from a a set of spline coefficients
- Parameters
-
[in] | coeff1d | An array of 4 spline coefficients |
[in] | dx | The distance to interpolate returns the interpolated position |
template<class Device >
KOKKOS_INLINE_FUNCTION double Tricub< Device >::interp_2d |
( |
const double(&) |
coeff2d[4][4], |
|
|
double |
dx, |
|
|
double |
dy |
|
) |
| |
|
staticprivate |
Compute the interpolated position from a a set of spline coefficients
- Parameters
-
[in] | coeff2d | An array of 4x4 spline coefficients |
[in] | dx | The distance to interpolate in contiguous dimension |
[in] | dx | The distance to interpolate in second dimension returns the interpolated position |
template<class Device>
template<class Device2 >
template<class Device >
KOKKOS_INLINE_FUNCTION double Tricub< Device >::slope_1d |
( |
const double(&) |
coeff1d[4], |
|
|
double |
dx |
|
) |
| |
|
staticprivate |
Compute the interpolated slope from a a set of spline coefficients
- Parameters
-
[in] | coeff1d | An array of 4 spline coefficients |
[in] | dx | The distance to interpolate returns the interpolated position |
template<class Device>
template<class Device2 >
The field for interpolation.
template<class Device>
double Tricub< Device >::dp_inv |
|
private |
Inverse of the cell size.
template<class Device>
double Tricub< Device >::dr_inv |
|
private |
template<class Device>
double Tricub< Device >::dz_inv |
|
private |
Number of points in r and z directions.
template<class Device>
Kokkos::View<double*,Kokkos::LayoutRight,Device> Tricub< Device >::pc |
|
private |
Array containing the phi coordinates of the grid points.
template<class Device>
Kokkos::View<double*,Kokkos::LayoutRight,Device> Tricub< Device >::rc |
|
private |
Array containing the r coordinates of the grid points.
template<class Device>
Kokkos::View<double*,Kokkos::LayoutRight,Device> Tricub< Device >::zc |
|
private |
Array containing the z coordinates of the grid points.
The documentation for this class was generated from the following files:
- /u/gitlab-xgc/builds/YGMz2TJ8/0/xgc/XGC-Devel/XGC_core/cpp/tricub.hpp
- /u/gitlab-xgc/builds/YGMz2TJ8/0/xgc/XGC-Devel/XGC_core/cpp/tricub.tpp