Test colorMap 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 testColorMap
!! Test colorMap to verify operation
integer,parameter::N = 11
integer,dimension(N,3),parameter::true = &
& reshape([ 0,1,2,3,4,5,5,5,5,5,5, &
& 0,1,2,3,4,5,4,3,2,1,0, &
& 5,5,5,5,5,5,4,3,2,1,0 ],[N,3])
real(wp),dimension(2),parameter::R = [0.0_wp,1.0_wp]
integer,dimension(N,3)::test
real(wp)::x
integer::k
do k=1,N
x = real(k-1,wp)/real(N-1,wp)
test(k,1:3) = colorMap(x,R)
end do
if( .not.all(true==test) ) error stop "Failed colorMap check"
end subroutine testColorMap