Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Interpolator for 1D splines of arbitrary degree, on uniform and non-uniform grids.
Derived types and interfaces | |
type | sll_t_spline_interpolator_1d |
1D spline interpolator More... | |
Functions/Subroutines | |
subroutine, public | sll_s_spline_1d_compute_num_cells (degree, bc_xmin, bc_xmax, nipts, ncells) |
Calculate number of cells from number of interpolation points. More... | |
subroutine | s_spline_interpolator_1d__init (self, bspl, bc_xmin, bc_xmax) |
Initialize a 1D spline interpolator object. More... | |
subroutine | s_spline_interpolator_1d__free (self) |
Destroy local objects and free allocated memory. More... | |
subroutine | s_spline_interpolator_1d__get_interp_points (self, tau) |
Get coordinates of interpolation points (1D grid) More... | |
subroutine | s_spline_interpolator_1d__compute_interpolant (self, spline, gtau, derivs_xmin, derivs_xmax) |
Compute interpolating 1D spline. More... | |
subroutine | s_build_system (self, matrix) |
Private subroutine for assembling and factorizing linear system for any kind of boundary conditions at xmin and xmax. More... | |
subroutine | s_compute_interpolation_points_uniform (self, tau) |
subroutine | s_compute_num_diags_uniform (self, kl, ku) |
subroutine | s_compute_interpolation_points_non_uniform (self, tau) |
subroutine | s_compute_num_diags_non_uniform (self, kl, ku) |
Variables | |
integer, parameter | wp = f64 |
Working precision. More... | |
integer, dimension(1:3), parameter | allowed_bcs = [sll_p_periodic, sll_p_hermite, sll_p_greville] |
Allowed boundary conditions. More... | |
|
private |
Private subroutine for assembling and factorizing linear system for any kind of boundary conditions at xmin and xmax.
[in] | self | 1D spline interpolator object |
[in,out] | matrix | generic 'spline' matrix (dense/banded/periodic-banded) |
Definition at line 330 of file sll_m_spline_interpolator_1d.F90.
|
private |
Definition at line 546 of file sll_m_spline_interpolator_1d.F90.
|
private |
Definition at line 427 of file sll_m_spline_interpolator_1d.F90.
|
private |
Definition at line 627 of file sll_m_spline_interpolator_1d.F90.
|
private |
Definition at line 513 of file sll_m_spline_interpolator_1d.F90.
|
private |
Compute interpolating 1D spline.
Compute coefficients of 1D spline that interpolates function values on grid. If Hermite BCs are used, function derivatives at appropriate boundary are also needed.
[in] | self | 1D spline interpolator |
[in,out] | spline | 1D spline |
[in] | gtau | function values of interpolation points |
[in] | derivs_xmin | (optional) array with boundary conditions at xmin |
[in] | derivs_xmax | (optional) array with boundary conditions at xmax |
Definition at line 243 of file sll_m_spline_interpolator_1d.F90.
|
private |
Destroy local objects and free allocated memory.
[in,out] | self | 1D spline interpolator |
Definition at line 202 of file sll_m_spline_interpolator_1d.F90.
|
private |
Get coordinates of interpolation points (1D grid)
[in] | self | 1D spline interpolator |
[out] | tau | x coordinates of interpolation points |
Definition at line 221 of file sll_m_spline_interpolator_1d.F90.
|
private |
Initialize a 1D spline interpolator object.
[out] | self | 1D spline interpolator |
[in] | bspl | B-splines (basis) |
[in] | bc_xmin | boundary condition at xmin |
[in] | bc_xmax | boundary condition at xmax |
Definition at line 124 of file sll_m_spline_interpolator_1d.F90.
subroutine, public sll_m_spline_interpolator_1d::sll_s_spline_1d_compute_num_cells | ( | integer, intent(in) | degree, |
integer, intent(in) | bc_xmin, | ||
integer, intent(in) | bc_xmax, | ||
integer, intent(in) | nipts, | ||
integer, intent(out) | ncells | ||
) |
Calculate number of cells from number of interpolation points.
Important for parallelization: for given spline degree and BCs, calculate the number of grid cells that yields the desired number of interpolation points
[in] | degree | spline degree |
[in] | bc_xmin | boundary condition type at left boundary (x=xmin) |
[in] | bc_xmax | boundary condition type at right boundary (x=xmax) |
[in] | nipts | desired number of interpolation points |
[out] | ncells | calculated number of cells in domain |
Definition at line 84 of file sll_m_spline_interpolator_1d.F90.
|
private |
Allowed boundary conditions.
Definition at line 39 of file sll_m_spline_interpolator_1d.F90.
|
private |
Working precision.
Definition at line 36 of file sll_m_spline_interpolator_1d.F90.