![]() |
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Implementation of a 3D sparse grid with interpolation routines.
<DETAILED_DESCRIPTION>
Derived types and interfaces | |
| type | sll_t_sparse_grid_3d |
| Sparse grid object for 3d with interpolation routines. 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 (using standard sparse grid interpolation) 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... | |
| real(kind=f64) function | interpolate_from_hierarchical_surplus (interpolator, data, eta) |
| Implements interpolate_from_interpolant_value for periodic sparse grid. More... | |
| real(kind=f64) function | interpolate_from_hierarchical_surplus_boundary (interpolator, data, eta) |
| implements interpolation from hierarchical surplus (interpolate_from_interpolant_value) non-periodic More... | |
| subroutine | interpolate_array_disp_sgfft (interpolator, dim, displacment_in, data_in, data_out) |
| Compute value at displaced grid points using trigonometric interpolation (based on SG FFT) More... | |
| subroutine | initialize_sg3d (interpolator, levels, order, interpolation, interpolation_type, eta_min, eta_max, boundary, modified) |
| Initialization function. Set up the hierarchy of the sparse grid. More... | |
| subroutine | set_hierarchy_info (interpolator, counter, cdim, lvecin, kvecin, novecin) |
| Helfer function for initialization. Setting all the information needed for node counter of the sparse grid along dimension cdim For a given sparse grid point fill the hierarchy information (3D specific) More... | |
| subroutine | set_hierarchy_info_boundary (interpolator, counter, cdim, lvecin, kvecin, novecin) |
| Helfer function for initialization. Setting all the information needed for node counter of the sparse grid along dimension cdim for points at the boundary along dimension dim. More... | |
| subroutine | fg_to_sg (interpolator, fg_values, sg_values) |
| Functions to evaluate fg on sg and sg on fg. More... | |
| integer(kind=i32) function, dimension(3) | 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... | |
| subroutine | tohierarchical (interpolator, data_in, data_out) |
| subroutine | todehi (interpolator, data_array) |
| subroutine | tohira (interpolator, data_array) |
| subroutine | tonodal (interpolator, data_in, data_out) |
| subroutine | displace (interpolator, dim, displacement, data) |
| subroutine | spfft (interpolator, data_in, data_out) |
| Sparse grid FFT. More... | |
| subroutine | ispfft (interpolator, data_in, data_out) |
| Sparse grid inverse FFT. More... | |
|
private |
Definition at line 942 of file sll_m_sparse_grid_3d.F90.
|
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 751 of file sll_m_sparse_grid_3d.F90.
|
private |
Functions to evaluate fg on sg and sg on fg.
Definition at line 736 of file sll_m_sparse_grid_3d.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] | levels | levels defines the maximum level in the sparse grid for each direction |
| [in] | order | order of the sparse grid functions |
| [in] | interpolation | order of the interpolator |
| [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. |
| [in] | modified | modified defines if we have a traditional sparse grid for modified = 0 (then the l_1 norm of the levels is bounded by max(levels) ) or if the boundary is sparsified for modified = 1 (then the l_1 norm of the levels is bounded by max(levels)+1 ) |
| [in] | boundary | boundary defines the boundary conditions: define 0 for periodic boundary conditions and 1 for zero inflow boundaries |
Definition at line 393 of file sll_m_sparse_grid_3d.F90.
|
private |
Compute value at displaced grid points using trigonometric interpolation (based on SG FFT)
| [in,out] | interpolator | Sparse grid object |
| [in] | dim | dimension along which the points should be displaced with displacement_in |
| [in] | displacment_in | displacement of the data points along dimension dim |
| [in,out] | data_in | Fourier transformed values on the sparse grid |
| [out] | data_out | Function values on the sparse grid after displacement |
Definition at line 373 of file sll_m_sparse_grid_3d.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 | hierarchical surplus |
| [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:3) 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 65 of file sll_m_sparse_grid_3d.F90.
|
private |
Implements interpolate_from_interpolant_value for periodic sparse grid.
Definition at line 124 of file sll_m_sparse_grid_3d.F90.
|
private |
implements interpolation from hierarchical surplus (interpolate_from_interpolant_value) non-periodic
Definition at line 181 of file sll_m_sparse_grid_3d.F90.
|
private |
Compute the value of the sparse grid interpolant at position eta (using standard sparse grid interpolation)
| [in,out] | interpolator | sparse grid object |
| [in] | data | Value of hierarchical surplus |
| [in] | eta | Coordinates of the point where to interpolate |
Definition at line 47 of file sll_m_sparse_grid_3d.F90.
|
private |
Sparse grid inverse FFT.
Definition at line 995 of file sll_m_sparse_grid_3d.F90.
|
private |
Helfer function for initialization. Setting all the information needed for node counter of the sparse grid along dimension cdim For a given sparse grid point fill the hierarchy information (3D specific)
| [in] | cdim | current dimension |
| [in] | counter | counter for node |
| [in] | lvecin | vector of current levels |
| [in] | kvecin | vector of current index within level |
| [in] | novecin | vector with number of points on the current level along each dimension |
Definition at line 542 of file sll_m_sparse_grid_3d.F90.
|
private |
Helfer function for initialization. Setting all the information needed for node counter of the sparse grid along dimension cdim for points at the boundary along dimension dim.
| [in] | cdim | current dimension |
| [in] | counter | counter for node |
| [in] | lvecin | vector of current levels |
| [in] | kvecin | vector of current index within level |
| [in] | novecin | vector with number of points on the current level along each dimension |
Definition at line 621 of file sll_m_sparse_grid_3d.F90.
|
private |
Sparse grid FFT.
Definition at line 984 of file sll_m_sparse_grid_3d.F90.
|
private |
Definition at line 815 of file sll_m_sparse_grid_3d.F90.
|
private |
Definition at line 771 of file sll_m_sparse_grid_3d.F90.
|
private |
Definition at line 857 of file sll_m_sparse_grid_3d.F90.
|
private |
Definition at line 899 of file sll_m_sparse_grid_3d.F90.
1.9.1