Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Derived types and interfaces | Functions/Subroutines
sll_m_sparse_grid_4d Module Reference

Description

Implementation of a 4D sparse grid with interpolation routines.

Author
Katharina Kormann, IPP

<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...
 

Function/Subroutine Documentation

◆ fg_index()

integer(kind=i32) function, dimension(4) sll_m_sparse_grid_4d::fg_index ( class(sll_t_sparse_grid_4d), intent(in)  interpolator,
integer(kind=i32), intent(in)  sg_index 
)
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.

◆ initialize_sg4d()

subroutine sll_m_sparse_grid_4d::initialize_sg4d ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
integer(kind=i32), dimension(:), intent(in)  levels,
integer(kind=i32), intent(in)  order,
integer(kind=i32), intent(in)  interpolation,
integer(kind=i32), intent(in)  interpolation_type,
real(kind=f64), dimension(:), intent(in)  eta_min,
real(kind=f64), dimension(:), intent(in)  eta_max 
)
private

Initialization function. Set up the hierarchy of the sparse grid.

Parameters
[in,out]interpolatorsparse grid object
[in]eta_mineta_min defines the lower bound of the domain
[in]eta_maxeta_max defines the upper bound of the domain
[in]orderorder of the sparse grid functions (degree of polynomial)
[in]interpolationorder of the interpolator (usually order+1 to have the same order)
[in]interpolation_typeChoose 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.

Here is the call graph for this function:

◆ interpolate4d_disp_linnconst_in_1d()

subroutine sll_m_sparse_grid_4d::interpolate4d_disp_linnconst_in_1d ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
real(kind=f64), intent(in)  displacement,
integer(kind=i32), dimension(:), intent(in)  dorder,
real(kind=f64), dimension(:), intent(inout)  data_in,
real(kind=f64), dimension(:), intent(out)  data_out 
)
private

As interpolate_disp_nconst_in_1d but displacement dependent on displacement*coordinate(dorder(2))

Parameters
[in,out]interpolatorSparse grid object

Definition at line 231 of file sll_m_sparse_grid_4d.F90.

◆ interpolate_const_disp()

subroutine sll_m_sparse_grid_4d::interpolate_const_disp ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
integer(kind=i32), dimension(:), intent(in)  dorder,
real(kind=f64), intent(in)  displacement,
real(kind=f64), dimension(:), intent(inout)  data_in,
real(kind=f64), dimension(:), intent(out)  data_out,
logical, intent(in)  hiera 
)
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.

Parameters
[in,out]interpolatorSparse grid object
[in,out]data_inValues of the hierarchical surplus on input.
[out]data_outValue of the function or the hierarchical surplus (depending on value of hiera) for the displaced data points.
[in]dorderdorder(1) gives the dimension along which we have the displacement; dorder(2:4) give the remaining dimensions
[in]displacementConstant displacement along dimension dorder(1)
[in]hieraIf 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.

◆ interpolate_disp_nconst_in_1d()

subroutine sll_m_sparse_grid_4d::interpolate_disp_nconst_in_1d ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
real(kind=f64), dimension(:), intent(in)  displacement,
integer(kind=i32), dimension(:), intent(in)  dorder,
real(kind=f64), dimension(:), intent(inout)  data_in,
real(kind=f64), dimension(:), intent(out)  data_out 
)
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).

Parameters
[in,out]interpolatorsparse grid object
[in,out]data_inhierarchical surplus of the present function
[out]data_outvalue of the displaced function
[in]dorderdorder: 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]displacementVector containing the values of the displacement (in hierarchical order, one dimensional)

Definition at line 130 of file sll_m_sparse_grid_4d.F90.

◆ interpolate_disp_nconst_in_2d()

subroutine sll_m_sparse_grid_4d::interpolate_disp_nconst_in_2d ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
real(kind=f64), dimension(:), intent(in)  displacement,
integer(kind=i32), dimension(:), intent(in)  dorder,
real(kind=f64), dimension(:), intent(inout)  data_in,
real(kind=f64), dimension(:), intent(out)  data_out 
)
private

As previous function but with displacement displacement*coordinate(dorder(2))

Definition at line 331 of file sll_m_sparse_grid_4d.F90.

◆ interpolate_from_hierarchical_surplus()

real(kind=f64) function sll_m_sparse_grid_4d::interpolate_from_hierarchical_surplus ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
real(kind=f64), dimension(:), intent(in)  data,
real(kind=f64), dimension(:), intent(in)  eta 
)
private

Definition at line 559 of file sll_m_sparse_grid_4d.F90.

Here is the caller graph for this function:

◆ interpolate_from_interpolant_value()

real(kind=f64) function sll_m_sparse_grid_4d::interpolate_from_interpolant_value ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
real(kind=f64), dimension(:), intent(in)  data,
real(kind=f64), dimension(:), intent(in)  eta 
)
private

Compute the value of the sparse grid interpolant at position eta.

Parameters
[in,out]interpolatorSparse grid object
Returns
Interpolated value at eta
Parameters
[in]dataValues of the hierarchical surplus
[in]etaPosition where to interpolate

Definition at line 45 of file sll_m_sparse_grid_4d.F90.

Here is the call graph for this function:

◆ set_hierarchy_info()

subroutine sll_m_sparse_grid_4d::set_hierarchy_info ( class(sll_t_sparse_grid_4d), intent(inout)  interpolator,
integer(kind=i32), intent(in)  counter,
integer(kind=i32), intent(in)  cdim,
integer(kind=i32), dimension(:), intent(in)  lvecin,
integer(kind=i32), dimension(:), intent(in)  kvecin,
integer(kind=i32), dimension(:), intent(in)  novecin 
)
private

For a given sparse grid point fill the hierarchy information (4D specific)

Parameters
[in]cdimdimention to be filled
[in]countercounter for node
[in]lvecinlevel vector
[in]kvecinvector with level within index
[in]novecinno. of points along each dimension on current level

Definition at line 793 of file sll_m_sparse_grid_4d.F90.

Here is the caller graph for this function:
    Report Typos and Errors