polar_grid_m Module

Module implementing polar grid The polar grid has dimension (nrho, ntheta) with uniform grid spacing rho is the radial coordinate as prescribed by the equilibrium theta is the geometric poloidal angle


Used by


Interfaces

interface

  • public pure module function get_phi(self)

    Returns toroidal angle phi

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=fp)

interface

  • public pure module function get_rhopol_min(self)

    Gets rhopol_min

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=fp)

interface

  • public pure module function get_rhopol_max(self)

    Gets rhopol_max

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=fp)

interface

  • public pure module function get_nrho(self)

    Gets nrho

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public pure module function get_ntheta(self)

    Gets ntheta

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public pure module function get_drho(self)

    Gets drho

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=fp)

interface

  • public pure module function get_dtheta(self)

    Gets dtheta

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=fp)

interface

  • public pure module function get_rho(self, ip)

    Computes rho at point ip

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    integer, intent(in) :: ip

    Radial grid index

    Return Value real(kind=fp)

interface

  • public pure module function get_theta(self, jp)

    Computes rho at point ip

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    integer, intent(in) :: jp

    Poloidal grid index

    Return Value real(kind=fp)

interface

  • public module function fluxsurf_area(self, equi, ip)

    Computes total area of flux surface Assumes axisymmetry

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    class(equilibrium_t), intent(inout) :: equi

    Equilibrium

    integer, intent(in) :: ip

    Radial grid index

    Return Value real(kind=fp)

interface

  • public module function fluxsurf_vol(self, equi, ip)

    Computes the volume of flux surface Radial extent of [rho-drho/2, rho + drho/2]

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    class(equilibrium_t), intent(inout) :: equi

    Equilibrium

    integer, intent(in) :: ip

    Radial grid index

    Return Value real(kind=fp)

interface

  • public module subroutine initialize_polar_grid(self, equi, phi, nrho, ntheta)

    Displays information for polar grid

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(inout) :: self

    Instance of the type

    class(equilibrium_t), intent(inout) :: equi

    Equilibrium

    real(kind=FP), intent(in) :: phi

    Toroidal angle

    integer, intent(in) :: nrho

    Number of radial grid points

    integer, intent(in) :: ntheta

    Number of poloidal grid points

interface

  • public module subroutine write_netcdf_polar(self, equi, fgid)

    Writes information about the polar_grid_t

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

    class(equilibrium_t), intent(inout) :: equi

    Equilibrium

    integer, intent(in) :: fgid

    File or group id number of existing Netcdf4 file

interface

  • public module subroutine read_netcdf_polar(self, fgid)

    Reads information about the polar_grid_t

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(inout) :: self

    Instance of the type

    integer, intent(in) :: fgid

    File or group id number of existing Netcdf4 file

interface

  • public module subroutine display_polar_grid(self)

    Displays information for polar grid

    Arguments

    Type IntentOptional Attributes Name
    class(polar_grid_t), intent(in) :: self

    Instance of the type

interface

  • public module subroutine destructor(self)

    Frees memory associated with polar_grid_t

    Arguments

    Type IntentOptional Attributes Name
    type(polar_grid_t), intent(inout) :: self

    Instance of the type


Derived Types

type, public ::  polar_grid_t

Polar grid

Finalizations Procedures

final :: destructor

Type-Bound Procedures

procedure, public :: initialize => initialize_polar_grid
procedure, public :: get_phi
procedure, public :: get_rhopol_min
procedure, public :: get_rhopol_max
procedure, public :: get_nrho
procedure, public :: get_ntheta
procedure, public :: get_drho
procedure, public :: get_dtheta
procedure, public :: get_rho
procedure, public :: get_theta
procedure, public :: fluxsurf_area
procedure, public :: fluxsurf_vol
procedure, public :: display => display_polar_grid
procedure, public :: write_netcdf => write_netcdf_polar
procedure, public :: read_netcdf => read_netcdf_polar