create_map_matrix Interface

interface
public module subroutine create_map_matrix(map_matrix, comm, equi, mesh_base, mesh_target, phi_direction, intorder, xorder, flux_box_surface_integral, use_fixed_stencil, use_gauss_quadrature, only_first_field_period, n_turns, dbgout, arclength_array, only_inner_points)

Arguments

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

Created map matrix

integer, intent(in) :: comm

MPI communicator used for parallel creation of the map matrix

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

Equilibrium

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

Base mesh where mapping starts

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

Target mesh where map matrix ends

integer, intent(in) :: phi_direction

Option whose sign determines whether the mapping should procede from base to target in the positive or negative phi direction

integer, intent(in) :: intorder

Interpolation order of the map matrix

integer, intent(in), optional :: xorder

Subcell splitting for flux-box integration 2^(xorder) Default xorder = 0 Advanced topic, see: GRILLIX documentation, section 7.1.4

logical, intent(in), optional :: flux_box_surface_integral

Indicates if ... point interpolation (default = false) ... or flux box surface integral is used (true) Advanced topic, see: GRILLIX documentation, section 7.1.4

logical, intent(in), optional :: use_fixed_stencil

Indicates interpolation method for the mapped quadrature points: ... if false (default), the interpolation stencil is chosen individually for each mapped quadrature point ... if true, the interpolation stencil is fixed as the mapped midpoint's stencil

logical, intent(in), optional :: use_gauss_quadrature

Indicates quadrature formula for mapped integral ... if false (default), uniform mapped midpoint quadrature ... if true, mapped tensor Gauss-Legendre quadrature

logical, intent(in), optional :: only_first_field_period

Create a map matrix for simulations in only the first field period of a 3D equilibrium

integer, intent(in), optional :: n_turns

Add additional turns to the difference in toroidal angle between mesh_base and mesh_target, default 0. Note that the sign is determined by phi_direction, and only the absolute value of n_turns is used.

integer, intent(in), optional :: dbgout

Specifies the number of information printed on screen. 0 represents no output, 1 minimal output, 2 debug output and 3 debug output by every MPI process

real(kind=FP), intent(out), optional, dimension(mesh_base%get_n_points()) :: arclength_array

Length of the field lines traced from the points of mesh_base to mesh_target. Only valid if xorder = 0, i.e. if the trace starts from the mesh points themselves and not from subcells.

logical, intent(in), optional :: only_inner_points

Compute the mapping only on inner mesh_base points. The map matrix (and the arclength array, if given) for boundary and ghost points will return zero.

Description

Creates map matrix for the parallel operators mapping from mesh_base to mesh_target. The resulting map_matrix can be used to compute umap = u(x_target, y_target, phi_target), where [x,y,phi]_target is map point in mesh_target.