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.
FUNCTION IntBesselK(a,b)REAL(rp),INTENT(IN)::aREAL(rp),INTENT(IN)::bREAL(rp)::IntBesselKREAL(rp)::IoldREAL(rp)::InewREAL(rp)::rerrREAL(rp)::sum_fREAL(rp)::v,h,zINTEGER::ii,jj,npointsLOGICAL::flagv=5.0_rp/3.0_rph=b-asum_f=0.5*(besselk(v,a)+besselk(v,b))Iold=0.0_rpInew=sum_f*hii=1_idefflag=.TRUE.do while(flag)Iold=Inewii=ii+1_idefnpoints=2_idef**(ii-2_idef)h=0.5_rp*(b-a)/REAL(npoints,rp)sum_f=0.0_rpdo jj=1_idef,npointsz=a+h+2.0_rp*(REAL(jj,rp)-1.0_rp)*hsum_f=sum_f+besselk(v,z)end doInew=0.5_rp*Iold+sum_f*hrerr=ABS((Inew-Iold)/Iold)flag=.NOT.(rerr.LT.Tol)end doIntBesselK=InewEND FUNCTION IntBesselK