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 testPlot
type(testN_t)::test
real(wp),dimension(:),allocatable::x,y
real(wp),dimension(:,:),allocatable::f
integer::N,i,j
real(wp),dimension(:),allocatable::xm
N = 100
x = linspace(0.0_wp,7.0_wp,N)
y = linspace(0.0_wp,7.0_wp,N)
allocate( f(N,N) )
do j=1,N
do i=1,N
f(i,j) = test%eval([ x(i) , y(j) ])
end do
end do
call setup(fileName='testsOptimize-%n.svg',figSize=[400,350])
kLog = 1
xm = test%steepestDescent([5.0_wp,5.0_wp])
call figure()
call subplot(1,1,1,aspect=span(y)/span(x))
call xylim(mixval(x),mixval(y))
call contourf(x,y,f,30)
call plot(xLog(:kLog-1,1),xLog(:kLog-1,2),lineStyle='-',markStyle='x',markColor='k')
call colorbar2(f,30)
call ticks()
call labels('x','y','Steepest Descent ['//intToChar(kLog-1)//']')
kLog = 1
xm = test%minNewton([5.0_wp,5.0_wp])
call figure()
call subplot(1,1,1,aspect=span(y)/span(x))
call xylim(mixval(x),mixval(y))
call contourf(x,y,f,30)
call plot(xLog(:kLog-1,1),xLog(:kLog-1,2),lineStyle='-',markStyle='x',markColor='k')
call colorbar2(f,30)
call ticks()
call labels('x','y','Newton-Raphson ['//intToChar(kLog-1)//']')
kLog = 1
xm = test%nelderMead([5.0_wp,5.0_wp])
call figure()
call subplot(1,1,1,aspect=span(y)/span(x))
call xylim(mixval(x),mixval(y))
call contourf(x,y,f,30)
call plot(xLog(:kLog-1,1),xLog(:kLog-1,2),lineStyle='-',markStyle='x',markColor='k')
call colorbar2(f,30)
call ticks()
call labels('x','y','Nelder-Mead Simplex ['//intToChar(kLog-1)//']')
call show()
end subroutine testPlot