XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Bicub< Device > Class Template Reference

#include <bicub.hpp>

Public Member Functions

 Bicub (double *rc_in, double *zc_in, BicubCoeff *acoeff_in, int nr_in, int nz_in, double rmin_in, double zmin_in, double dr_inv_in, double dz_inv_in)
 
 Bicub (int eq_mr, int eq_mz, double rmin_in, double zmin_in, double rmax_in, double zmax_in, Kokkos::View< double **, Kokkos::LayoutRight, HostType > &val)
 
 Bicub ()
 
KOKKOS_INLINE_FUNCTION void der_zero (double x, double y, double &f00) const
 
KOKKOS_INLINE_FUNCTION void der_one (double x, double y, double &f00, double &f10, double &f01) const
 
KOKKOS_INLINE_FUNCTION void der_all (double x, double y, double &f00, double &f10, double &f01, double &f11, double &f20, double &f02) const
 

Private Member Functions

KOKKOS_INLINE_FUNCTION void eval_bicub_0 (double x, double y, double xc, double yc, const double(&acoeff)[4][4], double &f00) const
 
KOKKOS_INLINE_FUNCTION void eval_bicub_1 (double x, double y, double xc, double yc, const double(&acoeff)[4][4], double &f00, double &f10, double &f01) const
 
KOKKOS_INLINE_FUNCTION void eval_bicub_2 (double x, double y, double xc, double yc, const double(&acoeff)[4][4], double &f00, double &f10, double &f01, double &f11, double &f20, double &f02) const
 

Private Attributes

int nr
 
int nz
 Number of points in r and z directions. More...
 
double rmin
 
double dr_inv
 
double zmin
 
double dz_inv
 First r and z point, and the 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< BicubCoeff
**, Kokkos::LayoutRight,
Device > 
acoeff_all
 The field for interpolation. More...
 

Constructor & Destructor Documentation

template<class Device >
Bicub< Device >::Bicub ( double *  rc_in,
double *  zc_in,
BicubCoeff acoeff_in,
int  nr_in,
int  nz_in,
double  rmin_in,
double  zmin_in,
double  dr_inv_in,
double  dz_inv_in 
)

Here is the call graph for this function:

template<class Device >
Bicub< Device >::Bicub ( int  eq_mr,
int  eq_mz,
double  rmin_in,
double  zmin_in,
double  rmax_in,
double  zmax_in,
Kokkos::View< double **, Kokkos::LayoutRight, HostType > &  val 
)

Here is the call graph for this function:

template<class Device >
Bicub< Device >::Bicub ( )
inline

Member Function Documentation

template<class Device >
KOKKOS_INLINE_FUNCTION void Bicub< Device >::der_all ( double  x,
double  y,
double &  f00,
double &  f10,
double &  f01,
double &  f11,
double &  f20,
double &  f02 
) const

Determine nearest interpolation grid points, then get first and second derivatives

Parameters
[in]xLocation in r
[in]yLocation in z
[out]f00f(x,y)
[out]f10df/dx
[out]f01df/dy
[out]f11df^2/dx/dy
[out]f20df^2/dx/dx
[out]f02df^2/dy/dy

Here is the call graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void Bicub< Device >::der_one ( double  x,
double  y,
double &  f00,
double &  f10,
double &  f01 
) const

Determine nearest interpolation grid points, then get first derivatives

Parameters
[in]xLocation in r
[in]yLocation in z
[out]f00f(x,y)
[out]f10df/dx
[out]f01df/dy

Here is the call graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void Bicub< Device >::der_zero ( double  x,
double  y,
double &  f00 
) const

Determine nearest interpolation grid points, then get first derivatives

Parameters
[in]xLocation in r
[in]yLocation in z
[out]f00f(x,y)

Here is the call graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void Bicub< Device >::eval_bicub_0 ( double  x,
double  y,
double  xc,
double  yc,
const double(&)  acoeff[4][4],
double &  f00 
) const
private

Evaluate bicubic polynomial f(x,y)

Parameters
[in]xLocation in r
[in]yLocation in z
[in]xcOffset or center of box in x
[in]ycOffset or center of box in y
[in]acoeffData to interpolate from
[out]f00f(x,y)
template<class Device >
KOKKOS_INLINE_FUNCTION void Bicub< Device >::eval_bicub_1 ( double  x,
double  y,
double  xc,
double  yc,
const double(&)  acoeff[4][4],
double &  f00,
double &  f10,
double &  f01 
) const
private

Evaluate bicubic polynomial f(x,y) and first derivatives

Parameters
[in]xLocation in r
[in]yLocation in z
[in]xcOffset or center of box in x
[in]ycOffset or center of box in y
[in]acoeffData to interpolate from
[out]f00f(x,y)
[out]f10df/dx
[out]f01df/dy
template<class Device >
KOKKOS_INLINE_FUNCTION void Bicub< Device >::eval_bicub_2 ( double  x,
double  y,
double  xc,
double  yc,
const double(&)  acoeff[4][4],
double &  f00,
double &  f10,
double &  f01,
double &  f11,
double &  f20,
double &  f02 
) const
private

Evaluate bicubic polynomial f(x,y) and high order derivatives

Parameters
[in]xLocation in r
[in]yLocation in z
[in]xcOffset or center of box in x
[in]ycOffset or center of box in y
[in]acoeffData to interpolate from
[out]f00f(x,y)
[out]f10df/dx
[out]f01df/dy
[out]f11df^2/dx/dy
[out]f20df^2/dx/dx
[out]f02df^2/dy/dy

Member Data Documentation

template<class Device >
Kokkos::View<BicubCoeff**,Kokkos::LayoutRight,Device> Bicub< Device >::acoeff_all
private

The field for interpolation.

template<class Device >
double Bicub< Device >::dr_inv
private
template<class Device >
double Bicub< Device >::dz_inv
private

First r and z point, and the inverse of the cell size.

template<class Device >
int Bicub< Device >::nr
private
template<class Device >
int Bicub< Device >::nz
private

Number of points in r and z directions.

template<class Device >
Kokkos::View<double*,Kokkos::LayoutRight,Device> Bicub< Device >::rc
private

Array containing the r coordinates of the grid points.

template<class Device >
double Bicub< Device >::rmin
private
template<class Device >
Kokkos::View<double*,Kokkos::LayoutRight,Device> Bicub< Device >::zc
private

Array containing the z coordinates of the grid points.

template<class Device >
double Bicub< Device >::zmin
private

The documentation for this class was generated from the following files: