polars_t Derived Type

type, public :: polars_t

Polar type contains polar grid, map matrix, surface and flux surface matrices


Contents


Components

Type Visibility Attributes Name Initial
type(polar_grid_t), public :: grid

Polar grid

real(kind=GP), public, allocatable, dimension(:,:) :: xpol

x-coordiantes of polar grid

real(kind=GP), public, allocatable, dimension(:,:) :: ypol

y-coordiantes of polar grid

type(csrmat_t), public, allocatable :: cart_to_polar_csr

Matrix mapping from Carteisan mesh to polar grid

type(csrmat_t), public, allocatable :: surface_average_csr

Matrix evaluating surface average

type(csrmat_t), public, allocatable :: flux_surface_average_csr

Matrix evaluating flux-surface average

real(kind=GP), public, dimension(:), allocatable :: fluxsurf_area

Area of each discrete flux surface

real(kind=GP), public, dimension(:), allocatable :: fluxsurf_vol

Volume of each discrete flux surface


Finalization Procedures

final :: destructor


Type-Bound Procedures

procedure, public :: set_parameters => set_parameters_polars

  • interface

    public module subroutine set_parameters_polars(self, filename, nrho_in, ntheta_in, intorder_in)

    Sets parameters for polars, either via namelist from file, or setting explicitly

    Arguments

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

    Instance of the type

    character(len=*), intent(in), optional :: filename

    Filename where parameter are read from

    integer, intent(in), optional :: nrho_in

    Number of radial polar grid points

    integer, intent(in), optional :: ntheta_in

    Number of poloidal polar grid points

    integer, intent(in), optional :: intorder_in

    Interpolation order

procedure, public :: build => build_polars

  • interface

    public module subroutine build_polars(self, equi, mesh, dbgout)

    Builds polar grid and map operators

    Arguments

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

    Instance of the type

    class(equilibrium_t) :: equi

    Equilibrium (not changed)

    type(mesh_cart_t), intent(in) :: mesh

    Mesh

    integer, intent(in), optional :: dbgout

    Debug output level

procedure, public :: write_netcdf => write_netcdf_polars

  • interface

    public module subroutine write_netcdf_polars(self, equi, fgid)

    Writes information to netcdf file

    Arguments

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

    Instance of the type

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

    Equilibrium

    integer, intent(in) :: fgid

    Netcdf file or group id

procedure, public :: read_netcdf => read_netcdf_polars

  • interface

    public module subroutine read_netcdf_polars(self, fgid)

    Reads penalisation from netcdf file

    Arguments

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

    Instance of the type

    integer, intent(in) :: fgid

    Netcdf file or group id

procedure, public :: display => display_polars

  • interface

    public module subroutine display_polars(self)

    Displays information on polars

    Arguments

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

    Instance of the type