ASCOT5
Loading...
Searching...
No Matches
Functions
spline.h File Reference

Header file for splineexpl.c and splinecomp.c. More...

#include "../ascot5.h"

Go to the source code of this file.

Functions

void splineexpl (real *f, int n, int bc, real *c)
 Calculate explicit cubic spline interpolation coefficients in 1D.
 
void splinecomp (real *f, int n, int bc, real *c)
 Calculate compact cubic spline interpolation coefficients in 1D.
 

Detailed Description

Header file for splineexpl.c and splinecomp.c.

Definition in file spline.h.

Function Documentation

◆ splineexpl()

void splineexpl ( real * f,
int n,
int bc,
real * c )

Calculate explicit cubic spline interpolation coefficients in 1D.

This function calculates the explicit cubic interpolation coefficients for a 1D data set using one of two possible boundary conditions. Function returns a pointer to coefficient array.

Parameters
f1D data to be interpolated
nnumber of data points
bcboundary condition flag
carray for coefficient storage, has length 4*n

NATURAL (Second derivative is zero at both ends)

PERIODIC (Function has same value and derivatives at both ends)

Definition at line 22 of file splineexpl.c.

◆ splinecomp()

void splinecomp ( real * f,
int n,
int bc,
real * c )

Calculate compact cubic spline interpolation coefficients in 1D.

This function calculates the compact cubic interpolation coefficients for a 1D data set using one of two possible boundary conditions. Function returns a pointer to the coefficient array.

Parameters
f1D data to be interpolated
nnumber of data points
bcboundary condition flag
carray for coefficient storage, has length 2*n

NATURAL (Second derivative is zero at both ends)

PERIODIC (Function has same value and derivatives at both ends)

Definition at line 22 of file splinecomp.c.