array_generation_m Module

Contains functions which create arrays


Uses

  • module~~array_generation_m~~UsesGraph module~array_generation_m array_generation_m module~precision_m precision_m module~array_generation_m->module~precision_m iso_c_binding iso_c_binding module~precision_m->iso_c_binding iso_fortran_env iso_fortran_env module~precision_m->iso_fortran_env mpi mpi module~precision_m->mpi netcdf netcdf module~precision_m->netcdf

Used by

  • module~~array_generation_m~~UsedByGraph module~array_generation_m array_generation_m module~dommaschk_equilibrium_netcdf_s dommaschk_equilibrium_netcdf_s module~dommaschk_equilibrium_netcdf_s->module~array_generation_m program~diagnose_poincare diagnose_poincare program~diagnose_poincare->module~array_generation_m

Functions

public function linspace(left, right, npoints, endpoint, stagger) result(points)

Returns an array of evenly spaced points over an interval from left to right. The endpoints on both sides can optionally be included. Optionally staggering can be used which effectively shifts all points by half the grid spacing to the right, creating a staggered grid. In that case the rightmost point will exceed the right boundary specified.

Arguments

Type IntentOptional Attributes Name
real(kind=FP), intent(in) :: left

Starting point (from)

real(kind=FP), intent(in) :: right

Ending point (to)

integer, intent(in) :: npoints

Number of points. Should be >1, for =1 the left point is returned.

logical, intent(in), optional :: endpoint

If true, the endpoint is included in the points (default = false)

logical, intent(in), optional :: stagger

If true, points are staggered (default = false)

Return Value real(kind=FP), dimension(npoints)

Array of points generated (output)