Test linspace to verify operation
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine testLinspace
!! Test linspace to verify operation
logical,dimension(1)::results
real(wp),dimension(:),allocatable::x,y
integer::N,k
N = 100
x = linspace(0.0_wp,1.0_wp,N)
y = [( real(k-1,wp)/real(N-1,wp) , k=1,N )]
results(1) = norm2(x-y)<1.0E-10_wp
if( .not.all(results) ) error stop "Failed linspace check"
end subroutine testLinspace