53 int n_x,
int bc_x,
real x_min,
real x_max) {
58 real x_grid = (x_max - x_min) / ( n_x - 1 * (bc_x ==
NATURALBC) );
107 *f = str->
c[n+0]+dx*str->
c[n+1]+dx2*str->
c[n+2]+dx3*str->
c[n+3];
159 f_df[0] = str->
c[n+0]+dx*str->
c[n+1]+dx2*str->
c[n+2]+dx3*str->
c[n+3];
162 f_df[1] = xgi*(str->
c[n+1]+2*dx*str->
c[n+2]+3*dx2*str->
c[n+3]);
165 f_df[2] = xgi*xgi*(2*str->
c[n+2]+6*dx*str->
c[n+3]);
Main header file for ASCOT5.
unsigned long int a5err
Simulation error flag.
void interp1Dexpl_init_spline(interp1D_data *str, real *c, int n_x, int bc_x, real x_min, real x_max)
Initialize a cubic spline.
a5err interp1Dexpl_eval_df(real *f_df, interp1D_data *str, real x)
Evaluate interpolated value of 1D and its 1st and 2nd derivatives.
int interp1Dexpl_init_coeff(real *c, real *f, int n_x, int bc_x, real x_min, real x_max)
Calculate cubic spline interpolation coefficients for scalar 1D data.
a5err interp1Dexpl_eval_f(real *f, interp1D_data *str, real x)
Evaluate interpolated value of 1D scalar field.
Spline interpolation library.
real fmod(real x, real y)
Compute the modulus of two real numbers.
Header file for splineexpl.c and splinecomp.c.
void splineexpl(real *f, int n, int bc, real *c)
Calculate explicit cubic spline interpolation coefficients in 1D.
Cubic interpolation struct.