Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Implementation of a 4D sparse grid with interpolation routines.
<DETAILED_DESCRIPTION>
Derived types and interfaces | |
type | sll_t_sparse_grid_4d |
Sparse grid object for 4d with interpolation routines. Note in 4d we have only an implementation of a standard sparse grid with periodic boundary conditions, i.e. modified=0, boundary=0 compared to 2d and 3d). More... | |
Functions/Subroutines | |
real(kind=f64) function | interpolate_from_interpolant_value (interpolator, data, eta) |
Compute the value of the sparse grid interpolant at position eta. More... | |
subroutine | interpolate_const_disp (interpolator, dorder, displacement, data_in, data_out, hiera) |
Interpolation function for interpolation at (constantly) displaced grid points; displacement only in dimension dim. It is another implementation of the base-class function "interpolate_disp". The advantage is that we can not revisit nodes as we do in the recursive dimension-independently-programmed version. More... | |
subroutine | interpolate_disp_nconst_in_1d (interpolator, displacement, dorder, data_in, data_out) |
Functionality: Interpolates the function values for a displacement on in dimension (periodic b.c. i.e. dimension 1 or 2) where the displacement is allowed to be non-constant in one other dimension (Dirichlet b.c. i.e. dimension 3 or 3). More... | |
subroutine | interpolate4d_disp_linnconst_in_1d (interpolator, displacement, dorder, data_in, data_out) |
As interpolate_disp_nconst_in_1d but displacement dependent on displacement*coordinate(dorder(2)) More... | |
subroutine | interpolate_disp_nconst_in_2d (interpolator, displacement, dorder, data_in, data_out) |
As previous function but with displacement displacement*coordinate(dorder(2)) More... | |
real(kind=f64) function | interpolate_from_hierarchical_surplus (interpolator, data, eta) |
subroutine | initialize_sg4d (interpolator, levels, order, interpolation, interpolation_type, eta_min, eta_max) |
Initialization function. Set up the hierarchy of the sparse grid. More... | |
subroutine | set_hierarchy_info (interpolator, counter, cdim, lvecin, kvecin, novecin) |
For a given sparse grid point fill the hierarchy information (4D specific) More... | |
integer(kind=i32) function, dimension(4) | fg_index (interpolator, sg_index) |
Compute the index of a sparse grid node on level "level" with index "index_on_level" on full grid with of max_level. More... | |
|
private |
Compute the index of a sparse grid node on level "level" with index "index_on_level" on full grid with of max_level.
Definition at line 892 of file sll_m_sparse_grid_4d.F90.
|
private |
Initialization function. Set up the hierarchy of the sparse grid.
[in,out] | interpolator | sparse grid object |
[in] | eta_min | eta_min defines the lower bound of the domain |
[in] | eta_max | eta_max defines the upper bound of the domain |
[in] | order | order of the sparse grid functions (degree of polynomial) |
[in] | interpolation | order of the interpolator (usually order+1 to have the same order) |
[in] | interpolation_type | Choose spline (interpolation_type = 0) or Lagrange (interpolation_type = 1) interpolation for the 1D interpolators if not traditional sparse grid interpolation is used. |
Definition at line 690 of file sll_m_sparse_grid_4d.F90.
|
private |
As interpolate_disp_nconst_in_1d but displacement dependent on displacement*coordinate(dorder(2))
[in,out] | interpolator | Sparse grid object |
Definition at line 231 of file sll_m_sparse_grid_4d.F90.
|
private |
Interpolation function for interpolation at (constantly) displaced grid points; displacement only in dimension dim. It is another implementation of the base-class function "interpolate_disp". The advantage is that we can not revisit nodes as we do in the recursive dimension-independently-programmed version.
[in,out] | interpolator | Sparse grid object |
[in,out] | data_in | Values of the hierarchical surplus on input. |
[out] | data_out | Value of the function or the hierarchical surplus (depending on value of hiera) for the displaced data points. |
[in] | dorder | dorder(1) gives the dimension along which we have the displacement; dorder(2:4) give the remaining dimensions |
[in] | displacement | Constant displacement along dimension dorder(1) |
[in] | hiera | If the result should be the hierarchical surplus, define hiera = .TRUE.; if the result should be the function values at the data points give hiera = .FALSE. |
Definition at line 60 of file sll_m_sparse_grid_4d.F90.
|
private |
Functionality: Interpolates the function values for a displacement on in dimension (periodic b.c. i.e. dimension 1 or 2) where the displacement is allowed to be non-constant in one other dimension (Dirichlet b.c. i.e. dimension 3 or 3).
[in,out] | interpolator | sparse grid object |
[in,out] | data_in | hierarchical surplus of the present function |
[out] | data_out | value of the displaced function |
[in] | dorder | dorder: Ordering of the dimensions. dorder(1) (=1 or 2) gives the dimension where we want to displace, dorder(2) (=3 or 4) gives the dimension of which the displacement is dependent. dorder(3) = 1 or 2 not dorder(1) and dorder(4) = 3 or 4 not dorder(2). |
[in] | displacement | Vector containing the values of the displacement (in hierarchical order, one dimensional) |
Definition at line 130 of file sll_m_sparse_grid_4d.F90.
|
private |
As previous function but with displacement displacement*coordinate(dorder(2))
Definition at line 331 of file sll_m_sparse_grid_4d.F90.
|
private |
Definition at line 559 of file sll_m_sparse_grid_4d.F90.
|
private |
Compute the value of the sparse grid interpolant at position eta.
[in,out] | interpolator | Sparse grid object |
[in] | data | Values of the hierarchical surplus |
[in] | eta | Position where to interpolate |
Definition at line 45 of file sll_m_sparse_grid_4d.F90.
|
private |
For a given sparse grid point fill the hierarchy information (4D specific)
[in] | cdim | dimention to be filled |
[in] | counter | counter for node |
[in] | lvecin | level vector |
[in] | kvecin | vector with level within index |
[in] | novecin | no. of points along each dimension on current level |
Definition at line 793 of file sll_m_sparse_grid_4d.F90.