0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_utils::linspace Interface Reference

Evenly spaced numbers in interval. More...

Public Member Functions

integer(i4) function, dimension(nstep) linspace_i4 (lower, upper, nstep)
 
integer(i8) function, dimension(nstep) linspace_i8 (lower, upper, nstep)
 
real(dp) function, dimension(nstep) linspace_dp (lower, upper, nstep)
 
real(sp) function, dimension(nstep) linspace_sp (lower, upper, nstep)
 

Detailed Description

Evenly spaced numbers in interval.

Return N evenly spaced numbers over a specified interval [lower,upper].

\[ linspace(lower,upper,N) = lower + arange(0,N-1)/(N-1) * (upper-lower) \]

Output array has kind of lower.

Example

rr = linspace(1.0_dp,11._dp,101)

-> see also example in test directory

Parameters
[in]integer(i4/i8)/real(sp/dp) :: lowerStart of interval.
[in]integer(i4/i8)/real(sp/dp) :: upperEnd of interval.
[in]integer(i4) :: nstepNumber of steps.
Returns
kind(lower) :: linspace(N) — 1D array with evenly spaced numbers between lower and upper.
Authors
Matthias Cuntz
Date
Jun 2016

Definition at line 178 of file mo_utils.F90.

Member Function/Subroutine Documentation

◆ linspace_dp()

real(dp) function, dimension(nstep) mo_utils::linspace::linspace_dp ( real(dp), intent(in)  lower,
real(dp), intent(in)  upper,
integer(i4), intent(in)  nstep 
)

Definition at line 908 of file mo_utils.F90.

◆ linspace_i4()

integer(i4) function, dimension(nstep) mo_utils::linspace::linspace_i4 ( integer(i4), intent(in)  lower,
integer(i4), intent(in)  upper,
integer(i4), intent(in)  nstep 
)

Definition at line 882 of file mo_utils.F90.

◆ linspace_i8()

integer(i8) function, dimension(nstep) mo_utils::linspace::linspace_i8 ( integer(i8), intent(in)  lower,
integer(i8), intent(in)  upper,
integer(i4), intent(in)  nstep 
)

Definition at line 895 of file mo_utils.F90.

◆ linspace_sp()

real(sp) function, dimension(nstep) mo_utils::linspace::linspace_sp ( real(sp), intent(in)  lower,
real(sp), intent(in)  upper,
integer(i4), intent(in)  nstep 
)

Definition at line 921 of file mo_utils.F90.


The documentation for this interface was generated from the following file: