#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 |
|
|
enum | { J0 = 0
, J1 = 1
, J2 = 2
, J3 = 3
} |
|
enum | { K0 = 0
, K1 = 1
, K2 = 2
, K3 = 3
} |
|
|
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 |
|
| 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...
|
|
double | dp |
|
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 |
|
◆ anonymous enum
◆ anonymous enum
◆ Tricub() [1/3]
◆ Tricub() [2/3]
◆ Tricub() [3/3]
◆ der_one()
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 |
◆ der_zero()
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) |
◆ eval_tricub_0()
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) |
◆ eval_tricub_1()
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 |
◆ interp_1d()
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
|
◆ interp_2d()
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
|
◆ mirror()
template<class Device >
template<class Device2 >
◆ slope_1d()
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
|
◆ Tricub
template<class Device >
template<class Device2 >
◆ acoeff_all
The field for interpolation.
◆ dp
◆ dp_inv
template<class Device >
double Tricub< Device >::dp_inv |
|
private |
Inverse of the cell size.
◆ dr_inv
template<class Device >
double Tricub< Device >::dr_inv |
|
private |
◆ dz_inv
template<class Device >
double Tricub< Device >::dz_inv |
|
private |
◆ np
Number of points in r and z directions.
◆ nr
◆ nz
◆ pc
template<class Device >
Kokkos::View<double*,Kokkos::LayoutRight,Device> Tricub< Device >::pc |
|
private |
Array containing the phi coordinates of the grid points.
◆ pmin
◆ rc
template<class Device >
Kokkos::View<double*,Kokkos::LayoutRight,Device> Tricub< Device >::rc |
|
private |
Array containing the r coordinates of the grid points.
◆ rmin
◆ zc
template<class Device >
Kokkos::View<double*,Kokkos::LayoutRight,Device> Tricub< Device >::zc |
|
private |
Array containing the z coordinates of the grid points.
◆ zmin
The documentation for this class was generated from the following files:
- /p/test_ssd/builds/t3_84szKM/0/xgc/XGC-Devel/XGC_core/cpp/tricub.hpp
- /p/test_ssd/builds/t3_84szKM/0/xgc/XGC-Devel/XGC_core/cpp/tricub.tpp