V3FIT
|
This modules contains routines for interpolating points inside a grid. This was originally written by S. P. Hirshman. It has been modified for thread safety converting it to be object oriented by M. Cianciosa. More...
Data Types | |
interface | bivariate_set_grids |
Interface for the setting of bivariate_type types either using bivariate_set_grids_1d or bivariate_set_grids_2d. More... | |
type | bivariate_type |
An object containing persistent data for the bivariate interpolation. More... | |
Functions/Subroutines | |
type(bivariate_type) function, pointer | bivariate_construct (ns, nu) |
Construct a bivariate_type object. More... | |
subroutine | bivariate_destruct (this) |
Deconstruct a bivariate_type object. More... | |
subroutine | bivariate_set_grids_2d (this, rsu, zsu, rgrid, zgrid) |
Set up the interpolation grid for a phi plane. More... | |
subroutine | bivariate_set_grids_1d (this, rsu, zsu, rgrid, zgrid) |
Set up the interpolation grid for a phi plane. More... | |
subroutine | bivariate_get_4pt (this, resp_rz, resp_su) |
Interpolate points on to responce function grid. More... | |
This modules contains routines for interpolating points inside a grid. This was originally written by S. P. Hirshman. It has been modified for thread safety converting it to be object oriented by M. Cianciosa.
type (bivariate_type) function, pointer bivariate::bivariate_construct | ( | integer, intent(in) | ns, |
integer, intent(in) | nu | ||
) |
Construct a bivariate_type object.
Allocates memory and initializes a bivariate_type object.
[in] | ns | Number of radial grid points. |
[in] | nu | Number of poloidal grid points. |
Definition at line 76 of file bivariate.f.
subroutine bivariate::bivariate_destruct | ( | type (bivariate_type), pointer | this | ) |
Deconstruct a bivariate_type object.
Deallocates memory and uninitializes a bivariate_type object.
[in,out] | this | A bivariate_type instance. |
Definition at line 118 of file bivariate.f.
subroutine bivariate::bivariate_get_4pt | ( | type (bivariate_type), 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 responce 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.
[in,out] | this | A bivariate_type instance. |
[in] | resp_rz | Response function on the rz grid. |
[out] | resp_su | Response function on the su grid. |
Definition at line 391 of file bivariate.f.
subroutine bivariate::bivariate_set_grids_1d | ( | type (bivariate_type), 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.
[in,out] | this | A bivariate_type instance. |
[in] | rsu | r coordinate at s,u |
[in] | zsu | z coordinate at s,u |
[in] | rgrid | R coordinate on a fixed, equally spaced grid |
[in] | zgrid | Z coordinate on a fixed, equally spaced grid |
Definition at line 290 of file bivariate.f.
subroutine bivariate::bivariate_set_grids_2d | ( | type (bivariate_type), 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.
[in,out] | this | A bivariate_type instance. |
[in] | rsu | r coordinate at s,u |
[in] | zsu | z coordinate at s,u |
[in] | rgrid | R coordinate on a fixed, equally spaced grid |
[in] | zgrid | Z coordinate on a fixed, equally spaced grid |
Definition at line 187 of file bivariate.f.