zonal_averages_factory_m Module

Creates matrices to compute polar averages - flux-surface average (which is actually a volume average) - surface average (an actual surface average, e.g. for computation of fluxes)

TODO: Not tested on 3D equilibria - phi variable only used for equilibrium and polar grid interfaces



Subroutines

public subroutine create_flux_surface_average_csr(flux_surface_average_csr, equi, mesh, polar_grid, polar_map_csr, dbgout)

Creates a matrix to compute flux surface average from Cartesian field

Arguments

Type IntentOptional Attributes Name
type(csrmat_t), intent(out), allocatable :: flux_surface_average_csr

Zonal average matrix

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

Equilibrium

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

Cartesian mesh

type(polar_grid_t), intent(in) :: polar_grid

Polar grid

type(csrmat_t), intent(in) :: polar_map_csr

Polar map matrix in CSR format

integer, intent(in), optional :: dbgout

Specifies the number of information printed on screen

public subroutine create_surface_average_csr(surface_average_csr, equi, mesh, polar_grid, polar_map_csr, dbgout)

Creates a matrix to surface average from Cartesian field

Arguments

Type IntentOptional Attributes Name
type(csrmat_t), intent(out), allocatable :: surface_average_csr

Zonal average matrix

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

Equilibrium

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

Cartesian mesh

type(polar_grid_t), intent(in) :: polar_grid

Polar grid

type(csrmat_t), intent(in) :: polar_map_csr

Polar map matrix in CSR format

integer, intent(in), optional :: dbgout

Specifies the number of information printed on screen

public subroutine create_flux_surface_average_csr_viaaddvols(flux_surface_average_csr, equi, mesh, polar_grid, dbgout)

Constructs flux surface average matrix via adding volumes of adjacent surfaces

Arguments

Type IntentOptional Attributes Name
type(csrmat_t), intent(out), allocatable :: flux_surface_average_csr

Zonal average matrix

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

Equilibrium

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

Cartesian mesh

type(polar_grid_t), intent(in) :: polar_grid

Polar grid

integer, intent(in), optional :: dbgout

Specifies the number of information printed on screen