23 int n_x,
int bc_x,
real x_min,
real x_max) {
25 real x_grid = (x_max - x_min) / ( n_x - 1 * (bc_x ==
NATURALBC) );
66 x1 = -(str->
n_x-1)*x1;
73 *f = str->
c[i_x]*(1 - dx) + str->
c[i_x+x1]*dx;
Main header file for ASCOT5.
Spline interpolation library.
int linint1D_eval_f(real *f, linint1D_data *str, real x)
Evaluate interpolated value of 1D scalar field.
void linint1D_init(linint1D_data *str, real *c, int n_x, int bc_x, real x_min, real x_max)
Initialize linear interpolation struct for scalar 1D data.
Linear interpolation library.
real fmod(real x, real y)
Compute the modulus of two real numbers.