Stellarator-Tools
Loading...
Searching...
No Matches
bivariate::bivariate_class Interface Reference

An object containing persistent data for the bivariate interpolation. More...

Public Member Functions

procedure set_grids_1d (this, rsu, zsu, rgrid, zgrid)
 Set up the interpolation grid for a phi plane.
 
procedure set_grids_2d (this, rsu, zsu, rgrid, zgrid)
 Set up the interpolation grid for a phi plane.
 
GENERIC set_grids set_grids_1d, set_grids_2d
 
procedure get_4pt (this, resp_rz, resp_su)
 Interpolate points on to response function grid.
 
FINAL bivariate_destruct (this)
 Deconstruct a bivariate_type object.
 
class(bivariate_class) function, pointer bivariate_construct (ns, nu)
 Construct a bivariate_type object.
 

Public Attributes

integer nsu
 Number of interpolation points.
 
integer nrz
 Number of interpolation points.
 
integer, dimension(:), pointer irz11_bi => null()
 Lower left interpolation point.
 
integer, dimension(:), pointer irz12_bi => null()
 Lower right interpolation point.
 
integer, dimension(:), pointer irz21_bi => null()
 Upper left interpolation point.
 
integer, dimension(:), pointer irz22_bi => null()
 Upper right interpolation point.
 
real(rprec), dimension(:), pointer w11_bi => null()
 Lower left interpolation weight.
 
real(rprec), dimension(:), pointer w12_bi => null()
 Lower right interpolation weight.
 
real(rprec), dimension(:), pointer w21_bi => null()
 Upper left interpolation weight.
 
real(rprec), dimension(:), pointer w22_bi => null()
 Upper right interpolation weight.
 

Detailed Description

An object containing persistent data for the bivariate interpolation.

Interface for bivariate constructor.

Member Function/Subroutine Documentation

◆ bivariate_construct()

class (bivariate_class) function, pointer bivariate::bivariate_class::bivariate_construct ( integer, intent(in)  ns,
integer, intent(in)  nu 
)

Construct a bivariate_type object.

Allocates memory and initializes a bivariate_type object.

Parameters
[in]nsNumber of radial grid points.
[in]nuNumber of poloidal grid points.
Returns
A pointer to a constructed bivariate_type object.

◆ bivariate_destruct()

FINAL bivariate::bivariate_class::bivariate_destruct ( type (bivariate_class), intent(inout)  this)
final

Deconstruct a bivariate_type object.

Deallocates memory and uninitializes a bivariate_type object.

Parameters
[in,out]thisA bivariate_type instance.

◆ get_4pt()

procedure bivariate::bivariate_class::get_4pt ( class (bivariate_class), intent(inout)  this,
real (rprec), dimension(this%nrz), intent(in)  resp_rz,
real (rprec), dimension(this%nsu), intent(out)  resp_su 
)

Interpolate points on to response function grid.

Determin response function on the s,u grid by 4 point bivariate interpolation of response function on the r,z mesh at a fixed toroidal plane. This uses a 2-D interpolation based on the four point formula in Abramowitz and Stegun, Eq. 25.2.66. Note that the arrays need an explicit size in dimension to allow the 2D arrays to be passed to the 1D arguments.

Parameters
[in,out]thisA bivariate_type instance.
[in]resp_rzResponse function on the rz grid.
[out]resp_suResponse function on the su grid.

◆ set_grids_1d()

procedure bivariate::bivariate_class::set_grids_1d ( class (bivariate_class), intent(inout)  this,
real (rprec), dimension(:), intent(in)  rsu,
real (rprec), dimension(:), intent(in)  zsu,
real (rprec), dimension(:), intent(in)  rgrid,
real (rprec), dimension(:), intent(in)  zgrid 
)

Set up the interpolation grid for a phi plane.

Compute the indices (ir_bi, jz_bi) and weight factors (wij_bi) for performing bivariate (4 pt) interpolation FROM a rectangular (R X Z) grid TO a general (non-orthogonal) grid (s, u). R and Z grids may have different mesh sizes.

Parameters
[in,out]thisA bivariate_type instance.
[in]rsur coordinate at s,u
[in]zsuz coordinate at s,u
[in]rgridR coordinate on a fixed, equally spaced grid
[in]zgridZ coordinate on a fixed, equally spaced grid

◆ set_grids_2d()

procedure bivariate::bivariate_class::set_grids_2d ( class (bivariate_class), intent(inout)  this,
real (rprec), dimension(:,:), intent(in)  rsu,
real (rprec), dimension(:,:), intent(in)  zsu,
real (rprec), dimension(:), intent(in)  rgrid,
real (rprec), dimension(:), intent(in)  zgrid 
)

Set up the interpolation grid for a phi plane.

Compute the indices (ir_bi, jz_bi) and weight factors (wij_bi) for performing bivariate (4 pt) interpolation FROM a rectangular (R X Z) grid TO a general (non-orthogonal) grid (s, u). R and Z grids may have different mesh sizes.

Parameters
[in,out]thisA bivariate_type instance.
[in]rsur coordinate at s,u
[in]zsuz coordinate at s,u
[in]rgridR coordinate on a fixed, equally spaced grid
[in]zgridZ coordinate on a fixed, equally spaced grid

The documentation for this interface was generated from the following file: