interpolation

moment_kinetics.interpolation.interpolate_to_grid_1d!Function

Interpolation from a regular grid to a 1d grid with arbitrary spacing

Arguments

result : Array{mkfloat, 1} Array to be overwritten with the result of the interpolation newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : discretization_info struct containing information for discretization, whose type determines which method is used.

source
moment_kinetics.interpolation.interpolate_to_grid_1dMethod

Interpolation from a regular grid to a 1d grid with arbitrary spacing

This version allocates a new array for the result, which is returned.

Arguments

newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : Bool or chebyshevinfo struct containing information for discretization, whose type determines which method is used.

Returns

result : Array Array with the values of f interpolated to the points in new_grid.

source
moment_kinetics.interpolation.single_element_interpolate!Function
single_element_interpolate!(result, newgrid, f, imin, imax, coord, spectral)

Interpolation within a single element.

f is an array with the values of the input variable in the element to be interpolated. imin and imax give the start and end points of the element in the grid (used to calculate shift and scale factors to a normalised grid).

newgrid gives the points within the element where output is required. result is filled with the interpolated values at those points.

coord is the coordinate struct for the dimension along which interpolation is being done. spectral is the corresponding discretization_info.

source