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.
Source Code
function brent(obj,xmin,xmax,label)result(x)class(brent_t),intent(in)::objreal(dp),intent(in)::xmin,xmaxcharacter(*),intent(in)::labelreal(dp)::xreal(dp)::fmin,fmaxfmin=obj%f(xmin)fmax=obj%f(xmax)if(fmin*fmax>0.0_dp)then call set_error(label//': no sign change on bracket, cannot solve')x=ieee_value(x,ieee_quiet_nan)return endifx=zero(obj,xmin,xmax,Brent_MachEps,Brent_Tol)if(abs(obj%f(x))>Brent_ResidTol.or.x<xmin.or.x>xmax)then call set_error(label//': Brent solve failed to converge')x=ieee_value(x,ieee_quiet_nan)endifend function brent