Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s | |||
real(kind=wp), | intent(in), | dimension(2) | :: | r |
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 doFunction(s,r)
character(*),intent(in)::s
real(wp),dimension(2),intent(in)::r
integer,parameter::N = 150
type(function_t)::f
real(wp),dimension(N)::x,y
integer::k
f = function_t(s)
write(*,*) f%str
x = linspace(r(1),r(2),N)
do k=1,N
y(k) = f%eval([x(k)])
end do
call figure()
call subplot(1,1,1,aspect=span(y)/span(x))
call xylim(mixval(x),mixval(y)+0.05_wp*[-1.0_wp,1.0_wp*span(y)])
call plot(x,y,lineColor='r',lineWidth=2.0_wp)
call ticks()
call labels('x','y',s)
end subroutine doFunction