find_zero Subroutine

public subroutine find_zero(a, b, tol, f, iuser, ruser, xzero, ifail)

Finds the zero of function f within interval [a,b] Wrapper for Fortran 77 routine in zeroin.f

Arguments

Type IntentOptional Attributes Name
real(kind=DP), intent(in) :: a

Left limit of interval

real(kind=DP), intent(in) :: b

Right limit of interval

real(kind=DP), intent(in) :: tol

Absolute tolerance of result

class(func_1D_t), intent(in), target :: f

Function f

integer, intent(in), contiguous, target :: iuser(:)

Integer parameters of function f

real(kind=DP), intent(in), contiguous, target :: ruser(:)

Real parameters of function f

real(kind=DP), intent(out) :: xzero

On success: zero of function f

integer, intent(out) :: ifail

On success = 0, otherwise -1