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.
Source Code
function d_trapz_ab_func(f,a,b,N)result(int)interface function f(x)real(8)::xreal(8)::fend function fend interfacereal(8),optional::a,binteger,optional::Nreal(8)::dh,a_,b_integer::L,ireal(8),dimension(:),allocatable::xxreal(8)::intL=100;if(present(N))L=Na_=0d0;if(present(a))a_=ab_=1d0;if(present(b))b_=b!int=0d0allocate(xx(L))xx=linspace(a_,b_,L,mesh=dh)do i=1,L-1int=int+(f(xx(i+1))+f(xx(i)))enddoint=int*dh/2d0deallocate(xx)end function d_trapz_ab_func