interpolation
moment_kinetics.interpolation
— ModuleInterpolation routines intended for post-processing.
Note these are not guaranteed to be highly optimized!
moment_kinetics.interpolation.interpolate_to_grid_1d!
— FunctionInterpolation 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.
moment_kinetics.interpolation.interpolate_to_grid_1d
— MethodInterpolation 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
.
moment_kinetics.interpolation.interpolate_to_grid_vpa!
— Methodmoment_kinetics.interpolation.interpolate_to_grid_vpa!
— Methodmoment_kinetics.interpolation.interpolate_to_grid_vpa
— Methodmoment_kinetics.interpolation.interpolate_to_grid_vpa
— Methodmoment_kinetics.interpolation.interpolate_to_grid_z!
— Methodmoment_kinetics.interpolation.interpolate_to_grid_z!
— Methodmoment_kinetics.interpolation.interpolate_to_grid_z!
— Methodmoment_kinetics.interpolation.interpolate_to_grid_z
— Methodmoment_kinetics.interpolation.interpolate_to_grid_z
— Methodmoment_kinetics.interpolation.interpolate_to_grid_z
— Methodmoment_kinetics.interpolation.single_element_interpolate!
— Functionsingle_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
.