diagnostics_helpers_m Module

Module containing useful diagnostic computation routines



Contents


Functions

public function inner_product(comm_handler, mesh, map, penalisation, is_stag, u_in, v_in, use_abs, use_vol_avg, use_full_domain, sum_over_planes)

Compute inner product of u*v over all volume elements Only accepts input arrays of lengths n_points or n_points_inner

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communicator

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

Mesh within poloidal plane

type(parallel_map_t), intent(in) :: map

Parallel map

type(penalisation_t), intent(in) :: penalisation

Penalisation

logical, intent(in) :: is_stag

Wheter computation is performed on staggered grid

real(kind=GP), intent(in), dimension(:) :: u_in

First input quantity

real(kind=GP), intent(in), optional, dimension(:) :: v_in

Second input quantity

logical, intent(in), optional :: use_abs

Whether to use absolue u,v values in product (default: false)

logical, intent(in), optional :: use_vol_avg

Whether to divide result by total fluxbox volume (default: false)

logical, intent(in), optional :: use_full_domain

Whether to include outer mesh points and penalisation region in the computation (default: false)

logical, intent(in), optional :: sum_over_planes

Whether to sum over all planes (default: true)

Return Value real(kind=gp)

public function total_volume(comm_handler, mesh, map, penalisation, is_stag, use_full_domain, sum_over_planes)

Compute total volume over all mesh points

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communicator

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

Mesh within poloidal plane

type(parallel_map_t), intent(in) :: map

Parallel map

type(penalisation_t), intent(in) :: penalisation

Penalisation

logical, intent(in) :: is_stag

Wheter computation is performed on staggered grid

logical, intent(in), optional :: use_full_domain

Whether to include outer mesh points and penalisation region in the computation (default: false)

logical, intent(in), optional :: sum_over_planes

Whether to sum over all planes (default: true)

Return Value real(kind=gp)


Subroutines

public subroutine interpolate_lineout(mesh, n_points, int_order, x_coords, y_coords, u_in, u_out)

Compute interpolation along a lineout within poloidal plane

Arguments

Type IntentOptional Attributes Name
type(mesh_cart_t), intent(in) :: mesh

Mesh within poloidal plane

integer, intent(in) :: n_points

Number of points in lineout to interpolate

integer, intent(in) :: int_order

Interpolation order

real(kind=GP), intent(in), dimension(n_points) :: x_coords

x-coordinates of lineout points to interpolate

real(kind=GP), intent(in), dimension(n_points) :: y_coords

y-coordinates of lineout points to interpolate

real(kind=GP), intent(in), dimension(mesh%get_n_points()) :: u_in

Input data given on entire plane

real(kind=GP), intent(out), dimension(n_points) :: u_out

Interpolated values on the lineout points