compute_drift_flux Subroutine

public subroutine compute_drift_flux(equi, equi_storage, mesh, dphi, polygon, u, drift_flux, v)

Computes fluxes due to drift through a toroidally extended polygon \int_S v * (B/B^2 \times \nabla u) dS The integrand can be expressed via a derivative along the polygon \int v * 1/Btor du/dl J dl dphi where l measures the length along the polygon $omp parallel default(none) & $omp private(iseg, ks, ks_glob, l, lfwd, x, y, xfwd, yfwd, & $omp jac_av, btor_av, v_av) & $omp shared(equi, equi_storage, mesh, dphi, polygon, phi, nexclude_last, & $omp u, v, drift_flux) $omp do $omp end do $omp end parallel

Arguments

Type IntentOptional Attributes Name
class(equilibrium_t), intent(in) :: equi

Equilibrium

type(equilibrium_storage_t), intent(in) :: equi_storage

Equilibrium on mesh

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

Mesh

real(kind=GP), intent(in) :: dphi

Toroidal extent of surface

type(polygon_in_mesh_t), intent(in) :: polygon

Polygon

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

Field

real(kind=GP), intent(out), dimension(polygon%get_np_total()) :: drift_flux

Drift flux through boundary in between polygon points This quantity is difficult to interpret, use the getter routines ... to compute the local or integrated fluxes

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

Optional field, default values 1


Contents