ASCOT5
|
Linear interpolation. More...
#include <stdlib.h>
#include <math.h>
#include "../ascot5.h"
#include "../spline/interp.h"
#include "linint.h"
Go to the source code of this file.
Functions | |
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. | |
int | linint1D_eval_f (real *f, linint1D_data *str, real x) |
Evaluate interpolated value of 1D scalar field. | |
Linear interpolation.
Definition in file linint1D.c.
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.
str | pointer to struct to be initialized |
c | array where data is stored |
n_x | number of data points in the x direction |
bc_x | boundary condition for x axis |
x_min | minimum value of the x axis |
x_max | maximum value of the x axis |
Definition at line 22 of file linint1D.c.
int linint1D_eval_f | ( | real * | f, |
linint1D_data * | str, | ||
real | x ) |
Evaluate interpolated value of 1D scalar field.
This function evaluates the interpolated value of a 1D scalar field using linear interpolation.
f | variable in which to place the evaluated value |
str | data struct for data interpolation |
x | x-coordinate |
< Normalized x coordinate in current cell
Definition at line 47 of file linint1D.c.