Test meshGridX and meshGridY 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 testMeshGrid
!! Test meshGridX and meshGridY to verify operation
logical,dimension(6)::results
real(wp),dimension(:),allocatable::x,y
real(wp),dimension(:,:),allocatable::XX,YY
integer::N,M
N = 5
M = 6
x = linspace(0.0_wp,1.0_wp,N)
y = linspace(0.0_wp,1.0_wp,M)
XX = meshGridX(x,y)
YY = meshGridY(x,y)
results(1) = all(XX(:,1)==x)
results(2) = all(YY(1,:)==y)
results(3) = all(XX(:,1)==XX(:,M))
results(4) = all(YY(1,:)==YY(N,:))
results(5) = all(shape(XX)==[N,M])
results(6) = all(shape(YY)==[N,M])
if( .not.all(results) ) error stop "Failed linspace check"
end subroutine testMeshGrid